blob: 29ce00c1af553fc23b21bbbb109df116c35873b8 [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
8990 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 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +00008998 AIX/5)
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 ;;
Antoine Pitroub41947b2010-08-30 14:55:30 +00009002 AIX/6)
9003$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
9004
9005 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009006 esac
9007
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9009$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009010 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009011 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009013 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009014 ac_cv_pthread_system_supported=no
9015else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009017/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009018#include <pthread.h>
9019 void *foo(void *parm) {
9020 return NULL;
9021 }
9022 main() {
9023 pthread_attr_t attr;
9024 pthread_t id;
9025 if (pthread_attr_init(&attr)) exit(-1);
9026 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9027 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9028 exit(0);
9029 }
9030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009032 ac_cv_pthread_system_supported=yes
9033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009034 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009035fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009038fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009039
Martin v. Löwiseba40652007-08-30 20:10:57 +00009040
Guido van Rossum627b2d71993-12-24 10:39:16 +00009041fi
9042
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9044$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009045 if test "$ac_cv_pthread_system_supported" = "yes"; then
9046
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009047$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009048
9049 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009050 for ac_func in pthread_sigmask
9051do :
9052 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009053if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009054 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009055#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009056_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009057 case $ac_sys_system in
9058 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009059
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009060$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009061
9062 ;;
9063 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009064fi
9065done
9066
9067fi
9068
9069
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009070# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009071
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9073$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009074# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009075if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009076 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009077 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9079$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009080 ipv6=no
9081 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009082 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9083$as_echo "yes" >&6; }
9084 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085
9086 ipv6=yes
9087 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009089else
Martin v. Löwis11437992002-04-12 09:54:03 +00009090
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009091 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009092
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9094$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009095 ipv6=no
9096
9097else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009099/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009100 /* AF_INET6 available check */
9101#include <sys/types.h>
9102#include <sys/socket.h>
9103main()
9104{
9105 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9106 exit(1);
9107 else
9108 exit(0);
9109}
9110
Martin v. Löwis11437992002-04-12 09:54:03 +00009111_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009112if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009113
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9115$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009116 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009117
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009118else
Matthias Klosec511b472010-05-08 11:01:39 +00009119
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9121$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009122 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009123
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009124fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9126 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009127fi
9128
Martin v. Löwiseba40652007-08-30 20:10:57 +00009129
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009130if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9132$as_echo_n "checking if RFC2553 API is available... " >&6; }
9133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009134/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009135
9136 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009137#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009138int
9139main ()
9140{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009141struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009142 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009143 ;
9144 return 0;
9145}
Matthias Klosec511b472010-05-08 11:01:39 +00009146
Martin v. Löwis11437992002-04-12 09:54:03 +00009147_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009148if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009149
9150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009151$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009152 ipv6=yes
9153
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009154else
Matthias Klosec511b472010-05-08 11:01:39 +00009155
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009157$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009158 ipv6=no
9159
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009162fi
9163
9164if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009165 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009166
9167fi
9168
Martin v. Löwiseba40652007-08-30 20:10:57 +00009169fi
9170
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009171
9172ipv6type=unknown
9173ipv6lib=none
9174ipv6trylibc=no
9175
9176if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9178$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009179 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9180 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009181 case $i in
9182 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009184/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009185
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009186#include <netinet/in.h>
9187#ifdef IPV6_INRIA_VERSION
9188yes
9189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009190_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009192 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009193 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009194fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009195rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009196
9197 ;;
9198 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009200/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009201
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009202#include <netinet/in.h>
9203#ifdef __KAME__
9204yes
9205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009206_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009208 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009209 ipv6type=$i;
9210 ipv6lib=inet6
9211 ipv6libdir=/usr/local/v6/lib
9212 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009213fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009214rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009215
9216 ;;
9217 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009219/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009220
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009221#include <features.h>
9222#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9223yes
9224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009225_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009226if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009227 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009228 ipv6type=$i;
9229 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009230fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009231rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009232
9233 ;;
9234 linux-inet6)
9235 if test -d /usr/inet6; then
9236 ipv6type=$i
9237 ipv6lib=inet6
9238 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009239 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009240 fi
9241 ;;
9242 solaris)
9243 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009244 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009245 ipv6type=$i
9246 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009247 fi
9248 fi
9249 ;;
9250 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009252/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009253
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009254#include <sys/param.h>
9255#ifdef _TOSHIBA_INET6
9256yes
9257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009258_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009259if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009260 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009261 ipv6type=$i;
9262 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009263 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009264fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009265rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009266
9267 ;;
9268 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009270/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009271
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009272#include </usr/local/v6/include/sys/v6config.h>
9273#ifdef __V6D__
9274yes
9275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009276_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009278 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009279 ipv6type=$i;
9280 ipv6lib=v6;
9281 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009282 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009283fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009284rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009285
9286 ;;
9287 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009289/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009290
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009291#include <sys/param.h>
9292#ifdef _ZETA_MINAMI_INET6
9293yes
9294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009295_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009296if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009297 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009298 ipv6type=$i;
9299 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009300 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009301fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009302rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009303
9304 ;;
9305 esac
9306 if test "$ipv6type" != "unknown"; then
9307 break
9308 fi
9309 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9311$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009312fi
9313
9314if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9315 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9316 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9317 echo "using lib$ipv6lib"
9318 else
9319 if test $ipv6trylibc = "yes"; then
9320 echo "using libc"
9321 else
9322 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9323 echo "You need to fetch lib$ipv6lib.a from appropriate"
9324 echo 'ipv6 kit and compile beforehand.'
9325 exit 1
9326 fi
9327 fi
9328fi
9329
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9331$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009333/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009334
9335 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009336int
9337main ()
9338{
9339FSIORefNum fRef = 0
9340 ;
9341 return 0;
9342}
Mark Dickinson0712b562010-05-08 19:13:21 +00009343
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009344_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009345if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009346
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009347
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009348$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009349
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9351$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009352
Mark Dickinson0712b562010-05-08 19:13:21 +00009353else
9354
9355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9356$as_echo "no" >&6; }
9357
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009358fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9360
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009361# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9363$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009364
Martin v. Löwiseba40652007-08-30 20:10:57 +00009365# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009366if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009367 withval=$with_doc_strings;
9368fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009369
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009370
9371if test -z "$with_doc_strings"
9372then with_doc_strings="yes"
9373fi
9374if test "$with_doc_strings" != "no"
9375then
9376
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009377$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009378
9379fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9381$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009382
Neil Schemenauera35c6882001-02-27 04:45:05 +00009383# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9385$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009386
Martin v. Löwiseba40652007-08-30 20:10:57 +00009387# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009388if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009389 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009390if test "$withval" != no
9391then
9392
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009393$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009394
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9396$as_echo "yes" >&6; }
9397else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9398$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009399fi
9400else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9402$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403fi
9404
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009405
9406# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9408$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009409
Martin v. Löwiseba40652007-08-30 20:10:57 +00009410# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009411if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009412 withval=$with_pymalloc;
9413fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009414
Neil Schemenauera35c6882001-02-27 04:45:05 +00009415
Neil Schemenauer16c22972002-03-22 15:34:49 +00009416if test -z "$with_pymalloc"
9417then with_pymalloc="yes"
9418fi
9419if test "$with_pymalloc" != "no"
9420then
Martin v. Löwis11437992002-04-12 09:54:03 +00009421
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009422$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009423
9424fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9426$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009427
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009428# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9430$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009431
9432# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009433if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009434 withval=$with_valgrind;
9435else
9436 with_valgrind=no
9437fi
9438
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9440$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009441if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009442 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 +00009443if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009444
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009445$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009446
9447else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009448 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009449
9450fi
9451
9452
9453fi
9454
Barry Warsawef82cd72000-06-30 16:21:01 +00009455# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9457$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009458
Martin v. Löwiseba40652007-08-30 20:10:57 +00009459# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009460if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009461 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009462if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009463then
9464
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009465$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9468$as_echo "yes" >&6; }
9469else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9470$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009471fi
9472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9474$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475fi
9476
Barry Warsawef82cd72000-06-30 16:21:01 +00009477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009478# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009479
Guido van Rossum98935bf2001-09-05 19:13:16 +00009480DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009481
Guido van Rossume97ee181999-12-20 21:27:22 +00009482# the dlopen() function means we might want to use dynload_shlib.o. some
9483# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009484for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009485do :
9486 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009487if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009490_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009491
Guido van Rossume97ee181999-12-20 21:27:22 +00009492fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009493done
Guido van Rossume97ee181999-12-20 21:27:22 +00009494
Michael W. Hudson54241132001-12-07 15:38:26 +00009495
Guido van Rossume97ee181999-12-20 21:27:22 +00009496# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9497# loading of modules.
9498
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9500$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009501if test -z "$DYNLOADFILE"
9502then
9503 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009504 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9505 if test "$ac_cv_func_dlopen" = yes
9506 then DYNLOADFILE="dynload_shlib.o"
9507 else DYNLOADFILE="dynload_aix.o"
9508 fi
9509 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009510 BeOS*) DYNLOADFILE="dynload_beos.o";;
9511 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009512 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9513 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009514 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009515 *)
9516 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9517 # out any dynamic loading
9518 if test "$ac_cv_func_dlopen" = yes
9519 then DYNLOADFILE="dynload_shlib.o"
9520 else DYNLOADFILE="dynload_stub.o"
9521 fi
9522 ;;
9523 esac
9524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9526$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009527if test "$DYNLOADFILE" != "dynload_stub.o"
9528then
Martin v. Löwis11437992002-04-12 09:54:03 +00009529
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009530$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009531
9532fi
9533
Neil Schemenauer4e425612001-06-19 15:44:15 +00009534# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9535
Michael W. Hudson54241132001-12-07 15:38:26 +00009536
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9538$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009539if test -z "$MACHDEP_OBJS"
9540then
Jack Jansene578a632001-08-15 01:27:14 +00009541 MACHDEP_OBJS=$extra_machdep_objs
9542else
9543 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009544fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9546$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009547
Guido van Rossum627b2d71993-12-24 10:39:16 +00009548# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009549for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9550 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009551 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009552 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009553 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009554 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009555 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009556 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9557 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009558 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009559 setlocale setregid setreuid setresuid setresgid \
9560 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009561 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009562 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009563 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009564do :
9565 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9566ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009567if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009569#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009570_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009571
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009572fi
9573done
9574
Michael W. Hudson54241132001-12-07 15:38:26 +00009575
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009576# For some functions, having a definition is not sufficient, since
9577# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9579$as_echo_n "checking for chroot... " >&6; }
9580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009581/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009582#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009583int
9584main ()
9585{
9586void *x=chroot
9587 ;
9588 return 0;
9589}
9590_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009592
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009593$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009594
Matthias Klosec511b472010-05-08 11:01:39 +00009595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009596$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9599$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009600
9601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9604$as_echo_n "checking for link... " >&6; }
9605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009606/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009607#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009608int
9609main ()
9610{
9611void *x=link
9612 ;
9613 return 0;
9614}
9615_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009617
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009618$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009619
Matthias Klosec511b472010-05-08 11:01:39 +00009620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009621$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009622else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9624$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009625
9626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9629$as_echo_n "checking for symlink... " >&6; }
9630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009631/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009632#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009633int
9634main ()
9635{
9636void *x=symlink
9637 ;
9638 return 0;
9639}
9640_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009641if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009642
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009643$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009644
Matthias Klosec511b472010-05-08 11:01:39 +00009645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009646$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9649$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009650
9651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9654$as_echo_n "checking for fchdir... " >&6; }
9655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009656/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009657#include <unistd.h>
9658int
9659main ()
9660{
9661void *x=fchdir
9662 ;
9663 return 0;
9664}
9665_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009666if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009667
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009669
Matthias Klosec511b472010-05-08 11:01:39 +00009670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009671$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009672else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9674$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009675
9676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9679$as_echo_n "checking for fsync... " >&6; }
9680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009681/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009682#include <unistd.h>
9683int
9684main ()
9685{
9686void *x=fsync
9687 ;
9688 return 0;
9689}
9690_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009692
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009693$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009694
Matthias Klosec511b472010-05-08 11:01:39 +00009695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009696$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009697else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9699$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009700
9701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9704$as_echo_n "checking for fdatasync... " >&6; }
9705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009706/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009707#include <unistd.h>
9708int
9709main ()
9710{
9711void *x=fdatasync
9712 ;
9713 return 0;
9714}
9715_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009716if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009717
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009718$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009719
Matthias Klosec511b472010-05-08 11:01:39 +00009720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009721$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9724$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009725
9726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9729$as_echo_n "checking for epoll... " >&6; }
9730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009731/* end confdefs.h. */
9732#include <sys/epoll.h>
9733int
9734main ()
9735{
9736void *x=epoll_create
9737 ;
9738 return 0;
9739}
9740_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009741if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009742
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009743$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009744
Matthias Klosec511b472010-05-08 11:01:39 +00009745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009746$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009747else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9749$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009750
9751fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9754$as_echo_n "checking for kqueue... " >&6; }
9755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009756/* end confdefs.h. */
9757
9758#include <sys/types.h>
9759#include <sys/event.h>
9760
9761int
9762main ()
9763{
9764int x=kqueue()
9765 ;
9766 return 0;
9767}
9768_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009769if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009770
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009771$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009772
Matthias Klosec511b472010-05-08 11:01:39 +00009773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009774$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009775else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9777$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009778
9779fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009781# On some systems (eg. FreeBSD 5), we would find a definition of the
9782# functions ctermid_r, setgroups in the library, but no prototype
9783# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9784# address to avoid compiler warnings and potential miscompilations
9785# because of the missing prototypes.
9786
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9788$as_echo_n "checking for ctermid_r... " >&6; }
9789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009790/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009791
Martin v. Löwisd5843682002-11-21 20:41:28 +00009792#include <stdio.h>
9793
Martin v. Löwisd5843682002-11-21 20:41:28 +00009794int
9795main ()
9796{
9797void* p = ctermid_r
9798 ;
9799 return 0;
9800}
9801_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009802if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009803
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009804$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009805
Matthias Klosec511b472010-05-08 11:01:39 +00009806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009807$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9810$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009811
9812fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9814
Antoine Pitroub170f172010-09-10 18:47:36 +00009815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9816$as_echo_n "checking for flock declaration... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009817if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009818 $as_echo_n "(cached) " >&6
9819else
9820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009821/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009822#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009823int
9824main ()
9825{
9826void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009827
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009828 ;
9829 return 0;
9830}
9831_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009832if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009833 ac_cv_flock_decl=yes
9834else
9835 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009836
9837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009839
Antoine Pitroub170f172010-09-10 18:47:36 +00009840fi
9841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9842$as_echo "$ac_cv_flock_decl" >&6; }
9843if test "x${ac_cv_flock_decl}" = xyes; then
9844 for ac_func in flock
9845do :
9846 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009847if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009848 cat >>confdefs.h <<_ACEOF
9849#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009850_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009851
Antoine Pitrou85729812010-09-07 14:55:24 +00009852else
Antoine Pitroub170f172010-09-10 18:47:36 +00009853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009854$as_echo_n "checking for flock in -lbsd... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009855if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009856 $as_echo_n "(cached) " >&6
9857else
9858 ac_check_lib_save_LIBS=$LIBS
9859LIBS="-lbsd $LIBS"
9860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9861/* end confdefs.h. */
9862
9863/* Override any GCC internal prototype to avoid an error.
9864 Use char because int might match the return type of a GCC
9865 builtin and then its argument prototype would still apply. */
9866#ifdef __cplusplus
9867extern "C"
9868#endif
9869char flock ();
9870int
9871main ()
9872{
9873return flock ();
9874 ;
9875 return 0;
9876}
9877_ACEOF
9878if ac_fn_c_try_link "$LINENO"; then :
9879 ac_cv_lib_bsd_flock=yes
9880else
9881 ac_cv_lib_bsd_flock=no
9882fi
9883rm -f core conftest.err conftest.$ac_objext \
9884 conftest$ac_exeext conftest.$ac_ext
9885LIBS=$ac_check_lib_save_LIBS
9886fi
9887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9888$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009889if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009890 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009891
9892
9893$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9894
9895
9896fi
9897
9898
9899fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009900done
9901
Antoine Pitrou85729812010-09-07 14:55:24 +00009902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009903
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9905$as_echo_n "checking for getpagesize... " >&6; }
9906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009907/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009908
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009909#include <unistd.h>
9910
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009911int
9912main ()
9913{
9914void* p = getpagesize
9915 ;
9916 return 0;
9917}
9918_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009919if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009920
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009921$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009922
Matthias Klosec511b472010-05-08 11:01:39 +00009923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009924$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9927$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009928
9929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009931
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009932for ac_prog in true
9933do
9934 # Extract the first word of "$ac_prog", so it can be a program name with args.
9935set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9937$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009938if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009939 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009940else
9941 if test -n "$TRUE"; then
9942 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9943else
9944as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9945for as_dir in $PATH
9946do
9947 IFS=$as_save_IFS
9948 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009949 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00009950 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 +00009951 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009952 $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 +00009953 break 2
9954 fi
9955done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009956 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00009957IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009958
9959fi
9960fi
9961TRUE=$ac_cv_prog_TRUE
9962if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9964$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009965else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9967$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009968fi
9969
Martin v. Löwiseba40652007-08-30 20:10:57 +00009970
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009971 test -n "$TRUE" && break
9972done
9973test -n "$TRUE" || TRUE="/bin/true"
9974
9975
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9977$as_echo_n "checking for inet_aton in -lc... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009978if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009979 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009980else
9981 ac_check_lib_save_LIBS=$LIBS
9982LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009984/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009985
Martin v. Löwiseba40652007-08-30 20:10:57 +00009986/* Override any GCC internal prototype to avoid an error.
9987 Use char because int might match the return type of a GCC
9988 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009989#ifdef __cplusplus
9990extern "C"
9991#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009992char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009993int
9994main ()
9995{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009996return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009997 ;
9998 return 0;
9999}
10000_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010001if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010002 ac_cv_lib_c_inet_aton=yes
10003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010004 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010005fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010006rm -f core conftest.err conftest.$ac_objext \
10007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010008LIBS=$ac_check_lib_save_LIBS
10009fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10011$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010012if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010013 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010014else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10016$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010017if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010018 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010019else
10020 ac_check_lib_save_LIBS=$LIBS
10021LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010023/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010024
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025/* Override any GCC internal prototype to avoid an error.
10026 Use char because int might match the return type of a GCC
10027 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010028#ifdef __cplusplus
10029extern "C"
10030#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010031char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010032int
10033main ()
10034{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010035return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010036 ;
10037 return 0;
10038}
10039_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010040if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010041 ac_cv_lib_resolv_inet_aton=yes
10042else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010043 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010044fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010045rm -f core conftest.err conftest.$ac_objext \
10046 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010047LIBS=$ac_check_lib_save_LIBS
10048fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10050$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010051if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010052 cat >>confdefs.h <<_ACEOF
10053#define HAVE_LIBRESOLV 1
10054_ACEOF
10055
10056 LIBS="-lresolv $LIBS"
10057
10058fi
10059
10060
10061fi
10062
10063
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010064# On Tru64, chflags seems to be present, but calling it will
10065# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10067$as_echo_n "checking for chflags... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010068if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010069 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010071 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010072 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010075/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000010076[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010077#include <sys/stat.h>
10078#include <unistd.h>
10079int main(int argc, char*argv[])
10080{
10081 if(chflags(argv[0], 0) != 0)
10082 return 1;
10083 return 0;
10084}
Gregory P. Smith49437c22009-11-02 01:38:35 +000010085]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010086_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010087if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010088 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010089else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010090 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010091fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10093 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010094fi
10095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010096
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10099$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010100if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010101 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010102if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010103 ac_cv_have_chflags="yes"
10104else
10105 ac_cv_have_chflags="no"
10106fi
10107
10108fi
10109if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010110
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010111$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010112
10113fi
10114
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10116$as_echo_n "checking for lchflags... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010117if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010118 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010120 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010121 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010122else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010124/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000010125[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010126#include <sys/stat.h>
10127#include <unistd.h>
10128int main(int argc, char*argv[])
10129{
10130 if(lchflags(argv[0], 0) != 0)
10131 return 1;
10132 return 0;
10133}
Gregory P. Smith49437c22009-11-02 01:38:35 +000010134]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010135_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010136if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010137 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010139 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10142 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010143fi
10144
10145
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010146fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10148$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010149if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010150 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010151if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010152 ac_cv_have_lchflags="yes"
10153else
10154 ac_cv_have_lchflags="no"
10155fi
10156
10157fi
10158if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010160$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010161
10162fi
10163
Ronald Oussorenf8752642006-07-06 10:13:35 +000010164case $ac_sys_system/$ac_sys_release in
10165Darwin/*)
10166 _CUR_CFLAGS="${CFLAGS}"
10167 _CUR_LDFLAGS="${LDFLAGS}"
10168 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10169 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10170 ;;
10171esac
10172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10174$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010175if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010176 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010177else
10178 ac_check_lib_save_LIBS=$LIBS
10179LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010181/* end confdefs.h. */
10182
Martin v. Löwiseba40652007-08-30 20:10:57 +000010183/* Override any GCC internal prototype to avoid an error.
10184 Use char because int might match the return type of a GCC
10185 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010186#ifdef __cplusplus
10187extern "C"
10188#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010189char inflateCopy ();
10190int
10191main ()
10192{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010193return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010194 ;
10195 return 0;
10196}
10197_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010198if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010199 ac_cv_lib_z_inflateCopy=yes
10200else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010201 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010202fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010203rm -f core conftest.err conftest.$ac_objext \
10204 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010205LIBS=$ac_check_lib_save_LIBS
10206fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10208$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010209if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010211$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010212
10213fi
10214
10215
Ronald Oussorenf8752642006-07-06 10:13:35 +000010216case $ac_sys_system/$ac_sys_release in
10217Darwin/*)
10218 CFLAGS="${_CUR_CFLAGS}"
10219 LDFLAGS="${_CUR_LDFLAGS}"
10220 ;;
10221esac
10222
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10224$as_echo_n "checking for hstrerror... " >&6; }
10225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010226/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010227
Martin v. Löwise9416172003-05-03 10:12:45 +000010228#include <netdb.h>
10229
Martin v. Löwise9416172003-05-03 10:12:45 +000010230int
10231main ()
10232{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010233void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010234 ;
10235 return 0;
10236}
10237_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010238if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010240$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010241
Matthias Klosec511b472010-05-08 11:01:39 +000010242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010243$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010244else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10246$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010247
10248fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010249rm -f core conftest.err conftest.$ac_objext \
10250 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010251
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10253$as_echo_n "checking for inet_aton... " >&6; }
10254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010255/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010256
Martin v. Löwis86d66262006-02-17 08:40:11 +000010257#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010258#include <sys/socket.h>
10259#include <netinet/in.h>
10260#include <arpa/inet.h>
10261
Martin v. Löwise9416172003-05-03 10:12:45 +000010262int
10263main ()
10264{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010265void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010266 ;
10267 return 0;
10268}
10269_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010270if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010271
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010272$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010273
Matthias Klosec511b472010-05-08 11:01:39 +000010274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010275$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010276else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10278$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010279
10280fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010281rm -f core conftest.err conftest.$ac_objext \
10282 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010283
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10285$as_echo_n "checking for inet_pton... " >&6; }
10286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010287/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010288
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010289#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010290#include <sys/socket.h>
10291#include <netinet/in.h>
10292#include <arpa/inet.h>
10293
Martin v. Löwise9416172003-05-03 10:12:45 +000010294int
10295main ()
10296{
10297void* p = inet_pton
10298 ;
10299 return 0;
10300}
10301_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010302if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010303
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010304$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010305
Matthias Klosec511b472010-05-08 11:01:39 +000010306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010307$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10310$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010311
10312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010314
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010315# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10317$as_echo_n "checking for setgroups... " >&6; }
10318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010319/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010320
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010321#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010322#ifdef HAVE_GRP_H
10323#include <grp.h>
10324#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010325
Martin v. Löwisd5843682002-11-21 20:41:28 +000010326int
10327main ()
10328{
10329void* p = setgroups
10330 ;
10331 return 0;
10332}
10333_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010335
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010336$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010337
Matthias Klosec511b472010-05-08 11:01:39 +000010338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010339$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010340else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10342$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010343
10344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010346
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010347# check for openpty and forkpty
10348
10349for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010350do :
10351 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010352if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010354#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010355_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010356
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10359$as_echo_n "checking for openpty in -lutil... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010360if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010361 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010362else
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010364LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010367
Martin v. Löwiseba40652007-08-30 20:10:57 +000010368/* Override any GCC internal prototype to avoid an error.
10369 Use char because int might match the return type of a GCC
10370 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010371#ifdef __cplusplus
10372extern "C"
10373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010374char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010375int
10376main ()
10377{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010378return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ;
10380 return 0;
10381}
10382_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010383if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010385else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010386 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010387fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010388rm -f core conftest.err conftest.$ac_objext \
10389 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010390LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010391fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10393$as_echo "$ac_cv_lib_util_openpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010394if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010395 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010396 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10399$as_echo_n "checking for openpty in -lbsd... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010400if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010401 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010402else
10403 ac_check_lib_save_LIBS=$LIBS
10404LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010406/* end confdefs.h. */
10407
Martin v. Löwiseba40652007-08-30 20:10:57 +000010408/* Override any GCC internal prototype to avoid an error.
10409 Use char because int might match the return type of a GCC
10410 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010411#ifdef __cplusplus
10412extern "C"
10413#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010414char openpty ();
10415int
10416main ()
10417{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010418return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010419 ;
10420 return 0;
10421}
10422_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010423if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010424 ac_cv_lib_bsd_openpty=yes
10425else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010426 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010427fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010428rm -f core conftest.err conftest.$ac_objext \
10429 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010430LIBS=$ac_check_lib_save_LIBS
10431fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10433$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010434if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010435 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010436 LIBS="$LIBS -lbsd"
10437fi
10438
10439
10440fi
10441
Fred Drake8cef4cf2000-06-28 16:40:38 +000010442
10443fi
10444done
10445
10446for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447do :
10448 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010449if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010450 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010451#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010452_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010453
Fred Drake8cef4cf2000-06-28 16:40:38 +000010454else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10456$as_echo_n "checking for forkpty in -lutil... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010457if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010458 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010459else
Martin v. Löwis11437992002-04-12 09:54:03 +000010460 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010461LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010464
Martin v. Löwiseba40652007-08-30 20:10:57 +000010465/* Override any GCC internal prototype to avoid an error.
10466 Use char because int might match the return type of a GCC
10467 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010468#ifdef __cplusplus
10469extern "C"
10470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010471char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010472int
10473main ()
10474{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010475return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010476 ;
10477 return 0;
10478}
10479_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010480if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010482else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010483 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010485rm -f core conftest.err conftest.$ac_objext \
10486 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010487LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010488fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10490$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010491if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010492 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010493 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010494else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10496$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010497if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010498 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010499else
10500 ac_check_lib_save_LIBS=$LIBS
10501LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010503/* end confdefs.h. */
10504
Martin v. Löwiseba40652007-08-30 20:10:57 +000010505/* Override any GCC internal prototype to avoid an error.
10506 Use char because int might match the return type of a GCC
10507 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010508#ifdef __cplusplus
10509extern "C"
10510#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010511char forkpty ();
10512int
10513main ()
10514{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010515return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010516 ;
10517 return 0;
10518}
10519_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010520if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010521 ac_cv_lib_bsd_forkpty=yes
10522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010523 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010525rm -f core conftest.err conftest.$ac_objext \
10526 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010527LIBS=$ac_check_lib_save_LIBS
10528fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10530$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010531if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010532 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010533 LIBS="$LIBS -lbsd"
10534fi
10535
10536
10537fi
10538
Fred Drake8cef4cf2000-06-28 16:40:38 +000010539
10540fi
10541done
10542
Jack Jansendd19cf82001-12-06 22:36:17 +000010543
Brett Cannonaa5778d2008-03-18 04:09:00 +000010544# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010545for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010546do :
10547 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010548if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010549 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010550#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010551_ACEOF
10552
10553fi
10554done
10555
10556
Michael W. Hudson54241132001-12-07 15:38:26 +000010557# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010558for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010559do :
10560 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10561ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010562if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010564#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010565_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010566
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010567fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010568done
10569
Michael W. Hudson54241132001-12-07 15:38:26 +000010570
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010571ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10572if test "x$ac_cv_func_dup2" = xyes; then :
10573 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010574
Martin v. Löwis1142de32002-03-29 16:28:31 +000010575else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010576 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010577 *" dup2.$ac_objext "* ) ;;
10578 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010579 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010580esac
10581
Martin v. Löwis1142de32002-03-29 16:28:31 +000010582fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010583
10584ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10585if test "x$ac_cv_func_getcwd" = xyes; then :
10586 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10587
10588else
10589 case " $LIBOBJS " in
10590 *" getcwd.$ac_objext "* ) ;;
10591 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10592 ;;
10593esac
10594
10595fi
10596
10597ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10598if test "x$ac_cv_func_strdup" = xyes; then :
10599 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10600
10601else
10602 case " $LIBOBJS " in
10603 *" strdup.$ac_objext "* ) ;;
10604 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10605 ;;
10606esac
10607
10608fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010609
10610
10611for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612do :
10613 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010614if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010615 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010616#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010617_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010619/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010620#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010621int
10622main ()
10623{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010624getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010625 ;
10626 return 0;
10627}
10628_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010629if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010631$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010632
Guido van Rossum627b2d71993-12-24 10:39:16 +000010633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010635
Guido van Rossum627b2d71993-12-24 10:39:16 +000010636fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010637done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010638
Jack Jansen150753c2003-03-29 22:07:47 +000010639for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010640do :
10641 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010642if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010643 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010644#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010645_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010647/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010648#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010649int
10650main ()
10651{
10652setpgrp(0,0);
10653 ;
10654 return 0;
10655}
10656_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010659$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010660
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010663
10664fi
10665done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010666
Thomas Wouters3a584202000-08-05 23:28:51 +000010667for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010668do :
10669 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010670if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010671 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010672#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010673_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010675/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010676#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010677int
10678main ()
10679{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010680gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010681 ;
10682 return 0;
10683}
10684_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010685if ac_fn_c_try_compile "$LINENO"; then :
10686
Guido van Rossum627b2d71993-12-24 10:39:16 +000010687else
Skip Montanaro6dead952003-09-25 14:50:04 +000010688
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010689$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010690
Martin v. Löwis11437992002-04-12 09:54:03 +000010691
Guido van Rossum627b2d71993-12-24 10:39:16 +000010692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010695fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010696done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010697
Michael W. Hudson54241132001-12-07 15:38:26 +000010698
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10700$as_echo_n "checking for major... " >&6; }
10701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010702/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010703
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010704#if defined(MAJOR_IN_MKDEV)
10705#include <sys/mkdev.h>
10706#elif defined(MAJOR_IN_SYSMACROS)
10707#include <sys/sysmacros.h>
10708#else
10709#include <sys/types.h>
10710#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010711
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010712int
10713main ()
10714{
10715
10716 makedev(major(0),minor(0));
10717
10718 ;
10719 return 0;
10720}
10721_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010722if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010723
10724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010725$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010726
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10728$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010729
10730else
Skip Montanaro6dead952003-09-25 14:50:04 +000010731
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10733$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010734
10735fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010736rm -f core conftest.err conftest.$ac_objext \
10737 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010738
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010739# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010740# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10742$as_echo_n "checking for getaddrinfo... " >&6; }
10743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010744/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010745
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010746#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010747#include <sys/socket.h>
10748#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010749#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010750
Martin v. Löwis11437992002-04-12 09:54:03 +000010751int
10752main ()
10753{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010754getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 ;
10756 return 0;
10757}
10758_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010760 have_getaddrinfo=yes
10761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010763fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764rm -f core conftest.err conftest.$ac_objext \
10765 conftest$ac_exeext conftest.$ac_ext
10766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10767$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010768if test $have_getaddrinfo = yes
10769then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10771$as_echo_n "checking getaddrinfo bug... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010772 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010773 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010774else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010775 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010776 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010779/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010780
10781#include <sys/types.h>
10782#include <netdb.h>
10783#include <string.h>
10784#include <sys/socket.h>
10785#include <netinet/in.h>
10786
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010787int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010788{
10789 int passive, gaierr, inet4 = 0, inet6 = 0;
10790 struct addrinfo hints, *ai, *aitop;
10791 char straddr[INET6_ADDRSTRLEN], strport[16];
10792
10793 for (passive = 0; passive <= 1; passive++) {
10794 memset(&hints, 0, sizeof(hints));
10795 hints.ai_family = AF_UNSPEC;
10796 hints.ai_flags = passive ? AI_PASSIVE : 0;
10797 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010798 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010799 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10800 (void)gai_strerror(gaierr);
10801 goto bad;
10802 }
10803 for (ai = aitop; ai; ai = ai->ai_next) {
10804 if (ai->ai_addr == NULL ||
10805 ai->ai_addrlen == 0 ||
10806 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10807 straddr, sizeof(straddr), strport, sizeof(strport),
10808 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10809 goto bad;
10810 }
10811 switch (ai->ai_family) {
10812 case AF_INET:
10813 if (strcmp(strport, "54321") != 0) {
10814 goto bad;
10815 }
10816 if (passive) {
10817 if (strcmp(straddr, "0.0.0.0") != 0) {
10818 goto bad;
10819 }
10820 } else {
10821 if (strcmp(straddr, "127.0.0.1") != 0) {
10822 goto bad;
10823 }
10824 }
10825 inet4++;
10826 break;
10827 case AF_INET6:
10828 if (strcmp(strport, "54321") != 0) {
10829 goto bad;
10830 }
10831 if (passive) {
10832 if (strcmp(straddr, "::") != 0) {
10833 goto bad;
10834 }
10835 } else {
10836 if (strcmp(straddr, "::1") != 0) {
10837 goto bad;
10838 }
10839 }
10840 inet6++;
10841 break;
10842 case AF_UNSPEC:
10843 goto bad;
10844 break;
10845 default:
10846 /* another family support? */
10847 break;
10848 }
10849 }
10850 }
10851
10852 if (!(inet4 == 0 || inet4 == 2))
10853 goto bad;
10854 if (!(inet6 == 0 || inet6 == 2))
10855 goto bad;
10856
10857 if (aitop)
10858 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010859 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010860
10861 bad:
10862 if (aitop)
10863 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010864 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010865}
10866
Martin v. Löwis11437992002-04-12 09:54:03 +000010867_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010868if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010869 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010871 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010872fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010876
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010877fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010878
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010880
Benjamin Peterson75fed812010-11-01 01:47:19 +000010881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10882$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10883
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010884if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010885then
10886 if test $ipv6 = yes
10887 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010888 echo 'Fatal: You must get working getaddrinfo() function.'
10889 echo ' or you can specify "--disable-ipv6"'.
10890 exit 1
10891 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010892else
Martin v. Löwis11437992002-04-12 09:54:03 +000010893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010894$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010895
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010896fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000010897
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010898for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010899do :
10900 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010901if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010902 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010903#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010904_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010905
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010906fi
10907done
10908
Michael W. Hudson54241132001-12-07 15:38:26 +000010909
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010910# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10912$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010913if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010914 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010917/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010918#include <sys/types.h>
10919#include <sys/time.h>
10920#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010921
Martin v. Löwis11437992002-04-12 09:54:03 +000010922int
10923main ()
10924{
10925if ((struct tm *) 0)
10926return 0;
10927 ;
10928 return 0;
10929}
10930_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010931if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010932 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010933else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010934 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010937fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10939$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010940if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010941
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010942$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010943
10944fi
10945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10947$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010948if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010949 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010952/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010953#include <sys/types.h>
10954#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010955
Martin v. Löwis11437992002-04-12 09:54:03 +000010956int
10957main ()
10958{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010959struct tm tm;
10960 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010961 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 ;
10963 return 0;
10964}
10965_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010966if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010967 ac_cv_struct_tm=time.h
10968else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010969 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10974$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010975if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010976
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010977$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010978
10979fi
10980
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010981ac_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 +000010982#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010983
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010984"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010985if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010986
10987cat >>confdefs.h <<_ACEOF
10988#define HAVE_STRUCT_TM_TM_ZONE 1
10989_ACEOF
10990
10991
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010992fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010993
Martin v. Löwis11437992002-04-12 09:54:03 +000010994if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10995
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010996$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010997
10998else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010999 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11000"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011001if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011002 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011004 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011005fi
11006
Martin v. Löwiseba40652007-08-30 20:10:57 +000011007cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011008#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011009_ACEOF
11010
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11012$as_echo_n "checking for tzname... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011013if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011014 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011015else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011017/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011018#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011019#if !HAVE_DECL_TZNAME
11020extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011022
Martin v. Löwis11437992002-04-12 09:54:03 +000011023int
11024main ()
11025{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011026return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011027 ;
11028 return 0;
11029}
11030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011031if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011032 ac_cv_var_tzname=yes
11033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011034 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011035fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011036rm -f core conftest.err conftest.$ac_objext \
11037 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011038fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11040$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011041 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011043$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011044
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011045 fi
11046fi
11047
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011048ac_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 +000011049if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011050
11051cat >>confdefs.h <<_ACEOF
11052#define HAVE_STRUCT_STAT_ST_RDEV 1
11053_ACEOF
11054
11055
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011056fi
11057
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011058ac_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 +000011059if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011060
Martin v. Löwis11437992002-04-12 09:54:03 +000011061cat >>confdefs.h <<_ACEOF
11062#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11063_ACEOF
11064
11065
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011066fi
11067
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011068ac_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 +000011069if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011070
11071cat >>confdefs.h <<_ACEOF
11072#define HAVE_STRUCT_STAT_ST_FLAGS 1
11073_ACEOF
11074
11075
11076fi
11077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011078ac_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 +000011079if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011080
11081cat >>confdefs.h <<_ACEOF
11082#define HAVE_STRUCT_STAT_ST_GEN 1
11083_ACEOF
11084
11085
11086fi
11087
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011088ac_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 +000011089if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011090
11091cat >>confdefs.h <<_ACEOF
11092#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11093_ACEOF
11094
11095
11096fi
11097
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011098ac_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 +000011099if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011100
Martin v. Löwis11437992002-04-12 09:54:03 +000011101cat >>confdefs.h <<_ACEOF
11102#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11103_ACEOF
11104
11105
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011106$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011107
11108else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011109 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011110 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011111 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11112 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011113esac
11114
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011115fi
11116
Michael W. Hudson54241132001-12-07 15:38:26 +000011117
Martin v. Löwis11437992002-04-12 09:54:03 +000011118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11120$as_echo_n "checking for time.h that defines altzone... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011121if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011122 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011123else
Matthias Klosec511b472010-05-08 11:01:39 +000011124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011126/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011127#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011128int
11129main ()
11130{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011131return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011132 ;
11133 return 0;
11134}
11135_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011136if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011137 ac_cv_header_time_altzone=yes
11138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011139 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011142
Martin v. Löwiseba40652007-08-30 20:10:57 +000011143fi
11144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11146$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011147if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011148
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011149$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011150
11151fi
11152
Guido van Rossumda88dad1995-01-26 00:46:29 +000011153was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11155$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011157/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011158
11159#include <sys/types.h>
11160#include <sys/select.h>
11161#include <sys/time.h>
11162
Martin v. Löwis11437992002-04-12 09:54:03 +000011163int
11164main ()
11165{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011166;
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 ;
11168 return 0;
11169}
11170_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011172
11173
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011174$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011175
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011176 was_it_defined=yes
11177
Martin v. Löwiseba40652007-08-30 20:10:57 +000011178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11181$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011182
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11184$as_echo_n "checking for addrinfo... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011185if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011186 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011189/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011190#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011191int
11192main ()
11193{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011194struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 ;
11196 return 0;
11197}
11198_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011199if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011200 ac_cv_struct_addrinfo=yes
11201else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011202 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11205fi
11206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11208$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011209if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011211$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011212
11213fi
11214
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11216$as_echo_n "checking for sockaddr_storage... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011217if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011218 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011219else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011221/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011222
11223# include <sys/types.h>
11224# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011225int
11226main ()
11227{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011228struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011229 ;
11230 return 0;
11231}
11232_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011233if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011234 ac_cv_struct_sockaddr_storage=yes
11235else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011236 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11239fi
11240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11242$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011243if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011245$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011246
11247fi
11248
Guido van Rossum627b2d71993-12-24 10:39:16 +000011249# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011250
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11252$as_echo_n "checking whether char is unsigned... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011253if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011254 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011255else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011258$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011259int
11260main ()
11261{
11262static int test_array [1 - 2 * !(((char) -1) < 0)];
11263test_array [0] = 0
11264
11265 ;
11266 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011267}
Martin v. Löwis11437992002-04-12 09:54:03 +000011268_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011269if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011270 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011272 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11277$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011278if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011279 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011280
11281fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11284$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011285if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011286 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011287else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011289/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011290
Martin v. Löwis11437992002-04-12 09:54:03 +000011291int
11292main ()
11293{
11294/* FIXME: Include the comments suggested by Paul. */
11295#ifndef __cplusplus
11296 /* Ultrix mips cc rejects this. */
11297 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011298 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011300 char const *const *pcpcc;
11301 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 /* NEC SVR4.0.2 mips cc rejects this. */
11303 struct point {int x, y;};
11304 static struct point const zero = {0,0};
11305 /* AIX XL C 1.02.0.0 rejects this.
11306 It does not let you subtract one const X* pointer from another in
11307 an arm of an if-expression whose if-part is not a constant
11308 expression */
11309 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011310 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011312 ++pcpcc;
11313 ppc = (char**) pcpcc;
11314 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 { /* SCO 3.2v4 cc rejects this. */
11316 char *t;
11317 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011318
Martin v. Löwis11437992002-04-12 09:54:03 +000011319 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011320 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011321 }
11322 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11323 int x[] = {25, 17};
11324 const int *foo = &x[0];
11325 ++foo;
11326 }
11327 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11328 typedef const int *iptr;
11329 iptr p = 0;
11330 ++p;
11331 }
11332 { /* AIX XL C 1.02.0.0 rejects this saying
11333 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11334 struct s { int j; const int *ap[3]; };
11335 struct s *b; b->j = 5;
11336 }
11337 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11338 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011339 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011340 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011341 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011342#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011343
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 ;
11345 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011346}
Martin v. Löwis11437992002-04-12 09:54:03 +000011347_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011348if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011349 ac_cv_c_const=yes
11350else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011351 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011354fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11356$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011357if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011359$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011360
11361fi
11362
Michael W. Hudson54241132001-12-07 15:38:26 +000011363
Guido van Rossumda88dad1995-01-26 00:46:29 +000011364works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11366$as_echo_n "checking for working volatile... " >&6; }
11367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011369
Martin v. Löwis11437992002-04-12 09:54:03 +000011370int
11371main ()
11372{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011373volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011374 ;
11375 return 0;
11376}
11377_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011379 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011380else
Skip Montanaro6dead952003-09-25 14:50:04 +000011381
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011382$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011383
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011384
Guido van Rossum627b2d71993-12-24 10:39:16 +000011385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11388$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011389
Guido van Rossumda88dad1995-01-26 00:46:29 +000011390works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11392$as_echo_n "checking for working signed char... " >&6; }
11393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011394/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011395
Martin v. Löwis11437992002-04-12 09:54:03 +000011396int
11397main ()
11398{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011399signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011400 ;
11401 return 0;
11402}
11403_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011405 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011406else
Skip Montanaro6dead952003-09-25 14:50:04 +000011407
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011408$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011409
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011410
Guido van Rossum7f43da71994-08-01 12:15:30 +000011411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11414$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011415
Guido van Rossumda88dad1995-01-26 00:46:29 +000011416have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11418$as_echo_n "checking for prototypes... " >&6; }
11419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011420/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011421int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011422int
11423main ()
11424{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011425return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011426 ;
11427 return 0;
11428}
11429_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011430if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011431
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011432$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011433
Matthias Klosec511b472010-05-08 11:01:39 +000011434 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11438$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011439
Guido van Rossumda88dad1995-01-26 00:46:29 +000011440works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11442$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011444/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011445
11446#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011447int foo(int x, ...) {
11448 va_list va;
11449 va_start(va, x);
11450 va_arg(va, int);
11451 va_arg(va, char *);
11452 va_arg(va, double);
11453 return 0;
11454}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011455
Martin v. Löwis11437992002-04-12 09:54:03 +000011456int
11457main ()
11458{
Guido van Rossum90eea071996-08-30 20:58:57 +000011459return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011460 ;
11461 return 0;
11462}
11463_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011465
11466
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011467$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011468
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011469 works=yes
11470
Guido van Rossum627b2d71993-12-24 10:39:16 +000011471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11474$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011475
Martin v. Löwisd6320502004-08-12 13:45:08 +000011476# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11478$as_echo_n "checking for socketpair... " >&6; }
11479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011480/* end confdefs.h. */
11481
11482#include <sys/types.h>
11483#include <sys/socket.h>
11484
11485int
11486main ()
11487{
11488void *x=socketpair
11489 ;
11490 return 0;
11491}
11492_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011493if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011494
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011495$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011496
Matthias Klosec511b472010-05-08 11:01:39 +000011497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011498$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011499else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11501$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011502
11503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011505
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011506# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11508$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011510/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011511#include <sys/types.h>
11512#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011513int
11514main ()
11515{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011516struct sockaddr x;
11517x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 ;
11519 return 0;
11520}
11521_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011522if ac_fn_c_try_compile "$LINENO"; then :
11523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11524$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011526$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011527
11528else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11530$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011531
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011534
Guido van Rossumda88dad1995-01-26 00:46:29 +000011535va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11537$as_echo_n "checking whether va_list is an array... " >&6; }
11538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011539/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011540
11541#ifdef HAVE_STDARG_PROTOTYPES
11542#include <stdarg.h>
11543#else
11544#include <varargs.h>
11545#endif
11546
Martin v. Löwis11437992002-04-12 09:54:03 +000011547int
11548main ()
11549{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011550va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 ;
11552 return 0;
11553}
11554_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011555if ac_fn_c_try_compile "$LINENO"; then :
11556
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011557else
Skip Montanaro6dead952003-09-25 14:50:04 +000011558
Martin v. Löwis11437992002-04-12 09:54:03 +000011559
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011560$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011561
Guido van Rossumda88dad1995-01-26 00:46:29 +000011562 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011563
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11567$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011568
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011569# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011570
11571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011572ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011573if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011575 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011576
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11578$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011579 OLD_CFLAGS=$CFLAGS
11580 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011582/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011583
11584# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011585
Martin v. Löwis11437992002-04-12 09:54:03 +000011586int
11587main ()
11588{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011589
11590 char *name;
11591 struct hostent *he, *res;
11592 char buffer[2048];
11593 int buflen = 2048;
11594 int h_errnop;
11595
11596 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011597
11598 ;
11599 return 0;
11600}
11601_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011602if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011603
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011604 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011605
Martin v. Löwis11437992002-04-12 09:54:03 +000011606
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011607$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011608
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11610$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011611
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011612else
Skip Montanaro6dead952003-09-25 14:50:04 +000011613
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11615$as_echo "no" >&6; }
11616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11617$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011619/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011620
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011621# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011622
Martin v. Löwis11437992002-04-12 09:54:03 +000011623int
11624main ()
11625{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011626
11627 char *name;
11628 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011629 char buffer[2048];
11630 int buflen = 2048;
11631 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011632
Matthias Klosec511b472010-05-08 11:01:39 +000011633 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011634
11635 ;
11636 return 0;
11637}
11638_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011640
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011641 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011642
Martin v. Löwis11437992002-04-12 09:54:03 +000011643
Matthias Klosec511b472010-05-08 11:01:39 +000011644$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11647$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011648
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011649else
Skip Montanaro6dead952003-09-25 14:50:04 +000011650
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11652$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11654$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11656/* end confdefs.h. */
11657
11658# include <netdb.h>
11659
11660int
11661main ()
11662{
11663
11664 char *name;
11665 struct hostent *he;
11666 struct hostent_data data;
11667
11668 (void) gethostbyname_r(name, he, &data);
11669
11670 ;
11671 return 0;
11672}
11673_ACEOF
11674if ac_fn_c_try_compile "$LINENO"; then :
11675
11676 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11677
11678
11679$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11680
11681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11682$as_echo "yes" >&6; }
11683
11684else
11685
11686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11687$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011688
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011691
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011694
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011697 CFLAGS=$OLD_CFLAGS
11698
11699else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011700
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011701 for ac_func in gethostbyname
11702do :
11703 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011704if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011705 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011706#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011707_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011708
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011709fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011710done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011711
Michael W. Hudson54241132001-12-07 15:38:26 +000011712
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011713fi
11714
Michael W. Hudson54241132001-12-07 15:38:26 +000011715
11716
11717
11718
11719
11720
Guido van Rossum627b2d71993-12-24 10:39:16 +000011721# checks for system services
11722# (none yet)
11723
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011724# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011725ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011726if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011727
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11730$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011731if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011732 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011733else
Martin v. Löwis11437992002-04-12 09:54:03 +000011734 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011735LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011738
Martin v. Löwiseba40652007-08-30 20:10:57 +000011739/* Override any GCC internal prototype to avoid an error.
11740 Use char because int might match the return type of a GCC
11741 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011742#ifdef __cplusplus
11743extern "C"
11744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011745char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011746int
11747main ()
11748{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011749return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011750 ;
11751 return 0;
11752}
11753_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011754if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011755 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011757 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011759rm -f core conftest.err conftest.$ac_objext \
11760 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011761LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011762fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11764$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011765if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 cat >>confdefs.h <<_ACEOF
11767#define HAVE_LIBIEEE 1
11768_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011769
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011770 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011771
Guido van Rossum627b2d71993-12-24 10:39:16 +000011772fi
11773
Michael W. Hudson54241132001-12-07 15:38:26 +000011774
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011775fi
11776
Michael W. Hudson54241132001-12-07 15:38:26 +000011777
Guido van Rossum7f253911997-05-09 02:42:48 +000011778# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11780$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011781
Martin v. Löwiseba40652007-08-30 20:10:57 +000011782# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011783if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011784 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011785if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011786then
11787
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011788$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011789
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11791$as_echo "yes" >&6; }
11792else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11793$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011794fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11797$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011798fi
11799
Guido van Rossum7f253911997-05-09 02:42:48 +000011800
Guido van Rossum7f43da71994-08-01 12:15:30 +000011801# check for --with-libm=...
11802
Guido van Rossum563e7081996-09-10 18:20:48 +000011803case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011804Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011805BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011806*) LIBM=-lm
11807esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11809$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011810
Martin v. Löwiseba40652007-08-30 20:10:57 +000011811# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011812if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011813 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011814if test "$withval" = no
11815then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11817$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011818elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011819then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11821$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011822else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011823fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11826$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011827fi
11828
Guido van Rossum7f43da71994-08-01 12:15:30 +000011829
11830# check for --with-libc=...
11831
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11833$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011834
Martin v. Löwiseba40652007-08-30 20:10:57 +000011835# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011836if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011837 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011838if test "$withval" = no
11839then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11841$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011842elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011843then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11845$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011846else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011847fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011848else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11850$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011851fi
11852
Guido van Rossum7f43da71994-08-01 12:15:30 +000011853
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011854# **************************************************
11855# * Check for various properties of floating point *
11856# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011857
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11859$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011860if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011861 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011862else
11863
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011864if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011865 ac_cv_little_endian_double=no
11866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011868/* end confdefs.h. */
11869
11870#include <string.h>
11871int main() {
11872 double x = 9006104071832581.0;
11873 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11874 return 0;
11875 else
11876 return 1;
11877}
11878
11879_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011880if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011881 ac_cv_little_endian_double=yes
11882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011883 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011887fi
11888
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011889fi
11890
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11892$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011893if test "$ac_cv_little_endian_double" = yes
11894then
11895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011896$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011897
11898fi
11899
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11901$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011902if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011903 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011904else
11905
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011906if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011907 ac_cv_big_endian_double=no
11908else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011910/* end confdefs.h. */
11911
11912#include <string.h>
11913int main() {
11914 double x = 9006104071832581.0;
11915 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11916 return 0;
11917 else
11918 return 1;
11919}
11920
11921_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011922if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011923 ac_cv_big_endian_double=yes
11924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011925 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11928 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011929fi
11930
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011931fi
11932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11934$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011935if test "$ac_cv_big_endian_double" = yes
11936then
11937
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011938$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011939
11940fi
11941
11942# Some ARM platforms use a mixed-endian representation for doubles.
11943# While Python doesn't currently have full support for these platforms
11944# (see e.g., issue 1762561), we can at least make sure that float <-> string
11945# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11947$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011948if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011949 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011950else
11951
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011952if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011953 ac_cv_mixed_endian_double=no
11954else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011956/* end confdefs.h. */
11957
11958#include <string.h>
11959int main() {
11960 double x = 9006104071832581.0;
11961 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11962 return 0;
11963 else
11964 return 1;
11965}
11966
11967_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011968if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011969 ac_cv_mixed_endian_double=yes
11970else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011971 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11974 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011975fi
11976
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011977fi
11978
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11980$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011981if test "$ac_cv_mixed_endian_double" = yes
11982then
11983
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011984$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011985
11986fi
11987
11988# The short float repr introduced in Python 3.1 requires the
11989# correctly-rounded string <-> double conversion functions from
11990# Python/dtoa.c, which in turn require that the FPU uses 53-bit
11991# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000011992# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011993# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000011994
11995# This inline assembler syntax may also work for suncc and icc,
11996# so we try it on all platforms.
11997
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11999$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012001/* end confdefs.h. */
12002
12003int
12004main ()
12005{
12006
Mark Dickinsona548dee2009-11-15 13:12:43 +000012007 unsigned short cw;
12008 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12009 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012010
12011 ;
12012 return 0;
12013}
12014_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012015if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012016 have_gcc_asm_for_x87=yes
12017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012019fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12022$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012023if test "$have_gcc_asm_for_x87" = yes
12024then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012025
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012026$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012027
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012028fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012029
Mark Dickinson04b27232009-01-04 12:29:36 +000012030# Detect whether system arithmetic is subject to x87-style double
12031# rounding issues. The result of this test has little meaning on non
12032# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12033# mode is round-to-nearest and double rounding issues are present, and
12034# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12036$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012037# $BASECFLAGS may affect the result
12038ac_save_cc="$CC"
12039CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012040if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012041 ac_cv_x87_double_rounding=no
12042else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012044/* end confdefs.h. */
12045
12046#include <stdlib.h>
12047#include <math.h>
12048int main() {
12049 volatile double x, y, z;
12050 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12051 x = 0.99999999999999989; /* 1-2**-53 */
12052 y = 1./x;
12053 if (y != 1.)
12054 exit(0);
12055 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12056 x = 1e16;
12057 y = 2.99999;
12058 z = x + y;
12059 if (z != 1e16+4.)
12060 exit(0);
12061 /* both tests show evidence of double rounding */
12062 exit(1);
12063}
12064
12065_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012066if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012067 ac_cv_x87_double_rounding=no
12068else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012069 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012070fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12072 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012073fi
12074
Mark Dickinson99abd142009-10-24 13:44:16 +000012075CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12077$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012078if test "$ac_cv_x87_double_rounding" = yes
12079then
12080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012081$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012082
12083fi
12084
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012085# ************************************
12086# * Check for mathematical functions *
12087# ************************************
12088
12089LIBS_SAVE=$LIBS
12090LIBS="$LIBS $LIBM"
12091
Mark Dickinson265d7382008-04-21 22:32:24 +000012092# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12093# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12095$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012096if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012097 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012098else
12099
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012100if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012101 ac_cv_tanh_preserves_zero_sign=no
12102else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012104/* end confdefs.h. */
12105
12106#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012107#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012108int main() {
12109 /* return 0 if either negative zeros don't exist
12110 on this platform or if negative zeros exist
12111 and tanh(-0.) == -0. */
12112 if (atan2(0., -1.) == atan2(-0., -1.) ||
12113 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12114 else exit(1);
12115}
12116
12117_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012118if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012119 ac_cv_tanh_preserves_zero_sign=yes
12120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012121 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012122fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12124 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012125fi
12126
Mark Dickinson265d7382008-04-21 22:32:24 +000012127fi
12128
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12130$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012131if test "$ac_cv_tanh_preserves_zero_sign" = yes
12132then
12133
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012134$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012135
12136fi
12137
Mark Dickinson65898e02009-09-05 10:27:00 +000012138for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012139do :
12140 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12141ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012142if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012143 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012144#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012145_ACEOF
12146
12147fi
12148done
12149
Mark Dickinson65898e02009-09-05 10:27:00 +000012150for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012151do :
12152 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12153ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012154if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012155 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012156#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012157_ACEOF
12158
12159fi
12160done
12161
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012162ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12163"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012164if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012165 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012167 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012168fi
12169
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012170cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012171#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012172_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012173ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12174"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012175if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012176 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012177else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012178 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012179fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012180
12181cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012182#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012183_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012184ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12185"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012186if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012187 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012189 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012190fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012191
12192cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012193#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012194_ACEOF
12195
12196
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012197LIBS=$LIBS_SAVE
12198
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012199# For multiprocessing module, check that sem_open
12200# actually works. For FreeBSD versions <= 7.2,
12201# the kernel module that provides POSIX semaphores
12202# isn't loaded by default, so an attempt to call
12203# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12205$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012206if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012207 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012209 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012210 ac_cv_posix_semaphores_enabled=yes
12211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012213/* end confdefs.h. */
12214
12215#include <unistd.h>
12216#include <fcntl.h>
12217#include <stdio.h>
12218#include <semaphore.h>
12219#include <sys/stat.h>
12220
12221int main(void) {
12222 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12223 if (a == SEM_FAILED) {
12224 perror("sem_open");
12225 return 1;
12226 }
12227 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012228 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012229 return 0;
12230}
12231
12232_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012233if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012234 ac_cv_posix_semaphores_enabled=yes
12235else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012236 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012237fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12239 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012240fi
12241
12242
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012243fi
12244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12246$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012247if test $ac_cv_posix_semaphores_enabled = no
12248then
12249
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012250$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012251
12252fi
12253
12254# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12256$as_echo_n "checking for broken sem_getvalue... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012257if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012258 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012259else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012260 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012261 ac_cv_broken_sem_getvalue=yes
12262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012264/* end confdefs.h. */
12265
12266#include <unistd.h>
12267#include <fcntl.h>
12268#include <stdio.h>
12269#include <semaphore.h>
12270#include <sys/stat.h>
12271
12272int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012273 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012274 int count;
12275 int res;
12276 if(a==SEM_FAILED){
12277 perror("sem_open");
12278 return 1;
12279
12280 }
12281 res = sem_getvalue(a, &count);
12282 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012283 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012284 return res==-1 ? 1 : 0;
12285}
12286
12287_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012288if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012289 ac_cv_broken_sem_getvalue=no
12290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012291 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012292fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012295fi
12296
12297
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012298fi
12299
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12301$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012302if test $ac_cv_broken_sem_getvalue = yes
12303then
12304
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012305$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012306
12307fi
12308
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012309# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12311$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012312# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012313if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012314 enableval=$enable_big_digits; case $enable_big_digits in
12315yes)
12316 enable_big_digits=30 ;;
12317no)
12318 enable_big_digits=15 ;;
1231915|30)
12320 ;;
12321*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012322 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 +000012323esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12325$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012326
12327cat >>confdefs.h <<_ACEOF
12328#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12329_ACEOF
12330
12331
12332else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12334$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012335fi
12336
12337
Guido van Rossumef2255b2000-03-10 22:30:29 +000012338# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012339ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012340if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012341
12342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012343$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012344
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012345 wchar_h="yes"
12346
Guido van Rossumef2255b2000-03-10 22:30:29 +000012347else
Martin v. Löwis11437992002-04-12 09:54:03 +000012348 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012349
12350fi
12351
Michael W. Hudson54241132001-12-07 15:38:26 +000012352
Martin v. Löwis11437992002-04-12 09:54:03 +000012353
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012354# determine wchar_t size
12355if test "$wchar_h" = yes
12356then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012357 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012358# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12359# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12360# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12362$as_echo_n "checking size of wchar_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012363if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012364 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012365else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012366 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12367"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012368
Martin v. Löwis11437992002-04-12 09:54:03 +000012369else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012370 if test "$ac_cv_type_wchar_t" = yes; then
12371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012373as_fn_error 77 "cannot compute sizeof (wchar_t)
12374See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012375 else
12376 ac_cv_sizeof_wchar_t=0
12377 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012378fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012379
Martin v. Löwis11437992002-04-12 09:54:03 +000012380fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12382$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012383
12384
12385
Martin v. Löwis11437992002-04-12 09:54:03 +000012386cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012387#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012388_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012389
Michael W. Hudson54241132001-12-07 15:38:26 +000012390
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012391fi
12392
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12394$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012395have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012397/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012398
12399#include <tcl.h>
12400#if TCL_UTF_MAX != 6
12401# error "NOT UCS4_TCL"
12402#endif
12403int
12404main ()
12405{
12406
12407 ;
12408 return 0;
12409}
12410_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012412
12413
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012414$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012415
12416 have_ucs4_tcl=yes
12417
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12421$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012422
Skip Montanaro6dead952003-09-25 14:50:04 +000012423# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012424if test "$wchar_h" = yes
12425then
12426 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12428$as_echo_n "checking whether wchar_t is signed... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012429 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012430 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012431else
12432
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012433 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012434 ac_cv_wchar_t_signed=yes
12435else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012437/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012438
12439 #include <wchar.h>
12440 int main()
12441 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012442 /* Success: exit code 0 */
12443 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012444 }
12445
12446_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012447if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012448 ac_cv_wchar_t_signed=yes
12449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012450 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12453 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012454fi
12455
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012456fi
12457
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12459$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012460fi
12461
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12463$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012464# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012465if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012466 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012467else
12468 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012469fi
12470
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012471
12472if test $enable_unicode = yes
12473then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012474 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012475 case "$have_ucs4_tcl" in
12476 yes) enable_unicode="ucs4"
12477 ;;
12478 *) enable_unicode="ucs2"
12479 ;;
12480 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012481fi
12482
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012483
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012484case "$enable_unicode" in
12485ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012486 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012487
12488 ;;
12489ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012490 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012491
12492 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012493*) 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 +000012494esac
12495
Michael W. Hudson54241132001-12-07 15:38:26 +000012496
Martin v. Löwis11437992002-04-12 09:54:03 +000012497
12498
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012499if test "$enable_unicode" = "no"
12500then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012501 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12503$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012504else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012505 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012507$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012508
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012509
12510 # wchar_t is only usable if it maps to an unsigned type
12511 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012512 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012513 then
12514 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012516$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012517
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012518 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012519
12520 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12521 then
12522 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012523 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012524
12525 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12526 then
12527 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012528 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012529
12530 else
12531 PY_UNICODE_TYPE="no type found"
12532 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12534$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012535fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012536
12537# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12539$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012540if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012541 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012542else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543 ac_cv_c_bigendian=unknown
12544 # See if we're dealing with a universal compiler.
12545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12546/* end confdefs.h. */
12547#ifndef __APPLE_CC__
12548 not a universal capable compiler
12549 #endif
12550 typedef int dummy;
12551
Skip Montanaro6dead952003-09-25 14:50:04 +000012552_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012553if ac_fn_c_try_compile "$LINENO"; then :
12554
12555 # Check for potential -arch flags. It is not universal unless
12556 # there are at least two -arch flags with different values.
12557 ac_arch=
12558 ac_prev=
12559 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12560 if test -n "$ac_prev"; then
12561 case $ac_word in
12562 i?86 | x86_64 | ppc | ppc64)
12563 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12564 ac_arch=$ac_word
12565 else
12566 ac_cv_c_bigendian=universal
12567 break
12568 fi
12569 ;;
12570 esac
12571 ac_prev=
12572 elif test "x$ac_word" = "x-arch"; then
12573 ac_prev=arch
12574 fi
12575 done
12576fi
12577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12578 if test $ac_cv_c_bigendian = unknown; then
12579 # See if sys/param.h defines the BYTE_ORDER macro.
12580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012581/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012582#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012583 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012584
Martin v. Löwis11437992002-04-12 09:54:03 +000012585int
12586main ()
12587{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012588#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12589 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12590 && LITTLE_ENDIAN)
12591 bogus endian macros
12592 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012593
12594 ;
12595 return 0;
12596}
12597_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012598if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012599 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012601/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012602#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012603 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012604
Martin v. Löwis11437992002-04-12 09:54:03 +000012605int
12606main ()
12607{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012608#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012609 not big endian
12610 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012611
12612 ;
12613 return 0;
12614}
12615_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012616if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012617 ac_cv_c_bigendian=yes
12618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012619 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012622fi
12623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12624 fi
12625 if test $ac_cv_c_bigendian = unknown; then
12626 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012628/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012629#include <limits.h>
12630
Martin v. Löwis11437992002-04-12 09:54:03 +000012631int
12632main ()
12633{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012634#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12635 bogus endian macros
12636 #endif
12637
Martin v. Löwis11437992002-04-12 09:54:03 +000012638 ;
12639 return 0;
12640}
12641_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012642if ac_fn_c_try_compile "$LINENO"; then :
12643 # It does; now see whether it defined to _BIG_ENDIAN or not.
12644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12645/* end confdefs.h. */
12646#include <limits.h>
12647
12648int
12649main ()
12650{
12651#ifndef _BIG_ENDIAN
12652 not big endian
12653 #endif
12654
12655 ;
12656 return 0;
12657}
12658_ACEOF
12659if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012661else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012662 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012663fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12665fi
12666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12667 fi
12668 if test $ac_cv_c_bigendian = unknown; then
12669 # Compile a test program.
12670 if test "$cross_compiling" = yes; then :
12671 # Try to guess by grepping values from an object file.
12672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12673/* end confdefs.h. */
12674short int ascii_mm[] =
12675 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12676 short int ascii_ii[] =
12677 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12678 int use_ascii (int i) {
12679 return ascii_mm[i] + ascii_ii[i];
12680 }
12681 short int ebcdic_ii[] =
12682 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12683 short int ebcdic_mm[] =
12684 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12685 int use_ebcdic (int i) {
12686 return ebcdic_mm[i] + ebcdic_ii[i];
12687 }
12688 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012689
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012690int
12691main ()
12692{
12693return use_ascii (foo) == use_ebcdic (foo);
12694 ;
12695 return 0;
12696}
12697_ACEOF
12698if ac_fn_c_try_compile "$LINENO"; then :
12699 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12700 ac_cv_c_bigendian=yes
12701 fi
12702 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12703 if test "$ac_cv_c_bigendian" = unknown; then
12704 ac_cv_c_bigendian=no
12705 else
12706 # finding both strings is unlikely to happen, but who knows?
12707 ac_cv_c_bigendian=unknown
12708 fi
12709 fi
12710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012714/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012715$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012716int
12717main ()
12718{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012719
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012720 /* Are we little or big endian? From Harbison&Steele. */
12721 union
12722 {
12723 long int l;
12724 char c[sizeof (long int)];
12725 } u;
12726 u.l = 1;
12727 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012728
12729 ;
12730 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012731}
Martin v. Löwis11437992002-04-12 09:54:03 +000012732_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012733if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012734 ac_cv_c_bigendian=no
12735else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012736 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012737fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12739 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012741
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012742 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012743fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12745$as_echo "$ac_cv_c_bigendian" >&6; }
12746 case $ac_cv_c_bigendian in #(
12747 yes)
12748 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12749;; #(
12750 no)
12751 ;; #(
12752 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012754$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012755
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012756 ;; #(
12757 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012758 as_fn_error $? "unknown endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012759 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12760 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012761
Michael W. Hudson54241132001-12-07 15:38:26 +000012762
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012763# Check whether right shifting a negative integer extends the sign bit
12764# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12766$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012767if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012768 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012769else
Martin v. Löwis11437992002-04-12 09:54:03 +000012770
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012771if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012772 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012773else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012775/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012776
12777int main()
12778{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012779 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012780}
12781
Martin v. Löwis11437992002-04-12 09:54:03 +000012782_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012783if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012784 ac_cv_rshift_extends_sign=yes
12785else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012786 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012787fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12789 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012790fi
12791
Martin v. Löwiseba40652007-08-30 20:10:57 +000012792fi
12793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12795$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012796if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012797then
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012799$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012800
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012801fi
12802
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012803# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12805$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012806if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012807 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012808else
Martin v. Löwis11437992002-04-12 09:54:03 +000012809
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012811/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012812#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012813int
12814main ()
12815{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012816
12817 FILE *f = fopen("/dev/null", "r");
12818 flockfile(f);
12819 getc_unlocked(f);
12820 funlockfile(f);
12821
Martin v. Löwis11437992002-04-12 09:54:03 +000012822 ;
12823 return 0;
12824}
12825_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012826if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012827 ac_cv_have_getc_unlocked=yes
12828else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012829 ac_cv_have_getc_unlocked=no
12830fi
12831rm -f core conftest.err conftest.$ac_objext \
12832 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012834
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12836$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012837if test "$ac_cv_have_getc_unlocked" = yes
12838then
Martin v. Löwis11437992002-04-12 09:54:03 +000012839
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012840$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012841
12842fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012843
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012844# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012845# save the value of LIBS so we don't actually link Python with readline
12846LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012847
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012848# On some systems we need to link readline to a termcap compatible
12849# library. NOTE: Keep the precedence of listed libraries synchronised
12850# with setup.py.
12851py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12853$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012854for py_libtermcap in "" ncursesw ncurses curses termcap; do
12855 if test -z "$py_libtermcap"; then
12856 READLINE_LIBS="-lreadline"
12857 else
12858 READLINE_LIBS="-lreadline -l$py_libtermcap"
12859 fi
12860 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012862/* end confdefs.h. */
12863
Martin v. Löwiseba40652007-08-30 20:10:57 +000012864/* Override any GCC internal prototype to avoid an error.
12865 Use char because int might match the return type of a GCC
12866 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012867#ifdef __cplusplus
12868extern "C"
12869#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012870char readline ();
12871int
12872main ()
12873{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012874return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012875 ;
12876 return 0;
12877}
12878_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012879if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012880 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012882rm -f core conftest.err conftest.$ac_objext \
12883 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012884 if test $py_cv_lib_readline = yes; then
12885 break
12886 fi
12887done
12888# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12889#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012890if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12892$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12895$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012896
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012897$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012898
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012899fi
12900
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012901# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12903$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012904if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012905 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012906else
12907 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012908LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012910/* end confdefs.h. */
12911
Martin v. Löwiseba40652007-08-30 20:10:57 +000012912/* Override any GCC internal prototype to avoid an error.
12913 Use char because int might match the return type of a GCC
12914 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012915#ifdef __cplusplus
12916extern "C"
12917#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012918char rl_callback_handler_install ();
12919int
12920main ()
12921{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012922return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012923 ;
12924 return 0;
12925}
12926_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012927if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012928 ac_cv_lib_readline_rl_callback_handler_install=yes
12929else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012930 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012931fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012932rm -f core conftest.err conftest.$ac_objext \
12933 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012934LIBS=$ac_check_lib_save_LIBS
12935fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12937$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012938if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012940$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012941
12942fi
12943
12944
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012945# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012947/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012948#include <readline/readline.h>
12949_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012950if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012951 have_readline=yes
12952else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012953 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000012954
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012955fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012956rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012957if test $have_readline = yes
12958then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012960/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012961#include <readline/readline.h>
12962
12963_ACEOF
12964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012965 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012966
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012967$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012968
12969fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012970rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012973/* end confdefs.h. */
12974#include <readline/readline.h>
12975
12976_ACEOF
12977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012978 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012980$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012981
12982fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012983rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012984
12985fi
12986
Martin v. Löwis0daad592001-09-30 21:09:59 +000012987# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12989$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012990if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012992else
Martin v. Löwis11437992002-04-12 09:54:03 +000012993 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012994LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012997
Martin v. Löwiseba40652007-08-30 20:10:57 +000012998/* Override any GCC internal prototype to avoid an error.
12999 Use char because int might match the return type of a GCC
13000 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013001#ifdef __cplusplus
13002extern "C"
13003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013004char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013005int
13006main ()
13007{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013008return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 ;
13010 return 0;
13011}
13012_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013013if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013014 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013015else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013016 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013017fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013018rm -f core conftest.err conftest.$ac_objext \
13019 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013020LIBS=$ac_check_lib_save_LIBS
13021fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13023$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013024if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013025
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013026$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013027
Martin v. Löwis0daad592001-09-30 21:09:59 +000013028fi
13029
Michael W. Hudson54241132001-12-07 15:38:26 +000013030
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013031# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13033$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013034if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013035 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013036else
13037 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013038LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013040/* end confdefs.h. */
13041
13042/* Override any GCC internal prototype to avoid an error.
13043 Use char because int might match the return type of a GCC
13044 builtin and then its argument prototype would still apply. */
13045#ifdef __cplusplus
13046extern "C"
13047#endif
13048char rl_completion_display_matches_hook ();
13049int
13050main ()
13051{
13052return rl_completion_display_matches_hook ();
13053 ;
13054 return 0;
13055}
13056_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013057if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013058 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013060 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013061fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013062rm -f core conftest.err conftest.$ac_objext \
13063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013064LIBS=$ac_check_lib_save_LIBS
13065fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13067$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013068if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013069
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013070$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013071
13072fi
13073
13074
Martin v. Löwis0daad592001-09-30 21:09:59 +000013075# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13077$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013078if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013079 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013080else
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013082LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013085
Martin v. Löwiseba40652007-08-30 20:10:57 +000013086/* Override any GCC internal prototype to avoid an error.
13087 Use char because int might match the return type of a GCC
13088 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013089#ifdef __cplusplus
13090extern "C"
13091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013092char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013093int
13094main ()
13095{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013096return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 ;
13098 return 0;
13099}
13100_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013101if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013103else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013104 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013105fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013106rm -f core conftest.err conftest.$ac_objext \
13107 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013108LIBS=$ac_check_lib_save_LIBS
13109fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13111$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013112if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013113
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013114$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013115
Guido van Rossum353ae582001-07-10 16:45:32 +000013116fi
13117
Jack Jansendd19cf82001-12-06 22:36:17 +000013118
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013119# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013121/* end confdefs.h. */
13122#include <readline/readline.h>
13123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013124if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013125 have_readline=yes
13126else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013127 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013128
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013129fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013130rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013131if test $have_readline = yes
13132then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013134/* end confdefs.h. */
13135#include <readline/readline.h>
13136
13137_ACEOF
13138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013139 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013142
13143fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013144rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013145
13146fi
13147
Martin v. Löwis82bca632006-02-10 20:49:30 +000013148# End of readline checks: restore LIBS
13149LIBS=$LIBS_no_readline
13150
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13152$as_echo_n "checking for broken nice()... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013153if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013154 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013155else
Martin v. Löwis11437992002-04-12 09:54:03 +000013156
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013157if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013158 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013161/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013162
13163int main()
13164{
13165 int val1 = nice(1);
13166 if (val1 != -1 && val1 == nice(2))
13167 exit(0);
13168 exit(1);
13169}
13170
Martin v. Löwis11437992002-04-12 09:54:03 +000013171_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013172if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013173 ac_cv_broken_nice=yes
13174else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013175 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013176fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13178 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013179fi
13180
Martin v. Löwiseba40652007-08-30 20:10:57 +000013181fi
13182
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13184$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013185if test "$ac_cv_broken_nice" = yes
13186then
Martin v. Löwis11437992002-04-12 09:54:03 +000013187
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013189
13190fi
13191
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13193$as_echo_n "checking for broken poll()... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013194if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013195 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013197 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013198 ac_cv_broken_poll=no
13199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013201/* end confdefs.h. */
13202
13203#include <poll.h>
13204
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013205int main()
13206{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013207 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013208 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013209
13210 close (42);
13211
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013212 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013213 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013214 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013215 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013216 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013217 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013218 return 1;
13219}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013220
13221_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013222if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013223 ac_cv_broken_poll=yes
13224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013225 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013226fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13228 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013230
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013231fi
13232
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13234$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013235if test "$ac_cv_broken_poll" = yes
13236then
13237
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013238$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013239
13240fi
13241
Brett Cannon43802422005-02-10 20:48:03 +000013242# 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 +000013243# (which is not required by ISO C or UNIX spec) and/or if we support
13244# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013245ac_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 +000013246#include <$ac_cv_struct_tm>
13247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013248"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013249if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013250
13251cat >>confdefs.h <<_ACEOF
13252#define HAVE_STRUCT_TM_TM_ZONE 1
13253_ACEOF
13254
13255
13256fi
13257
13258if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13259
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013260$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013261
13262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013263 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13264"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013265if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013266 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013268 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013269fi
13270
Martin v. Löwiseba40652007-08-30 20:10:57 +000013271cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013272#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013273_ACEOF
13274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13276$as_echo_n "checking for tzname... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013277if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013278 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013281/* end confdefs.h. */
13282#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013283#if !HAVE_DECL_TZNAME
13284extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013285#endif
13286
13287int
13288main ()
13289{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013290return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013291 ;
13292 return 0;
13293}
13294_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013295if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013296 ac_cv_var_tzname=yes
13297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013298 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013299fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013300rm -f core conftest.err conftest.$ac_objext \
13301 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13304$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013305 if test $ac_cv_var_tzname = yes; then
13306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013307$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013308
13309 fi
13310fi
13311
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013312
Martin v. Löwis1d459062005-03-14 21:23:33 +000013313# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13315$as_echo_n "checking for working tzset()... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013316if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013317 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013318else
13319
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013320if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013321 ac_cv_working_tzset=no
13322else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013324/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013325
13326#include <stdlib.h>
13327#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013328#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013329
13330#if HAVE_TZNAME
13331extern char *tzname[];
13332#endif
13333
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013334int main()
13335{
Brett Cannon18367812003-09-19 00:59:16 +000013336 /* Note that we need to ensure that not only does tzset(3)
13337 do 'something' with localtime, but it works as documented
13338 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013339 This includes making sure that tzname is set properly if
13340 tm->tm_zone does not exist since it is the alternative way
13341 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013342
13343 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013344 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013345 */
13346
Martin v. Löwis1d459062005-03-14 21:23:33 +000013347 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013348 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13349
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013350 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013351 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013352 if (localtime(&groundhogday)->tm_hour != 0)
13353 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013354#if HAVE_TZNAME
13355 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13356 if (strcmp(tzname[0], "UTC") ||
13357 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13358 exit(1);
13359#endif
Brett Cannon18367812003-09-19 00:59:16 +000013360
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013361 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013362 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013363 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013364 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013365#if HAVE_TZNAME
13366 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13367 exit(1);
13368#endif
Brett Cannon18367812003-09-19 00:59:16 +000013369
13370 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13371 tzset();
13372 if (localtime(&groundhogday)->tm_hour != 11)
13373 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013374#if HAVE_TZNAME
13375 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13376 exit(1);
13377#endif
13378
13379#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013380 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13381 exit(1);
13382 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13383 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013384#endif
Brett Cannon18367812003-09-19 00:59:16 +000013385
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013386 exit(0);
13387}
13388
13389_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013391 ac_cv_working_tzset=yes
13392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013393 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013394fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013395rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13396 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013397fi
13398
Martin v. Löwiseba40652007-08-30 20:10:57 +000013399fi
13400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13402$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013403if test "$ac_cv_working_tzset" = yes
13404then
13405
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013406$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013407
13408fi
13409
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013410# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13412$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013413if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013414 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013415else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013417/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013418#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013419int
13420main ()
13421{
13422
13423struct stat st;
13424st.st_mtim.tv_nsec = 1;
13425
13426 ;
13427 return 0;
13428}
13429_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013430if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013431 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013432else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013433 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13436fi
13437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13439$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013440if test "$ac_cv_stat_tv_nsec" = yes
13441then
13442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013443$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013444
13445fi
13446
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013447# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13449$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013450if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013451 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013452else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013454/* end confdefs.h. */
13455#include <sys/stat.h>
13456int
13457main ()
13458{
13459
13460struct stat st;
13461st.st_mtimespec.tv_nsec = 1;
13462
13463 ;
13464 return 0;
13465}
13466_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013468 ac_cv_stat_tv_nsec2=yes
13469else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013470 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13473fi
13474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13476$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013477if test "$ac_cv_stat_tv_nsec2" = yes
13478then
13479
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013480$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013481
13482fi
13483
Jack Jansen666b1e72001-10-31 12:11:48 +000013484# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13486$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013487if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013488 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013489else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013491/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013492#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013493int
13494main ()
13495{
Jack Jansen666b1e72001-10-31 12:11:48 +000013496
13497 int rtn;
13498 rtn = mvwdelch(0,0,0);
13499
Martin v. Löwis11437992002-04-12 09:54:03 +000013500 ;
13501 return 0;
13502}
13503_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013504if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013505 ac_cv_mvwdelch_is_expression=yes
13506else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013507 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13510fi
13511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13513$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013514
13515if test "$ac_cv_mvwdelch_is_expression" = yes
13516then
Martin v. Löwis11437992002-04-12 09:54:03 +000013517
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013518$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013519
13520fi
13521
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13523$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013524if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013525 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013528/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013529#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013530int
13531main ()
13532{
Jack Jansen666b1e72001-10-31 12:11:48 +000013533
13534 WINDOW *w;
13535 w->_flags = 0;
13536
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 ;
13538 return 0;
13539}
13540_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013541if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013542 ac_cv_window_has_flags=yes
13543else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013544 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13547fi
13548
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13550$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013551
Jack Jansen666b1e72001-10-31 12:11:48 +000013552
13553if test "$ac_cv_window_has_flags" = yes
13554then
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013556$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013557
13558fi
13559
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13561$as_echo_n "checking for is_term_resized... " >&6; }
13562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013563/* end confdefs.h. */
13564#include <curses.h>
13565int
13566main ()
13567{
13568void *x=is_term_resized
13569 ;
13570 return 0;
13571}
13572_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013573if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013575$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013576
Matthias Klosec511b472010-05-08 11:01:39 +000013577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013578$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013579else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13581$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013582
13583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13585
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13587$as_echo_n "checking for resize_term... " >&6; }
13588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013589/* end confdefs.h. */
13590#include <curses.h>
13591int
13592main ()
13593{
13594void *x=resize_term
13595 ;
13596 return 0;
13597}
13598_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013599if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013600
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013601$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013602
Matthias Klosec511b472010-05-08 11:01:39 +000013603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013604$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013605else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13607$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013608
13609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13613$as_echo_n "checking for resizeterm... " >&6; }
13614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013615/* end confdefs.h. */
13616#include <curses.h>
13617int
13618main ()
13619{
13620void *x=resizeterm
13621 ;
13622 return 0;
13623}
13624_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013625if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013627$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013628
Matthias Klosec511b472010-05-08 11:01:39 +000013629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013630$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013631else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13633$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013634
13635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13637
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13639$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013640
13641if test -r /dev/ptmx
13642then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13644$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013646$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013647
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13650$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013651fi
13652
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13654$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013655
13656if test -r /dev/ptc
13657then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13659$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013660
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013662
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13665$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013666fi
13667
Mark Dickinson82864d12009-11-15 16:18:58 +000013668if test "$have_long_long" = yes
13669then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13671$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013672 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013673 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013674else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013675 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013676 ac_cv_have_long_long_format=no
13677else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013679/* end confdefs.h. */
13680
13681 #include <stdio.h>
13682 #include <stddef.h>
13683 #include <string.h>
13684
13685 #ifdef HAVE_SYS_TYPES_H
13686 #include <sys/types.h>
13687 #endif
13688
13689 int main()
13690 {
13691 char buffer[256];
13692
13693 if (sprintf(buffer, "%lld", (long long)123) < 0)
13694 return 1;
13695 if (strcmp(buffer, "123"))
13696 return 1;
13697
13698 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13699 return 1;
13700 if (strcmp(buffer, "-123"))
13701 return 1;
13702
13703 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13704 return 1;
13705 if (strcmp(buffer, "123"))
13706 return 1;
13707
13708 return 0;
13709 }
13710
13711_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013712if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013713 ac_cv_have_long_long_format=yes
13714else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013715 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013716fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013719fi
13720
13721
Mark Dickinson82864d12009-11-15 16:18:58 +000013722fi
13723
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13725$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013726fi
13727
Mark Dickinson5ce84742009-12-31 20:48:04 +000013728if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013729then
13730
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013731$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013732
13733fi
13734
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013735if test $ac_sys_system = Darwin
13736then
13737 LIBS="$LIBS -framework CoreFoundation"
13738fi
13739
Mark Dickinson82864d12009-11-15 16:18:58 +000013740
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13742$as_echo_n "checking for %zd printf() format support... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013743if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013744 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013745else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013746 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013747 ac_cv_have_size_t_format="cross -- assuming yes"
13748
Brett Cannon09d12362006-05-11 05:11:33 +000013749else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013751/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013752
Brett Cannon09d12362006-05-11 05:11:33 +000013753#include <stdio.h>
13754#include <stddef.h>
13755#include <string.h>
13756
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013757#ifdef HAVE_SYS_TYPES_H
13758#include <sys/types.h>
13759#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013760
13761#ifdef HAVE_SSIZE_T
13762typedef ssize_t Py_ssize_t;
13763#elif SIZEOF_VOID_P == SIZEOF_LONG
13764typedef long Py_ssize_t;
13765#else
13766typedef int Py_ssize_t;
13767#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013768
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013769int main()
13770{
13771 char buffer[256];
13772
Brett Cannon09d12362006-05-11 05:11:33 +000013773 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13774 return 1;
13775
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013776 if (strcmp(buffer, "123"))
13777 return 1;
13778
13779 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13780 return 1;
13781
13782 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013783 return 1;
13784
13785 return 0;
13786}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013787
Brett Cannon09d12362006-05-11 05:11:33 +000013788_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013789if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013790 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013792 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013793fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013796fi
13797
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13800$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013801if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013802
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013803$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013804
13805fi
13806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013808#ifdef HAVE_SYS_TYPES_H
13809#include <sys/types.h>
13810#endif
13811#ifdef HAVE_SYS_SOCKET_H
13812#include <sys/socket.h>
13813#endif
13814
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013815"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013816if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013817
Martin v. Löwis11437992002-04-12 09:54:03 +000013818else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013819
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013820$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013821
13822fi
13823
Michael W. Hudson54241132001-12-07 15:38:26 +000013824
Benjamin Peterson7497e912010-10-16 00:53:39 +000013825case $ac_sys_system in
13826AIX*)
13827
13828$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13829 ;;
13830esac
13831
13832
Michael W. Hudson54241132001-12-07 15:38:26 +000013833
13834
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013835for h in `(cd $srcdir;echo Python/thread_*.h)`
13836do
13837 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13838done
13839
Michael W. Hudson54241132001-12-07 15:38:26 +000013840
Neal Norwitzd24499d2005-12-18 21:36:39 +000013841SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13843$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013844for dir in $SRCDIRS; do
13845 if test ! -d $dir; then
13846 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013847 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013848done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13850$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013851
Guido van Rossum627b2d71993-12-24 10:39:16 +000013852# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013853ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013854
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013855ac_config_files="$ac_config_files Modules/ld_so_aix"
13856
Martin v. Löwis11437992002-04-12 09:54:03 +000013857cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013858# This file is a shell script that caches the results of configure
13859# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013860# scripts and configure runs, see configure's option --config-cache.
13861# It is not useful on other systems. If it contains results you don't
13862# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013863#
Martin v. Löwis11437992002-04-12 09:54:03 +000013864# config.status only pays attention to the cache file if you give it
13865# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013866#
Skip Montanaro6dead952003-09-25 14:50:04 +000013867# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013868# loading this file, other *unset* `ac_cv_foo' will be assigned the
13869# following values.
13870
13871_ACEOF
13872
Guido van Rossumf78abae1997-01-21 22:02:36 +000013873# The following way of writing the cache mishandles newlines in values,
13874# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013875# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013876# Ultrix sh set writes to stderr and can't be redirected directly,
13877# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013878(
13879 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13880 eval ac_val=\$$ac_var
13881 case $ac_val in #(
13882 *${as_nl}*)
13883 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013884 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13885$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013886 esac
13887 case $ac_var in #(
13888 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013889 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13890 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891 esac ;;
13892 esac
13893 done
13894
Martin v. Löwis11437992002-04-12 09:54:03 +000013895 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013896 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13897 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013898 # `set' does not quote correctly, so add quotes: double-quote
13899 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013900 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013901 "s/'/'\\\\''/g;
13902 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 *)
13905 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013906 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013907 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013908 esac |
13909 sort
13910) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013912 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013914 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13916 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013917 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13918 :end' >>confcache
13919if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13920 if test -w "$cache_file"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013921 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013922 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13923$as_echo "$as_me: updating cache $cache_file" >&6;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013924 if test ! -f "$cache_file" || test -h "$cache_file"; then
13925 cat confcache >"$cache_file"
13926 else
13927 case $cache_file in #(
13928 */* | ?:*)
13929 mv -f confcache "$cache_file"$$ &&
13930 mv -f "$cache_file"$$ "$cache_file" ;; #(
13931 *)
13932 mv -f confcache "$cache_file" ;;
13933 esac
13934 fi
13935 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013936 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013937 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13938$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013939 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013940fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013941rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013942
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013943test "x$prefix" = xNONE && prefix=$ac_default_prefix
13944# Let make expand exec_prefix.
13945test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013946
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013947DEFS=-DHAVE_CONFIG_H
13948
Skip Montanaro6dead952003-09-25 14:50:04 +000013949ac_libobjs=
13950ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013951U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013952for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13953 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013954 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013955 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000013956 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13957 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013958 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13959 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013960done
13961LIBOBJS=$ac_libobjs
13962
13963LTLIBOBJS=$ac_ltlibobjs
13964
13965
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013967
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013968: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013969ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013970ac_clean_files_save=$ac_clean_files
13971ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013972{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13973$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13974as_write_fail=0
13975cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013976#! $SHELL
13977# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013978# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013979# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013980# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013981
Martin v. Löwis11437992002-04-12 09:54:03 +000013982debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013983ac_cs_recheck=false
13984ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013985
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013986SHELL=\${CONFIG_SHELL-$SHELL}
13987export SHELL
13988_ASEOF
13989cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13990## -------------------- ##
13991## M4sh Initialization. ##
13992## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013993
Martin v. Löwiseba40652007-08-30 20:10:57 +000013994# Be more Bourne compatible
13995DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013996if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013997 emulate sh
13998 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013999 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014000 # is contrary to our usage. Disable this feature.
14001 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014002 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014004 case `(set -o) 2>/dev/null` in #(
14005 *posix*) :
14006 set -o posix ;; #(
14007 *) :
14008 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014009esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014010fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014011
Skip Montanaro6dead952003-09-25 14:50:04 +000014012
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014013as_nl='
14014'
14015export as_nl
14016# Printing a long string crashes Solaris 7 /usr/bin/printf.
14017as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14018as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14019as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14020# Prefer a ksh shell builtin over an external printf program on Solaris,
14021# but without wasting forks for bash or zsh.
14022if test -z "$BASH_VERSION$ZSH_VERSION" \
14023 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14024 as_echo='print -r --'
14025 as_echo_n='print -rn --'
14026elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14027 as_echo='printf %s\n'
14028 as_echo_n='printf %s'
14029else
14030 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14031 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14032 as_echo_n='/usr/ucb/echo -n'
14033 else
14034 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14035 as_echo_n_body='eval
14036 arg=$1;
14037 case $arg in #(
14038 *"$as_nl"*)
14039 expr "X$arg" : "X\\(.*\\)$as_nl";
14040 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14041 esac;
14042 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14043 '
14044 export as_echo_n_body
14045 as_echo_n='sh -c $as_echo_n_body as_echo'
14046 fi
14047 export as_echo_body
14048 as_echo='sh -c $as_echo_body as_echo'
14049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014050
14051# The user is always right.
14052if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014053 PATH_SEPARATOR=:
14054 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14055 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14056 PATH_SEPARATOR=';'
14057 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014058fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014059
Martin v. Löwiseba40652007-08-30 20:10:57 +000014060
14061# IFS
14062# We need space, tab and new line, in precisely that order. Quoting is
14063# there to prevent editors from complaining about space-tab.
14064# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14065# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014066IFS=" "" $as_nl"
14067
14068# Find who we are. Look in the path if we contain no directory separator.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014069as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014070case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014071 *[\\/]* ) as_myself=$0 ;;
14072 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014073for as_dir in $PATH
14074do
14075 IFS=$as_save_IFS
14076 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014077 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14078 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014079IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014080
Martin v. Löwiseba40652007-08-30 20:10:57 +000014081 ;;
14082esac
14083# We did not find ourselves, most probably we were run as `sh COMMAND'
14084# in which case we are not to be found in the path.
14085if test "x$as_myself" = x; then
14086 as_myself=$0
14087fi
14088if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014089 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14090 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014091fi
14092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014093# Unset variables that we do not need and which cause bugs (e.g. in
14094# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14095# suppresses any "Segmentation fault" message there. '((' could
14096# trigger a bug in pdksh 5.2.14.
14097for as_var in BASH_ENV ENV MAIL MAILPATH
14098do eval test x\${$as_var+set} = xset \
14099 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014100done
14101PS1='$ '
14102PS2='> '
14103PS4='+ '
14104
14105# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014106LC_ALL=C
14107export LC_ALL
14108LANGUAGE=C
14109export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014110
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014111# CDPATH.
14112(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14113
14114
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014115# as_fn_error STATUS ERROR [LINENO LOG_FD]
14116# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014117# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14118# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014119# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014120as_fn_error ()
14121{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014122 as_status=$1; test $as_status -eq 0 && as_status=1
14123 if test "$4"; then
14124 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14125 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014126 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014127 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014128 as_fn_exit $as_status
14129} # as_fn_error
14130
14131
14132# as_fn_set_status STATUS
14133# -----------------------
14134# Set $? to STATUS, without forking.
14135as_fn_set_status ()
14136{
14137 return $1
14138} # as_fn_set_status
14139
14140# as_fn_exit STATUS
14141# -----------------
14142# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14143as_fn_exit ()
14144{
14145 set +e
14146 as_fn_set_status $1
14147 exit $1
14148} # as_fn_exit
14149
14150# as_fn_unset VAR
14151# ---------------
14152# Portably unset VAR.
14153as_fn_unset ()
14154{
14155 { eval $1=; unset $1;}
14156}
14157as_unset=as_fn_unset
14158# as_fn_append VAR VALUE
14159# ----------------------
14160# Append the text in VALUE to the end of the definition contained in VAR. Take
14161# advantage of any shell optimizations that allow amortized linear growth over
14162# repeated appends, instead of the typical quadratic growth present in naive
14163# implementations.
14164if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14165 eval 'as_fn_append ()
14166 {
14167 eval $1+=\$2
14168 }'
14169else
14170 as_fn_append ()
14171 {
14172 eval $1=\$$1\$2
14173 }
14174fi # as_fn_append
14175
14176# as_fn_arith ARG...
14177# ------------------
14178# Perform arithmetic evaluation on the ARGs, and store the result in the
14179# global $as_val. Take advantage of shells that can avoid forks. The arguments
14180# must be portable across $(()) and expr.
14181if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14182 eval 'as_fn_arith ()
14183 {
14184 as_val=$(( $* ))
14185 }'
14186else
14187 as_fn_arith ()
14188 {
14189 as_val=`expr "$@" || test $? -eq 1`
14190 }
14191fi # as_fn_arith
14192
14193
Martin v. Löwiseba40652007-08-30 20:10:57 +000014194if expr a : '\(a\)' >/dev/null 2>&1 &&
14195 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14196 as_expr=expr
14197else
14198 as_expr=false
14199fi
14200
14201if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14202 as_basename=basename
14203else
14204 as_basename=false
14205fi
14206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014207if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14208 as_dirname=dirname
14209else
14210 as_dirname=false
14211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014212
Martin v. Löwiseba40652007-08-30 20:10:57 +000014213as_me=`$as_basename -- "$0" ||
14214$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14215 X"$0" : 'X\(//\)$' \| \
14216 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014217$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014218 sed '/^.*\/\([^/][^/]*\)\/*$/{
14219 s//\1/
14220 q
14221 }
14222 /^X\/\(\/\/\)$/{
14223 s//\1/
14224 q
14225 }
14226 /^X\/\(\/\).*/{
14227 s//\1/
14228 q
14229 }
14230 s/.*/./; q'`
14231
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014232# Avoid depending upon Character Ranges.
14233as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14234as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14235as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14236as_cr_digits='0123456789'
14237as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014238
14239ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014240case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014241-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014242 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014243 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014244 xy) ECHO_C='\c';;
14245 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14246 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014247 esac;;
14248*)
14249 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014250esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014251
Martin v. Löwis11437992002-04-12 09:54:03 +000014252rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014253if test -d conf$$.dir; then
14254 rm -f conf$$.dir/conf$$.file
14255else
14256 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014257 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014258fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014259if (echo >conf$$.file) 2>/dev/null; then
14260 if ln -s conf$$.file conf$$ 2>/dev/null; then
14261 as_ln_s='ln -s'
14262 # ... but there are two gotchas:
14263 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14264 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14265 # In both cases, we have to default to `cp -p'.
14266 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14267 as_ln_s='cp -p'
14268 elif ln conf$$.file conf$$ 2>/dev/null; then
14269 as_ln_s=ln
14270 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014271 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014272 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014273else
14274 as_ln_s='cp -p'
14275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014276rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14277rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014279
14280# as_fn_mkdir_p
14281# -------------
14282# Create "$as_dir" as a directory, including parents if necessary.
14283as_fn_mkdir_p ()
14284{
14285
14286 case $as_dir in #(
14287 -*) as_dir=./$as_dir;;
14288 esac
14289 test -d "$as_dir" || eval $as_mkdir_p || {
14290 as_dirs=
14291 while :; do
14292 case $as_dir in #(
14293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14294 *) as_qdir=$as_dir;;
14295 esac
14296 as_dirs="'$as_qdir' $as_dirs"
14297 as_dir=`$as_dirname -- "$as_dir" ||
14298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14299 X"$as_dir" : 'X\(//\)[^/]' \| \
14300 X"$as_dir" : 'X\(//\)$' \| \
14301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14302$as_echo X"$as_dir" |
14303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14304 s//\1/
14305 q
14306 }
14307 /^X\(\/\/\)[^/].*/{
14308 s//\1/
14309 q
14310 }
14311 /^X\(\/\/\)$/{
14312 s//\1/
14313 q
14314 }
14315 /^X\(\/\).*/{
14316 s//\1/
14317 q
14318 }
14319 s/.*/./; q'`
14320 test -d "$as_dir" && break
14321 done
14322 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014323 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014324
14325
14326} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014327if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014328 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014329else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014330 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014331 as_mkdir_p=false
14332fi
14333
Martin v. Löwiseba40652007-08-30 20:10:57 +000014334if test -x / >/dev/null 2>&1; then
14335 as_test_x='test -x'
14336else
14337 if ls -dL / >/dev/null 2>&1; then
14338 as_ls_L_option=L
14339 else
14340 as_ls_L_option=
14341 fi
14342 as_test_x='
14343 eval sh -c '\''
14344 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014345 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014346 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014347 case $1 in #(
14348 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014349 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014350 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014351 ???[sx]*):;;*)false;;esac;fi
14352 '\'' sh
14353 '
14354fi
14355as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014356
14357# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014358as_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 +000014359
14360# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014361as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
14363
Martin v. Löwis11437992002-04-12 09:54:03 +000014364exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014365## ----------------------------------- ##
14366## Main body of $CONFIG_STATUS script. ##
14367## ----------------------------------- ##
14368_ASEOF
14369test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014370
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014371cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14372# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014373# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014374# values after options handling.
14375ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014376This file was extended by python $as_me 2.7, which was
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014377generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014378
14379 CONFIG_FILES = $CONFIG_FILES
14380 CONFIG_HEADERS = $CONFIG_HEADERS
14381 CONFIG_LINKS = $CONFIG_LINKS
14382 CONFIG_COMMANDS = $CONFIG_COMMANDS
14383 $ $0 $@
14384
Martin v. Löwiseba40652007-08-30 20:10:57 +000014385on `(hostname || uname -n) 2>/dev/null | sed 1q`
14386"
14387
Martin v. Löwis11437992002-04-12 09:54:03 +000014388_ACEOF
14389
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014390case $ac_config_files in *"
14391"*) set x $ac_config_files; shift; ac_config_files=$*;;
14392esac
14393
14394case $ac_config_headers in *"
14395"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14396esac
14397
14398
14399cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014400# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014401config_files="$ac_config_files"
14402config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014403
Martin v. Löwiseba40652007-08-30 20:10:57 +000014404_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014405
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014406cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014407ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014408\`$as_me' instantiates files and other configuration actions
14409from templates according to the current configuration. Unless the files
14410and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014412Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014413
14414 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014415 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014416 --config print configuration, then exit
14417 -q, --quiet, --silent
14418 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014419 -d, --debug don't remove temporary files
14420 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014421 --file=FILE[:TEMPLATE]
14422 instantiate the configuration file FILE
14423 --header=FILE[:TEMPLATE]
14424 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
14426Configuration files:
14427$config_files
14428
14429Configuration headers:
14430$config_headers
14431
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014432Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014433
Martin v. Löwiseba40652007-08-30 20:10:57 +000014434_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014435cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14436ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014437ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014438python config.status 2.7
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014439configured by $0, generated by GNU Autoconf 2.68,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014440 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014441
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014442Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014443This config.status script is free software; the Free Software Foundation
14444gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014445
14446ac_pwd='$ac_pwd'
14447srcdir='$srcdir'
14448INSTALL='$INSTALL'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014449test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014450_ACEOF
14451
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014452cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14453# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014454ac_need_defaults=:
14455while test $# != 0
14456do
14457 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014458 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014459 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14460 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014461 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014462 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014463 --*=)
14464 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14465 ac_optarg=
14466 ac_shift=:
14467 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014468 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014469 ac_option=$1
14470 ac_optarg=$2
14471 ac_shift=shift
14472 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 esac
14474
Skip Montanaro6dead952003-09-25 14:50:04 +000014475 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014476 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014477 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14478 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014479 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014480 $as_echo "$ac_cs_version"; exit ;;
14481 --config | --confi | --conf | --con | --co | --c )
14482 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014483 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 debug=: ;;
14485 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014486 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014487 case $ac_optarg in
14488 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014489 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014490 esac
14491 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 ac_need_defaults=false;;
14493 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014494 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014495 case $ac_optarg in
14496 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14497 esac
14498 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014500 --he | --h)
14501 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014502 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014503Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014504 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014505 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014506 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14507 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14508 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014509
14510 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014511 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014512Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014513
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014514 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014515 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
14517 esac
14518 shift
14519done
14520
Skip Montanaro6dead952003-09-25 14:50:04 +000014521ac_configure_extra_args=
14522
14523if $ac_cs_silent; then
14524 exec 6>/dev/null
14525 ac_configure_extra_args="$ac_configure_extra_args --silent"
14526fi
14527
14528_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014529cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014530if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014531 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14532 shift
14533 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14534 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014535 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014536 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014537fi
14538
Martin v. Löwis11437992002-04-12 09:54:03 +000014539_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014541exec 5>>config.log
14542{
14543 echo
14544 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14545## Running $as_me. ##
14546_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014547 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014548} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014549
Martin v. Löwiseba40652007-08-30 20:10:57 +000014550_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014551cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014552_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014553
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014554cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014555
14556# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014557for ac_config_target in $ac_config_targets
14558do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014559 case $ac_config_target in
14560 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14561 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14562 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14563 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014564 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14565 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014566 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14567 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014568 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014569 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014570
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014571 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014572 esac
14573done
14574
Martin v. Löwiseba40652007-08-30 20:10:57 +000014575
Martin v. Löwis11437992002-04-12 09:54:03 +000014576# If the user did not use the arguments to specify the items to instantiate,
14577# then the envvar interface is used. Set only those that are not.
14578# We use the long form for the default assignment because of an extremely
14579# bizarre bug on SunOS 4.1.3.
14580if $ac_need_defaults; then
14581 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14582 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14583fi
14584
Skip Montanaro6dead952003-09-25 14:50:04 +000014585# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014586# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014587# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014588# Hook for its removal unless debugging.
14589# Note that there is a small window in which the directory will not be cleaned:
14590# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014591$debug ||
14592{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014593 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014594 trap 'exit_status=$?
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014595 : "${ac_tmp:=$tmp}"
14596 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014597' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014598 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014599}
Martin v. Löwis11437992002-04-12 09:54:03 +000014600# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014601
Martin v. Löwis11437992002-04-12 09:54:03 +000014602{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014603 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014604 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014605} ||
14606{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014607 tmp=./conf$$-$RANDOM
14608 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014609} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14610ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014612# Set up the scripts for CONFIG_FILES section.
14613# No need to generate them if there are no CONFIG_FILES.
14614# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014615if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014616
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014617
14618ac_cr=`echo X | tr X '\015'`
14619# On cygwin, bash can eat \r inside `` if the user requested igncr.
14620# But we know of no other shell where ac_cr would be empty at this
14621# point, so we can use a bashism as a fallback.
14622if test "x$ac_cr" = x; then
14623 eval ac_cr=\$\'\\r\'
14624fi
14625ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14626if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014627 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014628else
14629 ac_cs_awk_cr=$ac_cr
14630fi
14631
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014632echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014633_ACEOF
14634
Martin v. Löwiseba40652007-08-30 20:10:57 +000014635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014636{
14637 echo "cat >conf$$subs.awk <<_ACEOF" &&
14638 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14639 echo "_ACEOF"
14640} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014641 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14642ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014643ac_delim='%!_!# '
14644for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014645 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014646 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014647
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014648 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14649 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014650 break
14651 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014652 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014653 else
14654 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014655 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014656done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014657rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014659cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014660cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014661_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014662sed -n '
14663h
14664s/^/S["/; s/!.*/"]=/
14665p
14666g
14667s/^[^!]*!//
14668:repl
14669t repl
14670s/'"$ac_delim"'$//
14671t delim
14672:nl
14673h
14674s/\(.\{148\}\)..*/\1/
14675t more1
14676s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14677p
14678n
14679b repl
14680:more1
14681s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14682p
14683g
14684s/.\{148\}//
14685t nl
14686:delim
14687h
14688s/\(.\{148\}\)..*/\1/
14689t more2
14690s/["\\]/\\&/g; s/^/"/; s/$/"/
14691p
14692b
14693:more2
14694s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14695p
14696g
14697s/.\{148\}//
14698t delim
14699' <conf$$subs.awk | sed '
14700/^[^""]/{
14701 N
14702 s/\n//
14703}
14704' >>$CONFIG_STATUS || ac_write_fail=1
14705rm -f conf$$subs.awk
14706cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14707_ACAWK
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014708cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014709 for (key in S) S_is_set[key] = 1
14710 FS = ""
14711
14712}
14713{
14714 line = $ 0
14715 nfields = split(line, field, "@")
14716 substed = 0
14717 len = length(field[1])
14718 for (i = 2; i < nfields; i++) {
14719 key = field[i]
14720 keylen = length(key)
14721 if (S_is_set[key]) {
14722 value = S[key]
14723 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14724 len += length(value) + length(field[++i])
14725 substed = 1
14726 } else
14727 len += 1 + keylen
14728 }
14729
14730 print line
14731}
14732
14733_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014734_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014735cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14736if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14737 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14738else
14739 cat
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014740fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14741 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014742_ACEOF
14743
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014744# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14745# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014746# trailing colons and then remove the whole line if VPATH becomes empty
14747# (actually we leave an empty line to preserve line numbers).
14748if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014749 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14750h
14751s///
14752s/^/:/
14753s/[ ]*$/:/
14754s/:\$(srcdir):/:/g
14755s/:\${srcdir}:/:/g
14756s/:@srcdir@:/:/g
14757s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014758s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014759x
14760s/\(=[ ]*\).*/\1/
14761G
14762s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014763s/^[^=]*=[ ]*$//
14764}'
14765fi
14766
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014767cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014768fi # test -n "$CONFIG_FILES"
14769
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014770# Set up the scripts for CONFIG_HEADERS section.
14771# No need to generate them if there are no CONFIG_HEADERS.
14772# This happens for instance with `./config.status Makefile'.
14773if test -n "$CONFIG_HEADERS"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014774cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014775BEGIN {
14776_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014777
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014778# Transform confdefs.h into an awk script `defines.awk', embedded as
14779# here-document in config.status, that substitutes the proper values into
14780# config.h.in to produce config.h.
14781
14782# Create a delimiter string that does not exist in confdefs.h, to ease
14783# handling of long lines.
14784ac_delim='%!_!# '
14785for ac_last_try in false false :; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014786 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14787 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014788 break
14789 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014790 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014791 else
14792 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14793 fi
14794done
14795
14796# For the awk script, D is an array of macro values keyed by name,
14797# likewise P contains macro parameters if any. Preserve backslash
14798# newline sequences.
14799
14800ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14801sed -n '
14802s/.\{148\}/&'"$ac_delim"'/g
14803t rset
14804:rset
14805s/^[ ]*#[ ]*define[ ][ ]*/ /
14806t def
14807d
14808:def
14809s/\\$//
14810t bsnl
14811s/["\\]/\\&/g
14812s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14813D["\1"]=" \3"/p
14814s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14815d
14816:bsnl
14817s/["\\]/\\&/g
14818s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14819D["\1"]=" \3\\\\\\n"\\/p
14820t cont
14821s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14822t cont
14823d
14824:cont
14825n
14826s/.\{148\}/&'"$ac_delim"'/g
14827t clear
14828:clear
14829s/\\$//
14830t bsnlc
14831s/["\\]/\\&/g; s/^/"/; s/$/"/p
14832d
14833:bsnlc
14834s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14835b cont
14836' <confdefs.h | sed '
14837s/'"$ac_delim"'/"\\\
14838"/g' >>$CONFIG_STATUS || ac_write_fail=1
14839
14840cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14841 for (key in D) D_is_set[key] = 1
14842 FS = ""
14843}
14844/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14845 line = \$ 0
14846 split(line, arg, " ")
14847 if (arg[1] == "#") {
14848 defundef = arg[2]
14849 mac1 = arg[3]
14850 } else {
14851 defundef = substr(arg[1], 2)
14852 mac1 = arg[2]
14853 }
14854 split(mac1, mac2, "(") #)
14855 macro = mac2[1]
14856 prefix = substr(line, 1, index(line, defundef) - 1)
14857 if (D_is_set[macro]) {
14858 # Preserve the white space surrounding the "#".
14859 print prefix "define", macro P[macro] D[macro]
14860 next
14861 } else {
14862 # Replace #undef with comments. This is necessary, for example,
14863 # in the case of _POSIX_SOURCE, which is predefined and required
14864 # on some systems where configure will not decide to define it.
14865 if (defundef == "undef") {
14866 print "/*", prefix defundef, macro, "*/"
14867 next
14868 }
14869 }
14870}
14871{ print }
14872_ACAWK
14873_ACEOF
14874cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014875 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014876fi # test -n "$CONFIG_HEADERS"
14877
14878
14879eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14880shift
14881for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014882do
14883 case $ac_tag in
14884 :[FHLC]) ac_mode=$ac_tag; continue;;
14885 esac
14886 case $ac_mode$ac_tag in
14887 :[FHL]*:*);;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014888 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014889 :[FH]-) ac_tag=-:-;;
14890 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14891 esac
14892 ac_save_IFS=$IFS
14893 IFS=:
14894 set x $ac_tag
14895 IFS=$ac_save_IFS
14896 shift
14897 ac_file=$1
14898 shift
14899
14900 case $ac_mode in
14901 :L) ac_source=$1;;
14902 :[FH])
14903 ac_file_inputs=
14904 for ac_f
14905 do
14906 case $ac_f in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014907 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014908 *) # Look for the file first in the build tree, then in the source tree
14909 # (if the path is not absolute). The absolute path cannot be DOS-style,
14910 # because $ac_f cannot contain `:'.
14911 test -f "$ac_f" ||
14912 case $ac_f in
14913 [\\/$]*) false;;
14914 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14915 esac ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014916 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014917 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014918 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14919 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014920 done
14921
14922 # Let's still pretend it is `configure' which instantiates (i.e., don't
14923 # use $as_me), people would be surprised to read:
14924 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014925 configure_input='Generated from '`
14926 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14927 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014928 if test x"$ac_file" != x-; then
14929 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014930 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14931$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014932 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014933 # Neutralize special characters interpreted by sed in replacement strings.
14934 case $configure_input in #(
14935 *\&* | *\|* | *\\* )
14936 ac_sed_conf_input=`$as_echo "$configure_input" |
14937 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14938 *) ac_sed_conf_input=$configure_input;;
14939 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014940
14941 case $ac_tag in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014942 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14943 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014944 esac
14945 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 esac
14947
Martin v. Löwiseba40652007-08-30 20:10:57 +000014948 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014949$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014950 X"$ac_file" : 'X\(//\)[^/]' \| \
14951 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014953$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014954 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14955 s//\1/
14956 q
14957 }
14958 /^X\(\/\/\)[^/].*/{
14959 s//\1/
14960 q
14961 }
14962 /^X\(\/\/\)$/{
14963 s//\1/
14964 q
14965 }
14966 /^X\(\/\).*/{
14967 s//\1/
14968 q
14969 }
14970 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014971 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 ac_builddir=.
14973
Martin v. Löwiseba40652007-08-30 20:10:57 +000014974case "$ac_dir" in
14975.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14976*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014977 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014978 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014979 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014980 case $ac_top_builddir_sub in
14981 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14982 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14983 esac ;;
14984esac
14985ac_abs_top_builddir=$ac_pwd
14986ac_abs_builddir=$ac_pwd$ac_dir_suffix
14987# for backward compatibility:
14988ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014989
14990case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014991 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014992 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014993 ac_top_srcdir=$ac_top_builddir_sub
14994 ac_abs_top_srcdir=$ac_pwd ;;
14995 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997 ac_top_srcdir=$srcdir
14998 ac_abs_top_srcdir=$srcdir ;;
14999 *) # Relative name.
15000 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15001 ac_top_srcdir=$ac_top_build_prefix$srcdir
15002 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015003esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015004ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015005
Martin v. Löwis11437992002-04-12 09:54:03 +000015006
Martin v. Löwiseba40652007-08-30 20:10:57 +000015007 case $ac_mode in
15008 :F)
15009 #
15010 # CONFIG_FILE
15011 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015012
15013 case $INSTALL in
15014 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015015 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015017_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015018
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015019cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015020# If the template does not know about datarootdir, expand it.
15021# FIXME: This hack should be removed a few years after 2.60.
15022ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015023ac_sed_dataroot='
15024/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015025 p
15026 q
15027}
15028/@datadir@/p
15029/@docdir@/p
15030/@infodir@/p
15031/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015032/@mandir@/p'
15033case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015034*datarootdir*) ac_datarootdir_seen=yes;;
15035*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015036 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15037$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015038_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015040 ac_datarootdir_hack='
15041 s&@datadir@&$datadir&g
15042 s&@docdir@&$docdir&g
15043 s&@infodir@&$infodir&g
15044 s&@localedir@&$localedir&g
15045 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015046 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015047esac
15048_ACEOF
15049
15050# Neutralize VPATH when `$srcdir' = `.'.
15051# Shell code in configure.ac might set extrasub.
15052# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015053cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15054ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015055$extrasub
15056_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015057cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015058:t
15059/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015060s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015062s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063s&@srcdir@&$ac_srcdir&;t t
15064s&@abs_srcdir@&$ac_abs_srcdir&;t t
15065s&@top_srcdir@&$ac_top_srcdir&;t t
15066s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15067s&@builddir@&$ac_builddir&;t t
15068s&@abs_builddir@&$ac_abs_builddir&;t t
15069s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15070s&@INSTALL@&$ac_INSTALL&;t t
15071$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015072"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015073eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15074 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015075
Martin v. Löwiseba40652007-08-30 20:10:57 +000015076test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015077 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15078 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15079 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015080 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015081which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015082$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015083which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015084
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015085 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 case $ac_file in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015087 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15088 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015089 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015090 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015091 ;;
15092 :H)
15093 #
15094 # CONFIG_HEADER
15095 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015097 {
15098 $as_echo "/* $configure_input */" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015099 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15100 } >"$ac_tmp/config.h" \
15101 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15102 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015103 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15104$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015106 rm -f "$ac_file"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015107 mv "$ac_tmp/config.h" "$ac_file" \
15108 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 fi
15110 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015111 $as_echo "/* $configure_input */" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015112 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15113 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015114 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015115 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015116
Martin v. Löwiseba40652007-08-30 20:10:57 +000015117
15118 esac
15119
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015120
15121 case $ac_file$ac_mode in
15122 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15123
15124 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015125done # for ac_tag
15126
Guido van Rossum627b2d71993-12-24 10:39:16 +000015127
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015128as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015129_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015130ac_clean_files=$ac_clean_files_save
15131
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015132test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015133 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015134
Martin v. Löwis11437992002-04-12 09:54:03 +000015135
15136# configure is writing to config.log, and then calls config.status.
15137# config.status does its own redirection, appending to config.log.
15138# Unfortunately, on DOS this fails, as config.log is still kept open
15139# by configure, so config.status won't be able to write to it; its
15140# output is simply discarded. So we exec the FD to /dev/null,
15141# effectively closing config.log, so it can be properly (re)opened and
15142# appended to by config.status. When coming back to configure, we
15143# need to make the FD available again.
15144if test "$no_create" != yes; then
15145 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015146 ac_config_status_args=
15147 test "$silent" = yes &&
15148 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015150 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 exec 5>>config.log
15152 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15153 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015154 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015155fi
15156if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15158$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015159fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015160
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015161
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015162echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015163if test ! -f Modules/Setup
15164then
15165 cp $srcdir/Modules/Setup.dist Modules/Setup
15166fi
15167
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015168echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015169if test ! -f Modules/Setup.local
15170then
15171 echo "# Edit this file for local setup changes" >Modules/Setup.local
15172fi
15173
15174echo "creating Makefile"
15175$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15176 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015177 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015178
15179case $ac_sys_system in
15180BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015181 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015182
15183 Support for BeOS is deprecated as of Python 2.6.
15184 See PEP 11 for the gory details.
15185 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015186$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015187
15188 Support for BeOS is deprecated as of Python 2.6.
15189 See PEP 11 for the gory details.
15190 " >&2;}
15191 ;;
15192*) ;;
15193esac
15194
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015195mv config.c Modules