blob: 0fadddf1a264f3677cdf65165041de6f36fbdd63 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002# From configure.in Revision: 87700 .
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
646SVNVERSION
647ARFLAGS
648AR
649RANLIB
650GNULD
651LINKCC
652RUNSHARED
653INSTSONAME
654LDLIBRARYDIR
655BLDLIBRARY
656DLLLIBRARY
657LDLIBRARY
658LIBRARY
659BUILDEXEEXT
660EGREP
661GREP
662CPP
663MAINCC
664CXX
665OBJEXT
666EXEEXT
667ac_ct_CC
668CPPFLAGS
669LDFLAGS
670CFLAGS
671CC
672EXPORT_MACOSX_DEPLOYMENT_TARGET
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXTRAMACHDEPPATH
675EXTRAPLATDIR
676SGI_ABI
677MACHDEP
678FRAMEWORKINSTALLAPPSPREFIX
679FRAMEWORKUNIXTOOLSPREFIX
680FRAMEWORKALTINSTALLLAST
681FRAMEWORKALTINSTALLFIRST
682FRAMEWORKINSTALLLAST
683FRAMEWORKINSTALLFIRST
684PYTHONFRAMEWORKINSTALLDIR
685PYTHONFRAMEWORKPREFIX
686PYTHONFRAMEWORKDIR
687PYTHONFRAMEWORKIDENTIFIER
688PYTHONFRAMEWORK
689LIPO_32BIT_FLAGS
690ARCH_RUN_32BIT
691UNIVERSALSDK
692CONFIG_ARGS
693SOVERSION
694VERSION
695target_alias
696host_alias
697build_alias
698LIBS
699ECHO_T
700ECHO_N
701ECHO_C
702DEFS
703mandir
704localedir
705libdir
706psdir
707pdfdir
708dvidir
709htmldir
710infodir
711docdir
712oldincludedir
713includedir
714localstatedir
715sharedstatedir
716sysconfdir
717datadir
718datarootdir
719libexecdir
720sbindir
721bindir
722program_transform_name
723prefix
724exec_prefix
725PACKAGE_URL
726PACKAGE_BUGREPORT
727PACKAGE_STRING
728PACKAGE_VERSION
729PACKAGE_TARNAME
730PACKAGE_NAME
731PATH_SEPARATOR
732SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000733ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000734ac_user_opts='
735enable_option_checking
736enable_universalsdk
737with_universal_archs
738with_framework_name
739enable_framework
740with_gcc
741with_cxx_main
742with_suffix
743enable_shared
744enable_profiling
745with_pydebug
746enable_toolbox_glue
747with_libs
748with_system_expat
749with_system_ffi
750with_dbmliborder
751with_signal_module
752with_dec_threads
753with_threads
754with_thread
755with_pth
756enable_ipv6
757with_doc_strings
758with_tsc
759with_pymalloc
760with_valgrind
761with_wctype_functions
762with_fpectl
763with_libm
764with_libc
765enable_big_digits
766enable_unicode
767'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000768 ac_precious_vars='build_alias
769host_alias
770target_alias
771CC
772CFLAGS
773LDFLAGS
774LIBS
775CPPFLAGS
776CPP'
777
Guido van Rossum627b2d71993-12-24 10:39:16 +0000778
Guido van Rossum7f43da71994-08-01 12:15:30 +0000779# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000780ac_init_help=
781ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000782ac_unrecognized_opts=
783ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784# The variables have the same names as the options, with
785# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000786cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000789no_recursion=
790prefix=NONE
791program_prefix=NONE
792program_suffix=NONE
793program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798x_includes=NONE
799x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000800
801# Installation directory options.
802# These are left unexpanded so users can "make install exec_prefix=/foo"
803# and all the variables that are supposed to be based on exec_prefix
804# by default will actually change.
805# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000806# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000807bindir='${exec_prefix}/bin'
808sbindir='${exec_prefix}/sbin'
809libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000810datarootdir='${prefix}/share'
811datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812sysconfdir='${prefix}/etc'
813sharedstatedir='${prefix}/com'
814localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815includedir='${prefix}/include'
816oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000817docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
818infodir='${datarootdir}/info'
819htmldir='${docdir}'
820dvidir='${docdir}'
821pdfdir='${docdir}'
822psdir='${docdir}'
823libdir='${exec_prefix}/lib'
824localedir='${datarootdir}/locale'
825mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000826
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000828ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000830do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831 # If the previous option needs an argument, assign it.
832 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000833 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834 ac_prev=
835 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000836 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000839 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
840 *=) ac_optarg= ;;
841 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844 # Accept the important Cygnus configure options, so we can diagnose typos.
845
Martin v. Löwiseba40652007-08-30 20:10:57 +0000846 case $ac_dashdash$ac_option in
847 --)
848 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850 -bindir | --bindir | --bindi | --bind | --bin | --bi)
851 ac_prev=bindir ;;
852 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854
855 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860 -cache-file | --cache-file | --cache-fil | --cache-fi \
861 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
862 ac_prev=cache_file ;;
863 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
864 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000865 cache_file=$ac_optarg ;;
866
867 --config-cache | -C)
868 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869
Martin v. Löwiseba40652007-08-30 20:10:57 +0000870 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000874
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
876 | --dataroo | --dataro | --datar)
877 ac_prev=datarootdir ;;
878 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
879 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
880 datarootdir=$ac_optarg ;;
881
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000883 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000885 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000886 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000887 ac_useropt_orig=$ac_useropt
888 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
889 case $ac_user_opts in
890 *"
891"enable_$ac_useropt"
892"*) ;;
893 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
894 ac_unrecognized_sep=', ';;
895 esac
896 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000897
898 -docdir | --docdir | --docdi | --doc | --do)
899 ac_prev=docdir ;;
900 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
901 docdir=$ac_optarg ;;
902
903 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
904 ac_prev=dvidir ;;
905 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
906 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
908 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000909 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000911 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000912 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000913 ac_useropt_orig=$ac_useropt
914 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
915 case $ac_user_opts in
916 *"
917"enable_$ac_useropt"
918"*) ;;
919 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
920 ac_unrecognized_sep=', ';;
921 esac
922 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
925 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
926 | --exec | --exe | --ex)
927 ac_prev=exec_prefix ;;
928 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
929 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
930 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
933 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 # Obsolete; use --with-gas.
935 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 -help | --help | --hel | --he | -h)
938 ac_init_help=long ;;
939 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
940 ac_init_help=recursive ;;
941 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
942 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
944 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
Martin v. Löwiseba40652007-08-30 20:10:57 +0000949 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
950 ac_prev=htmldir ;;
951 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
952 | --ht=*)
953 htmldir=$ac_optarg ;;
954
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 -includedir | --includedir | --includedi | --included | --include \
956 | --includ | --inclu | --incl | --inc)
957 ac_prev=includedir ;;
958 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
959 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961
962 -infodir | --infodir | --infodi | --infod | --info | --inf)
963 ac_prev=infodir ;;
964 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
967 -libdir | --libdir | --libdi | --libd)
968 ac_prev=libdir ;;
969 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
972 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
973 | --libexe | --libex | --libe)
974 ac_prev=libexecdir ;;
975 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
976 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978
Martin v. Löwiseba40652007-08-30 20:10:57 +0000979 -localedir | --localedir | --localedi | --localed | --locale)
980 ac_prev=localedir ;;
981 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
982 localedir=$ac_optarg ;;
983
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000984 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000985 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986 ac_prev=localstatedir ;;
987 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000988 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990
991 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
992 ac_prev=mandir ;;
993 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997 # Obsolete; use --without-fp.
998 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
1000 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 no_create=yes ;;
1003
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1009 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1010 | --oldin | --oldi | --old | --ol | --o)
1011 ac_prev=oldincludedir ;;
1012 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1013 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1014 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1018 ac_prev=prefix ;;
1019 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1023 | --program-pre | --program-pr | --program-p)
1024 ac_prev=program_prefix ;;
1025 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1026 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1030 | --program-suf | --program-su | --program-s)
1031 ac_prev=program_suffix ;;
1032 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1033 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
1036 -program-transform-name | --program-transform-name \
1037 | --program-transform-nam | --program-transform-na \
1038 | --program-transform-n | --program-transform- \
1039 | --program-transform | --program-transfor \
1040 | --program-transfo | --program-transf \
1041 | --program-trans | --program-tran \
1042 | --progr-tra | --program-tr | --program-t)
1043 ac_prev=program_transform_name ;;
1044 -program-transform-name=* | --program-transform-name=* \
1045 | --program-transform-nam=* | --program-transform-na=* \
1046 | --program-transform-n=* | --program-transform-=* \
1047 | --program-transform=* | --program-transfor=* \
1048 | --program-transfo=* | --program-transf=* \
1049 | --program-trans=* | --program-tran=* \
1050 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052
Martin v. Löwiseba40652007-08-30 20:10:57 +00001053 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1054 ac_prev=pdfdir ;;
1055 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1056 pdfdir=$ac_optarg ;;
1057
1058 -psdir | --psdir | --psdi | --psd | --ps)
1059 ac_prev=psdir ;;
1060 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1061 psdir=$ac_optarg ;;
1062
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1064 | -silent | --silent | --silen | --sile | --sil)
1065 silent=yes ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1068 ac_prev=sbindir ;;
1069 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1070 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1074 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1075 | --sharedst | --shareds | --shared | --share | --shar \
1076 | --sha | --sh)
1077 ac_prev=sharedstatedir ;;
1078 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1079 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1080 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1081 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 -site | --site | --sit)
1085 ac_prev=site ;;
1086 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1090 ac_prev=srcdir ;;
1091 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1095 | --syscon | --sysco | --sysc | --sys | --sy)
1096 ac_prev=sysconfdir ;;
1097 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1098 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1107 verbose=yes ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 -version | --version | --versio | --versi | --vers | -V)
1110 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001113 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001115 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001116 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001117 ac_useropt_orig=$ac_useropt
1118 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1119 case $ac_user_opts in
1120 *"
1121"with_$ac_useropt"
1122"*) ;;
1123 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1124 ac_unrecognized_sep=', ';;
1125 esac
1126 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
1128 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001129 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001131 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001132 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001133 ac_useropt_orig=$ac_useropt
1134 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1135 case $ac_user_opts in
1136 *"
1137"with_$ac_useropt"
1138"*) ;;
1139 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1140 ac_unrecognized_sep=', ';;
1141 esac
1142 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144 --x)
1145 # Obsolete; use --with-x.
1146 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
1148 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1149 | --x-incl | --x-inc | --x-in | --x-i)
1150 ac_prev=x_includes ;;
1151 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1152 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
1155 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1156 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1157 ac_prev=x_libraries ;;
1158 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1159 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001162 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1163Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164 ;;
1165
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 *=*)
1167 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1168 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001169 case $ac_envvar in #(
1170 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001171 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001172 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001173 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 export $ac_envvar ;;
1175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001178 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001180 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001181 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 ;;
1183
1184 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001185done
1186
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001189 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190fi
1191
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001192if test -n "$ac_unrecognized_opts"; then
1193 case $enable_option_checking in
1194 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001195 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001196 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1197 esac
1198fi
1199
1200# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001201for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1202 datadir sysconfdir sharedstatedir localstatedir includedir \
1203 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1204 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001205do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001206 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001207 # Remove trailing slashes.
1208 case $ac_val in
1209 */ )
1210 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1211 eval $ac_var=\$ac_val;;
1212 esac
1213 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001214 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001215 [\\/$]* | ?:[\\/]* ) continue;;
1216 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001218 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001219done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001220
Martin v. Löwis11437992002-04-12 09:54:03 +00001221# There might be people who depend on the old broken behavior: `$host'
1222# used to hold the argument of --host etc.
1223# FIXME: To remove some day.
1224build=$build_alias
1225host=$host_alias
1226target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001227
Martin v. Löwis11437992002-04-12 09:54:03 +00001228# FIXME: To remove some day.
1229if test "x$host_alias" != x; then
1230 if test "x$build_alias" = x; then
1231 cross_compiling=maybe
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001232 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1233 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 elif test "x$build_alias" != "x$host_alias"; then
1235 cross_compiling=yes
1236 fi
1237fi
1238
1239ac_tool_prefix=
1240test -n "$host_alias" && ac_tool_prefix=$host_alias-
1241
1242test "$silent" = yes && exec 6>/dev/null
1243
Guido van Rossum627b2d71993-12-24 10:39:16 +00001244
Martin v. Löwiseba40652007-08-30 20:10:57 +00001245ac_pwd=`pwd` && test -n "$ac_pwd" &&
1246ac_ls_di=`ls -di .` &&
1247ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001248 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001249test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001250 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001251
1252
Guido van Rossum627b2d71993-12-24 10:39:16 +00001253# Find the source files, if location was not specified.
1254if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001256 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001257 ac_confdir=`$as_dirname -- "$as_myself" ||
1258$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1259 X"$as_myself" : 'X\(//\)[^/]' \| \
1260 X"$as_myself" : 'X\(//\)$' \| \
1261 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1262$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001263 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\/\)[^/].*/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\/\)$/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\).*/{
1276 s//\1/
1277 q
1278 }
1279 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001281 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282 srcdir=..
1283 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001284else
1285 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001287if test ! -r "$srcdir/$ac_unique_file"; then
1288 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001289 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001291ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1292ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001293 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001294 pwd)`
1295# When building in place, set srcdir=.
1296if test "$ac_abs_confdir" = "$ac_pwd"; then
1297 srcdir=.
1298fi
1299# Remove unnecessary trailing slashes from srcdir.
1300# Double slashes in file names in object file debugging info
1301# mess up M-x gdb in Emacs.
1302case $srcdir in
1303*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1304esac
1305for ac_var in $ac_precious_vars; do
1306 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1307 eval ac_env_${ac_var}_value=\$${ac_var}
1308 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1309 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1310done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312#
1313# Report the --help message.
1314#
1315if test "$ac_init_help" = "long"; then
1316 # Omit some internal or obsolete options to make the list less imposing.
1317 # This message is too long to be a string in the A/UX 3.1 sh.
1318 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001319\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001320
1321Usage: $0 [OPTION]... [VAR=VALUE]...
1322
1323To assign environment variables (e.g., CC, CFLAGS...), specify them as
1324VAR=VALUE. See below for descriptions of some of the useful variables.
1325
1326Defaults for the options are specified in brackets.
1327
1328Configuration:
1329 -h, --help display this help and exit
1330 --help=short display options specific to this package
1331 --help=recursive display the short help of all the included packages
1332 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001333 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001334 --cache-file=FILE cache test results in FILE [disabled]
1335 -C, --config-cache alias for \`--cache-file=config.cache'
1336 -n, --no-create do not create output files
1337 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1338
Martin v. Löwis11437992002-04-12 09:54:03 +00001339Installation directories:
1340 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001341 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001342 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001343 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001344
1345By default, \`make install' will install all the files in
1346\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1347an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1348for instance \`--prefix=\$HOME'.
1349
1350For better control, use the options below.
1351
1352Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001353 --bindir=DIR user executables [EPREFIX/bin]
1354 --sbindir=DIR system admin executables [EPREFIX/sbin]
1355 --libexecdir=DIR program executables [EPREFIX/libexec]
1356 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1357 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1358 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1359 --libdir=DIR object code libraries [EPREFIX/lib]
1360 --includedir=DIR C header files [PREFIX/include]
1361 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1362 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1363 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1364 --infodir=DIR info documentation [DATAROOTDIR/info]
1365 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1366 --mandir=DIR man documentation [DATAROOTDIR/man]
1367 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1368 --htmldir=DIR html documentation [DOCDIR]
1369 --dvidir=DIR dvi documentation [DOCDIR]
1370 --pdfdir=DIR pdf documentation [DOCDIR]
1371 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001372_ACEOF
1373
1374 cat <<\_ACEOF
1375_ACEOF
1376fi
1377
1378if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001379 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001380 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001381 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 cat <<\_ACEOF
1383
1384Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001385 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1387 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001388 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001389 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001390 --enable-framework[=INSTALLDIR]
1391 Build (MacOSX|Darwin) framework
1392 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001393 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001394 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1395 --enable-ipv6 Enable ipv6 (with ipv4) support
1396 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001397 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001398 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001399 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001400 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402Optional Packages:
1403 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1404 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001405 --with-universal-archs=ARCH
1406 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001407 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001408 --with-framework-name=FRAMEWORK
1409 specify an alternate name of the framework built
1410 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001412 --with-cxx-main=<compiler>
1413 compile main() and link python executable with C++
1414 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --with-suffix=.exe set executable suffix
1416 --with-pydebug build with Py_DEBUG defined
1417 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001418 --with-system-expat build pyexpat module using an installed expat
1419 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001420 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001421 --with-dbmliborder=db1:db2:...
1422 order to check db backends for dbm. Valid value is a
1423 colon separated string with the backend names
1424 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with-signal-module disable/enable signal module
1426 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1427 --with(out)-threads[=DIRECTORY]
1428 disable/enable thread support
1429 --with(out)-thread[=DIRECTORY]
1430 deprecated; use --with(out)-threads
1431 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001433 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001435 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001437 --with-fpectl enable SIGFPE catching
1438 --with-libm=STRING math library
1439 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001440
1441Some influential environment variables:
1442 CC C compiler command
1443 CFLAGS C compiler flags
1444 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1445 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001447 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001448 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001449 CPP C preprocessor
1450
1451Use these variables to override the choices made by `configure' or to help
1452it to find libraries and programs with nonstandard names/locations.
1453
Georg Brandl464432d2009-05-20 18:24:08 +00001454Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001456ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001457fi
1458
1459if test "$ac_init_help" = "recursive"; then
1460 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001462 test -d "$ac_dir" ||
1463 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1464 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 ac_builddir=.
1466
Martin v. Löwiseba40652007-08-30 20:10:57 +00001467case "$ac_dir" in
1468.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1469*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001470 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001471 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001472 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001473 case $ac_top_builddir_sub in
1474 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1475 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1476 esac ;;
1477esac
1478ac_abs_top_builddir=$ac_pwd
1479ac_abs_builddir=$ac_pwd$ac_dir_suffix
1480# for backward compatibility:
1481ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001482
1483case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001484 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001486 ac_top_srcdir=$ac_top_builddir_sub
1487 ac_abs_top_srcdir=$ac_pwd ;;
1488 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001489 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001490 ac_top_srcdir=$srcdir
1491 ac_abs_top_srcdir=$srcdir ;;
1492 *) # Relative name.
1493 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1494 ac_top_srcdir=$ac_top_build_prefix$srcdir
1495 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001496esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001498
Martin v. Löwiseba40652007-08-30 20:10:57 +00001499 cd "$ac_dir" || { ac_status=$?; continue; }
1500 # Check for guested configure.
1501 if test -f "$ac_srcdir/configure.gnu"; then
1502 echo &&
1503 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1504 elif test -f "$ac_srcdir/configure"; then
1505 echo &&
1506 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001507 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001508 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001509 fi || ac_status=$?
1510 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001511 done
1512fi
1513
Martin v. Löwiseba40652007-08-30 20:10:57 +00001514test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001515if $ac_init_version; then
1516 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001517python configure 2.7
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001518generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001519
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001520Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001521This configure script is free software; the Free Software Foundation
1522gives unlimited permission to copy, distribute and modify it.
1523_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001524 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001525fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001526
1527## ------------------------ ##
1528## Autoconf initialization. ##
1529## ------------------------ ##
1530
1531# ac_fn_c_try_compile LINENO
1532# --------------------------
1533# Try to compile conftest.$ac_ext, and return whether this succeeded.
1534ac_fn_c_try_compile ()
1535{
1536 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1537 rm -f conftest.$ac_objext
1538 if { { ac_try="$ac_compile"
1539case "(($ac_try" in
1540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1541 *) ac_try_echo=$ac_try;;
1542esac
1543eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1544$as_echo "$ac_try_echo"; } >&5
1545 (eval "$ac_compile") 2>conftest.err
1546 ac_status=$?
1547 if test -s conftest.err; then
1548 grep -v '^ *+' conftest.err >conftest.er1
1549 cat conftest.er1 >&5
1550 mv -f conftest.er1 conftest.err
1551 fi
1552 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1553 test $ac_status = 0; } && {
1554 test -z "$ac_c_werror_flag" ||
1555 test ! -s conftest.err
1556 } && test -s conftest.$ac_objext; then :
1557 ac_retval=0
1558else
1559 $as_echo "$as_me: failed program was:" >&5
1560sed 's/^/| /' conftest.$ac_ext >&5
1561
1562 ac_retval=1
1563fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001564 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001565 as_fn_set_status $ac_retval
1566
1567} # ac_fn_c_try_compile
1568
1569# ac_fn_c_try_cpp LINENO
1570# ----------------------
1571# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1572ac_fn_c_try_cpp ()
1573{
1574 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1575 if { { ac_try="$ac_cpp conftest.$ac_ext"
1576case "(($ac_try" in
1577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1578 *) ac_try_echo=$ac_try;;
1579esac
1580eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1581$as_echo "$ac_try_echo"; } >&5
1582 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1583 ac_status=$?
1584 if test -s conftest.err; then
1585 grep -v '^ *+' conftest.err >conftest.er1
1586 cat conftest.er1 >&5
1587 mv -f conftest.er1 conftest.err
1588 fi
1589 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001590 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001591 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1592 test ! -s conftest.err
1593 }; then :
1594 ac_retval=0
1595else
1596 $as_echo "$as_me: failed program was:" >&5
1597sed 's/^/| /' conftest.$ac_ext >&5
1598
1599 ac_retval=1
1600fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001601 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001602 as_fn_set_status $ac_retval
1603
1604} # ac_fn_c_try_cpp
1605
1606# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1607# -------------------------------------------------------
1608# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1609# the include files in INCLUDES and setting the cache variable VAR
1610# accordingly.
1611ac_fn_c_check_header_mongrel ()
1612{
1613 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001614 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1616$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001617if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001618 $as_echo_n "(cached) " >&6
1619fi
1620eval ac_res=\$$3
1621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1622$as_echo "$ac_res" >&6; }
1623else
1624 # Is the header compilable?
1625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1626$as_echo_n "checking $2 usability... " >&6; }
1627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1628/* end confdefs.h. */
1629$4
1630#include <$2>
1631_ACEOF
1632if ac_fn_c_try_compile "$LINENO"; then :
1633 ac_header_compiler=yes
1634else
1635 ac_header_compiler=no
1636fi
1637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1639$as_echo "$ac_header_compiler" >&6; }
1640
1641# Is the header present?
1642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1643$as_echo_n "checking $2 presence... " >&6; }
1644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1645/* end confdefs.h. */
1646#include <$2>
1647_ACEOF
1648if ac_fn_c_try_cpp "$LINENO"; then :
1649 ac_header_preproc=yes
1650else
1651 ac_header_preproc=no
1652fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001653rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1655$as_echo "$ac_header_preproc" >&6; }
1656
1657# So? What about this header?
1658case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1659 yes:no: )
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1661$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1663$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1664 ;;
1665 no:yes:* )
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1667$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1669$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1671$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1673$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1675$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001676( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001677## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001678## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001679 ) | sed "s/^/$as_me: WARNING: /" >&2
1680 ;;
1681esac
1682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1683$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001684if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001685 $as_echo_n "(cached) " >&6
1686else
1687 eval "$3=\$ac_header_compiler"
1688fi
1689eval ac_res=\$$3
1690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1691$as_echo "$ac_res" >&6; }
1692fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001693 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001694
1695} # ac_fn_c_check_header_mongrel
1696
1697# ac_fn_c_try_run LINENO
1698# ----------------------
1699# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1700# that executables *can* be run.
1701ac_fn_c_try_run ()
1702{
1703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1704 if { { ac_try="$ac_link"
1705case "(($ac_try" in
1706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1707 *) ac_try_echo=$ac_try;;
1708esac
1709eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1710$as_echo "$ac_try_echo"; } >&5
1711 (eval "$ac_link") 2>&5
1712 ac_status=$?
1713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1714 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1715 { { case "(($ac_try" in
1716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1717 *) ac_try_echo=$ac_try;;
1718esac
1719eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1720$as_echo "$ac_try_echo"; } >&5
1721 (eval "$ac_try") 2>&5
1722 ac_status=$?
1723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1724 test $ac_status = 0; }; }; then :
1725 ac_retval=0
1726else
1727 $as_echo "$as_me: program exited with status $ac_status" >&5
1728 $as_echo "$as_me: failed program was:" >&5
1729sed 's/^/| /' conftest.$ac_ext >&5
1730
1731 ac_retval=$ac_status
1732fi
1733 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001734 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001735 as_fn_set_status $ac_retval
1736
1737} # ac_fn_c_try_run
1738
1739# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1740# -------------------------------------------------------
1741# Tests whether HEADER exists and can be compiled using the include files in
1742# INCLUDES, setting the cache variable VAR accordingly.
1743ac_fn_c_check_header_compile ()
1744{
1745 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1747$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001748if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001749 $as_echo_n "(cached) " >&6
1750else
1751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1752/* end confdefs.h. */
1753$4
1754#include <$2>
1755_ACEOF
1756if ac_fn_c_try_compile "$LINENO"; then :
1757 eval "$3=yes"
1758else
1759 eval "$3=no"
1760fi
1761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1762fi
1763eval ac_res=\$$3
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1765$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001766 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001767
1768} # ac_fn_c_check_header_compile
1769
1770# ac_fn_c_try_link LINENO
1771# -----------------------
1772# Try to link conftest.$ac_ext, and return whether this succeeded.
1773ac_fn_c_try_link ()
1774{
1775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1776 rm -f conftest.$ac_objext conftest$ac_exeext
1777 if { { ac_try="$ac_link"
1778case "(($ac_try" in
1779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1780 *) ac_try_echo=$ac_try;;
1781esac
1782eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1783$as_echo "$ac_try_echo"; } >&5
1784 (eval "$ac_link") 2>conftest.err
1785 ac_status=$?
1786 if test -s conftest.err; then
1787 grep -v '^ *+' conftest.err >conftest.er1
1788 cat conftest.er1 >&5
1789 mv -f conftest.er1 conftest.err
1790 fi
1791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1792 test $ac_status = 0; } && {
1793 test -z "$ac_c_werror_flag" ||
1794 test ! -s conftest.err
1795 } && test -s conftest$ac_exeext && {
1796 test "$cross_compiling" = yes ||
1797 $as_test_x conftest$ac_exeext
1798 }; then :
1799 ac_retval=0
1800else
1801 $as_echo "$as_me: failed program was:" >&5
1802sed 's/^/| /' conftest.$ac_ext >&5
1803
1804 ac_retval=1
1805fi
1806 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1807 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1808 # interfere with the next link command; also delete a directory that is
1809 # left behind by Apple's compiler. We do this before executing the actions.
1810 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001811 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001812 as_fn_set_status $ac_retval
1813
1814} # ac_fn_c_try_link
1815
1816# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1817# -------------------------------------------
1818# Tests whether TYPE exists after having included INCLUDES, setting cache
1819# variable VAR accordingly.
1820ac_fn_c_check_type ()
1821{
1822 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001825if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001826 $as_echo_n "(cached) " >&6
1827else
1828 eval "$3=no"
1829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1830/* end confdefs.h. */
1831$4
1832int
1833main ()
1834{
1835if (sizeof ($2))
1836 return 0;
1837 ;
1838 return 0;
1839}
1840_ACEOF
1841if ac_fn_c_try_compile "$LINENO"; then :
1842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1843/* end confdefs.h. */
1844$4
1845int
1846main ()
1847{
1848if (sizeof (($2)))
1849 return 0;
1850 ;
1851 return 0;
1852}
1853_ACEOF
1854if ac_fn_c_try_compile "$LINENO"; then :
1855
1856else
1857 eval "$3=yes"
1858fi
1859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1860fi
1861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1862fi
1863eval ac_res=\$$3
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1865$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001866 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001867
1868} # ac_fn_c_check_type
1869
1870# ac_fn_c_find_uintX_t LINENO BITS VAR
1871# ------------------------------------
1872# Finds an unsigned integer type with width BITS, setting cache variable VAR
1873# accordingly.
1874ac_fn_c_find_uintX_t ()
1875{
1876 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1878$as_echo_n "checking for uint$2_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001879if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001880 $as_echo_n "(cached) " >&6
1881else
1882 eval "$3=no"
1883 # Order is important - never check a type that is potentially smaller
1884 # than half of the expected target width.
1885 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1886 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888/* end confdefs.h. */
1889$ac_includes_default
1890int
1891main ()
1892{
1893static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1894test_array [0] = 0
1895
1896 ;
1897 return 0;
1898}
1899_ACEOF
1900if ac_fn_c_try_compile "$LINENO"; then :
1901 case $ac_type in #(
1902 uint$2_t) :
1903 eval "$3=yes" ;; #(
1904 *) :
1905 eval "$3=\$ac_type" ;;
1906esac
1907fi
1908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001909 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001910
1911else
1912 break
1913fi
1914 done
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001920
1921} # ac_fn_c_find_uintX_t
1922
1923# ac_fn_c_find_intX_t LINENO BITS VAR
1924# -----------------------------------
1925# Finds a signed integer type with width BITS, setting cache variable VAR
1926# accordingly.
1927ac_fn_c_find_intX_t ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1931$as_echo_n "checking for int$2_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001932if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 # Order is important - never check a type that is potentially smaller
1937 # than half of the expected target width.
1938 for ac_type in int$2_t 'int' 'long int' \
1939 'long long int' 'short int' 'signed char'; do
1940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1941/* end confdefs.h. */
1942$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001943 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001944int
1945main ()
1946{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001947static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001948test_array [0] = 0
1949
1950 ;
1951 return 0;
1952}
1953_ACEOF
1954if ac_fn_c_try_compile "$LINENO"; then :
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001958 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001959int
1960main ()
1961{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001962static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001963 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1964test_array [0] = 0
1965
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970if ac_fn_c_try_compile "$LINENO"; then :
1971
1972else
1973 case $ac_type in #(
1974 int$2_t) :
1975 eval "$3=yes" ;; #(
1976 *) :
1977 eval "$3=\$ac_type" ;;
1978esac
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1981fi
1982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001983 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001984
1985else
1986 break
1987fi
1988 done
1989fi
1990eval ac_res=\$$3
1991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1992$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001993 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001994
1995} # ac_fn_c_find_intX_t
1996
1997# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1998# --------------------------------------------
1999# Tries to find the compile-time value of EXPR in a program that includes
2000# INCLUDES, setting VAR accordingly. Returns whether the value could be
2001# computed
2002ac_fn_c_compute_int ()
2003{
2004 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2005 if test "$cross_compiling" = yes; then
2006 # Depending upon the size, compute the lo and hi bounds.
2007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h. */
2009$4
2010int
2011main ()
2012{
2013static int test_array [1 - 2 * !(($2) >= 0)];
2014test_array [0] = 0
2015
2016 ;
2017 return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021 ac_lo=0 ac_mid=0
2022 while :; do
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$4
2026int
2027main ()
2028{
2029static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2030test_array [0] = 0
2031
2032 ;
2033 return 0;
2034}
2035_ACEOF
2036if ac_fn_c_try_compile "$LINENO"; then :
2037 ac_hi=$ac_mid; break
2038else
2039 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2040 if test $ac_lo -le $ac_mid; then
2041 ac_lo= ac_hi=
2042 break
2043 fi
2044 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2045fi
2046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2047 done
2048else
2049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2050/* end confdefs.h. */
2051$4
2052int
2053main ()
2054{
2055static int test_array [1 - 2 * !(($2) < 0)];
2056test_array [0] = 0
2057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_hi=-1 ac_mid=-1
2064 while :; do
2065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2066/* end confdefs.h. */
2067$4
2068int
2069main ()
2070{
2071static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2072test_array [0] = 0
2073
2074 ;
2075 return 0;
2076}
2077_ACEOF
2078if ac_fn_c_try_compile "$LINENO"; then :
2079 ac_lo=$ac_mid; break
2080else
2081 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2082 if test $ac_mid -le $ac_hi; then
2083 ac_lo= ac_hi=
2084 break
2085 fi
2086 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089 done
2090else
2091 ac_lo= ac_hi=
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096# Binary search between lo and hi bounds.
2097while test "x$ac_lo" != "x$ac_hi"; do
2098 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2100/* end confdefs.h. */
2101$4
2102int
2103main ()
2104{
2105static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2106test_array [0] = 0
2107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112if ac_fn_c_try_compile "$LINENO"; then :
2113 ac_hi=$ac_mid
2114else
2115 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2116fi
2117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118done
2119case $ac_lo in #((
2120?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2121'') ac_retval=1 ;;
2122esac
2123 else
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125/* end confdefs.h. */
2126$4
2127static long int longval () { return $2; }
2128static unsigned long int ulongval () { return $2; }
2129#include <stdio.h>
2130#include <stdlib.h>
2131int
2132main ()
2133{
2134
2135 FILE *f = fopen ("conftest.val", "w");
2136 if (! f)
2137 return 1;
2138 if (($2) < 0)
2139 {
2140 long int i = longval ();
2141 if (i != ($2))
2142 return 1;
2143 fprintf (f, "%ld", i);
2144 }
2145 else
2146 {
2147 unsigned long int i = ulongval ();
2148 if (i != ($2))
2149 return 1;
2150 fprintf (f, "%lu", i);
2151 }
2152 /* Do not output a trailing newline, as this causes \r\n confusion
2153 on some platforms. */
2154 return ferror (f) || fclose (f) != 0;
2155
2156 ;
2157 return 0;
2158}
2159_ACEOF
2160if ac_fn_c_try_run "$LINENO"; then :
2161 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2162else
2163 ac_retval=1
2164fi
2165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2166 conftest.$ac_objext conftest.beam conftest.$ac_ext
2167rm -f conftest.val
2168
2169 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002170 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002171 as_fn_set_status $ac_retval
2172
2173} # ac_fn_c_compute_int
2174
2175# ac_fn_c_check_func LINENO FUNC VAR
2176# ----------------------------------
2177# Tests whether FUNC exists, setting the cache variable VAR accordingly
2178ac_fn_c_check_func ()
2179{
2180 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2182$as_echo_n "checking for $2... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002183if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002184 $as_echo_n "(cached) " >&6
2185else
2186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187/* end confdefs.h. */
2188/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2189 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2190#define $2 innocuous_$2
2191
2192/* System header to define __stub macros and hopefully few prototypes,
2193 which can conflict with char $2 (); below.
2194 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2195 <limits.h> exists even on freestanding compilers. */
2196
2197#ifdef __STDC__
2198# include <limits.h>
2199#else
2200# include <assert.h>
2201#endif
2202
2203#undef $2
2204
2205/* Override any GCC internal prototype to avoid an error.
2206 Use char because int might match the return type of a GCC
2207 builtin and then its argument prototype would still apply. */
2208#ifdef __cplusplus
2209extern "C"
2210#endif
2211char $2 ();
2212/* The GNU C library defines this for functions which it implements
2213 to always fail with ENOSYS. Some functions are actually named
2214 something starting with __ and the normal name is an alias. */
2215#if defined __stub_$2 || defined __stub___$2
2216choke me
2217#endif
2218
2219int
2220main ()
2221{
2222return $2 ();
2223 ;
2224 return 0;
2225}
2226_ACEOF
2227if ac_fn_c_try_link "$LINENO"; then :
2228 eval "$3=yes"
2229else
2230 eval "$3=no"
2231fi
2232rm -f core conftest.err conftest.$ac_objext \
2233 conftest$ac_exeext conftest.$ac_ext
2234fi
2235eval ac_res=\$$3
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2237$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002238 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002239
2240} # ac_fn_c_check_func
2241
2242# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2243# ----------------------------------------------------
2244# Tries to find if the field MEMBER exists in type AGGR, after including
2245# INCLUDES, setting cache variable VAR accordingly.
2246ac_fn_c_check_member ()
2247{
2248 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2250$as_echo_n "checking for $2.$3... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002251if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002252 $as_echo_n "(cached) " >&6
2253else
2254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255/* end confdefs.h. */
2256$5
2257int
2258main ()
2259{
2260static $2 ac_aggr;
2261if (ac_aggr.$3)
2262return 0;
2263 ;
2264 return 0;
2265}
2266_ACEOF
2267if ac_fn_c_try_compile "$LINENO"; then :
2268 eval "$4=yes"
2269else
2270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271/* end confdefs.h. */
2272$5
2273int
2274main ()
2275{
2276static $2 ac_aggr;
2277if (sizeof ac_aggr.$3)
2278return 0;
2279 ;
2280 return 0;
2281}
2282_ACEOF
2283if ac_fn_c_try_compile "$LINENO"; then :
2284 eval "$4=yes"
2285else
2286 eval "$4=no"
2287fi
2288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2289fi
2290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2291fi
2292eval ac_res=\$$4
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2294$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002295 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002296
2297} # ac_fn_c_check_member
2298
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002299# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2300# ---------------------------------------------
2301# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2302# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002303ac_fn_c_check_decl ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002306 as_decl_name=`echo $2|sed 's/ *(.*//'`
2307 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2309$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2310if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002311 $as_echo_n "(cached) " >&6
2312else
2313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314/* end confdefs.h. */
2315$4
2316int
2317main ()
2318{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002319#ifndef $as_decl_name
2320#ifdef __cplusplus
2321 (void) $as_decl_use;
2322#else
2323 (void) $as_decl_name;
2324#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002325#endif
2326
2327 ;
2328 return 0;
2329}
2330_ACEOF
2331if ac_fn_c_try_compile "$LINENO"; then :
2332 eval "$3=yes"
2333else
2334 eval "$3=no"
2335fi
2336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337fi
2338eval ac_res=\$$3
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002341 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002342
2343} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002344cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002345This file contains any messages produced by compilers while
2346running configure, to aid debugging if configure makes a mistake.
2347
Martin v. Löwis174440b2008-10-03 08:59:41 +00002348It was created by python $as_me 2.7, which was
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002349generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002350
2351 $ $0 $@
2352
2353_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002354exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002355{
2356cat <<_ASUNAME
2357## --------- ##
2358## Platform. ##
2359## --------- ##
2360
2361hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2362uname -m = `(uname -m) 2>/dev/null || echo unknown`
2363uname -r = `(uname -r) 2>/dev/null || echo unknown`
2364uname -s = `(uname -s) 2>/dev/null || echo unknown`
2365uname -v = `(uname -v) 2>/dev/null || echo unknown`
2366
2367/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2368/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2369
2370/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2371/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2372/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002373/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002374/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2375/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2376/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2377
2378_ASUNAME
2379
2380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2381for as_dir in $PATH
2382do
2383 IFS=$as_save_IFS
2384 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002385 $as_echo "PATH: $as_dir"
2386 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002387IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002388
2389} >&5
2390
2391cat >&5 <<_ACEOF
2392
2393
2394## ----------- ##
2395## Core tests. ##
2396## ----------- ##
2397
2398_ACEOF
2399
2400
2401# Keep a trace of the command line.
2402# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002403# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002404# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002405# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002406ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002407ac_configure_args0=
2408ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002409ac_must_keep_next=false
2410for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002411do
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 for ac_arg
2413 do
2414 case $ac_arg in
2415 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2416 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2417 | -silent | --silent | --silen | --sile | --sil)
2418 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002420 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 esac
2422 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002423 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002425 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002427 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002429 case $ac_arg in
2430 *=* | --config-cache | -C | -disable-* | --disable-* \
2431 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2432 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2433 | -with-* | --with-* | -without-* | --without-* | --x)
2434 case "$ac_configure_args0 " in
2435 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2436 esac
2437 ;;
2438 -* ) ac_must_keep_next=true ;;
2439 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002440 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002441 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002442 ;;
2443 esac
2444 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002445done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002446{ ac_configure_args0=; unset ac_configure_args0;}
2447{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002448
2449# When interrupted or exit'd, cleanup temporary files, and complete
2450# config.log. We remove comments because anyway the quotes in there
2451# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002452# WARNING: Use '\'' to represent an apostrophe within the trap.
2453# 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 +00002454trap 'exit_status=$?
2455 # Save into config.log some information that might help in debugging.
2456 {
2457 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002458
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002459 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002460## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002461## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002462 echo
2463 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464(
2465 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2466 eval ac_val=\$$ac_var
2467 case $ac_val in #(
2468 *${as_nl}*)
2469 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002470 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2471$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002472 esac
2473 case $ac_var in #(
2474 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002475 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2476 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002477 esac ;;
2478 esac
2479 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002481 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2482 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002484 "s/'\''/'\''\\\\'\'''\''/g;
2485 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2486 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002487 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002488 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002489 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002490 esac |
2491 sort
2492)
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002494
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002495 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002496## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002497## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 echo
2499 for ac_var in $ac_subst_vars
2500 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002501 eval ac_val=\$$ac_var
2502 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002503 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002504 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002505 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 done | sort
2507 echo
2508
2509 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002510 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002511## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002512## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 echo
2514 for ac_var in $ac_subst_files
2515 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516 eval ac_val=\$$ac_var
2517 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002518 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002519 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002520 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 done | sort
2522 echo
2523 fi
2524
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002526 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002527## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002528## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002530 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 echo
2532 fi
2533 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002534 $as_echo "$as_me: caught signal $ac_signal"
2535 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002537 rm -f core *.core core.conftest.* &&
2538 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002540' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002541for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002542 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002543done
2544ac_signal=0
2545
2546# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002547rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002548
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002549$as_echo "/* confdefs.h */" > confdefs.h
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551# Predefined preprocessor variables.
2552
2553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_NAME "$PACKAGE_NAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_VERSION "$PACKAGE_VERSION"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_STRING "$PACKAGE_STRING"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2571_ACEOF
2572
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_URL "$PACKAGE_URL"
2575_ACEOF
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577
2578# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002579# Prefer an explicitly selected file to automatically selected ones.
2580ac_site_file1=NONE
2581ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002582if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002583 # We do not want a PATH search for config.site.
2584 case $CONFIG_SITE in #((
2585 -*) ac_site_file1=./$CONFIG_SITE;;
2586 */*) ac_site_file1=$CONFIG_SITE;;
2587 *) ac_site_file1=./$CONFIG_SITE;;
2588 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002590 ac_site_file1=$prefix/share/config.site
2591 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002593 ac_site_file1=$ac_default_prefix/share/config.site
2594 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002595fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002596for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002598 test "x$ac_site_file" = xNONE && continue
2599 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2601$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002603 . "$ac_site_file" \
2604 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2605$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2606as_fn_error $? "failed to load site script $ac_site_file
2607See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002608 fi
2609done
2610
2611if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002612 # Some versions of bash will fail to source /dev/null (special files
2613 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2614 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2615 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2616$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002618 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2619 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 esac
2621 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002622else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2624$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 >$cache_file
2626fi
2627
2628# Check that the precious variables saved in the cache have kept the same
2629# value.
2630ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002631for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2633 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002634 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2635 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 case $ac_old_set,$ac_new_set in
2637 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2639$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 +00002640 ac_cache_corrupted=: ;;
2641 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2643$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 ac_cache_corrupted=: ;;
2645 ,);;
2646 *)
2647 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002648 # differences in whitespace do not lead to failure.
2649 ac_old_val_w=`echo x $ac_old_val`
2650 ac_new_val_w=`echo x $ac_new_val`
2651 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2653$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2654 ac_cache_corrupted=:
2655 else
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2657$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2658 eval $ac_var=\$ac_old_val
2659 fi
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2661$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2663$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 fi;;
2665 esac
2666 # Pass precious variables to config.status.
2667 if test "$ac_new_set" = set; then
2668 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002669 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 *) ac_arg=$ac_var=$ac_new_val ;;
2671 esac
2672 case " $ac_configure_args " in
2673 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002674 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 esac
2676 fi
2677done
2678if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002679 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2682$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002683 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002685## -------------------- ##
2686## Main body of script. ##
2687## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002688
Guido van Rossum7f43da71994-08-01 12:15:30 +00002689ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002691ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2692ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2693ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694
Guido van Rossum627b2d71993-12-24 10:39:16 +00002695
Michael W. Hudson54241132001-12-07 15:38:26 +00002696
Martin v. Löwiseba40652007-08-30 20:10:57 +00002697ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002698
2699
Martin v. Löwis11437992002-04-12 09:54:03 +00002700
Georg Brandlbcd64a32009-03-31 21:45:18 +00002701if test "$prefix" != "/"; then
2702 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2703fi
2704
2705
Martin v. Löwis11437992002-04-12 09:54:03 +00002706
2707
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002708# We don't use PACKAGE_ variables, and they cause conflicts
2709# with other autoconf-based packages that include Python.h
2710grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2711rm confdefs.h
2712mv confdefs.h.new confdefs.h
2713
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002714
Martin v. Löwis174440b2008-10-03 08:59:41 +00002715VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002716
Martin v. Löwis1142de32002-03-29 16:28:31 +00002717
2718SOVERSION=1.0
2719
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002720# The later defininition of _XOPEN_SOURCE disables certain features
2721# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2722
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002723$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002724
2725
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002726# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2727# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2728# them.
2729
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002730$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002731
2732
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002733# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2734# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2735# them.
2736
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002737$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002738
2739
Martin v. Löwisd6320502004-08-12 13:45:08 +00002740# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2741# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2742
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002743$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002744
2745
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002746# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2747# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2748# them.
2749
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002750$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002751
2752
2753
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002754define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002755
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002756# Arguments passed to configure.
2757
2758CONFIG_ARGS="$ac_configure_args"
2759
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2761$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002762# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002763if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002764 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002765 case $enableval in
2766 yes)
2767 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002768 if test ! -d "${enableval}"
2769 then
2770 enableval=/
2771 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002772 ;;
2773 esac
2774 case $enableval in
2775 no)
2776 UNIVERSALSDK=
2777 enable_universalsdk=
2778 ;;
2779 *)
2780 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002781 if test ! -d "${UNIVERSALSDK}"
2782 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002783 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002784 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002785 ;;
2786 esac
2787
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002788
Ronald Oussoren988117f2006-04-29 11:31:35 +00002789else
2790
2791 UNIVERSALSDK=
2792 enable_universalsdk=
2793
Martin v. Löwiseba40652007-08-30 20:10:57 +00002794fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002795
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002796if test -n "${UNIVERSALSDK}"
2797then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2799$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2802$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002803fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002804
Martin v. Löwiseba40652007-08-30 20:10:57 +00002805
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002806
2807
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002808UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002809
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2811$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002812
2813# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002814if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002815 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2817$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002818 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002819 if test "${enable_universalsdk}" ; then
2820 :
2821 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002822 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002823 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002824
2825else
2826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2828$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002829
2830fi
2831
2832
2833
2834
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002835
2836# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002837if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002838 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002839 if test "${enable_framework}"; then
2840 :
2841 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002842 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002843 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002844 PYTHONFRAMEWORK=${withval}
2845 PYTHONFRAMEWORKDIR=${withval}.framework
2846 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2847
2848else
2849
2850 PYTHONFRAMEWORK=Python
2851 PYTHONFRAMEWORKDIR=Python.framework
2852 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2853
2854fi
2855
Martin v. Löwiseba40652007-08-30 20:10:57 +00002856# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002857if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002858 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002859 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002860 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002861 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002862 esac
2863 case $enableval in
2864 no)
2865 PYTHONFRAMEWORK=
2866 PYTHONFRAMEWORKDIR=no-framework
2867 PYTHONFRAMEWORKPREFIX=
2868 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002869 FRAMEWORKINSTALLFIRST=
2870 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002871 FRAMEWORKALTINSTALLFIRST=
2872 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002873 if test "x${prefix}" = "xNONE"; then
2874 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2875 else
2876 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2877 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002878 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002879 ;;
2880 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002881 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002882 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002883 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002884 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002885 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2886 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002887 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002888
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002889 if test "x${prefix}" = "xNONE" ; then
2890 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002891
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002892 else
2893 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2894 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002895
2896 case "${enableval}" in
2897 /System*)
2898 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2899 if test "${prefix}" = "NONE" ; then
2900 # See below
2901 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2902 fi
2903 ;;
2904
2905 /Library*)
2906 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2907 ;;
2908
2909 */Library/Frameworks)
2910 MDIR="`dirname "${enableval}"`"
2911 MDIR="`dirname "${MDIR}"`"
2912 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2913
2914 if test "${prefix}" = "NONE"; then
2915 # User hasn't specified the
2916 # --prefix option, but wants to install
2917 # the framework in a non-default location,
2918 # ensure that the compatibility links get
2919 # installed relative to that prefix as well
2920 # instead of in /usr/local.
2921 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2922 fi
2923 ;;
2924
2925 *)
2926 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2927 ;;
2928 esac
2929
Jack Jansen127e56e2001-09-11 14:41:54 +00002930 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002931
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002932 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002933 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002934 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002935
Martin v. Löwiseba40652007-08-30 20:10:57 +00002936 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002937
Martin v. Löwiseba40652007-08-30 20:10:57 +00002938 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002939
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002940 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2941
2942 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2943
Jack Jansene578a632001-08-15 01:27:14 +00002944 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002945
Guido van Rossum563e7081996-09-10 18:20:48 +00002946else
Martin v. Löwis11437992002-04-12 09:54:03 +00002947
Jack Jansene578a632001-08-15 01:27:14 +00002948 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002949 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002950 PYTHONFRAMEWORKPREFIX=
2951 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002952 FRAMEWORKINSTALLFIRST=
2953 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002954 FRAMEWORKALTINSTALLFIRST=
2955 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002956 if test "x${prefix}" = "xNONE" ; then
2957 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2958 else
2959 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2960 fi
Jack Jansene578a632001-08-15 01:27:14 +00002961 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002962
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002963
Martin v. Löwiseba40652007-08-30 20:10:57 +00002964fi
2965
Michael W. Hudson54241132001-12-07 15:38:26 +00002966
2967
2968
2969
Jack Jansene578a632001-08-15 01:27:14 +00002970
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002971
2972
Ronald Oussoren5b787322006-06-06 19:50:24 +00002973
2974
2975
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002976
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002977
Jack Jansene578a632001-08-15 01:27:14 +00002978##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00002979## AS_HELP_STRING([--with-dyld],
2980## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002981##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002982# Set name for machine-dependent library files
2983
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2985$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002986if test -z "$MACHDEP"
2987then
Guido van Rossum563e7081996-09-10 18:20:48 +00002988 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002989 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002990 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002991 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002992 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002993 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002994 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002995 ac_md_system=`echo $ac_sys_system |
2996 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2997 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002998 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002999 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003000
Guido van Rossum07397971997-04-29 21:49:50 +00003001 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003002 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003003 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003004 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003005 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003006 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003007 esac
3008fi
Guido van Rossum91922671997-10-09 20:24:13 +00003009
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003010# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3011# disable features if it is defined, without any means to access these
3012# features as extensions. For these systems, we skip the definition of
3013# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3014# some feature, make sure there is no alternative way to access this
3015# feature. Also, when using wildcards, make sure you have verified the
3016# need for not defining _XOPEN_SOURCE on all systems matching the
3017# wildcard, and that the wildcard does not include future systems
3018# (which may remove their limitations).
3019case $ac_sys_system/$ac_sys_release in
3020 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3021 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003022 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003023 # In addition, Stefan Krah confirms that issue #1244610 exists through
3024 # OpenBSD 4.6, but is fixed in 4.7.
3025 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003026 define_xopen_source=no
3027 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3028 # also defined. This can be overridden by defining _BSD_SOURCE
3029 # As this has a different meaning on Linux, only define it on OpenBSD
3030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003031$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003032
3033 ;;
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003034 OpenBSD/4.[789])
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003035 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3036 # also defined. This can be overridden by defining _BSD_SOURCE
3037 # As this has a different meaning on Linux, only define it on OpenBSD
3038
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003039$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003040
3041 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003042 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3043 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3044 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003045 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 +00003046 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003047 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3048 # request to enable features supported by the standard as a request
3049 # to disable features not supported by the standard. The best way
3050 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3051 # entirely and define __EXTENSIONS__ instead.
3052 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003053 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003054 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3055 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003056 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003057 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003058 define_xopen_source=no;;
3059 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003060 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003061 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003062 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003063 # On FreeBSD 4, the math functions C89 does not cover are never defined
3064 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3065 FreeBSD/4.*)
3066 define_xopen_source=no;;
3067 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3068 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3069 # identifies itself as Darwin/7.*
3070 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3071 # disables platform specific features beyond repair.
3072 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3073 # has no effect, don't bother defining them
3074 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003075 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003076 Darwin/1[0-9].*)
3077 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003078 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3079 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3080 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003081 AIX/4)
3082 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003083 AIX/5)
3084 if test `uname -r` -eq 1; then
3085 define_xopen_source=no
3086 fi
3087 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003088 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3089 # defining NI_NUMERICHOST.
3090 QNX/6.3.2)
3091 define_xopen_source=no
3092 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003093
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003094esac
3095
3096if test $define_xopen_source = yes
3097then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003098
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003099$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003100
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003101
3102 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3103 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3104 # several APIs are not declared. Since this is also needed in some
3105 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003106
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003107$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003108
3109
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003110
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003111$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003112
3113
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003114fi
3115
Guido van Rossum91922671997-10-09 20:24:13 +00003116#
3117# SGI compilers allow the specification of the both the ABI and the
3118# ISA on the command line. Depending on the values of these switches,
3119# different and often incompatable code will be generated.
3120#
3121# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3122# thus supply support for various ABI/ISA combinations. The MACHDEP
3123# variable is also adjusted.
3124#
3125
3126if test ! -z "$SGI_ABI"
3127then
3128 CC="cc $SGI_ABI"
3129 LDFLAGS="$SGI_ABI $LDFLAGS"
3130 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3131fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3133$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003134
Jack Jansen83f898c2002-12-30 22:23:40 +00003135# And add extra plat-mac for darwin
3136
Jack Jansen7b59b422003-03-17 15:44:10 +00003137
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3139$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003140if test -z "$EXTRAPLATDIR"
3141then
3142 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003143 darwin)
3144 EXTRAPLATDIR="\$(PLATMACDIRS)"
3145 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3146 ;;
3147 *)
3148 EXTRAPLATDIR=""
3149 EXTRAMACHDEPPATH=""
3150 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003151 esac
3152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3154$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003155
Jack Jansen6b08a402004-06-03 12:41:45 +00003156# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3157# it may influence the way we can build extensions, so distutils
3158# needs to check it
3159
Ronald Oussoren988117f2006-04-29 11:31:35 +00003160
Jack Jansen6b08a402004-06-03 12:41:45 +00003161CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003162EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003163
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3165$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003166ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3168$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003169
Guido van Rossum627b2d71993-12-24 10:39:16 +00003170# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003171
3172# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3173# for debug/optimization stuff. BASECFLAGS is for flags that are required
3174# just to get things to compile and link. Users are free to override OPT
3175# when running configure or make. The build should not break if they do.
3176# BASECFLAGS should generally not be messed with, however.
3177
3178# XXX shouldn't some/most/all of this code be merged with the stuff later
3179# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3181$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003182
Martin v. Löwiseba40652007-08-30 20:10:57 +00003183# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003184if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003185 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003186 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003187 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003188 without_gcc=yes;;
3189 yes) CC=gcc
3190 without_gcc=no;;
3191 *) CC=$withval
3192 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003193 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003194else
Martin v. Löwis11437992002-04-12 09:54:03 +00003195
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003196 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003197 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003198 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003199 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003200 case $BE_HOST_CPU in
3201 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003202 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003203 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003204 BASECFLAGS="$BASECFLAGS -export pragma"
3205 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003206 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003207 ;;
3208 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003209 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003210 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003211 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003212 ;;
3213 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003214 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003215 ;;
3216 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003217 AR="\$(srcdir)/Modules/ar_beos"
3218 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003219 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003220 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003221 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003222fi
3223
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3225$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003226
Guido van Rossum8b131c51995-03-09 14:10:13 +00003227# If the user switches compilers, we can't believe the cache
3228if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3229then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003230 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003231(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003232fi
3233
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003234# If the user set CFLAGS, use this instead of the automatically
3235# determined setting
3236preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003237ac_ext=c
3238ac_cpp='$CPP $CPPFLAGS'
3239ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3240ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3241ac_compiler_gnu=$ac_cv_c_compiler_gnu
3242if test -n "$ac_tool_prefix"; then
3243 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3244set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3246$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003247if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003248 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003249else
3250 if test -n "$CC"; then
3251 ac_cv_prog_CC="$CC" # Let the user override the test.
3252else
Martin v. Löwis11437992002-04-12 09:54:03 +00003253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3254for as_dir in $PATH
3255do
3256 IFS=$as_save_IFS
3257 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003258 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003259 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 +00003260 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003261 $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 +00003262 break 2
3263 fi
3264done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003265 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003267
Jack Jansendd19cf82001-12-06 22:36:17 +00003268fi
3269fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003270CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003271if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3273$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003274else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3276$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003277fi
3278
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279
Martin v. Löwis11437992002-04-12 09:54:03 +00003280fi
3281if test -z "$ac_cv_prog_CC"; then
3282 ac_ct_CC=$CC
3283 # Extract the first word of "gcc", so it can be a program name with args.
3284set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3286$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003287if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003288 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003289else
3290 if test -n "$ac_ct_CC"; then
3291 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3292else
3293as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3294for as_dir in $PATH
3295do
3296 IFS=$as_save_IFS
3297 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003298 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003299 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 +00003300 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003301 $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 +00003302 break 2
3303 fi
3304done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003305 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003307
3308fi
3309fi
3310ac_ct_CC=$ac_cv_prog_ac_ct_CC
3311if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3313$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003314else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3316$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003317fi
3318
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319 if test "x$ac_ct_CC" = x; then
3320 CC=""
3321 else
3322 case $cross_compiling:$ac_tool_warned in
3323yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003326ac_tool_warned=yes ;;
3327esac
3328 CC=$ac_ct_CC
3329 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003330else
3331 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003332fi
3333
Jack Jansendd19cf82001-12-06 22:36:17 +00003334if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003335 if test -n "$ac_tool_prefix"; then
3336 # 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 +00003337set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3339$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003340if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003341 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003342else
3343 if test -n "$CC"; then
3344 ac_cv_prog_CC="$CC" # Let the user override the test.
3345else
Martin v. Löwis11437992002-04-12 09:54:03 +00003346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3347for as_dir in $PATH
3348do
3349 IFS=$as_save_IFS
3350 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003351 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003352 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 +00003353 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003354 $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 +00003355 break 2
3356 fi
3357done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003358 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003359IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003360
3361fi
3362fi
3363CC=$ac_cv_prog_CC
3364if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3366$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003367else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3369$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003370fi
3371
Martin v. Löwiseba40652007-08-30 20:10:57 +00003372
Martin v. Löwis11437992002-04-12 09:54:03 +00003373 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003374fi
3375if test -z "$CC"; then
3376 # Extract the first word of "cc", so it can be a program name with args.
3377set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3379$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003380if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003381 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003382else
3383 if test -n "$CC"; then
3384 ac_cv_prog_CC="$CC" # Let the user override the test.
3385else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003386 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3388for as_dir in $PATH
3389do
3390 IFS=$as_save_IFS
3391 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003392 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003393 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 +00003394 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3395 ac_prog_rejected=yes
3396 continue
3397 fi
3398 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003399 $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 +00003400 break 2
3401 fi
3402done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003403 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003404IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003405
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003406if test $ac_prog_rejected = yes; then
3407 # We found a bogon in the path, so make sure we never use it.
3408 set dummy $ac_cv_prog_CC
3409 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003410 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003411 # We chose a different compiler from the bogus one.
3412 # However, it has the same basename, so the bogon will be chosen
3413 # first if we set CC to just the basename; use the full file name.
3414 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003415 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003416 fi
3417fi
3418fi
3419fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003420CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003421if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3423$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3426$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003427fi
3428
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429
Martin v. Löwis11437992002-04-12 09:54:03 +00003430fi
3431if test -z "$CC"; then
3432 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003433 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003434 do
3435 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3436set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3438$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003439if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003440 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003441else
3442 if test -n "$CC"; then
3443 ac_cv_prog_CC="$CC" # Let the user override the test.
3444else
Martin v. Löwis11437992002-04-12 09:54:03 +00003445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3446for as_dir in $PATH
3447do
3448 IFS=$as_save_IFS
3449 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003450 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003451 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 +00003452 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003453 $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 +00003454 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003455 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003456done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003457 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003458IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003459
3460fi
3461fi
3462CC=$ac_cv_prog_CC
3463if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3465$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003466else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3468$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003469fi
3470
Martin v. Löwiseba40652007-08-30 20:10:57 +00003471
Martin v. Löwis11437992002-04-12 09:54:03 +00003472 test -n "$CC" && break
3473 done
3474fi
3475if test -z "$CC"; then
3476 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003477 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003478do
3479 # Extract the first word of "$ac_prog", so it can be a program name with args.
3480set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3482$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003483if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003484 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003485else
3486 if test -n "$ac_ct_CC"; then
3487 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3488else
3489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3490for as_dir in $PATH
3491do
3492 IFS=$as_save_IFS
3493 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003494 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003495 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 +00003496 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003497 $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 +00003498 break 2
3499 fi
3500done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003501 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003503
Martin v. Löwis11437992002-04-12 09:54:03 +00003504fi
3505fi
3506ac_ct_CC=$ac_cv_prog_ac_ct_CC
3507if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3509$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3512$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003513fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003514
Martin v. Löwiseba40652007-08-30 20:10:57 +00003515
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 test -n "$ac_ct_CC" && break
3517done
Michael W. Hudson54241132001-12-07 15:38:26 +00003518
Martin v. Löwiseba40652007-08-30 20:10:57 +00003519 if test "x$ac_ct_CC" = x; then
3520 CC=""
3521 else
3522 case $cross_compiling:$ac_tool_warned in
3523yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003524{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3525$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526ac_tool_warned=yes ;;
3527esac
3528 CC=$ac_ct_CC
3529 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003530fi
3531
3532fi
3533
3534
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003535test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3536$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003537as_fn_error $? "no acceptable C compiler found in \$PATH
3538See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003539
3540# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003541$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3542set X $ac_compile
3543ac_compiler=$2
3544for ac_option in --version -v -V -qversion; do
3545 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003546case "(($ac_try" in
3547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3548 *) ac_try_echo=$ac_try;;
3549esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003550eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3551$as_echo "$ac_try_echo"; } >&5
3552 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003554 if test -s conftest.err; then
3555 sed '10a\
3556... rest of stderr output deleted ...
3557 10q' conftest.err >conftest.er1
3558 cat conftest.er1 >&5
3559 fi
3560 rm -f conftest.er1 conftest.err
3561 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3562 test $ac_status = 0; }
3563done
Martin v. Löwis11437992002-04-12 09:54:03 +00003564
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003566/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003567
Martin v. Löwis11437992002-04-12 09:54:03 +00003568int
3569main ()
3570{
3571
3572 ;
3573 return 0;
3574}
3575_ACEOF
3576ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003577ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003578# Try to create an executable without -o first, disregard a.out.
3579# It will help us diagnose broken compilers, and finding out an intuition
3580# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3582$as_echo_n "checking whether the C compiler works... " >&6; }
3583ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3584
3585# The possible output files:
3586ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3587
Martin v. Löwiseba40652007-08-30 20:10:57 +00003588ac_rmfiles=
3589for ac_file in $ac_files
3590do
3591 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003592 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003593 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3594 esac
3595done
3596rm -f $ac_rmfiles
3597
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003598if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003599case "(($ac_try" in
3600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3601 *) ac_try_echo=$ac_try;;
3602esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003603eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3604$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003605 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3608 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003609 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3610# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3611# in a Makefile. We should not override ac_cv_exeext if it was cached,
3612# so that the user can short-circuit this test for compilers unknown to
3613# Autoconf.
3614for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003615do
3616 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003618 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003619 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003620 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003621 # We found the default executable, but exeext='' is most
3622 # certainly right.
3623 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003624 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003625 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003626 then :; else
3627 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3628 fi
3629 # We set ac_cv_exeext here because the later test for it is not
3630 # safe: cross compilers may not add the suffix if given an `-o'
3631 # argument, so we may need to know it at that point already.
3632 # Even if this section looks crufty: it has the advantage of
3633 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003634 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003635 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003636 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 esac
3638done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003639test "$ac_cv_exeext" = no && ac_cv_exeext=
3640
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003641else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003642 ac_file=''
3643fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003644if test -z "$ac_file"; then :
3645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3646$as_echo "no" >&6; }
3647$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003648sed 's/^/| /' conftest.$ac_ext >&5
3649
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003650{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3651$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003652as_fn_error 77 "C compiler cannot create executables
3653See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003654else
3655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3656$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003657fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3659$as_echo_n "checking for C compiler default output file name... " >&6; }
3660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3661$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003662ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003663
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003664rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003665ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3667$as_echo_n "checking for suffix of executables... " >&6; }
3668if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003669case "(($ac_try" in
3670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3671 *) ac_try_echo=$ac_try;;
3672esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3674$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003675 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003676 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3678 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3680# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3681# work properly (i.e., refer to `conftest.exe'), while it won't with
3682# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003683for ac_file in conftest.exe conftest conftest.*; do
3684 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003686 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003688 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 * ) break;;
3690 esac
3691done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003695as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3696See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003698rm -f conftest conftest$ac_cv_exeext
3699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3700$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003701
3702rm -f conftest.$ac_ext
3703EXEEXT=$ac_cv_exeext
3704ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3706/* end confdefs.h. */
3707#include <stdio.h>
3708int
3709main ()
3710{
3711FILE *f = fopen ("conftest.out", "w");
3712 return ferror (f) || fclose (f) != 0;
3713
3714 ;
3715 return 0;
3716}
Skip Montanaro6dead952003-09-25 14:50:04 +00003717_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003718ac_clean_files="$ac_clean_files conftest.out"
3719# Check that the compiler produces executables we can run. If not, either
3720# the compiler is broken, or we cross compile.
3721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3722$as_echo_n "checking whether we are cross compiling... " >&6; }
3723if test "$cross_compiling" != yes; then
3724 { { ac_try="$ac_link"
3725case "(($ac_try" in
3726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3727 *) ac_try_echo=$ac_try;;
3728esac
3729eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3730$as_echo "$ac_try_echo"; } >&5
3731 (eval "$ac_link") 2>&5
3732 ac_status=$?
3733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3734 test $ac_status = 0; }
3735 if { ac_try='./conftest$ac_cv_exeext'
3736 { { case "(($ac_try" in
3737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3738 *) ac_try_echo=$ac_try;;
3739esac
3740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3741$as_echo "$ac_try_echo"; } >&5
3742 (eval "$ac_try") 2>&5
3743 ac_status=$?
3744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3745 test $ac_status = 0; }; }; then
3746 cross_compiling=no
3747 else
3748 if test "$cross_compiling" = maybe; then
3749 cross_compiling=yes
3750 else
3751 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003753as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003754If you meant to cross compile, use \`--host'.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003755See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003756 fi
3757 fi
3758fi
3759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3760$as_echo "$cross_compiling" >&6; }
3761
3762rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3763ac_clean_files=$ac_clean_files_save
3764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3765$as_echo_n "checking for suffix of object files... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003766if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003767 $as_echo_n "(cached) " >&6
3768else
3769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003771
Martin v. Löwis11437992002-04-12 09:54:03 +00003772int
3773main ()
3774{
3775
3776 ;
3777 return 0;
3778}
3779_ACEOF
3780rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003781if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003782case "(($ac_try" in
3783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3784 *) ac_try_echo=$ac_try;;
3785esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3787$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003788 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3791 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792 for ac_file in conftest.o conftest.obj conftest.*; do
3793 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003795 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3797 break;;
3798 esac
3799done
3800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003801 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003802sed 's/^/| /' conftest.$ac_ext >&5
3803
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003804{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003806as_fn_error $? "cannot compute suffix of object files: cannot compile
3807See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003808fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003809rm -f conftest.$ac_cv_objext conftest.$ac_ext
3810fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3812$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003813OBJEXT=$ac_cv_objext
3814ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3816$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003817if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003818 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
Martin v. Löwis11437992002-04-12 09:54:03 +00003823int
3824main ()
3825{
3826#ifndef __GNUC__
3827 choke me
3828#endif
3829
3830 ;
3831 return 0;
3832}
3833_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003834if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 ac_compiler_gnu=yes
3836else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003837 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003838fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003840ac_cv_c_compiler_gnu=$ac_compiler_gnu
3841
3842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3844$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3845if test $ac_compiler_gnu = yes; then
3846 GCC=yes
3847else
3848 GCC=
3849fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003850ac_test_CFLAGS=${CFLAGS+set}
3851ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3853$as_echo_n "checking whether $CC accepts -g... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003854if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003855 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003856else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003857 ac_save_c_werror_flag=$ac_c_werror_flag
3858 ac_c_werror_flag=yes
3859 ac_cv_prog_cc_g=no
3860 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003863
Martin v. Löwis11437992002-04-12 09:54:03 +00003864int
3865main ()
3866{
3867
3868 ;
3869 return 0;
3870}
3871_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003872if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003873 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003874else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003875 CFLAGS=""
3876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003877/* end confdefs.h. */
3878
3879int
3880main ()
3881{
3882
3883 ;
3884 return 0;
3885}
3886_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003887if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003889else
3890 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003891 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003893/* end confdefs.h. */
3894
3895int
3896main ()
3897{
3898
3899 ;
3900 return 0;
3901}
3902_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003903if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003904 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3911 ac_c_werror_flag=$ac_save_c_werror_flag
3912fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3914$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003915if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003917elif test $ac_cv_prog_cc_g = yes; then
3918 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003919 CFLAGS="-g -O2"
3920 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003921 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003922 fi
3923else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003924 if test "$GCC" = yes; then
3925 CFLAGS="-O2"
3926 else
3927 CFLAGS=
3928 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3931$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003932if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003933 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003934else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003935 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003936ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003938/* end confdefs.h. */
3939#include <stdarg.h>
3940#include <stdio.h>
3941#include <sys/types.h>
3942#include <sys/stat.h>
3943/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3944struct buf { int x; };
3945FILE * (*rcsopen) (struct buf *, struct stat *, int);
3946static char *e (p, i)
3947 char **p;
3948 int i;
3949{
3950 return p[i];
3951}
3952static char *f (char * (*g) (char **, int), char **p, ...)
3953{
3954 char *s;
3955 va_list v;
3956 va_start (v,p);
3957 s = g (p, va_arg (v,int));
3958 va_end (v);
3959 return s;
3960}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003961
3962/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3963 function prototypes and stuff, but not '\xHH' hex character constants.
3964 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003966 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3967 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003968 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003969int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3970
Martin v. Löwiseba40652007-08-30 20:10:57 +00003971/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3972 inside strings and character constants. */
3973#define FOO(x) 'x'
3974int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3975
Skip Montanaro6dead952003-09-25 14:50:04 +00003976int test (int i, double x);
3977struct s1 {int (*f) (int a);};
3978struct s2 {int (*f) (double a);};
3979int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3980int argc;
3981char **argv;
3982int
3983main ()
3984{
3985return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3986 ;
3987 return 0;
3988}
3989_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003990for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3991 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003992do
3993 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003994 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003995 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003997rm -f core conftest.err conftest.$ac_objext
3998 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003999done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004000rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004001CC=$ac_save_CC
4002
4003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004004# AC_CACHE_VAL
4005case "x$ac_cv_prog_cc_c89" in
4006 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4008$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004009 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4011$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004012 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004013 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4015$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004016esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004017if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004018
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004019fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004020
Martin v. Löwis11437992002-04-12 09:54:03 +00004021ac_ext=c
4022ac_cpp='$CPP $CPPFLAGS'
4023ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4024ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4025ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004026
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004027if test ! -z "$preset_cflags"
4028then
4029 CFLAGS=$preset_cflags
4030fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004031
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004032
4033
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4035$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004036
Martin v. Löwiseba40652007-08-30 20:10:57 +00004037# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004038if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004039 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004040
4041 case $withval in
4042 no) with_cxx_main=no
4043 MAINCC='$(CC)';;
4044 yes) with_cxx_main=yes
4045 MAINCC='$(CXX)';;
4046 *) with_cxx_main=yes
4047 MAINCC=$withval
4048 if test -z "$CXX"
4049 then
4050 CXX=$withval
4051 fi;;
4052 esac
4053else
4054
4055 with_cxx_main=no
4056 MAINCC='$(CC)'
4057
Martin v. Löwiseba40652007-08-30 20:10:57 +00004058fi
4059
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4061$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004062
4063preset_cxx="$CXX"
4064if test -z "$CXX"
4065then
4066 case "$CC" in
4067 gcc) # Extract the first word of "g++", so it can be a program name with args.
4068set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4070$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004071if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004072 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004073else
4074 case $CXX in
4075 [\\/]* | ?:[\\/]*)
4076 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4077 ;;
4078 *)
4079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4080for as_dir in notfound
4081do
4082 IFS=$as_save_IFS
4083 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004084 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004085 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 +00004086 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004087 $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 +00004088 break 2
4089 fi
4090done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004091 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004092IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004093
4094 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4095 ;;
4096esac
4097fi
4098CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004099if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4101$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004102else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4104$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004106
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004107 ;;
4108 cc) # Extract the first word of "c++", so it can be a program name with args.
4109set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4111$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004112if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004113 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004114else
4115 case $CXX in
4116 [\\/]* | ?:[\\/]*)
4117 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4118 ;;
4119 *)
4120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4121for as_dir in notfound
4122do
4123 IFS=$as_save_IFS
4124 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004125 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004126 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 +00004127 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004128 $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 +00004129 break 2
4130 fi
4131done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004132 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004133IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004134
4135 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4136 ;;
4137esac
4138fi
4139CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004140if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4142$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004143else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4145$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004147
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004148 ;;
4149 esac
4150 if test "$CXX" = "notfound"
4151 then
4152 CXX=""
4153 fi
4154fi
4155if test -z "$CXX"
4156then
4157 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4158do
4159 # Extract the first word of "$ac_prog", so it can be a program name with args.
4160set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4162$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004163if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004164 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004165else
4166 if test -n "$CXX"; then
4167 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4168else
4169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4170for as_dir in $PATH
4171do
4172 IFS=$as_save_IFS
4173 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004174 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004175 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 +00004176 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004177 $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 +00004178 break 2
4179 fi
4180done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004181 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004182IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004183
4184fi
4185fi
4186CXX=$ac_cv_prog_CXX
4187if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4189$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004190else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4192$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004193fi
4194
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004196 test -n "$CXX" && break
4197done
4198test -n "$CXX" || CXX="notfound"
4199
4200 if test "$CXX" = "notfound"
4201 then
4202 CXX=""
4203 fi
4204fi
4205if test "$preset_cxx" != "$CXX"
4206then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004208
4209 By default, distutils will build C++ extension modules with \"$CXX\".
4210 If this is not intended, then set CXX on the configure command line.
4211 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004212$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004213
4214 By default, distutils will build C++ extension modules with \"$CXX\".
4215 If this is not intended, then set CXX on the configure command line.
4216 " >&2;}
4217fi
4218
4219
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004220# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004221
4222ac_ext=c
4223ac_cpp='$CPP $CPPFLAGS'
4224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4226ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4228$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004229# On Suns, sometimes $CPP names a directory.
4230if test -n "$CPP" && test -d "$CPP"; then
4231 CPP=
4232fi
4233if test -z "$CPP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004234 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004235 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004236else
Martin v. Löwis11437992002-04-12 09:54:03 +00004237 # Double quotes because CPP needs to be expanded
4238 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4239 do
4240 ac_preproc_ok=false
4241for ac_c_preproc_warn_flag in '' yes
4242do
4243 # Use a header file that comes with gcc, so configuring glibc
4244 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004245 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4246 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004247 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004250/* end confdefs.h. */
4251#ifdef __STDC__
4252# include <limits.h>
4253#else
4254# include <assert.h>
4255#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004256 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004257_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004258if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004260else
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # Broken: fails on valid input.
4262continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004263fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004264rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004265
Martin v. Löwiseba40652007-08-30 20:10:57 +00004266 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004270#include <ac_nonexistent.h>
4271_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004272if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # Broken: success on invalid input.
4274continue
4275else
Martin v. Löwis11437992002-04-12 09:54:03 +00004276 # Passes both tests.
4277ac_preproc_ok=:
4278break
4279fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004280rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004281
4282done
4283# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004284rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004285if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004286 break
4287fi
4288
4289 done
4290 ac_cv_prog_CPP=$CPP
4291
4292fi
4293 CPP=$ac_cv_prog_CPP
4294else
4295 ac_cv_prog_CPP=$CPP
4296fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4298$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004299ac_preproc_ok=false
4300for ac_c_preproc_warn_flag in '' yes
4301do
4302 # Use a header file that comes with gcc, so configuring glibc
4303 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004304 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4305 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 # On the NeXT, cc -E runs the code through the compiler's parser,
4307 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004309/* end confdefs.h. */
4310#ifdef __STDC__
4311# include <limits.h>
4312#else
4313# include <assert.h>
4314#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004315 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004316_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004317if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004318
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004319else
Martin v. Löwis11437992002-04-12 09:54:03 +00004320 # Broken: fails on valid input.
4321continue
4322fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004323rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004324
Martin v. Löwiseba40652007-08-30 20:10:57 +00004325 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004326 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004329#include <ac_nonexistent.h>
4330_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004331if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004332 # Broken: success on invalid input.
4333continue
4334else
Martin v. Löwis11437992002-04-12 09:54:03 +00004335 # Passes both tests.
4336ac_preproc_ok=:
4337break
4338fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004339rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004340
4341done
4342# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004343rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004344if $ac_preproc_ok; then :
4345
Martin v. Löwis11437992002-04-12 09:54:03 +00004346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004347 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4348$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004349as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4350See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004351fi
4352
4353ac_ext=c
4354ac_cpp='$CPP $CPPFLAGS'
4355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4357ac_compiler_gnu=$ac_cv_c_compiler_gnu
4358
4359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4361$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004362if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004363 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004365 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004366 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004367 # Loop through the user's path and test for each of PROGNAME-LIST
4368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004369for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4370do
4371 IFS=$as_save_IFS
4372 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004373 for ac_prog in grep ggrep; do
4374 for ac_exec_ext in '' $ac_executable_extensions; do
4375 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4376 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4377# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004378 # Check for GNU $ac_path_GREP
4379case `"$ac_path_GREP" --version 2>&1` in
4380*GNU*)
4381 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4382*)
4383 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004384 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004385 while :
4386 do
4387 cat "conftest.in" "conftest.in" >"conftest.tmp"
4388 mv "conftest.tmp" "conftest.in"
4389 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004390 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4392 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004393 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004394 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4395 # Best one so far, save it but keep looking for a better one
4396 ac_cv_path_GREP="$ac_path_GREP"
4397 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004398 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004399 # 10*(2^10) chars as input seems more than enough
4400 test $ac_count -gt 10 && break
4401 done
4402 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4403esac
4404
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004405 $ac_path_GREP_found && break 3
4406 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004407 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004408 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004409IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004410 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004411 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 +00004412 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004413else
4414 ac_cv_path_GREP=$GREP
4415fi
4416
Martin v. Löwiseba40652007-08-30 20:10:57 +00004417fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4419$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004420 GREP="$ac_cv_path_GREP"
4421
4422
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4424$as_echo_n "checking for egrep... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004425if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004426 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004427else
4428 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4429 then ac_cv_path_EGREP="$GREP -E"
4430 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004431 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004432 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004433 # Loop through the user's path and test for each of PROGNAME-LIST
4434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004435for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4436do
4437 IFS=$as_save_IFS
4438 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004439 for ac_prog in egrep; do
4440 for ac_exec_ext in '' $ac_executable_extensions; do
4441 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4442 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4443# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004444 # Check for GNU $ac_path_EGREP
4445case `"$ac_path_EGREP" --version 2>&1` in
4446*GNU*)
4447 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4448*)
4449 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004450 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004451 while :
4452 do
4453 cat "conftest.in" "conftest.in" >"conftest.tmp"
4454 mv "conftest.tmp" "conftest.in"
4455 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004456 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004457 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4458 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004459 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004460 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4461 # Best one so far, save it but keep looking for a better one
4462 ac_cv_path_EGREP="$ac_path_EGREP"
4463 ac_path_EGREP_max=$ac_count
4464 fi
4465 # 10*(2^10) chars as input seems more than enough
4466 test $ac_count -gt 10 && break
4467 done
4468 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4469esac
4470
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004471 $ac_path_EGREP_found && break 3
4472 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004473 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004474 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004475IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004476 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004477 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 +00004478 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004479else
4480 ac_cv_path_EGREP=$EGREP
4481fi
4482
Martin v. Löwiseba40652007-08-30 20:10:57 +00004483 fi
4484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4486$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004487 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004488
4489
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4491$as_echo_n "checking for ANSI C header files... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004492if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004493 $as_echo_n "(cached) " >&6
4494else
4495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004496/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004497#include <stdlib.h>
4498#include <stdarg.h>
4499#include <string.h>
4500#include <float.h>
4501
4502int
4503main ()
4504{
4505
4506 ;
4507 return 0;
4508}
4509_ACEOF
4510if ac_fn_c_try_compile "$LINENO"; then :
4511 ac_cv_header_stdc=yes
4512else
4513 ac_cv_header_stdc=no
4514fi
4515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4516
4517if test $ac_cv_header_stdc = yes; then
4518 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4520/* end confdefs.h. */
4521#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004522
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004523_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004525 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004527else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004528 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004529fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004530rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004532fi
4533
4534if test $ac_cv_header_stdc = yes; then
4535 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4537/* end confdefs.h. */
4538#include <stdlib.h>
4539
4540_ACEOF
4541if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4542 $EGREP "free" >/dev/null 2>&1; then :
4543
4544else
4545 ac_cv_header_stdc=no
4546fi
4547rm -f conftest*
4548
4549fi
4550
4551if test $ac_cv_header_stdc = yes; then
4552 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4553 if test "$cross_compiling" = yes; then :
4554 :
4555else
4556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4557/* end confdefs.h. */
4558#include <ctype.h>
4559#include <stdlib.h>
4560#if ((' ' & 0x0FF) == 0x020)
4561# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4562# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4563#else
4564# define ISLOWER(c) \
4565 (('a' <= (c) && (c) <= 'i') \
4566 || ('j' <= (c) && (c) <= 'r') \
4567 || ('s' <= (c) && (c) <= 'z'))
4568# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4569#endif
4570
4571#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4572int
4573main ()
4574{
4575 int i;
4576 for (i = 0; i < 256; i++)
4577 if (XOR (islower (i), ISLOWER (i))
4578 || toupper (i) != TOUPPER (i))
4579 return 2;
4580 return 0;
4581}
4582_ACEOF
4583if ac_fn_c_try_run "$LINENO"; then :
4584
4585else
4586 ac_cv_header_stdc=no
4587fi
4588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4589 conftest.$ac_objext conftest.beam conftest.$ac_ext
4590fi
4591
4592fi
4593fi
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4595$as_echo "$ac_cv_header_stdc" >&6; }
4596if test $ac_cv_header_stdc = yes; then
4597
4598$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4599
4600fi
4601
4602# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4603for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4604 inttypes.h stdint.h unistd.h
4605do :
4606 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4607ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4608"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004609if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004610 cat >>confdefs.h <<_ACEOF
4611#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4612_ACEOF
4613
4614fi
4615
4616done
4617
4618
4619
4620 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 +00004621if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004622 MINIX=yes
4623else
4624 MINIX=
4625fi
4626
4627
4628 if test "$MINIX" = yes; then
4629
4630$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4631
4632
4633$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4634
4635
4636$as_echo "#define _MINIX 1" >>confdefs.h
4637
4638 fi
4639
4640
4641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4642$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004643if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004644 $as_echo_n "(cached) " >&6
4645else
4646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4647/* end confdefs.h. */
4648
4649# define __EXTENSIONS__ 1
4650 $ac_includes_default
4651int
4652main ()
4653{
4654
4655 ;
4656 return 0;
4657}
4658_ACEOF
4659if ac_fn_c_try_compile "$LINENO"; then :
4660 ac_cv_safe_to_define___extensions__=yes
4661else
4662 ac_cv_safe_to_define___extensions__=no
4663fi
4664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4665fi
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4667$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4668 test $ac_cv_safe_to_define___extensions__ = yes &&
4669 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4670
4671 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4672
4673 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4674
4675 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4676
4677 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4678
4679
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004680
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004681# Check for unsupported systems
4682case $ac_sys_system/$ac_sys_release in
4683atheos*|Linux*/1*)
4684 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4685 echo See README for details.
4686 exit 1;;
4687esac
4688
4689
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4691$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004692
4693# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004694if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004695 withval=$with_suffix;
4696 case $withval in
4697 no) EXEEXT=;;
4698 yes) EXEEXT=.exe;;
4699 *) EXEEXT=$withval;;
4700 esac
4701fi
4702
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4704$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004705
4706# Test whether we're running on a non-case-sensitive system, in which
4707# case we give a warning if no ext is given
4708
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4710$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004711if test ! -d CaseSensitiveTestDir; then
4712mkdir CaseSensitiveTestDir
4713fi
4714
4715if test -d casesensitivetestdir
4716then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4718$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004719 BUILDEXEEXT=.exe
4720else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4722$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004723 BUILDEXEEXT=$EXEEXT
4724fi
4725rmdir CaseSensitiveTestDir
4726
4727case $MACHDEP in
4728bsdos*)
4729 case $CC in
4730 gcc) CC="$CC -D_HAVE_BSDI";;
4731 esac;;
4732esac
4733
4734case $ac_sys_system in
4735hp*|HP*)
4736 case $CC in
4737 cc|*/cc) CC="$CC -Ae";;
4738 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004739SunOS*)
4740 # Some functions have a prototype only with that define, e.g. confstr
4741
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004742$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004743
4744 ;;
4745esac
4746
4747
4748
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4750$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004751if test -z "$LIBRARY"
4752then
4753 LIBRARY='libpython$(VERSION).a'
4754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4756$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004757
4758# LDLIBRARY is the name of the library to link against (as opposed to the
4759# name of the library into which to insert object files). BLDLIBRARY is also
4760# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4761# is blank as the main program is not linked directly against LDLIBRARY.
4762# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4763# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4764# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4765# DLLLIBRARY is the shared (i.e., DLL) library.
4766#
4767# RUNSHARED is used to run shared python without installed libraries
4768#
4769# INSTSONAME is the name of the shared library that will be use to install
4770# on the system - some systems like version suffix, others don't
4771
4772
4773
4774
4775
4776
4777LDLIBRARY="$LIBRARY"
4778BLDLIBRARY='$(LDLIBRARY)'
4779INSTSONAME='$(LDLIBRARY)'
4780DLLLIBRARY=''
4781LDLIBRARYDIR=''
4782RUNSHARED=''
4783
4784# LINKCC is the command that links the python executable -- default is $(CC).
4785# If CXX is set, and if it is needed to link a main function that was
4786# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4787# python might then depend on the C++ runtime
4788# This is altered for AIX in order to build the export list before
4789# linking.
4790
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4792$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004793if test -z "$LINKCC"
4794then
4795 LINKCC='$(PURIFY) $(MAINCC)'
4796 case $ac_sys_system in
4797 AIX*)
4798 exp_extra="\"\""
4799 if test $ac_sys_release -ge 5 -o \
4800 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4801 exp_extra="."
4802 fi
4803 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004804 QNX*)
4805 # qcc must be used because the other compilers do not
4806 # support -N.
4807 LINKCC=qcc;;
4808 esac
4809fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4811$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004812
4813# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4814# make sure we default having it set to "no": this is used by
4815# distutils.unixccompiler to know if it should add --enable-new-dtags
4816# to linker command lines, and failing to detect GNU ld simply results
4817# in the same bahaviour as before.
4818
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4820$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004821ac_prog=ld
4822if test "$GCC" = yes; then
4823 ac_prog=`$CC -print-prog-name=ld`
4824fi
4825case `"$ac_prog" -V 2>&1 < /dev/null` in
4826 *GNU*)
4827 GNULD=yes;;
4828 *)
4829 GNULD=no;;
4830esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4832$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004833
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4835$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004836# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004837if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004838 enableval=$enable_shared;
4839fi
4840
4841
4842if test -z "$enable_shared"
4843then
4844 case $ac_sys_system in
4845 CYGWIN* | atheos*)
4846 enable_shared="yes";;
4847 *)
4848 enable_shared="no";;
4849 esac
4850fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4852$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004853
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4855$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004856# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004857if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004858 enableval=$enable_profiling; ac_save_cc="$CC"
4859 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004860 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004861 ac_enable_profiling="no"
4862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004864/* end confdefs.h. */
4865int main() { return 0; }
4866_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004867if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004868 ac_enable_profiling="yes"
4869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004870 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004874fi
4875
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004876 CC="$ac_save_cc"
4877fi
4878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4880$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004881
4882case "$ac_enable_profiling" in
4883 "yes")
4884 BASECFLAGS="-pg $BASECFLAGS"
4885 LDFLAGS="-pg $LDFLAGS"
4886 ;;
4887esac
4888
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4890$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004891
4892# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4893# library that we build, but we do not want to link against it (we
4894# will find it with a -framework option). For this reason there is an
4895# extra variable BLDLIBRARY against which Python and the extension
4896# modules are linked, BLDLIBRARY. This is normally the same as
4897# LDLIBRARY, but empty for MacOSX framework builds.
4898if test "$enable_framework"
4899then
4900 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4901 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4902 BLDLIBRARY=''
4903else
4904 BLDLIBRARY='$(LDLIBRARY)'
4905fi
4906
4907# Other platforms follow
4908if test $enable_shared = "yes"; then
4909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004910$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004911
4912 case $ac_sys_system in
4913 BeOS*)
4914 LDLIBRARY='libpython$(VERSION).so'
4915 ;;
4916 CYGWIN*)
4917 LDLIBRARY='libpython$(VERSION).dll.a'
4918 DLLLIBRARY='libpython$(VERSION).dll'
4919 ;;
4920 SunOS*)
4921 LDLIBRARY='libpython$(VERSION).so'
4922 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4923 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4924 INSTSONAME="$LDLIBRARY".$SOVERSION
4925 ;;
4926 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4927 LDLIBRARY='libpython$(VERSION).so'
4928 BLDLIBRARY='-L. -lpython$(VERSION)'
4929 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4930 case $ac_sys_system in
4931 FreeBSD*)
4932 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4933 ;;
4934 esac
4935 INSTSONAME="$LDLIBRARY".$SOVERSION
4936 ;;
4937 hp*|HP*)
4938 case `uname -m` in
4939 ia64)
4940 LDLIBRARY='libpython$(VERSION).so'
4941 ;;
4942 *)
4943 LDLIBRARY='libpython$(VERSION).sl'
4944 ;;
4945 esac
4946 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4947 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4948 ;;
4949 OSF*)
4950 LDLIBRARY='libpython$(VERSION).so'
4951 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4952 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4953 ;;
4954 atheos*)
4955 LDLIBRARY='libpython$(VERSION).so'
4956 BLDLIBRARY='-L. -lpython$(VERSION)'
4957 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4958 ;;
4959 Darwin*)
4960 LDLIBRARY='libpython$(VERSION).dylib'
4961 BLDLIBRARY='-L. -lpython$(VERSION)'
4962 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4963 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00004964 AIX*)
4965 LDLIBRARY='libpython$(VERSION).so'
4966 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4967 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004968
4969 esac
4970else # shared is disabled
4971 case $ac_sys_system in
4972 CYGWIN*)
4973 BLDLIBRARY='$(LIBRARY)'
4974 LDLIBRARY='libpython$(VERSION).dll.a'
4975 ;;
4976 esac
4977fi
4978
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4980$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004981
4982if test -n "$ac_tool_prefix"; then
4983 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4984set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4986$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004987if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004988 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004989else
4990 if test -n "$RANLIB"; then
4991 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4992else
4993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4994for as_dir in $PATH
4995do
4996 IFS=$as_save_IFS
4997 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004998 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004999 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5000 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005002 break 2
5003 fi
5004done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005005 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005006IFS=$as_save_IFS
5007
5008fi
5009fi
5010RANLIB=$ac_cv_prog_RANLIB
5011if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5013$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005014else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5016$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005017fi
5018
5019
5020fi
5021if test -z "$ac_cv_prog_RANLIB"; then
5022 ac_ct_RANLIB=$RANLIB
5023 # Extract the first word of "ranlib", so it can be a program name with args.
5024set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005027if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005028 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005029else
5030 if test -n "$ac_ct_RANLIB"; then
5031 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5032else
5033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in $PATH
5035do
5036 IFS=$as_save_IFS
5037 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005038 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005039 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5040 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005042 break 2
5043 fi
5044done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005045 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005046IFS=$as_save_IFS
5047
5048fi
5049fi
5050ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5051if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5053$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5056$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005057fi
5058
5059 if test "x$ac_ct_RANLIB" = x; then
5060 RANLIB=":"
5061 else
5062 case $cross_compiling:$ac_tool_warned in
5063yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005064{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5065$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005066ac_tool_warned=yes ;;
5067esac
5068 RANLIB=$ac_ct_RANLIB
5069 fi
5070else
5071 RANLIB="$ac_cv_prog_RANLIB"
5072fi
5073
5074
5075for ac_prog in ar aal
5076do
5077 # Extract the first word of "$ac_prog", so it can be a program name with args.
5078set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5080$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005081if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005082 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005083else
5084 if test -n "$AR"; then
5085 ac_cv_prog_AR="$AR" # Let the user override the test.
5086else
5087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5088for as_dir in $PATH
5089do
5090 IFS=$as_save_IFS
5091 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005092 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005093 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5094 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005095 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005096 break 2
5097 fi
5098done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005099 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005100IFS=$as_save_IFS
5101
5102fi
5103fi
5104AR=$ac_cv_prog_AR
5105if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5107$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5110$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005111fi
5112
5113
5114 test -n "$AR" && break
5115done
5116test -n "$AR" || AR="ar"
5117
5118
5119# tweak ARFLAGS only if the user didn't set it on the command line
5120
5121if test -z "$ARFLAGS"
5122then
5123 ARFLAGS="rc"
5124fi
5125
5126
5127# Extract the first word of "svnversion", so it can be a program name with args.
5128set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005131if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005132 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005133else
5134 if test -n "$SVNVERSION"; then
5135 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5136else
5137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140 IFS=$as_save_IFS
5141 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005142 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005143 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5144 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005146 break 2
5147 fi
5148done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005149 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005150IFS=$as_save_IFS
5151
5152 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5153fi
5154fi
5155SVNVERSION=$ac_cv_prog_SVNVERSION
5156if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5158$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005162fi
5163
5164
5165if test $SVNVERSION = found
5166then
5167 SVNVERSION="svnversion \$(srcdir)"
5168else
5169 SVNVERSION="echo Unversioned directory"
5170fi
5171
5172case $MACHDEP in
5173bsdos*|hp*|HP*)
5174 # install -d does not work on BSDI or HP-UX
5175 if test -z "$INSTALL"
5176 then
5177 INSTALL="${srcdir}/install-sh -c"
5178 fi
5179esac
5180ac_aux_dir=
5181for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005182 if test -f "$ac_dir/install-sh"; then
5183 ac_aux_dir=$ac_dir
5184 ac_install_sh="$ac_aux_dir/install-sh -c"
5185 break
5186 elif test -f "$ac_dir/install.sh"; then
5187 ac_aux_dir=$ac_dir
5188 ac_install_sh="$ac_aux_dir/install.sh -c"
5189 break
5190 elif test -f "$ac_dir/shtool"; then
5191 ac_aux_dir=$ac_dir
5192 ac_install_sh="$ac_aux_dir/shtool install -c"
5193 break
5194 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005195done
5196if test -z "$ac_aux_dir"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005197 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198fi
5199
5200# These three variables are undocumented and unsupported,
5201# and are intended to be withdrawn in a future Autoconf release.
5202# They can cause serious problems if a builder's source tree is in a directory
5203# whose full name contains unusual characters.
5204ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5205ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5206ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5207
5208
5209# Find a good install program. We prefer a C program (faster),
5210# so one script is as good as another. But avoid the broken or
5211# incompatible versions:
5212# SysV /etc/install, /usr/sbin/install
5213# SunOS /usr/etc/install
5214# IRIX /sbin/install
5215# AIX /bin/install
5216# AmigaOS /C/install, which installs bootblocks on floppy discs
5217# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5218# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5219# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5220# OS/2's system install, which has a completely different semantic
5221# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005222# Reject install programs that cannot install multiple files.
5223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5224$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005225if test -z "$INSTALL"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005226if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005227 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005228else
5229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5230for as_dir in $PATH
5231do
5232 IFS=$as_save_IFS
5233 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005234 # Account for people who put trailing slashes in PATH elements.
5235case $as_dir/ in #((
5236 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005237 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005238 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005239 /usr/ucb/* ) ;;
5240 *)
5241 # OSF1 and SCO ODT 3.0 have their own names for install.
5242 # Don't use installbsd from OSF since it installs stuff as root
5243 # by default.
5244 for ac_prog in ginstall scoinst install; do
5245 for ac_exec_ext in '' $ac_executable_extensions; do
5246 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5247 if test $ac_prog = install &&
5248 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5249 # AIX install. It has an incompatible calling convention.
5250 :
5251 elif test $ac_prog = install &&
5252 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5253 # program-specific install script used by HP pwplus--don't use.
5254 :
5255 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005256 rm -rf conftest.one conftest.two conftest.dir
5257 echo one > conftest.one
5258 echo two > conftest.two
5259 mkdir conftest.dir
5260 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5261 test -s conftest.one && test -s conftest.two &&
5262 test -s conftest.dir/conftest.one &&
5263 test -s conftest.dir/conftest.two
5264 then
5265 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5266 break 3
5267 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005268 fi
5269 fi
5270 done
5271 done
5272 ;;
5273esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005274
5275 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005276IFS=$as_save_IFS
5277
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005278rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005279
5280fi
5281 if test "${ac_cv_path_install+set}" = set; then
5282 INSTALL=$ac_cv_path_install
5283 else
5284 # As a last resort, use the slow shell script. Don't cache a
5285 # value for INSTALL within a source directory, because that will
5286 # break other packages using the cache if that directory is
5287 # removed, or if the value is a relative name.
5288 INSTALL=$ac_install_sh
5289 fi
5290fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5292$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005293
5294# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5295# It thinks the first close brace ends the variable substitution.
5296test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5297
5298test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5299
5300test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5301
5302
5303# Not every filesystem supports hard links
5304
5305if test -z "$LN" ; then
5306 case $ac_sys_system in
5307 BeOS*) LN="ln -s";;
5308 CYGWIN*) LN="ln -s";;
5309 atheos*) LN="ln -s";;
5310 *) LN=ln;;
5311 esac
5312fi
5313
5314# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5316$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005317
5318# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005319if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005320 withval=$with_pydebug;
5321if test "$withval" != no
5322then
5323
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005324$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5327$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005328 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005329else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005331fi
5332else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5334$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005335fi
5336
5337
5338# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5339# merged with this chunk of code?
5340
5341# Optimizer/debugger flags
5342# ------------------------
5343# (The following bit of code is complicated enough - please keep things
5344# indented properly. Just pretend you're editing Python code. ;-)
5345
5346# There are two parallel sets of case statements below, one that checks to
5347# see if OPT was set and one that does BASECFLAGS setting based upon
5348# compiler and platform. BASECFLAGS tweaks need to be made even if the
5349# user set OPT.
5350
5351# tweak OPT based on compiler and platform, only if the user didn't set
5352# it on the command line
5353
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005354if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005355then
5356 case $GCC in
5357 yes)
5358 if test "$CC" != 'g++' ; then
5359 STRICT_PROTO="-Wstrict-prototypes"
5360 fi
5361 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5362 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5363 WRAP="-fwrapv"
5364 fi
5365 case $ac_cv_prog_cc_g in
5366 yes)
5367 if test "$Py_DEBUG" = 'true' ; then
5368 # Optimization messes up debuggers, so turn it off for
5369 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005370 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005371 else
5372 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5373 fi
5374 ;;
5375 *)
5376 OPT="-O3 -Wall $STRICT_PROTO"
5377 ;;
5378 esac
5379 case $ac_sys_system in
5380 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5381 ;;
5382 esac
5383 ;;
5384
5385 *)
5386 OPT="-O"
5387 ;;
5388 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005389fi
5390
5391
5392
5393# The -arch flags for universal builds on OSX
5394UNIVERSAL_ARCH_FLAGS=
5395
5396
5397# tweak BASECFLAGS based on compiler and platform
5398case $GCC in
5399yes)
5400 # Python violates C99 rules, by casting between incompatible
5401 # pointer types. GCC may generate bad code as a result of that,
5402 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5404$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005405 ac_save_cc="$CC"
5406 CC="$CC -fno-strict-aliasing"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005407 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005408 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005411/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005412
5413int
5414main ()
5415{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005416
Gregory P. Smith373469a2009-11-01 21:03:38 +00005417 ;
5418 return 0;
5419}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005420_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005421if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005422 ac_cv_no_strict_aliasing_ok=yes
5423else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005424 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005425fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005427fi
5428
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005429 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5431$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005432 if test $ac_cv_no_strict_aliasing_ok = yes
5433 then
5434 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5435 fi
5436
5437 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5438 # support. Without this, treatment of subnormals doesn't follow
5439 # the standard.
5440 case $ac_sys_machine in
5441 alpha*)
5442 BASECFLAGS="$BASECFLAGS -mieee"
5443 ;;
5444 esac
5445
5446 case $ac_sys_system in
5447 SCO_SV*)
5448 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5449 ;;
5450 # is there any other compiler on Darwin besides gcc?
5451 Darwin*)
5452 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5453 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005454 if test "${CC}" = gcc
5455 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5457$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005458 case "${UNIVERSALSDK}" in
5459 */MacOSX10.4u.sdk)
5460 # Build using 10.4 SDK, force usage of gcc when the
5461 # compiler is gcc, otherwise the user will get very
5462 # confusing error messages when building on OSX 10.6
5463 CC=gcc-4.0
5464 CPP=cpp-4.0
5465 ;;
5466 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5468$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005469 fi
5470
5471 # Calculate the right deployment target for this build.
5472 #
5473 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5474 if test ${cur_target} '>' 10.2; then
5475 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005476 if test ${enable_universalsdk}; then
5477 if test "${UNIVERSAL_ARCHS}" = "all"; then
5478 # Ensure that the default platform for a
5479 # 4-way universal build is OSX 10.5,
5480 # that's the first OS release where
5481 # 4-way builds make sense.
5482 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005483
5484 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5485 cur_target='10.5'
5486
5487 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5488 cur_target='10.5'
5489
5490 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5491 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005492 fi
5493 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005494 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005495 # On Intel macs default to a deployment
5496 # target of 10.4, that's the first OSX
5497 # release with Intel support.
5498 cur_target="10.4"
5499 fi
5500 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005501 fi
5502 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5503
5504 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5505 # environment with a value that is the same as what we'll use
5506 # in the Makefile to ensure that we'll get the same compiler
5507 # environment during configure and build time.
5508 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5509 export MACOSX_DEPLOYMENT_TARGET
5510 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5511
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005512 if test "${enable_universalsdk}"; then
5513 UNIVERSAL_ARCH_FLAGS=""
5514 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5515 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5516 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005517 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005518
5519 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5520 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5521 LIPO_32BIT_FLAGS=""
5522 ARCH_RUN_32BIT="true"
5523
5524 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5525 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5526 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005527 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005528
5529 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5530 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5531 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005532 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005533
5534 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5535 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5536 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005537 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005538
5539 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005540 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 +00005541
5542 fi
5543
5544
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005545 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5546 if test "${UNIVERSALSDK}" != "/"
5547 then
5548 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5549 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5550 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005551 fi
5552
5553 fi
5554
5555
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005556 ;;
5557 OSF*)
5558 BASECFLAGS="$BASECFLAGS -mieee"
5559 ;;
5560 esac
5561 ;;
5562
5563*)
5564 case $ac_sys_system in
5565 OpenUNIX*|UnixWare*)
5566 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5567 ;;
5568 OSF*)
5569 BASECFLAGS="$BASECFLAGS -ieee -std"
5570 ;;
5571 SCO_SV*)
5572 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5573 ;;
5574 esac
5575 ;;
5576esac
5577
5578if test "$Py_DEBUG" = 'true'; then
5579 :
5580else
5581 OPT="-DNDEBUG $OPT"
5582fi
5583
5584if test "$ac_arch_flags"
5585then
5586 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5587fi
5588
5589# disable check for icc since it seems to pass, but generates a warning
5590if test "$CC" = icc
5591then
5592 ac_cv_opt_olimit_ok=no
5593fi
5594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5596$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005597if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005598 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005599else
5600 ac_save_cc="$CC"
5601CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005603/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005604
5605int
5606main ()
5607{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005608
Gregory P. Smith373469a2009-11-01 21:03:38 +00005609 ;
5610 return 0;
5611}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005613if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005614 ac_cv_opt_olimit_ok=yes
5615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005616 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005617
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005618fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005620CC="$ac_save_cc"
5621fi
5622
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5624$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005625if test $ac_cv_opt_olimit_ok = yes; then
5626 case $ac_sys_system in
5627 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5628 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5629 # environment?
5630 Darwin*)
5631 ;;
5632 *)
5633 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5634 ;;
5635 esac
5636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5638$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005639 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005640 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005641else
5642 ac_save_cc="$CC"
5643 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005645/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005646
5647int
5648main ()
5649{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005650
Gregory P. Smith373469a2009-11-01 21:03:38 +00005651 ;
5652 return 0;
5653}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005654_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005655if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005656 ac_cv_olimit_ok=yes
5657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005658 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005659
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005660fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005662 CC="$ac_save_cc"
5663fi
5664
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5666$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005667 if test $ac_cv_olimit_ok = yes; then
5668 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5669 fi
5670fi
5671
5672# Check whether GCC supports PyArg_ParseTuple format
5673if test "$GCC" = "yes"
5674then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5676$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005677 save_CFLAGS=$CFLAGS
5678 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005680/* end confdefs.h. */
5681
5682 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005683int
5684main ()
5685{
5686
5687 ;
5688 return 0;
5689}
Matthias Klosec511b472010-05-08 11:01:39 +00005690
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005691_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005692if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005693
Matthias Klosec511b472010-05-08 11:01:39 +00005694
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005695$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005696
Matthias Klosec511b472010-05-08 11:01:39 +00005697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005698$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005699
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005700else
Matthias Klosec511b472010-05-08 11:01:39 +00005701
5702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005703$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005704
5705fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5707 CFLAGS=$save_CFLAGS
5708fi
5709
5710# On some compilers, pthreads are available without further options
5711# (e.g. MacOS X). On some of these systems, the compiler will not
5712# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5713# So we have to see first whether pthreads are available without
5714# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5716$as_echo_n "checking whether pthreads are available without options... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005717if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005718 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005719else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005720 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005721 ac_cv_pthread_is_default=no
5722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005724/* end confdefs.h. */
5725
5726#include <pthread.h>
5727
5728void* routine(void* p){return NULL;}
5729
5730int main(){
5731 pthread_t p;
5732 if(pthread_create(&p,NULL,routine,NULL)!=0)
5733 return 1;
5734 (void)pthread_detach(p);
5735 return 0;
5736}
5737
5738_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005739if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005740
5741 ac_cv_pthread_is_default=yes
5742 ac_cv_kthread=no
5743 ac_cv_pthread=no
5744
5745else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005746 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005747fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005750fi
5751
5752
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005753fi
5754
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5756$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005757
5758
5759if test $ac_cv_pthread_is_default = yes
5760then
5761 ac_cv_kpthread=no
5762else
5763# -Kpthread, if available, provides the right #defines
5764# and linker options to make pthread_create available
5765# Some compilers won't report that they do not support -Kpthread,
5766# so we need to run a program to see whether it really made the
5767# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5769$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005770if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005771 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005772else
5773 ac_save_cc="$CC"
5774CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005775if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005776 ac_cv_kpthread=no
5777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005779/* end confdefs.h. */
5780
5781#include <pthread.h>
5782
5783void* routine(void* p){return NULL;}
5784
5785int main(){
5786 pthread_t p;
5787 if(pthread_create(&p,NULL,routine,NULL)!=0)
5788 return 1;
5789 (void)pthread_detach(p);
5790 return 0;
5791}
5792
5793_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005794if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005795 ac_cv_kpthread=yes
5796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005797 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005801fi
5802
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005803CC="$ac_save_cc"
5804fi
5805
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5807$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005808fi
5809
5810if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5811then
5812# -Kthread, if available, provides the right #defines
5813# and linker options to make pthread_create available
5814# Some compilers won't report that they do not support -Kthread,
5815# so we need to run a program to see whether it really made the
5816# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5818$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005819if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005820 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005821else
5822 ac_save_cc="$CC"
5823CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005824if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005825 ac_cv_kthread=no
5826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005828/* end confdefs.h. */
5829
5830#include <pthread.h>
5831
5832void* routine(void* p){return NULL;}
5833
5834int main(){
5835 pthread_t p;
5836 if(pthread_create(&p,NULL,routine,NULL)!=0)
5837 return 1;
5838 (void)pthread_detach(p);
5839 return 0;
5840}
5841
5842_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005843if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005844 ac_cv_kthread=yes
5845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005846 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005850fi
5851
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005852CC="$ac_save_cc"
5853fi
5854
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5856$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005857fi
5858
5859if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5860then
5861# -pthread, if available, provides the right #defines
5862# and linker options to make pthread_create available
5863# Some compilers won't report that they do not support -pthread,
5864# so we need to run a program to see whether it really made the
5865# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5867$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005868if ${ac_cv_thread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005869 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005870else
5871 ac_save_cc="$CC"
5872CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005873if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005874 ac_cv_pthread=no
5875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005877/* end confdefs.h. */
5878
5879#include <pthread.h>
5880
5881void* routine(void* p){return NULL;}
5882
5883int main(){
5884 pthread_t p;
5885 if(pthread_create(&p,NULL,routine,NULL)!=0)
5886 return 1;
5887 (void)pthread_detach(p);
5888 return 0;
5889}
5890
5891_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005892if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005893 ac_cv_pthread=yes
5894else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005895 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005896fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005899fi
5900
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005901CC="$ac_save_cc"
5902fi
5903
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5905$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005906fi
5907
5908# If we have set a CC compiler flag for thread support then
5909# check if it works for CXX, too.
5910ac_cv_cxx_thread=no
5911if test ! -z "$CXX"
5912then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5914$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005915ac_save_cxx="$CXX"
5916
5917if test "$ac_cv_kpthread" = "yes"
5918then
5919 CXX="$CXX -Kpthread"
5920 ac_cv_cxx_thread=yes
5921elif test "$ac_cv_kthread" = "yes"
5922then
5923 CXX="$CXX -Kthread"
5924 ac_cv_cxx_thread=yes
5925elif test "$ac_cv_pthread" = "yes"
5926then
5927 CXX="$CXX -pthread"
5928 ac_cv_cxx_thread=yes
5929fi
5930
5931if test $ac_cv_cxx_thread = yes
5932then
5933 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5934 $CXX -c conftest.$ac_ext 2>&5
5935 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5936 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5937 then
5938 ac_cv_cxx_thread=yes
5939 else
5940 ac_cv_cxx_thread=no
5941 fi
5942 rm -fr conftest*
5943fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5945$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005946fi
5947CXX="$ac_save_cxx"
5948
5949
5950# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5952$as_echo_n "checking for ANSI C header files... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005953if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005954 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005955else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005957/* end confdefs.h. */
5958#include <stdlib.h>
5959#include <stdarg.h>
5960#include <string.h>
5961#include <float.h>
5962
5963int
5964main ()
5965{
5966
5967 ;
5968 return 0;
5969}
5970_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005971if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005972 ac_cv_header_stdc=yes
5973else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005974 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005975fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5977
5978if test $ac_cv_header_stdc = yes; then
5979 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005981/* end confdefs.h. */
5982#include <string.h>
5983
5984_ACEOF
5985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005986 $EGREP "memchr" >/dev/null 2>&1; then :
5987
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005988else
5989 ac_cv_header_stdc=no
5990fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005991rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005992
5993fi
5994
5995if test $ac_cv_header_stdc = yes; then
5996 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005998/* end confdefs.h. */
5999#include <stdlib.h>
6000
6001_ACEOF
6002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006003 $EGREP "free" >/dev/null 2>&1; then :
6004
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006005else
6006 ac_cv_header_stdc=no
6007fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006008rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006009
6010fi
6011
6012if test $ac_cv_header_stdc = yes; then
6013 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006014 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006015 :
6016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006018/* end confdefs.h. */
6019#include <ctype.h>
6020#include <stdlib.h>
6021#if ((' ' & 0x0FF) == 0x020)
6022# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6023# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6024#else
6025# define ISLOWER(c) \
6026 (('a' <= (c) && (c) <= 'i') \
6027 || ('j' <= (c) && (c) <= 'r') \
6028 || ('s' <= (c) && (c) <= 'z'))
6029# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6030#endif
6031
6032#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6033int
6034main ()
6035{
6036 int i;
6037 for (i = 0; i < 256; i++)
6038 if (XOR (islower (i), ISLOWER (i))
6039 || toupper (i) != TOUPPER (i))
6040 return 2;
6041 return 0;
6042}
6043_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006044if ac_fn_c_try_run "$LINENO"; then :
6045
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006047 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006048fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006051fi
6052
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006053fi
6054fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6056$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006057if test $ac_cv_header_stdc = yes; then
6058
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006059$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006060
6061fi
6062
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006063for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6064fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006065ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006066shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006067unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006068sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6069sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006070sys/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 +00006071sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006072sys/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 +00006073sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006074bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006075do :
6076 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6077ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006078if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006079 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006080#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006081_ACEOF
6082
6083fi
6084
Guido van Rossum627b2d71993-12-24 10:39:16 +00006085done
6086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006087ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006088for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006089 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6091$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006092if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006093 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006096/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006097#include <sys/types.h>
6098#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006099
Martin v. Löwis11437992002-04-12 09:54:03 +00006100int
6101main ()
6102{
6103if ((DIR *) 0)
6104return 0;
6105 ;
6106 return 0;
6107}
6108_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006109if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006110 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006112 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006115fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006116eval ac_res=\$$as_ac_Header
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6118$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006119if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006120 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006121#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006122_ACEOF
6123
6124ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006125fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006127done
6128# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6129if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6131$as_echo_n "checking for library containing opendir... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006132if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006133 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006134else
Martin v. Löwis11437992002-04-12 09:54:03 +00006135 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006138
Martin v. Löwiseba40652007-08-30 20:10:57 +00006139/* Override any GCC internal prototype to avoid an error.
6140 Use char because int might match the return type of a GCC
6141 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006142#ifdef __cplusplus
6143extern "C"
6144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006145char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006146int
6147main ()
6148{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006149return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006150 ;
6151 return 0;
6152}
6153_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006154for ac_lib in '' dir; do
6155 if test -z "$ac_lib"; then
6156 ac_res="none required"
6157 else
6158 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006159 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006160 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006161 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006162 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006163fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006164rm -f core conftest.err conftest.$ac_objext \
6165 conftest$ac_exeext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006166 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006167 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006169done
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006170if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006171
Martin v. Löwiseba40652007-08-30 20:10:57 +00006172else
6173 ac_cv_search_opendir=no
6174fi
6175rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006176LIBS=$ac_func_search_save_LIBS
6177fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6179$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006180ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006181if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006182 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006183
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006184fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006185
Michael W. Hudson54241132001-12-07 15:38:26 +00006186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6188$as_echo_n "checking for library containing opendir... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006189if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006190 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006191else
6192 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006195
Martin v. Löwiseba40652007-08-30 20:10:57 +00006196/* Override any GCC internal prototype to avoid an error.
6197 Use char because int might match the return type of a GCC
6198 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006199#ifdef __cplusplus
6200extern "C"
6201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006202char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006203int
6204main ()
6205{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006207 ;
6208 return 0;
6209}
6210_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006211for ac_lib in '' x; do
6212 if test -z "$ac_lib"; then
6213 ac_res="none required"
6214 else
6215 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006216 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006217 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006218 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006219 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006220fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006221rm -f core conftest.err conftest.$ac_objext \
6222 conftest$ac_exeext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006223 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006224 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006226done
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006227if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006228
Martin v. Löwiseba40652007-08-30 20:10:57 +00006229else
6230 ac_cv_search_opendir=no
6231fi
6232rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006233LIBS=$ac_func_search_save_LIBS
6234fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6236$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006237ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006238if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006239 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006240
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006241fi
6242
6243fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006244
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6246$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006247if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006248 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006251/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253int
6254main ()
6255{
6256return makedev(0, 0);
6257 ;
6258 return 0;
6259}
6260_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006261if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006262 ac_cv_header_sys_types_h_makedev=yes
6263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006264 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006266rm -f core conftest.err conftest.$ac_objext \
6267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006268
6269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6271$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272
6273if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006274ac_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 +00006275if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006276
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006277$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278
6279fi
6280
6281
6282
6283 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006284 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 +00006285if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006286
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006287$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288
6289fi
6290
6291
6292 fi
6293fi
6294
Michael W. Hudson54241132001-12-07 15:38:26 +00006295
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006296# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006297for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006298do :
6299 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006300#ifdef HAVE_CURSES_H
6301#include <curses.h>
6302#endif
6303
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006304"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006305if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006306 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006307#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006308_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006309
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006310fi
6311
6312done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006313
6314
Martin v. Löwis11017b12006-01-14 18:12:57 +00006315# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006316for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006317do :
6318 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 +00006319#ifdef HAVE_ASM_TYPES_H
6320#include <asm/types.h>
6321#endif
6322#ifdef HAVE_SYS_SOCKET_H
6323#include <sys/socket.h>
6324#endif
6325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006327if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006328 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006329#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006330_ACEOF
6331
6332fi
6333
6334done
6335
6336
Guido van Rossum627b2d71993-12-24 10:39:16 +00006337# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006338was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6340$as_echo_n "checking for clock_t in time.h... " >&6; }
6341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006342/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006343#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006344
6345_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006347 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006348 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006349else
Martin v. Löwis11437992002-04-12 09:54:03 +00006350
6351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006352$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006353
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006354
Guido van Rossum627b2d71993-12-24 10:39:16 +00006355fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006356rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006357
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6359$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006360
Neal Norwitz11690112002-07-30 01:08:28 +00006361# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6363$as_echo_n "checking for makedev... " >&6; }
6364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006365/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006366
6367#if defined(MAJOR_IN_MKDEV)
6368#include <sys/mkdev.h>
6369#elif defined(MAJOR_IN_SYSMACROS)
6370#include <sys/sysmacros.h>
6371#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006372#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006373#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006374int
6375main ()
6376{
6377 makedev(0, 0)
6378 ;
6379 return 0;
6380}
6381_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006382if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006383 ac_cv_has_makedev=yes
6384else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006385 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006386fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006387rm -f core conftest.err conftest.$ac_objext \
6388 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006389if test "$ac_cv_has_makedev" = "no"; then
6390 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006392/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006393
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006394#define _OSF_SOURCE 1
6395#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006396
Neal Norwitz11690112002-07-30 01:08:28 +00006397int
6398main ()
6399{
6400 makedev(0, 0)
6401 ;
6402 return 0;
6403}
6404_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006405if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006406 ac_cv_has_makedev=yes
6407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006408 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006409fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006410rm -f core conftest.err conftest.$ac_objext \
6411 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006412 if test "$ac_cv_has_makedev" = "yes"; then
6413
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006414$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006415
6416 fi
6417fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6419$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006420if test "$ac_cv_has_makedev" = "yes"; then
6421
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006422$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006423
6424fi
6425
Martin v. Löwis399a6892002-10-04 10:22:02 +00006426# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6427# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6428# defined, but the compiler does not support pragma redefine_extname,
6429# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6430# structures (such as rlimit64) without declaring them. As a
6431# work-around, disable LFS on such configurations
6432
6433use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6435$as_echo_n "checking Solaris LFS bug... " >&6; }
6436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006437/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006438
6439#define _LARGEFILE_SOURCE 1
6440#define _FILE_OFFSET_BITS 64
6441#include <sys/resource.h>
6442
Martin v. Löwis399a6892002-10-04 10:22:02 +00006443int
6444main ()
6445{
6446struct rlimit foo;
6447 ;
6448 return 0;
6449}
6450_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006452 sol_lfs_bug=no
6453else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006454 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6458$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006459if test "$sol_lfs_bug" = "yes"; then
6460 use_lfs=no
6461fi
6462
6463if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006464# Two defines needed to enable largefile support on various platforms
6465# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006466
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006467$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006468
6469
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006470$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006471
Martin v. Löwis399a6892002-10-04 10:22:02 +00006472fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006473
Guido van Rossum84e7b241996-08-19 21:59:00 +00006474# Add some code to confdefs.h so that the test for off_t works on SCO
6475cat >> confdefs.h <<\EOF
6476#if defined(SCO_DS)
6477#undef _OFF_T
6478#endif
6479EOF
6480
Guido van Rossumef2255b2000-03-10 22:30:29 +00006481# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006482ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006483if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006484
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006485else
Martin v. Löwis11437992002-04-12 09:54:03 +00006486
6487cat >>confdefs.h <<_ACEOF
6488#define mode_t int
6489_ACEOF
6490
6491fi
6492
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006493ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006494if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006495
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496else
Martin v. Löwis11437992002-04-12 09:54:03 +00006497
6498cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006499#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006500_ACEOF
6501
6502fi
6503
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006504ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006505if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006507else
Martin v. Löwis11437992002-04-12 09:54:03 +00006508
6509cat >>confdefs.h <<_ACEOF
6510#define pid_t int
6511_ACEOF
6512
6513fi
6514
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006515
Martin v. Löwis11437992002-04-12 09:54:03 +00006516cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006517#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006518_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006519
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006520ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006521if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006522
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006523else
Martin v. Löwis11437992002-04-12 09:54:03 +00006524
6525cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006526#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006527_ACEOF
6528
6529fi
6530
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6532$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006533if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006534 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006535else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006537/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006538#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006539
6540_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006541if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006542 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006543 ac_cv_type_uid_t=yes
6544else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006545 ac_cv_type_uid_t=no
6546fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006547rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006548
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006549fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6551$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006552if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006553
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006554$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006555
6556
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006557$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006558
6559fi
6560
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006561ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6562case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006563 no|yes) ;; #(
6564 *)
6565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006566$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006567
6568
6569cat >>confdefs.h <<_ACEOF
6570#define uint32_t $ac_cv_c_uint32_t
6571_ACEOF
6572;;
6573 esac
6574
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006575ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6576case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006577 no|yes) ;; #(
6578 *)
6579
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006580$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006581
6582
6583cat >>confdefs.h <<_ACEOF
6584#define uint64_t $ac_cv_c_uint64_t
6585_ACEOF
6586;;
6587 esac
6588
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006589ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6590case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006591 no|yes) ;; #(
6592 *)
6593
6594cat >>confdefs.h <<_ACEOF
6595#define int32_t $ac_cv_c_int32_t
6596_ACEOF
6597;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006598esac
6599
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006600ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6601case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006602 no|yes) ;; #(
6603 *)
6604
6605cat >>confdefs.h <<_ACEOF
6606#define int64_t $ac_cv_c_int64_t
6607_ACEOF
6608;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006609esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006610
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006611ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006612if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006613
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006614$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006615
6616fi
6617
Jack Jansendd19cf82001-12-06 22:36:17 +00006618
Michael W. Hudson54241132001-12-07 15:38:26 +00006619# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006620# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006621# The cast to long int works around a bug in the HP C Compiler
6622# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6623# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6624# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6626$as_echo_n "checking size of int... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006627if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006628 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006629else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006630 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 +00006631
Martin v. Löwis11437992002-04-12 09:54:03 +00006632else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006633 if test "$ac_cv_type_int" = yes; then
6634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006636as_fn_error 77 "cannot compute sizeof (int)
6637See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006638 else
6639 ac_cv_sizeof_int=0
6640 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006641fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006642
Martin v. Löwis11437992002-04-12 09:54:03 +00006643fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6645$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006646
6647
6648
Martin v. Löwis11437992002-04-12 09:54:03 +00006649cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006650#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006651_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006652
6653
Martin v. Löwiseba40652007-08-30 20:10:57 +00006654# The cast to long int works around a bug in the HP C Compiler
6655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6657# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6659$as_echo_n "checking size of long... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006660if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006661 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006662else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006663 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 +00006664
Martin v. Löwis11437992002-04-12 09:54:03 +00006665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006666 if test "$ac_cv_type_long" = yes; then
6667 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006669as_fn_error 77 "cannot compute sizeof (long)
6670See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006671 else
6672 ac_cv_sizeof_long=0
6673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006674fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006675
Martin v. Löwis11437992002-04-12 09:54:03 +00006676fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6678$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006679
6680
6681
Martin v. Löwis11437992002-04-12 09:54:03 +00006682cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006683#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006684_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006685
6686
Martin v. Löwiseba40652007-08-30 20:10:57 +00006687# The cast to long int works around a bug in the HP C Compiler
6688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6690# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6692$as_echo_n "checking size of void *... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006693if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006694 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006696 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 +00006697
Martin v. Löwis11437992002-04-12 09:54:03 +00006698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006699 if test "$ac_cv_type_void_p" = yes; then
6700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006702as_fn_error 77 "cannot compute sizeof (void *)
6703See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006704 else
6705 ac_cv_sizeof_void_p=0
6706 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006707fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006708
Martin v. Löwis11437992002-04-12 09:54:03 +00006709fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6711$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006712
6713
6714
Martin v. Löwis11437992002-04-12 09:54:03 +00006715cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006716#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006717_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006718
6719
Martin v. Löwiseba40652007-08-30 20:10:57 +00006720# The cast to long int works around a bug in the HP C Compiler
6721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6723# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6725$as_echo_n "checking size of short... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006726if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006729 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 +00006730
Martin v. Löwis11437992002-04-12 09:54:03 +00006731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006732 if test "$ac_cv_type_short" = yes; then
6733 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006735as_fn_error 77 "cannot compute sizeof (short)
6736See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006737 else
6738 ac_cv_sizeof_short=0
6739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006740fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006741
Martin v. Löwis11437992002-04-12 09:54:03 +00006742fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6744$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006745
6746
6747
Martin v. Löwis11437992002-04-12 09:54:03 +00006748cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006749#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006750_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006751
6752
Martin v. Löwiseba40652007-08-30 20:10:57 +00006753# The cast to long int works around a bug in the HP C Compiler
6754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6756# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6758$as_echo_n "checking size of float... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006759if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006762 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 +00006763
Martin v. Löwis11437992002-04-12 09:54:03 +00006764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006765 if test "$ac_cv_type_float" = yes; then
6766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006768as_fn_error 77 "cannot compute sizeof (float)
6769See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006770 else
6771 ac_cv_sizeof_float=0
6772 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006773fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006774
Martin v. Löwis11437992002-04-12 09:54:03 +00006775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6777$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006778
6779
6780
Martin v. Löwis11437992002-04-12 09:54:03 +00006781cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006782#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006783_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006784
6785
Martin v. Löwiseba40652007-08-30 20:10:57 +00006786# The cast to long int works around a bug in the HP C Compiler
6787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6789# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6791$as_echo_n "checking size of double... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006792if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006795 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 +00006796
Martin v. Löwis11437992002-04-12 09:54:03 +00006797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006798 if test "$ac_cv_type_double" = yes; then
6799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006801as_fn_error 77 "cannot compute sizeof (double)
6802See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006803 else
6804 ac_cv_sizeof_double=0
6805 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006807
Martin v. Löwis11437992002-04-12 09:54:03 +00006808fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6810$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006811
6812
6813
Martin v. Löwis11437992002-04-12 09:54:03 +00006814cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006815#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006816_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006817
6818
Martin v. Löwiseba40652007-08-30 20:10:57 +00006819# The cast to long int works around a bug in the HP C Compiler
6820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6822# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6824$as_echo_n "checking size of fpos_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006825if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006826 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828 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 +00006829
Martin v. Löwis11437992002-04-12 09:54:03 +00006830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006831 if test "$ac_cv_type_fpos_t" = yes; then
6832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006834as_fn_error 77 "cannot compute sizeof (fpos_t)
6835See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006836 else
6837 ac_cv_sizeof_fpos_t=0
6838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006840
Martin v. Löwis11437992002-04-12 09:54:03 +00006841fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6843$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844
6845
6846
Martin v. Löwis11437992002-04-12 09:54:03 +00006847cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006848#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006849_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006850
Michael W. Hudson54241132001-12-07 15:38:26 +00006851
Martin v. Löwiseba40652007-08-30 20:10:57 +00006852# The cast to long int works around a bug in the HP C Compiler
6853# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6854# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6855# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6857$as_echo_n "checking size of size_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006858if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006859 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861 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 +00006862
Martin v. Löwis18e16552006-02-15 17:27:45 +00006863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006864 if test "$ac_cv_type_size_t" = yes; then
6865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006867as_fn_error 77 "cannot compute sizeof (size_t)
6868See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006869 else
6870 ac_cv_sizeof_size_t=0
6871 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006872fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006873
Martin v. Löwis18e16552006-02-15 17:27:45 +00006874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6876$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006877
6878
6879
Martin v. Löwis18e16552006-02-15 17:27:45 +00006880cat >>confdefs.h <<_ACEOF
6881#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6882_ACEOF
6883
6884
Christian Heimes951cc0f2008-01-31 23:08:23 +00006885# The cast to long int works around a bug in the HP C Compiler
6886# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6887# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6888# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6890$as_echo_n "checking size of pid_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006891if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006892 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00006893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006894 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 +00006895
Christian Heimes951cc0f2008-01-31 23:08:23 +00006896else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006897 if test "$ac_cv_type_pid_t" = yes; then
6898 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006900as_fn_error 77 "cannot compute sizeof (pid_t)
6901See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006902 else
6903 ac_cv_sizeof_pid_t=0
6904 fi
6905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006906
Christian Heimes951cc0f2008-01-31 23:08:23 +00006907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6909$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006910
6911
6912
6913cat >>confdefs.h <<_ACEOF
6914#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6915_ACEOF
6916
6917
Michael W. Hudson54241132001-12-07 15:38:26 +00006918
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6920$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006921have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006923/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006924
Martin v. Löwis11437992002-04-12 09:54:03 +00006925int
6926main ()
6927{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006928long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006929 ;
6930 return 0;
6931}
6932_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006933if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006934
6935
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006936$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006937
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006938 have_long_long=yes
6939
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6943$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006944if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006945# The cast to long int works around a bug in the HP C Compiler
6946# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6947# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6948# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6950$as_echo_n "checking size of long long... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006951if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006952 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006953else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006954 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 +00006955
Martin v. Löwis11437992002-04-12 09:54:03 +00006956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006957 if test "$ac_cv_type_long_long" = yes; then
6958 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6959$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006960as_fn_error 77 "cannot compute sizeof (long long)
6961See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006962 else
6963 ac_cv_sizeof_long_long=0
6964 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006965fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006966
Martin v. Löwis11437992002-04-12 09:54:03 +00006967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6969$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006970
6971
6972
Martin v. Löwis11437992002-04-12 09:54:03 +00006973cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006974#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006975_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006976
Michael W. Hudson54241132001-12-07 15:38:26 +00006977
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006978fi
6979
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6981$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006982have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006984/* end confdefs.h. */
6985
6986int
6987main ()
6988{
Matthias Klosec511b472010-05-08 11:01:39 +00006989long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006990 ;
6991 return 0;
6992}
6993_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006994if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006995
6996
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006997$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00006998
6999 have_long_double=yes
7000
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007001fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7004$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007005if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007006# The cast to long int works around a bug in the HP C Compiler
7007# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7008# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7009# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7011$as_echo_n "checking size of long double... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007012if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007013 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007014else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007015 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 +00007016
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007018 if test "$ac_cv_type_long_double" = yes; then
7019 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7020$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007021as_fn_error 77 "cannot compute sizeof (long double)
7022See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007023 else
7024 ac_cv_sizeof_long_double=0
7025 fi
7026fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007027
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007028fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7030$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007031
7032
7033
7034cat >>confdefs.h <<_ACEOF
7035#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7036_ACEOF
7037
7038
7039fi
7040
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7042$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007043have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007045/* end confdefs.h. */
7046
7047int
7048main ()
7049{
7050_Bool x; x = (_Bool)0;
7051 ;
7052 return 0;
7053}
7054_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007055if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007056
7057
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007058$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007059
7060 have_c99_bool=yes
7061
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7065$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007066if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007067# The cast to long int works around a bug in the HP C Compiler
7068# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7069# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7070# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7072$as_echo_n "checking size of _Bool... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007073if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007074 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007075else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007076 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 +00007077
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007079 if test "$ac_cv_type__Bool" = yes; then
7080 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007082as_fn_error 77 "cannot compute sizeof (_Bool)
7083See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007084 else
7085 ac_cv_sizeof__Bool=0
7086 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007087fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007088
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007089fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7091$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007092
7093
7094
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007095cat >>confdefs.h <<_ACEOF
7096#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7097_ACEOF
7098
7099
7100fi
7101
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007102ac_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 +00007103 #include <stdint.h>
7104 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007105 #ifdef HAVE_INTTYPES_H
7106 #include <inttypes.h>
7107 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007108"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007109if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007110
7111cat >>confdefs.h <<_ACEOF
7112#define HAVE_UINTPTR_T 1
7113_ACEOF
7114
Martin v. Löwiseba40652007-08-30 20:10:57 +00007115# The cast to long int works around a bug in the HP C Compiler
7116# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7117# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7118# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7120$as_echo_n "checking size of uintptr_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007121if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007122 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007123else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007124 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 +00007125
Martin v. Löwis11437992002-04-12 09:54:03 +00007126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007127 if test "$ac_cv_type_uintptr_t" = yes; then
7128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007130as_fn_error 77 "cannot compute sizeof (uintptr_t)
7131See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007132 else
7133 ac_cv_sizeof_uintptr_t=0
7134 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007135fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136
Martin v. Löwis11437992002-04-12 09:54:03 +00007137fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7139$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007140
7141
7142
Martin v. Löwis11437992002-04-12 09:54:03 +00007143cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007144#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007145_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007146
Michael W. Hudson54241132001-12-07 15:38:26 +00007147
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007148fi
7149
Martin v. Löwisebe26702006-10-02 14:55:51 +00007150
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007151# The cast to long int works around a bug in the HP C Compiler
7152# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7153# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7154# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7156$as_echo_n "checking size of off_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007157if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007158 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007160 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007161#ifdef HAVE_SYS_TYPES_H
7162#include <sys/types.h>
7163#endif
7164
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007166
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007167else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007168 if test "$ac_cv_type_off_t" = yes; then
7169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007171as_fn_error 77 "cannot compute sizeof (off_t)
7172See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007173 else
7174 ac_cv_sizeof_off_t=0
7175 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007176fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007177
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007178fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7180$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007181
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007182
7183
Martin v. Löwis11437992002-04-12 09:54:03 +00007184cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007185#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007186_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007187
Michael W. Hudson54241132001-12-07 15:38:26 +00007188
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007189
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7191$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007192if test "$have_long_long" = yes
7193then
7194if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007195 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007196
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007197$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007198
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7200$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007201else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7203$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007204fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007205else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7207$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007208fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007209
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007210# The cast to long int works around a bug in the HP C Compiler
7211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7213# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7215$as_echo_n "checking size of time_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007216if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007217 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007218else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007219 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007220#ifdef HAVE_SYS_TYPES_H
7221#include <sys/types.h>
7222#endif
7223#ifdef HAVE_TIME_H
7224#include <time.h>
7225#endif
7226
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007227"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007228
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007230 if test "$ac_cv_type_time_t" = yes; then
7231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7232$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007233as_fn_error 77 "cannot compute sizeof (time_t)
7234See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007235 else
7236 ac_cv_sizeof_time_t=0
7237 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007238fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007239
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7242$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007243
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007244
7245
Martin v. Löwis11437992002-04-12 09:54:03 +00007246cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007247#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007248_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007249
Michael W. Hudson54241132001-12-07 15:38:26 +00007250
7251
Trent Mick635f6fb2000-08-23 21:33:05 +00007252# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007253ac_save_cc="$CC"
7254if test "$ac_cv_kpthread" = "yes"
7255then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007256elif test "$ac_cv_kthread" = "yes"
7257then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007258elif test "$ac_cv_pthread" = "yes"
7259then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007260fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7262$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007263have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007265/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007266
7267 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007268int
7269main ()
7270{
Guido van Rossum12580492000-09-24 16:47:19 +00007271pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007272 ;
7273 return 0;
7274}
Matthias Klosec511b472010-05-08 11:01:39 +00007275
Martin v. Löwis11437992002-04-12 09:54:03 +00007276_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007277if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007278 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7282$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007283if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007284 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007285# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7286# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7287# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7289$as_echo_n "checking size of pthread_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007290if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007293 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007294#ifdef HAVE_PTHREAD_H
7295#include <pthread.h>
7296#endif
7297
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007298"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007299
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007301 if test "$ac_cv_type_pthread_t" = yes; then
7302 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7303$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007304as_fn_error 77 "cannot compute sizeof (pthread_t)
7305See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007306 else
7307 ac_cv_sizeof_pthread_t=0
7308 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007309fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007310
Trent Mick635f6fb2000-08-23 21:33:05 +00007311fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7313$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007314
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007315
7316
Martin v. Löwis11437992002-04-12 09:54:03 +00007317cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007318#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007319_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007320
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007321
Trent Mick635f6fb2000-08-23 21:33:05 +00007322fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007323CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007324
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7326$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007327# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007328if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007329 enableval=$enable_toolbox_glue;
7330fi
Jack Jansene578a632001-08-15 01:27:14 +00007331
7332
7333if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007334then
Jack Jansene578a632001-08-15 01:27:14 +00007335 case $ac_sys_system/$ac_sys_release in
7336 Darwin/*)
7337 enable_toolbox_glue="yes";;
7338 *)
7339 enable_toolbox_glue="no";;
7340 esac
7341fi
7342case "$enable_toolbox_glue" in
7343yes)
Jack Jansene578a632001-08-15 01:27:14 +00007344 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007345 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007346
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007347$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007348
7349 ;;
7350*)
Jack Jansene578a632001-08-15 01:27:14 +00007351 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007352 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007353 ;;
7354esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7356$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007357
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007358
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007359
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007360case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007361 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007362 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7363 ;;
7364 Darwin/*)
7365 OTHER_LIBTOOL_OPT=""
7366 ;;
7367esac
7368
7369
Ronald Oussoren25967582009-09-06 10:00:26 +00007370ARCH_RUN_32BIT=""
7371
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007372case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007373 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007374 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7375 if test "${enable_universalsdk}"; then
7376 :
7377 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007378 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007379 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007380 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007381 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007382 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007383 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007384 if test ${gcc_version} '<' 4.0
7385 then
7386 LIBTOOL_CRUFT="-lcc_dynamic"
7387 else
7388 LIBTOOL_CRUFT=""
7389 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007390 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007391 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007394/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007395
Ronald Oussoren25967582009-09-06 10:00:26 +00007396 #include <unistd.h>
7397 int main(int argc, char*argv[])
7398 {
7399 if (sizeof(long) == 4) {
7400 return 0;
7401 } else {
7402 return 1;
7403 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007404 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007405
Ronald Oussoren25967582009-09-06 10:00:26 +00007406_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007407if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007408 ac_osx_32bit=yes
7409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007410 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007411fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7413 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007414fi
7415
7416
Ronald Oussoren25967582009-09-06 10:00:26 +00007417 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007418 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007419 i386)
7420 MACOSX_DEFAULT_ARCH="i386"
7421 ;;
7422 ppc)
7423 MACOSX_DEFAULT_ARCH="ppc"
7424 ;;
7425 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007426 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007427 ;;
7428 esac
7429 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007430 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007431 i386)
7432 MACOSX_DEFAULT_ARCH="x86_64"
7433 ;;
7434 ppc)
7435 MACOSX_DEFAULT_ARCH="ppc64"
7436 ;;
7437 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007438 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007439 ;;
7440 esac
7441
7442 #ARCH_RUN_32BIT="true"
7443 fi
7444
7445 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007446 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007447 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007448esac
7449
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7451$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007452if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007453then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007454 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007455 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007456 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007457
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007458$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007459
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7461$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007462 if test $enable_shared = "yes"
7463 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007464 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 +00007465 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007466else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007469fi
7470
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7472$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007473case $ac_sys_system/$ac_sys_release in
7474 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007475
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007476$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007477
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7479$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007480 ;;
7481 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7483$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007484 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007485esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007486
Guido van Rossum0a516c91994-09-12 10:58:40 +00007487# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007488
Michael W. Hudson54241132001-12-07 15:38:26 +00007489
7490
7491
7492
Ronald Oussoren75912852010-04-08 08:13:31 +00007493
Guido van Rossum0a516c91994-09-12 10:58:40 +00007494# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007495# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7497$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007498if test -z "$SO"
7499then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007500 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007501 hp*|HP*)
7502 case `uname -m` in
7503 ia64) SO=.so;;
7504 *) SO=.sl;;
7505 esac
7506 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007507 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007508 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007509 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007510else
7511 # this might also be a termcap variable, see #610332
7512 echo
7513 echo '====================================================================='
7514 echo '+ +'
7515 echo '+ WARNING: You have set SO in your environment. +'
7516 echo '+ Do you really mean to change the extension for shared libraries? +'
7517 echo '+ Continuing in 10 seconds to let you to ponder. +'
7518 echo '+ +'
7519 echo '====================================================================='
7520 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007521fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7523$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007524
Ronald Oussoren79f90492009-01-02 10:44:46 +00007525
Neal Norwitz58e28882006-05-19 07:00:58 +00007526cat >>confdefs.h <<_ACEOF
7527#define SHLIB_EXT "$SO"
7528_ACEOF
7529
Guido van Rossum0a516c91994-09-12 10:58:40 +00007530# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007531# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007532# (Shared libraries in this instance are shared modules to be loaded into
7533# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7535$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007536if test -z "$LDSHARED"
7537then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007538 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007539 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007540 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007541 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007542 ;;
7543 BeOS*)
7544 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007545 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007546 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007547 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007548 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007549 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007550 if test "$GCC" = "yes" ; then
7551 LDSHARED='$(CC) -shared'
7552 LDCXXSHARED='$(CXX) -shared'
7553 else
7554 LDSHARED='$(CC) -G'
7555 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007556 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007557 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007558 if test "$GCC" = "yes" ; then
7559 LDSHARED='$(CC) -shared'
7560 LDCXXSHARED='$(CXX) -shared'
7561 else
7562 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007563 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007564 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007565 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007566 LDSHARED='$(CC) -bundle'
7567 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007568 if test "$enable_framework" ; then
7569 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007570 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7571 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007572 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007573 else
7574 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007575 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007576 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007577 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007578 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007579 LDSHARED='$(CC) -bundle'
7580 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007581 if test "$enable_framework" ; then
7582 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007583 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7584 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007585 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007586 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007587 # No framework, use the Python app as bundle-loader
7588 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007589 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007590 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007591 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007592 Darwin/*)
7593 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7594 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007595
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007596 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007597 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007598 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007599 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007600 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007601 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7602 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007603 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007604 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007605 LDSHARED='$(CC) -bundle'
7606 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007607 if test "$enable_framework" ; then
7608 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007609 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7610 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007611 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007612 else
7613 # No framework, use the Python app as bundle-loader
7614 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7615 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007616 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007617 fi
7618 fi
7619 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007620 Linux*|GNU*|QNX*)
7621 LDSHARED='$(CC) -shared'
7622 LDCXXSHARED='$(CXX) -shared';;
7623 BSD/OS*/4*)
7624 LDSHARED="gcc -shared"
7625 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007626 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007627 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007628 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007629 LDSHARED='$(CC) -shared'
7630 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007631 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007632 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007633 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007634 OpenBSD*)
7635 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7636 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007637 LDSHARED='$(CC) -shared $(CCSHARED)'
7638 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007639 else
7640 case `uname -r` in
7641 [01].* | 2.[0-7] | 2.[0-7].*)
7642 LDSHARED="ld -Bshareable ${LDFLAGS}"
7643 ;;
7644 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007645 LDSHARED='$(CC) -shared $(CCSHARED)'
7646 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007647 ;;
7648 esac
7649 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007650 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007651 LDSHARED='$(CC) -shared'
7652 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007653 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007654 if test "$GCC" = "yes" ; then
7655 LDSHARED='$(CC) -shared'
7656 LDCXXSHARED='$(CXX) -shared'
7657 else
7658 LDSHARED='$(CC) -G'
7659 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007660 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007661 SCO_SV*)
7662 LDSHARED='$(CC) -Wl,-G,-Bexport'
7663 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7664 CYGWIN*)
7665 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7666 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7667 atheos*)
7668 LDSHARED="gcc -shared"
7669 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007670 *) LDSHARED="ld";;
7671 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007672fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7674$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007675LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007676BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007677# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007678# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7680$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007681if test -z "$CCSHARED"
7682then
Guido van Rossum07397971997-04-29 21:49:50 +00007683 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007684 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007685 then CCSHARED="-fPIC";
7686 elif test `uname -p` = sparc;
7687 then CCSHARED="-xcode=pic32";
7688 else CCSHARED="-Kpic";
7689 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007690 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007691 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007692 else CCSHARED="+z";
7693 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007694 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007695 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007696 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007697 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007698 if test "$GCC" = "yes"
7699 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007700 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007701 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007702 SCO_SV*)
7703 if test "$GCC" = "yes"
7704 then CCSHARED="-fPIC"
7705 else CCSHARED="-Kpic -belf"
7706 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007707 IRIX*/6*) case $CC in
7708 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007709 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007710 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007711 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007712 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007713fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7715$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007716# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007717# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7719$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007720if test -z "$LINKFORSHARED"
7721then
Guido van Rossum07397971997-04-29 21:49:50 +00007722 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007723 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007724 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007725 LINKFORSHARED="-Wl,-E -Wl,+s";;
7726# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007727 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007728 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007729 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007730 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007731 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7732 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007733 # not used by the core itself but which needs to be in the core so
7734 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007735 # -prebind is no longer used, because it actually seems to give a
7736 # slowdown in stead of a speedup, maybe due to the large number of
7737 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007738
7739 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007740 if test "$enable_framework"
7741 then
Jack Jansenda49e192005-01-07 13:08:22 +00007742 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007743 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007744 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007745 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007746 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007747 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007748 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007749 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7750 then
7751 LINKFORSHARED="-Wl,--export-dynamic"
7752 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007753 SunOS/5*) case $CC in
7754 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007755 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007756 then
7757 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007758 fi;;
7759 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007760 CYGWIN*)
7761 if test $enable_shared = "no"
7762 then
7763 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7764 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007765 QNX*)
7766 # -Wl,-E causes the symbols to be added to the dynamic
7767 # symbol table so that they can be found when a module
7768 # is loaded. -N 2048K causes the stack size to be set
7769 # to 2048 kilobytes so that the stack doesn't overflow
7770 # when running test_compile.py.
7771 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007772 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007773fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7775$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007776
Michael W. Hudson54241132001-12-07 15:38:26 +00007777
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007778
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7780$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007781if test ! "$LIBRARY" = "$LDLIBRARY"
7782then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007783 case $ac_sys_system in
7784 CYGWIN*)
7785 # Cygwin needs CCSHARED when building extension DLLs
7786 # but not when building the interpreter DLL.
7787 CFLAGSFORSHARED='';;
7788 *)
7789 CFLAGSFORSHARED='$(CCSHARED)'
7790 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007791fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7793$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007794
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007795# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7796# library (with --enable-shared).
7797# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007798# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7799# if it is not required, since it creates a dependency of the shared library
7800# to LIBS. This, in turn, means that applications linking the shared libpython
7801# don't need to link LIBS explicitly. The default should be only changed
7802# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007803
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7805$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007806case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007807 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007808 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007809esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7811$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007812
7813
Guido van Rossum627b2d71993-12-24 10:39:16 +00007814# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7816$as_echo_n "checking for dlopen in -ldl... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007817if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007818 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007819else
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007821LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007824
Martin v. Löwiseba40652007-08-30 20:10:57 +00007825/* Override any GCC internal prototype to avoid an error.
7826 Use char because int might match the return type of a GCC
7827 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007828#ifdef __cplusplus
7829extern "C"
7830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007831char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007832int
7833main ()
7834{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007835return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007836 ;
7837 return 0;
7838}
7839_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007840if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007841 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007843 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007844fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007845rm -f core conftest.err conftest.$ac_objext \
7846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007847LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007848fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7850$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007851if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007852 cat >>confdefs.h <<_ACEOF
7853#define HAVE_LIBDL 1
7854_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007855
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007856 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007857
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007858fi
7859 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7861$as_echo_n "checking for shl_load in -ldld... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007862if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007863 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007864else
Martin v. Löwis11437992002-04-12 09:54:03 +00007865 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007866LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007869
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870/* Override any GCC internal prototype to avoid an error.
7871 Use char because int might match the return type of a GCC
7872 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007873#ifdef __cplusplus
7874extern "C"
7875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007876char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007877int
7878main ()
7879{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007880return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 ;
7882 return 0;
7883}
7884_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007885if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007887else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007888 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007890rm -f core conftest.err conftest.$ac_objext \
7891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007892LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007893fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7895$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007896if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 cat >>confdefs.h <<_ACEOF
7898#define HAVE_LIBDLD 1
7899_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007900
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007901 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007902
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007903fi
7904 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007905
Ronald Oussoren79f90492009-01-02 10:44:46 +00007906# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007907if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7909$as_echo_n "checking for library containing sem_init... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007910if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007911 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007912else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007913 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007916
Martin v. Löwiseba40652007-08-30 20:10:57 +00007917/* Override any GCC internal prototype to avoid an error.
7918 Use char because int might match the return type of a GCC
7919 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007920#ifdef __cplusplus
7921extern "C"
7922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007923char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007924int
7925main ()
7926{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007927return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 ;
7929 return 0;
7930}
7931_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007932for ac_lib in '' pthread rt posix4; do
7933 if test -z "$ac_lib"; then
7934 ac_res="none required"
7935 else
7936 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007937 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007938 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007939 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007940 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007941fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007942rm -f core conftest.err conftest.$ac_objext \
7943 conftest$ac_exeext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007944 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007945 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007947done
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007948if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007949
Martin v. Löwiseba40652007-08-30 20:10:57 +00007950else
7951 ac_cv_search_sem_init=no
7952fi
7953rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007954LIBS=$ac_func_search_save_LIBS
7955fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7957$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007958ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007959if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007961
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007962fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007963 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007964 # posix4 on Solaris 2.6
7965 # pthread (first!) on Linux
7966fi
7967
Martin v. Löwis19d17342003-06-14 21:03:05 +00007968# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7970$as_echo_n "checking for textdomain in -lintl... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007971if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007972 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007973else
7974 ac_check_lib_save_LIBS=$LIBS
7975LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007977/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007978
Martin v. Löwiseba40652007-08-30 20:10:57 +00007979/* Override any GCC internal prototype to avoid an error.
7980 Use char because int might match the return type of a GCC
7981 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007982#ifdef __cplusplus
7983extern "C"
7984#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007985char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007986int
7987main ()
7988{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007989return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007990 ;
7991 return 0;
7992}
7993_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007994if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007995 ac_cv_lib_intl_textdomain=yes
7996else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007997 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007999rm -f core conftest.err conftest.$ac_objext \
8000 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008001LIBS=$ac_check_lib_save_LIBS
8002fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8004$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008005if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008006
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008007$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008008
8009fi
8010
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008011
8012# checks for system dependent C++ extensions support
8013case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008014 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8015$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008017/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008018
8019 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008020int
8021main ()
8022{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008023loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ;
8025 return 0;
8026}
Matthias Klosec511b472010-05-08 11:01:39 +00008027
Martin v. Löwis11437992002-04-12 09:54:03 +00008028_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008029if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008030
Matthias Klosec511b472010-05-08 11:01:39 +00008031
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008032$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008033
Matthias Klosec511b472010-05-08 11:01:39 +00008034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008035$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008036
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008037else
Matthias Klosec511b472010-05-08 11:01:39 +00008038
8039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008040$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008041
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008043rm -f core conftest.err conftest.$ac_objext \
8044 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008045 *) ;;
8046esac
8047
Guido van Rossum70c7f481998-03-26 18:44:10 +00008048# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008049# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8051$as_echo_n "checking for t_open in -lnsl... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008052if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008053 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008054else
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008056LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008059
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060/* Override any GCC internal prototype to avoid an error.
8061 Use char because int might match the return type of a GCC
8062 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008063#ifdef __cplusplus
8064extern "C"
8065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008066char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008067int
8068main ()
8069{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008070return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008071 ;
8072 return 0;
8073}
8074_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008075if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008076 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008078 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008080rm -f core conftest.err conftest.$ac_objext \
8081 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008082LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008083fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8085$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008086if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008087 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008088fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008089 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8091$as_echo_n "checking for socket in -lsocket... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008092if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008093 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008094else
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008096LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008099
Martin v. Löwiseba40652007-08-30 20:10:57 +00008100/* Override any GCC internal prototype to avoid an error.
8101 Use char because int might match the return type of a GCC
8102 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008103#ifdef __cplusplus
8104extern "C"
8105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008106char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008107int
8108main ()
8109{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008110return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 ;
8112 return 0;
8113}
8114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008115if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008116 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008118 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008119fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008120rm -f core conftest.err conftest.$ac_objext \
8121 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008122LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008123fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8125$as_echo "$ac_cv_lib_socket_socket" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008126if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008127 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008128fi
8129 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008130
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008131case "$ac_sys_system" in
8132BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8134$as_echo_n "checking for socket in -lnet... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008135if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008136 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008137else
Martin v. Löwis11437992002-04-12 09:54:03 +00008138 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008139LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008142
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143/* Override any GCC internal prototype to avoid an error.
8144 Use char because int might match the return type of a GCC
8145 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008146#ifdef __cplusplus
8147extern "C"
8148#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008149char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008150int
8151main ()
8152{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008153return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008154 ;
8155 return 0;
8156}
8157_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008158if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008160else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008161 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008162fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008163rm -f core conftest.err conftest.$ac_objext \
8164 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008165LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008166fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8168$as_echo "$ac_cv_lib_net_socket" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008169if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008170 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008171fi
8172 # BeOS
8173;;
8174esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008175
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8177$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008178
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008180if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8183$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008184LIBS="$withval $LIBS"
8185
8186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008189fi
8190
Guido van Rossum7f43da71994-08-01 12:15:30 +00008191
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008192if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008193 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8194set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8196$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008197if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008198 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008199else
8200 case $PKG_CONFIG in
8201 [\\/]* | ?:[\\/]*)
8202 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8203 ;;
8204 *)
8205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8206for as_dir in $PATH
8207do
8208 IFS=$as_save_IFS
8209 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008210 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008211 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8212 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008213 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008214 break 2
8215 fi
8216done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008217 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008218IFS=$as_save_IFS
8219
8220 ;;
8221esac
8222fi
8223PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8224if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8226$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008227else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8229$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008230fi
8231
8232
8233fi
8234if test -z "$ac_cv_path_PKG_CONFIG"; then
8235 ac_pt_PKG_CONFIG=$PKG_CONFIG
8236 # Extract the first word of "pkg-config", so it can be a program name with args.
8237set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8239$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008240if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008241 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008242else
8243 case $ac_pt_PKG_CONFIG in
8244 [\\/]* | ?:[\\/]*)
8245 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8246 ;;
8247 *)
8248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8249for as_dir in $PATH
8250do
8251 IFS=$as_save_IFS
8252 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008253 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008254 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8255 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008257 break 2
8258 fi
8259done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008260 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008261IFS=$as_save_IFS
8262
8263 ;;
8264esac
8265fi
8266ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8267if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8269$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8272$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008273fi
8274
8275 if test "x$ac_pt_PKG_CONFIG" = x; then
8276 PKG_CONFIG=""
8277 else
8278 case $cross_compiling:$ac_tool_warned in
8279yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008280{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8281$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008282ac_tool_warned=yes ;;
8283esac
8284 PKG_CONFIG=$ac_pt_PKG_CONFIG
8285 fi
8286else
8287 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8288fi
8289
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008290
8291# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8293$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008294
8295# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008296if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008297 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008298else
8299 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008300fi
8301
8302
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8304$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008305
8306# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8308$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008309
8310# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008311if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008312 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008313else
8314 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008315fi
8316
8317
8318if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008319 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8320else
8321 LIBFFI_INCLUDEDIR=""
8322fi
8323
8324
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8326$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008327
Benjamin Peterson867475c2009-04-29 20:36:25 +00008328# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8330$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008331
8332# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008333if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008334 withval=$with_dbmliborder;
8335if test x$with_dbmliborder = xyes
8336then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008337as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008338else
8339 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8340 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8341 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008342 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008343 fi
8344 done
8345fi
8346fi
8347
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8349$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008350
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008351# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008352
8353
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8355$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008356
Martin v. Löwiseba40652007-08-30 20:10:57 +00008357# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008358if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008359 withval=$with_signal_module;
8360fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008361
8362
8363if test -z "$with_signal_module"
8364then with_signal_module="yes"
8365fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8367$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008368
8369if test "${with_signal_module}" = "yes"; then
8370 USE_SIGNAL_MODULE=""
8371 SIGNAL_OBJS=""
8372else
8373 USE_SIGNAL_MODULE="#"
8374 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8375fi
8376
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008377# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008378
Barry Warsawc0d24d82000-06-29 16:12:00 +00008379USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008380
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8382$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008383
Guido van Rossumec2f0731997-01-22 20:54:01 +00008384
Martin v. Löwiseba40652007-08-30 20:10:57 +00008385# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008386if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008387 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8389$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008390LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008391if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008392 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008393fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8396$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008397fi
8398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399
8400# Templates for things AC_DEFINEd more than once.
8401# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008402
8403
Martin v. Löwis11437992002-04-12 09:54:03 +00008404
8405
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8407$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008408
Martin v. Löwiseba40652007-08-30 20:10:57 +00008409# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008410if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008411 withval=$with_threads;
8412fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008413
8414
Barry Warsawc0d24d82000-06-29 16:12:00 +00008415# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008416
Martin v. Löwiseba40652007-08-30 20:10:57 +00008417# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008418if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008419 withval=$with_thread; with_threads=$with_thread
8420fi
8421
Barry Warsawc0d24d82000-06-29 16:12:00 +00008422
8423if test -z "$with_threads"
8424then with_threads="yes"
8425fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8427$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008428
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008429
Barry Warsawc0d24d82000-06-29 16:12:00 +00008430if test "$with_threads" = "no"
8431then
8432 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008433elif test "$ac_cv_pthread_is_default" = yes
8434then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008435 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008436
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008437 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008438 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008439
8440 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008441 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008442elif test "$ac_cv_kpthread" = "yes"
8443then
8444 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008445 if test "$ac_cv_cxx_thread" = "yes"; then
8446 CXX="$CXX -Kpthread"
8447 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008448 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008449
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008450 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008451 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008452elif test "$ac_cv_kthread" = "yes"
8453then
8454 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008455 if test "$ac_cv_cxx_thread" = "yes"; then
8456 CXX="$CXX -Kthread"
8457 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008458 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008459
8460 posix_threads=yes
8461 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008462elif test "$ac_cv_pthread" = "yes"
8463then
8464 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008465 if test "$ac_cv_cxx_thread" = "yes"; then
8466 CXX="$CXX -pthread"
8467 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008468 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008469
8470 posix_threads=yes
8471 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008472else
8473 if test ! -z "$with_threads" -a -d "$with_threads"
8474 then LDFLAGS="$LDFLAGS -L$with_threads"
8475 fi
8476 if test ! -z "$withval" -a -d "$withval"
8477 then LDFLAGS="$LDFLAGS -L$withval"
8478 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008479
8480 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008481 # define _POSIX_THREADS in unistd.h. Some apparently don't
8482 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8484$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008486/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008487
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008488#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008489#ifdef _POSIX_THREADS
8490yes
8491#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008492
8493_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008495 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008496 unistd_defines_pthreads=yes
8497else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008498 unistd_defines_pthreads=no
8499fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008500rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008501
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8503$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008504
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008505 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008506
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008507 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008508if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008509 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008510
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008511 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008512
Martin v. Löwis11437992002-04-12 09:54:03 +00008513
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008514$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008515
8516 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008517 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008518else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008519
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008520 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 +00008521if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008522 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008523
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008524 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008525
Martin v. Löwis11437992002-04-12 09:54:03 +00008526
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008527$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008528
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008529 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008530else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8533$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008534
Martin v. Löwiseba40652007-08-30 20:10:57 +00008535# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008536if test "${with_pth+set}" = set; then :
8537 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8538$as_echo "$withval" >&6; }
8539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008540
8541
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008542$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008543
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008544 LIBS="-lpth $LIBS"
8545 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008546else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8548$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008549
8550 # Just looking for pthread_create in libpthread is not enough:
8551 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8552 # So we really have to include pthread.h, and then link.
8553 _libs=$LIBS
8554 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8556$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008558/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008559#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008560
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008561void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008562int
8563main ()
8564{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008565
8566pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ;
8568 return 0;
8569}
8570_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008572
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8574$as_echo "yes" >&6; }
8575 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008576
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008577 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008578 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008579else
Martin v. Löwis11437992002-04-12 09:54:03 +00008580
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008581 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008582 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008583if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008584 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008585
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008586 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008587 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008588else
Guido van Rossumad678af1998-10-02 14:42:15 +00008589
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008590 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 +00008591if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008592 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008593
8594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008595$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008596
8597 THREADOBJ="Python/thread.o"
8598else
8599
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008600 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 +00008601if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008602 $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 BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008606
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008607 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008608else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008609
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8611$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008612if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008613 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008614else
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008616LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008619
Martin v. Löwiseba40652007-08-30 20:10:57 +00008620/* Override any GCC internal prototype to avoid an error.
8621 Use char because int might match the return type of a GCC
8622 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008623#ifdef __cplusplus
8624extern "C"
8625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008626char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008627int
8628main ()
8629{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008630return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 ;
8632 return 0;
8633}
8634_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008635if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008638 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008639fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008640rm -f core conftest.err conftest.$ac_objext \
8641 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008642LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008643fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8645$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008646if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008647 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008648
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008649 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008650 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008651 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008652else
Greg Steinadf63d62000-07-05 10:38:09 +00008653
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8655$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008656if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008657 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008658else
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008660LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008663
Martin v. Löwiseba40652007-08-30 20:10:57 +00008664/* Override any GCC internal prototype to avoid an error.
8665 Use char because int might match the return type of a GCC
8666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667#ifdef __cplusplus
8668extern "C"
8669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008670char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008671int
8672main ()
8673{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008674return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ;
8676 return 0;
8677}
8678_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008682 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008683fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008684rm -f core conftest.err conftest.$ac_objext \
8685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008686LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008687fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8689$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008690if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008691 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008692
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008693 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008694 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008695 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008696else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008697
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8699$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008700if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008701 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008702else
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008704LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008707
Martin v. Löwiseba40652007-08-30 20:10:57 +00008708/* Override any GCC internal prototype to avoid an error.
8709 Use char because int might match the return type of a GCC
8710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008711#ifdef __cplusplus
8712extern "C"
8713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008714char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008715int
8716main ()
8717{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008718return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 ;
8720 return 0;
8721}
8722_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008723if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008725else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008726 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008727fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008728rm -f core conftest.err conftest.$ac_objext \
8729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008730LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008731fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8733$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008734if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008735 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008736
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008737 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008738 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008739 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008740else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008741
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8743$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008744if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008745 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008746else
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008748LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008751
Martin v. Löwiseba40652007-08-30 20:10:57 +00008752/* Override any GCC internal prototype to avoid an error.
8753 Use char because int might match the return type of a GCC
8754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008755#ifdef __cplusplus
8756extern "C"
8757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008758char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008759int
8760main ()
8761{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008762return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008763 ;
8764 return 0;
8765}
8766_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008770 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008771fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008772rm -f core conftest.err conftest.$ac_objext \
8773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008774LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8777$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008778if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008779 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008780
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008781 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008782 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008783 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008784else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008785
Martin v. Löwis130fb172001-07-19 11:00:41 +00008786 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008787fi
8788
Guido van Rossum627b2d71993-12-24 10:39:16 +00008789
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008790fi
8791
Guido van Rossum0be3e491997-05-22 20:33:33 +00008792fi
8793
Guido van Rossum49545951997-12-02 19:28:29 +00008794fi
8795
Guido van Rossumb93a8621998-05-07 13:27:32 +00008796fi
8797
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008798
Michael W. Hudson54241132001-12-07 15:38:26 +00008799fi
8800
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008801
8802fi
8803
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008805rm -f core conftest.err conftest.$ac_objext \
8806 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008807fi
8808
Martin v. Löwis11437992002-04-12 09:54:03 +00008809fi
8810
8811
8812fi
8813
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008814
Michael W. Hudson54241132001-12-07 15:38:26 +00008815
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8817$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008818if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008819 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008820else
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008822LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008825
Martin v. Löwiseba40652007-08-30 20:10:57 +00008826/* Override any GCC internal prototype to avoid an error.
8827 Use char because int might match the return type of a GCC
8828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008829#ifdef __cplusplus
8830extern "C"
8831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008832char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008833int
8834main ()
8835{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008836return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ;
8838 return 0;
8839}
8840_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008841if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008844 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008845fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008846rm -f core conftest.err conftest.$ac_objext \
8847 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008848LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008849fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8851$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008852if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008853 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008854
Martin v. Löwis130fb172001-07-19 11:00:41 +00008855 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008856 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008857 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008858fi
8859
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008860
Neal Norwitza978ab02002-11-02 16:58:05 +00008861 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8863$as_echo_n "checking for thr_create in -lthread... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008864if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008865 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008866else
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008868LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008870/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008871
Martin v. Löwiseba40652007-08-30 20:10:57 +00008872/* Override any GCC internal prototype to avoid an error.
8873 Use char because int might match the return type of a GCC
8874 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008875#ifdef __cplusplus
8876extern "C"
8877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008878char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008879int
8880main ()
8881{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008882return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 ;
8884 return 0;
8885}
8886_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008887if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008889else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008890 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008891fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008892rm -f core conftest.err conftest.$ac_objext \
8893 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008894LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008895fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8897$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008898if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008899 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008900
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008901 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008902 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008903 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008904fi
8905
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008906 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008907
Martin v. Löwis130fb172001-07-19 11:00:41 +00008908 if test "$USE_THREAD_MODULE" != "#"
8909 then
8910 # If the above checks didn't disable threads, (at least) OSF1
8911 # needs this '-threads' argument during linking.
8912 case $ac_sys_system in
8913 OSF1) LDLAST=-threads;;
8914 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008915 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008916fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008917
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008918if test "$posix_threads" = "yes"; then
8919 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008920
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008921$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008922
8923 fi
8924
8925 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8926 case $ac_sys_system/$ac_sys_release in
8927 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008928$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008929
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008930 ;;
8931 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008932$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008933
8934 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +00008935 AIX/5)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008936$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00008937
8938 ;;
Antoine Pitroub41947b2010-08-30 14:55:30 +00008939 AIX/6)
8940$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8941
8942 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008943 esac
8944
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8946$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008947 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008948 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008950 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008951 ac_cv_pthread_system_supported=no
8952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008954/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008955#include <pthread.h>
8956 void *foo(void *parm) {
8957 return NULL;
8958 }
8959 main() {
8960 pthread_attr_t attr;
8961 pthread_t id;
8962 if (pthread_attr_init(&attr)) exit(-1);
8963 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8964 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8965 exit(0);
8966 }
8967_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008968if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008969 ac_cv_pthread_system_supported=yes
8970else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008971 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8974 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008975fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008976
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977
Guido van Rossum627b2d71993-12-24 10:39:16 +00008978fi
8979
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8981$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008982 if test "$ac_cv_pthread_system_supported" = "yes"; then
8983
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008984$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008985
8986 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008987 for ac_func in pthread_sigmask
8988do :
8989 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008990if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008991 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008992#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008993_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008994 case $ac_sys_system in
8995 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008996
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008997$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008998
8999 ;;
9000 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009001fi
9002done
9003
9004fi
9005
9006
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009008
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9010$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009011# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009013 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9016$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017 ipv6=no
9018 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009019 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9020$as_echo "yes" >&6; }
9021 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022
9023 ipv6=yes
9024 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026else
Martin v. Löwis11437992002-04-12 09:54:03 +00009027
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009028 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009029
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9031$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032 ipv6=no
9033
9034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009036/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037 /* AF_INET6 available check */
9038#include <sys/types.h>
9039#include <sys/socket.h>
9040main()
9041{
9042 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9043 exit(1);
9044 else
9045 exit(0);
9046}
9047
Martin v. Löwis11437992002-04-12 09:54:03 +00009048_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009049if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009050
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9052$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009054
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055else
Matthias Klosec511b472010-05-08 11:01:39 +00009056
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9058$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009060
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009061fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9063 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009064fi
9065
Martin v. Löwiseba40652007-08-30 20:10:57 +00009066
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009067if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9069$as_echo_n "checking if RFC2553 API is available... " >&6; }
9070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009071/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009072
9073 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009074#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009075int
9076main ()
9077{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009078struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009079 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 ;
9081 return 0;
9082}
Matthias Klosec511b472010-05-08 11:01:39 +00009083
Martin v. Löwis11437992002-04-12 09:54:03 +00009084_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009085if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009086
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009088$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009089 ipv6=yes
9090
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009091else
Matthias Klosec511b472010-05-08 11:01:39 +00009092
9093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009094$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009095 ipv6=no
9096
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009099fi
9100
9101if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009102 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009103
9104fi
9105
Martin v. Löwiseba40652007-08-30 20:10:57 +00009106fi
9107
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009108
9109ipv6type=unknown
9110ipv6lib=none
9111ipv6trylibc=no
9112
9113if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9115$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009116 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9117 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009118 case $i in
9119 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009121/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009122
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123#include <netinet/in.h>
9124#ifdef IPV6_INRIA_VERSION
9125yes
9126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009127_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009129 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009130 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009131fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009132rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009133
9134 ;;
9135 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009137/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009138
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009139#include <netinet/in.h>
9140#ifdef __KAME__
9141yes
9142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009143_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009145 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009146 ipv6type=$i;
9147 ipv6lib=inet6
9148 ipv6libdir=/usr/local/v6/lib
9149 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009150fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009151rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009152
9153 ;;
9154 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009156/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009157
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009158#include <features.h>
9159#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9160yes
9161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009162_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009164 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009165 ipv6type=$i;
9166 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009167fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009168rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009169
9170 ;;
9171 linux-inet6)
9172 if test -d /usr/inet6; then
9173 ipv6type=$i
9174 ipv6lib=inet6
9175 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009176 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009177 fi
9178 ;;
9179 solaris)
9180 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009181 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009182 ipv6type=$i
9183 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009184 fi
9185 fi
9186 ;;
9187 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009189/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009190
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009191#include <sys/param.h>
9192#ifdef _TOSHIBA_INET6
9193yes
9194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009195_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009197 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009198 ipv6type=$i;
9199 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009200 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009201fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009202rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009203
9204 ;;
9205 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009207/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009208
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009209#include </usr/local/v6/include/sys/v6config.h>
9210#ifdef __V6D__
9211yes
9212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009213_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009215 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009216 ipv6type=$i;
9217 ipv6lib=v6;
9218 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009219 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009220fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009221rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009222
9223 ;;
9224 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009226/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009227
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009228#include <sys/param.h>
9229#ifdef _ZETA_MINAMI_INET6
9230yes
9231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009232_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009233if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009234 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009235 ipv6type=$i;
9236 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009237 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009238fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009239rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009240
9241 ;;
9242 esac
9243 if test "$ipv6type" != "unknown"; then
9244 break
9245 fi
9246 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9248$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009249fi
9250
9251if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9252 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9253 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9254 echo "using lib$ipv6lib"
9255 else
9256 if test $ipv6trylibc = "yes"; then
9257 echo "using libc"
9258 else
9259 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9260 echo "You need to fetch lib$ipv6lib.a from appropriate"
9261 echo 'ipv6 kit and compile beforehand.'
9262 exit 1
9263 fi
9264 fi
9265fi
9266
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9268$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009270/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009271
9272 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009273int
9274main ()
9275{
9276FSIORefNum fRef = 0
9277 ;
9278 return 0;
9279}
Mark Dickinson0712b562010-05-08 19:13:21 +00009280
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009281_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009282if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009283
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009284
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009285$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009286
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9288$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009289
Mark Dickinson0712b562010-05-08 19:13:21 +00009290else
9291
9292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9293$as_echo "no" >&6; }
9294
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009295fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9297
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009298# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9300$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009301
Martin v. Löwiseba40652007-08-30 20:10:57 +00009302# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009303if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009304 withval=$with_doc_strings;
9305fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009306
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009307
9308if test -z "$with_doc_strings"
9309then with_doc_strings="yes"
9310fi
9311if test "$with_doc_strings" != "no"
9312then
9313
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009314$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009315
9316fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9318$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009319
Neil Schemenauera35c6882001-02-27 04:45:05 +00009320# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9322$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009323
Martin v. Löwiseba40652007-08-30 20:10:57 +00009324# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009325if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009326 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009327if test "$withval" != no
9328then
9329
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009330$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9333$as_echo "yes" >&6; }
9334else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9335$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009336fi
9337else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9339$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009340fi
9341
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009342
9343# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9345$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009346
Martin v. Löwiseba40652007-08-30 20:10:57 +00009347# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009348if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009349 withval=$with_pymalloc;
9350fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009351
Neil Schemenauera35c6882001-02-27 04:45:05 +00009352
Neil Schemenauer16c22972002-03-22 15:34:49 +00009353if test -z "$with_pymalloc"
9354then with_pymalloc="yes"
9355fi
9356if test "$with_pymalloc" != "no"
9357then
Martin v. Löwis11437992002-04-12 09:54:03 +00009358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009359$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009360
9361fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9363$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009364
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009365# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9367$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009368
9369# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009370if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009371 withval=$with_valgrind;
9372else
9373 with_valgrind=no
9374fi
9375
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9377$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009378if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009379 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 +00009380if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009381
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009382$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009383
9384else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009385 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009386
9387fi
9388
9389
9390fi
9391
Barry Warsawef82cd72000-06-30 16:21:01 +00009392# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9394$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009395
Martin v. Löwiseba40652007-08-30 20:10:57 +00009396# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009397if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009398 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009399if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009400then
9401
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009402$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009403
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9405$as_echo "yes" >&6; }
9406else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9407$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009408fi
9409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9411$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009412fi
9413
Barry Warsawef82cd72000-06-30 16:21:01 +00009414
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009415# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009416
Guido van Rossum98935bf2001-09-05 19:13:16 +00009417DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009418
Guido van Rossume97ee181999-12-20 21:27:22 +00009419# the dlopen() function means we might want to use dynload_shlib.o. some
9420# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009421for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009422do :
9423 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009424if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009426#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009427_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009428
Guido van Rossume97ee181999-12-20 21:27:22 +00009429fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009430done
Guido van Rossume97ee181999-12-20 21:27:22 +00009431
Michael W. Hudson54241132001-12-07 15:38:26 +00009432
Guido van Rossume97ee181999-12-20 21:27:22 +00009433# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9434# loading of modules.
9435
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9437$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009438if test -z "$DYNLOADFILE"
9439then
9440 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009441 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9442 if test "$ac_cv_func_dlopen" = yes
9443 then DYNLOADFILE="dynload_shlib.o"
9444 else DYNLOADFILE="dynload_aix.o"
9445 fi
9446 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009447 BeOS*) DYNLOADFILE="dynload_beos.o";;
9448 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009449 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9450 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009451 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009452 *)
9453 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9454 # out any dynamic loading
9455 if test "$ac_cv_func_dlopen" = yes
9456 then DYNLOADFILE="dynload_shlib.o"
9457 else DYNLOADFILE="dynload_stub.o"
9458 fi
9459 ;;
9460 esac
9461fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9463$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009464if test "$DYNLOADFILE" != "dynload_stub.o"
9465then
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009467$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009468
9469fi
9470
Neil Schemenauer4e425612001-06-19 15:44:15 +00009471# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9472
Michael W. Hudson54241132001-12-07 15:38:26 +00009473
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9475$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009476if test -z "$MACHDEP_OBJS"
9477then
Jack Jansene578a632001-08-15 01:27:14 +00009478 MACHDEP_OBJS=$extra_machdep_objs
9479else
9480 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009481fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9483$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009484
Guido van Rossum627b2d71993-12-24 10:39:16 +00009485# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009486for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9487 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009488 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009489 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009490 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009491 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009492 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009493 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9494 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009495 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009496 setlocale setregid setreuid setresuid setresgid \
9497 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009498 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009499 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009500 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009501do :
9502 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9503ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009504if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009506#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009507_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009508
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009509fi
9510done
9511
Michael W. Hudson54241132001-12-07 15:38:26 +00009512
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009513# For some functions, having a definition is not sufficient, since
9514# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9516$as_echo_n "checking for chroot... " >&6; }
9517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009518/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009519#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009520int
9521main ()
9522{
9523void *x=chroot
9524 ;
9525 return 0;
9526}
9527_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009528if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009529
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009530$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009531
Matthias Klosec511b472010-05-08 11:01:39 +00009532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009533$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009534else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9536$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009537
9538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9541$as_echo_n "checking for link... " >&6; }
9542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009544#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009545int
9546main ()
9547{
9548void *x=link
9549 ;
9550 return 0;
9551}
9552_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009554
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009555$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009556
Matthias Klosec511b472010-05-08 11:01:39 +00009557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009558$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009559else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009562
9563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9566$as_echo_n "checking for symlink... " >&6; }
9567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009568/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009569#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009570int
9571main ()
9572{
9573void *x=symlink
9574 ;
9575 return 0;
9576}
9577_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009578if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009579
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009580$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009581
Matthias Klosec511b472010-05-08 11:01:39 +00009582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009583$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009584else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9586$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009587
9588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9591$as_echo_n "checking for fchdir... " >&6; }
9592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009593/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009594#include <unistd.h>
9595int
9596main ()
9597{
9598void *x=fchdir
9599 ;
9600 return 0;
9601}
9602_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009603if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009604
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009605$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009606
Matthias Klosec511b472010-05-08 11:01:39 +00009607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009608$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9611$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009612
9613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9616$as_echo_n "checking for fsync... " >&6; }
9617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009618/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009619#include <unistd.h>
9620int
9621main ()
9622{
9623void *x=fsync
9624 ;
9625 return 0;
9626}
9627_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009629
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009630$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009631
Matthias Klosec511b472010-05-08 11:01:39 +00009632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009633$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009634else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9636$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009637
9638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9641$as_echo_n "checking for fdatasync... " >&6; }
9642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009643/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009644#include <unistd.h>
9645int
9646main ()
9647{
9648void *x=fdatasync
9649 ;
9650 return 0;
9651}
9652_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009654
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009655$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009656
Matthias Klosec511b472010-05-08 11:01:39 +00009657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009658$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009659else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9661$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009662
9663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9666$as_echo_n "checking for epoll... " >&6; }
9667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009668/* end confdefs.h. */
9669#include <sys/epoll.h>
9670int
9671main ()
9672{
9673void *x=epoll_create
9674 ;
9675 return 0;
9676}
9677_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009679
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009680$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009681
Matthias Klosec511b472010-05-08 11:01:39 +00009682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009683$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009687
9688fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9691$as_echo_n "checking for kqueue... " >&6; }
9692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009693/* end confdefs.h. */
9694
9695#include <sys/types.h>
9696#include <sys/event.h>
9697
9698int
9699main ()
9700{
9701int x=kqueue()
9702 ;
9703 return 0;
9704}
9705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009706if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009707
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009708$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009709
Matthias Klosec511b472010-05-08 11:01:39 +00009710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009711$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9714$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009715
9716fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009718# On some systems (eg. FreeBSD 5), we would find a definition of the
9719# functions ctermid_r, setgroups in the library, but no prototype
9720# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9721# address to avoid compiler warnings and potential miscompilations
9722# because of the missing prototypes.
9723
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9725$as_echo_n "checking for ctermid_r... " >&6; }
9726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009727/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009728
Martin v. Löwisd5843682002-11-21 20:41:28 +00009729#include <stdio.h>
9730
Martin v. Löwisd5843682002-11-21 20:41:28 +00009731int
9732main ()
9733{
9734void* p = ctermid_r
9735 ;
9736 return 0;
9737}
9738_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009739if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009740
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009741$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009742
Matthias Klosec511b472010-05-08 11:01:39 +00009743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009744$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009745else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9747$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009748
9749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9751
Antoine Pitroub170f172010-09-10 18:47:36 +00009752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9753$as_echo_n "checking for flock declaration... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009754if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009755 $as_echo_n "(cached) " >&6
9756else
9757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009758/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009759#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009760int
9761main ()
9762{
9763void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009764
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009765 ;
9766 return 0;
9767}
9768_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009769if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009770 ac_cv_flock_decl=yes
9771else
9772 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009773
9774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009776
Antoine Pitroub170f172010-09-10 18:47:36 +00009777fi
9778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9779$as_echo "$ac_cv_flock_decl" >&6; }
9780if test "x${ac_cv_flock_decl}" = xyes; then
9781 for ac_func in flock
9782do :
9783 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009784if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009785 cat >>confdefs.h <<_ACEOF
9786#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009787_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009788
Antoine Pitrou85729812010-09-07 14:55:24 +00009789else
Antoine Pitroub170f172010-09-10 18:47:36 +00009790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009791$as_echo_n "checking for flock in -lbsd... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009792if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009793 $as_echo_n "(cached) " >&6
9794else
9795 ac_check_lib_save_LIBS=$LIBS
9796LIBS="-lbsd $LIBS"
9797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9798/* end confdefs.h. */
9799
9800/* Override any GCC internal prototype to avoid an error.
9801 Use char because int might match the return type of a GCC
9802 builtin and then its argument prototype would still apply. */
9803#ifdef __cplusplus
9804extern "C"
9805#endif
9806char flock ();
9807int
9808main ()
9809{
9810return flock ();
9811 ;
9812 return 0;
9813}
9814_ACEOF
9815if ac_fn_c_try_link "$LINENO"; then :
9816 ac_cv_lib_bsd_flock=yes
9817else
9818 ac_cv_lib_bsd_flock=no
9819fi
9820rm -f core conftest.err conftest.$ac_objext \
9821 conftest$ac_exeext conftest.$ac_ext
9822LIBS=$ac_check_lib_save_LIBS
9823fi
9824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9825$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009826if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009827 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009828
9829
9830$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9831
9832
9833fi
9834
9835
9836fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009837done
9838
Antoine Pitrou85729812010-09-07 14:55:24 +00009839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009840
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9842$as_echo_n "checking for getpagesize... " >&6; }
9843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009844/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009845
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009846#include <unistd.h>
9847
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009848int
9849main ()
9850{
9851void* p = getpagesize
9852 ;
9853 return 0;
9854}
9855_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009856if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009857
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009858$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009859
Matthias Klosec511b472010-05-08 11:01:39 +00009860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009861$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9864$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009865
9866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009868
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009869for ac_prog in true
9870do
9871 # Extract the first word of "$ac_prog", so it can be a program name with args.
9872set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9874$as_echo_n "checking for $ac_word... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009875if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009876 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009877else
9878 if test -n "$TRUE"; then
9879 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9880else
9881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9882for as_dir in $PATH
9883do
9884 IFS=$as_save_IFS
9885 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009886 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887 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 +00009888 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009889 $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 +00009890 break 2
9891 fi
9892done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009893 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009895
9896fi
9897fi
9898TRUE=$ac_cv_prog_TRUE
9899if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9901$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009902else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9904$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009905fi
9906
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009908 test -n "$TRUE" && break
9909done
9910test -n "$TRUE" || TRUE="/bin/true"
9911
9912
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9914$as_echo_n "checking for inet_aton in -lc... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009915if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009916 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009917else
9918 ac_check_lib_save_LIBS=$LIBS
9919LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009921/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009922
Martin v. Löwiseba40652007-08-30 20:10:57 +00009923/* Override any GCC internal prototype to avoid an error.
9924 Use char because int might match the return type of a GCC
9925 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009926#ifdef __cplusplus
9927extern "C"
9928#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009929char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009930int
9931main ()
9932{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009934 ;
9935 return 0;
9936}
9937_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009938if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009939 ac_cv_lib_c_inet_aton=yes
9940else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009941 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009942fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009943rm -f core conftest.err conftest.$ac_objext \
9944 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009945LIBS=$ac_check_lib_save_LIBS
9946fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9948$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009949if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009950 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009951else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9953$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009954if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009955 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009956else
9957 ac_check_lib_save_LIBS=$LIBS
9958LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009960/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009961
Martin v. Löwiseba40652007-08-30 20:10:57 +00009962/* Override any GCC internal prototype to avoid an error.
9963 Use char because int might match the return type of a GCC
9964 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009965#ifdef __cplusplus
9966extern "C"
9967#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009968char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009969int
9970main ()
9971{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009972return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009973 ;
9974 return 0;
9975}
9976_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009977if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009978 ac_cv_lib_resolv_inet_aton=yes
9979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009980 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009981fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009982rm -f core conftest.err conftest.$ac_objext \
9983 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009984LIBS=$ac_check_lib_save_LIBS
9985fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9987$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009988if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009989 cat >>confdefs.h <<_ACEOF
9990#define HAVE_LIBRESOLV 1
9991_ACEOF
9992
9993 LIBS="-lresolv $LIBS"
9994
9995fi
9996
9997
9998fi
9999
10000
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010001# On Tru64, chflags seems to be present, but calling it will
10002# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10004$as_echo_n "checking for chflags... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010005if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010006 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010008 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010009 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010012/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000010013[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010014#include <sys/stat.h>
10015#include <unistd.h>
10016int main(int argc, char*argv[])
10017{
10018 if(chflags(argv[0], 0) != 0)
10019 return 1;
10020 return 0;
10021}
Gregory P. Smith49437c22009-11-02 01:38:35 +000010022]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010023_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010024if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010025 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010026else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010027 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010028fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10030 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010031fi
10032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010033
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010034fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10036$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010037if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010038 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010039if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010040 ac_cv_have_chflags="yes"
10041else
10042 ac_cv_have_chflags="no"
10043fi
10044
10045fi
10046if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010047
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010048$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010049
10050fi
10051
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10053$as_echo_n "checking for lchflags... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010054if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010056else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010057 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010058 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010061/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000010062[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010063#include <sys/stat.h>
10064#include <unistd.h>
10065int main(int argc, char*argv[])
10066{
10067 if(lchflags(argv[0], 0) != 0)
10068 return 1;
10069 return 0;
10070}
Gregory P. Smith49437c22009-11-02 01:38:35 +000010071]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010072_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010073if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010074 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010075else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010076 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010077fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10079 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010080fi
10081
10082
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010083fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10085$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010086if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010087 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010088if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010089 ac_cv_have_lchflags="yes"
10090else
10091 ac_cv_have_lchflags="no"
10092fi
10093
10094fi
10095if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010096
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010098
10099fi
10100
Ronald Oussorenf8752642006-07-06 10:13:35 +000010101case $ac_sys_system/$ac_sys_release in
10102Darwin/*)
10103 _CUR_CFLAGS="${CFLAGS}"
10104 _CUR_LDFLAGS="${LDFLAGS}"
10105 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10106 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10107 ;;
10108esac
10109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10111$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010112if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010113 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010114else
10115 ac_check_lib_save_LIBS=$LIBS
10116LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010118/* end confdefs.h. */
10119
Martin v. Löwiseba40652007-08-30 20:10:57 +000010120/* Override any GCC internal prototype to avoid an error.
10121 Use char because int might match the return type of a GCC
10122 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010123#ifdef __cplusplus
10124extern "C"
10125#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010126char inflateCopy ();
10127int
10128main ()
10129{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010130return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010131 ;
10132 return 0;
10133}
10134_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010135if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010136 ac_cv_lib_z_inflateCopy=yes
10137else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010138 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010139fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010140rm -f core conftest.err conftest.$ac_objext \
10141 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010142LIBS=$ac_check_lib_save_LIBS
10143fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10145$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010146if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010148$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010149
10150fi
10151
10152
Ronald Oussorenf8752642006-07-06 10:13:35 +000010153case $ac_sys_system/$ac_sys_release in
10154Darwin/*)
10155 CFLAGS="${_CUR_CFLAGS}"
10156 LDFLAGS="${_CUR_LDFLAGS}"
10157 ;;
10158esac
10159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10161$as_echo_n "checking for hstrerror... " >&6; }
10162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010163/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010164
Martin v. Löwise9416172003-05-03 10:12:45 +000010165#include <netdb.h>
10166
Martin v. Löwise9416172003-05-03 10:12:45 +000010167int
10168main ()
10169{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010170void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010171 ;
10172 return 0;
10173}
10174_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010175if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010177$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010178
Matthias Klosec511b472010-05-08 11:01:39 +000010179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010180$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010181else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10183$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010184
10185fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010186rm -f core conftest.err conftest.$ac_objext \
10187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010188
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10190$as_echo_n "checking for inet_aton... " >&6; }
10191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010192/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010193
Martin v. Löwis86d66262006-02-17 08:40:11 +000010194#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010195#include <sys/socket.h>
10196#include <netinet/in.h>
10197#include <arpa/inet.h>
10198
Martin v. Löwise9416172003-05-03 10:12:45 +000010199int
10200main ()
10201{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010202void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010203 ;
10204 return 0;
10205}
10206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010207if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010209$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010210
Matthias Klosec511b472010-05-08 11:01:39 +000010211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010212$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010216
10217fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010218rm -f core conftest.err conftest.$ac_objext \
10219 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010220
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10222$as_echo_n "checking for inet_pton... " >&6; }
10223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010224/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010225
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010226#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010227#include <sys/socket.h>
10228#include <netinet/in.h>
10229#include <arpa/inet.h>
10230
Martin v. Löwise9416172003-05-03 10:12:45 +000010231int
10232main ()
10233{
10234void* p = inet_pton
10235 ;
10236 return 0;
10237}
10238_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010239if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010241$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010242
Matthias Klosec511b472010-05-08 11:01:39 +000010243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010244$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010245else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10247$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010248
10249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010251
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010252# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10254$as_echo_n "checking for setgroups... " >&6; }
10255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010256/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010257
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010258#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010259#ifdef HAVE_GRP_H
10260#include <grp.h>
10261#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010262
Martin v. Löwisd5843682002-11-21 20:41:28 +000010263int
10264main ()
10265{
10266void* p = setgroups
10267 ;
10268 return 0;
10269}
10270_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010272
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010273$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010274
Matthias Klosec511b472010-05-08 11:01:39 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010276$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010277else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010280
10281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010283
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010284# check for openpty and forkpty
10285
10286for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010287do :
10288 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010289if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010291#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010292_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010293
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10296$as_echo_n "checking for openpty in -lutil... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010297if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010299else
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010301LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010304
Martin v. Löwiseba40652007-08-30 20:10:57 +000010305/* Override any GCC internal prototype to avoid an error.
10306 Use char because int might match the return type of a GCC
10307 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010308#ifdef __cplusplus
10309extern "C"
10310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010311char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010312int
10313main ()
10314{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010315return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 ;
10317 return 0;
10318}
10319_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010320if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010322else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010323 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010324fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010325rm -f core conftest.err conftest.$ac_objext \
10326 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010327LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010328fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10330$as_echo "$ac_cv_lib_util_openpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010331if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010333 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010334else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10336$as_echo_n "checking for openpty in -lbsd... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010337if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010338 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010339else
10340 ac_check_lib_save_LIBS=$LIBS
10341LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010343/* end confdefs.h. */
10344
Martin v. Löwiseba40652007-08-30 20:10:57 +000010345/* Override any GCC internal prototype to avoid an error.
10346 Use char because int might match the return type of a GCC
10347 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010348#ifdef __cplusplus
10349extern "C"
10350#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010351char openpty ();
10352int
10353main ()
10354{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010355return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010356 ;
10357 return 0;
10358}
10359_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010360if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010361 ac_cv_lib_bsd_openpty=yes
10362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010363 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010364fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010365rm -f core conftest.err conftest.$ac_objext \
10366 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010367LIBS=$ac_check_lib_save_LIBS
10368fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10370$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010371if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010372 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010373 LIBS="$LIBS -lbsd"
10374fi
10375
10376
10377fi
10378
Fred Drake8cef4cf2000-06-28 16:40:38 +000010379
10380fi
10381done
10382
10383for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010384do :
10385 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010386if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010388#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010389_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010390
Fred Drake8cef4cf2000-06-28 16:40:38 +000010391else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10393$as_echo_n "checking for forkpty in -lutil... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010394if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010395 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010396else
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010398LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010401
Martin v. Löwiseba40652007-08-30 20:10:57 +000010402/* Override any GCC internal prototype to avoid an error.
10403 Use char because int might match the return type of a GCC
10404 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010405#ifdef __cplusplus
10406extern "C"
10407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010408char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010409int
10410main ()
10411{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010412return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 ;
10414 return 0;
10415}
10416_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010417if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010419else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010420 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010421fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422rm -f core conftest.err conftest.$ac_objext \
10423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010424LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010425fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10427$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010428if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010429 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010430 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010431else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10433$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010434if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010435 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010436else
10437 ac_check_lib_save_LIBS=$LIBS
10438LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010440/* end confdefs.h. */
10441
Martin v. Löwiseba40652007-08-30 20:10:57 +000010442/* Override any GCC internal prototype to avoid an error.
10443 Use char because int might match the return type of a GCC
10444 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010445#ifdef __cplusplus
10446extern "C"
10447#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010448char forkpty ();
10449int
10450main ()
10451{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010452return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010453 ;
10454 return 0;
10455}
10456_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010458 ac_cv_lib_bsd_forkpty=yes
10459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010460 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010461fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010462rm -f core conftest.err conftest.$ac_objext \
10463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010464LIBS=$ac_check_lib_save_LIBS
10465fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10467$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010468if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010469 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010470 LIBS="$LIBS -lbsd"
10471fi
10472
10473
10474fi
10475
Fred Drake8cef4cf2000-06-28 16:40:38 +000010476
10477fi
10478done
10479
Jack Jansendd19cf82001-12-06 22:36:17 +000010480
Brett Cannonaa5778d2008-03-18 04:09:00 +000010481# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010482for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010483do :
10484 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010485if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010486 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010487#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010488_ACEOF
10489
10490fi
10491done
10492
10493
Michael W. Hudson54241132001-12-07 15:38:26 +000010494# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010495for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010496do :
10497 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10498ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010499if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010500 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010501#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010502_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010503
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010504fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010505done
10506
Michael W. Hudson54241132001-12-07 15:38:26 +000010507
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010508ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10509if test "x$ac_cv_func_dup2" = xyes; then :
10510 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010511
Martin v. Löwis1142de32002-03-29 16:28:31 +000010512else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010513 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010514 *" dup2.$ac_objext "* ) ;;
10515 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010516 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010517esac
10518
Martin v. Löwis1142de32002-03-29 16:28:31 +000010519fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010520
10521ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10522if test "x$ac_cv_func_getcwd" = xyes; then :
10523 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10524
10525else
10526 case " $LIBOBJS " in
10527 *" getcwd.$ac_objext "* ) ;;
10528 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10529 ;;
10530esac
10531
10532fi
10533
10534ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10535if test "x$ac_cv_func_strdup" = xyes; then :
10536 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10537
10538else
10539 case " $LIBOBJS " in
10540 *" strdup.$ac_objext "* ) ;;
10541 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10542 ;;
10543esac
10544
10545fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010546
10547
10548for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010549do :
10550 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010551if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010552 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010553#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010554_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010556/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010557#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010558int
10559main ()
10560{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010561getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010562 ;
10563 return 0;
10564}
10565_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010566if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010567
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010568$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010569
Guido van Rossum627b2d71993-12-24 10:39:16 +000010570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010572
Guido van Rossum627b2d71993-12-24 10:39:16 +000010573fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010574done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010575
Jack Jansen150753c2003-03-29 22:07:47 +000010576for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010577do :
10578 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010579if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010580 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010581#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010582_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010584/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010585#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010586int
10587main ()
10588{
10589setpgrp(0,0);
10590 ;
10591 return 0;
10592}
10593_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010596$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010597
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010600
10601fi
10602done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010603
Thomas Wouters3a584202000-08-05 23:28:51 +000010604for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010605do :
10606 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010607if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010608 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010609#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010610_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010612/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010613#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010614int
10615main ()
10616{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010617gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 ;
10619 return 0;
10620}
10621_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010622if ac_fn_c_try_compile "$LINENO"; then :
10623
Guido van Rossum627b2d71993-12-24 10:39:16 +000010624else
Skip Montanaro6dead952003-09-25 14:50:04 +000010625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010626$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010627
Martin v. Löwis11437992002-04-12 09:54:03 +000010628
Guido van Rossum627b2d71993-12-24 10:39:16 +000010629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010631
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010632fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010633done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010634
Michael W. Hudson54241132001-12-07 15:38:26 +000010635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10637$as_echo_n "checking for major... " >&6; }
10638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010639/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010640
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010641#if defined(MAJOR_IN_MKDEV)
10642#include <sys/mkdev.h>
10643#elif defined(MAJOR_IN_SYSMACROS)
10644#include <sys/sysmacros.h>
10645#else
10646#include <sys/types.h>
10647#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010648
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010649int
10650main ()
10651{
10652
10653 makedev(major(0),minor(0));
10654
10655 ;
10656 return 0;
10657}
10658_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010659if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010660
10661
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010662$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10665$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010666
10667else
Skip Montanaro6dead952003-09-25 14:50:04 +000010668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10670$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010671
10672fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010673rm -f core conftest.err conftest.$ac_objext \
10674 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010675
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010676# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010677# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10679$as_echo_n "checking for getaddrinfo... " >&6; }
10680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010681/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010682
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010683#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010684#include <sys/socket.h>
10685#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010686#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010687
Martin v. Löwis11437992002-04-12 09:54:03 +000010688int
10689main ()
10690{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010691getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 ;
10693 return 0;
10694}
10695_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010696if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010697 have_getaddrinfo=yes
10698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010699 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010700fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010701rm -f core conftest.err conftest.$ac_objext \
10702 conftest$ac_exeext conftest.$ac_ext
10703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10704$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010705if test $have_getaddrinfo = yes
10706then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10708$as_echo_n "checking getaddrinfo bug... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010709 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010710 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010711else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010712 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010713 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010714else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010716/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010717
10718#include <sys/types.h>
10719#include <netdb.h>
10720#include <string.h>
10721#include <sys/socket.h>
10722#include <netinet/in.h>
10723
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010724int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010725{
10726 int passive, gaierr, inet4 = 0, inet6 = 0;
10727 struct addrinfo hints, *ai, *aitop;
10728 char straddr[INET6_ADDRSTRLEN], strport[16];
10729
10730 for (passive = 0; passive <= 1; passive++) {
10731 memset(&hints, 0, sizeof(hints));
10732 hints.ai_family = AF_UNSPEC;
10733 hints.ai_flags = passive ? AI_PASSIVE : 0;
10734 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010735 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010736 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10737 (void)gai_strerror(gaierr);
10738 goto bad;
10739 }
10740 for (ai = aitop; ai; ai = ai->ai_next) {
10741 if (ai->ai_addr == NULL ||
10742 ai->ai_addrlen == 0 ||
10743 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10744 straddr, sizeof(straddr), strport, sizeof(strport),
10745 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10746 goto bad;
10747 }
10748 switch (ai->ai_family) {
10749 case AF_INET:
10750 if (strcmp(strport, "54321") != 0) {
10751 goto bad;
10752 }
10753 if (passive) {
10754 if (strcmp(straddr, "0.0.0.0") != 0) {
10755 goto bad;
10756 }
10757 } else {
10758 if (strcmp(straddr, "127.0.0.1") != 0) {
10759 goto bad;
10760 }
10761 }
10762 inet4++;
10763 break;
10764 case AF_INET6:
10765 if (strcmp(strport, "54321") != 0) {
10766 goto bad;
10767 }
10768 if (passive) {
10769 if (strcmp(straddr, "::") != 0) {
10770 goto bad;
10771 }
10772 } else {
10773 if (strcmp(straddr, "::1") != 0) {
10774 goto bad;
10775 }
10776 }
10777 inet6++;
10778 break;
10779 case AF_UNSPEC:
10780 goto bad;
10781 break;
10782 default:
10783 /* another family support? */
10784 break;
10785 }
10786 }
10787 }
10788
10789 if (!(inet4 == 0 || inet4 == 2))
10790 goto bad;
10791 if (!(inet6 == 0 || inet6 == 2))
10792 goto bad;
10793
10794 if (aitop)
10795 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010796 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010797
10798 bad:
10799 if (aitop)
10800 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010801 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010802}
10803
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010805if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010806 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010807else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010808 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010809fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10811 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010812fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010813
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010814fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010815
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010817
Benjamin Peterson75fed812010-11-01 01:47:19 +000010818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10819$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10820
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010821if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010822then
10823 if test $ipv6 = yes
10824 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010825 echo 'Fatal: You must get working getaddrinfo() function.'
10826 echo ' or you can specify "--disable-ipv6"'.
10827 exit 1
10828 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010829else
Martin v. Löwis11437992002-04-12 09:54:03 +000010830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010831$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010832
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010833fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000010834
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010835for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010836do :
10837 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010838if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010839 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010840#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010841_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010842
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010843fi
10844done
10845
Michael W. Hudson54241132001-12-07 15:38:26 +000010846
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010847# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10849$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010850if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010851 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010854/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010855#include <sys/types.h>
10856#include <sys/time.h>
10857#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010858
Martin v. Löwis11437992002-04-12 09:54:03 +000010859int
10860main ()
10861{
10862if ((struct tm *) 0)
10863return 0;
10864 ;
10865 return 0;
10866}
10867_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010868if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010869 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010871 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10876$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010877if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010878
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010879$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010880
10881fi
10882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10884$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010885if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010886 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010887else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010889/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010890#include <sys/types.h>
10891#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010892
Martin v. Löwis11437992002-04-12 09:54:03 +000010893int
10894main ()
10895{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010896struct tm tm;
10897 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010898 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010899 ;
10900 return 0;
10901}
10902_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010903if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010904 ac_cv_struct_tm=time.h
10905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010906 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10911$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010912if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010913
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010914$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010915
10916fi
10917
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010918ac_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 +000010919#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010920
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010921"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010922if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010923
10924cat >>confdefs.h <<_ACEOF
10925#define HAVE_STRUCT_TM_TM_ZONE 1
10926_ACEOF
10927
10928
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010929fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010930
Martin v. Löwis11437992002-04-12 09:54:03 +000010931if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010933$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010934
10935else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010936 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10937"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010938if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010939 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000010940else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010941 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000010942fi
10943
Martin v. Löwiseba40652007-08-30 20:10:57 +000010944cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010945#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000010946_ACEOF
10947
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10949$as_echo_n "checking for tzname... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010950if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010951 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000010952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010954/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010955#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000010956#if !HAVE_DECL_TZNAME
10957extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010959
Martin v. Löwis11437992002-04-12 09:54:03 +000010960int
10961main ()
10962{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010963return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010964 ;
10965 return 0;
10966}
10967_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010968if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010969 ac_cv_var_tzname=yes
10970else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010971 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010973rm -f core conftest.err conftest.$ac_objext \
10974 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010975fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10977$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010978 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010980$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010981
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010982 fi
10983fi
10984
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010985ac_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 +000010986if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010987
10988cat >>confdefs.h <<_ACEOF
10989#define HAVE_STRUCT_STAT_ST_RDEV 1
10990_ACEOF
10991
10992
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010993fi
10994
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010995ac_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 +000010996if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010997
Martin v. Löwis11437992002-04-12 09:54:03 +000010998cat >>confdefs.h <<_ACEOF
10999#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11000_ACEOF
11001
11002
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011003fi
11004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011005ac_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 +000011006if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011007
11008cat >>confdefs.h <<_ACEOF
11009#define HAVE_STRUCT_STAT_ST_FLAGS 1
11010_ACEOF
11011
11012
11013fi
11014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011015ac_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 +000011016if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011017
11018cat >>confdefs.h <<_ACEOF
11019#define HAVE_STRUCT_STAT_ST_GEN 1
11020_ACEOF
11021
11022
11023fi
11024
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011025ac_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 +000011026if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011027
11028cat >>confdefs.h <<_ACEOF
11029#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11030_ACEOF
11031
11032
11033fi
11034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011035ac_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 +000011036if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011037
Martin v. Löwis11437992002-04-12 09:54:03 +000011038cat >>confdefs.h <<_ACEOF
11039#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11040_ACEOF
11041
11042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011043$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011044
11045else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011046 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011047 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011048 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11049 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011050esac
11051
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011052fi
11053
Michael W. Hudson54241132001-12-07 15:38:26 +000011054
Martin v. Löwis11437992002-04-12 09:54:03 +000011055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11057$as_echo_n "checking for time.h that defines altzone... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011058if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011059 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011060else
Matthias Klosec511b472010-05-08 11:01:39 +000011061
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011063/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011064#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011065int
11066main ()
11067{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011068return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 ;
11070 return 0;
11071}
11072_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011073if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011074 ac_cv_header_time_altzone=yes
11075else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011076 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011079
Martin v. Löwiseba40652007-08-30 20:10:57 +000011080fi
11081
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11083$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011084if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011085
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011086$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011087
11088fi
11089
Guido van Rossumda88dad1995-01-26 00:46:29 +000011090was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11092$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011094/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011095
11096#include <sys/types.h>
11097#include <sys/select.h>
11098#include <sys/time.h>
11099
Martin v. Löwis11437992002-04-12 09:54:03 +000011100int
11101main ()
11102{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011103;
Martin v. Löwis11437992002-04-12 09:54:03 +000011104 ;
11105 return 0;
11106}
11107_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011109
11110
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011111$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011112
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011113 was_it_defined=yes
11114
Martin v. Löwiseba40652007-08-30 20:10:57 +000011115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11118$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011119
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11121$as_echo_n "checking for addrinfo... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011122if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011123 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011124else
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. */
Matthias Klosec511b472010-05-08 11:01:39 +000011127#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011128int
11129main ()
11130{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011131struct addrinfo a
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 :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011137 ac_cv_struct_addrinfo=yes
11138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011139 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11142fi
11143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11145$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011146if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011148$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011149
11150fi
11151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11153$as_echo_n "checking for sockaddr_storage... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011154if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011155 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011156else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011158/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011159
11160# include <sys/types.h>
11161# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011162int
11163main ()
11164{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011165struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011166 ;
11167 return 0;
11168}
11169_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011170if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011171 ac_cv_struct_sockaddr_storage=yes
11172else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011173 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11176fi
11177
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11179$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011180if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011181
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011182$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011183
11184fi
11185
Guido van Rossum627b2d71993-12-24 10:39:16 +000011186# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011187
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11189$as_echo_n "checking whether char is unsigned... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011190if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011191 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011192else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011195$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011196int
11197main ()
11198{
11199static int test_array [1 - 2 * !(((char) -1) < 0)];
11200test_array [0] = 0
11201
11202 ;
11203 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011204}
Martin v. Löwis11437992002-04-12 09:54:03 +000011205_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011207 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011209 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011210fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011212fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11214$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011215if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011216 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011217
11218fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11221$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011222if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011223 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011226/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011227
Martin v. Löwis11437992002-04-12 09:54:03 +000011228int
11229main ()
11230{
11231/* FIXME: Include the comments suggested by Paul. */
11232#ifndef __cplusplus
11233 /* Ultrix mips cc rejects this. */
11234 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011235 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011237 char const *const *pcpcc;
11238 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011239 /* NEC SVR4.0.2 mips cc rejects this. */
11240 struct point {int x, y;};
11241 static struct point const zero = {0,0};
11242 /* AIX XL C 1.02.0.0 rejects this.
11243 It does not let you subtract one const X* pointer from another in
11244 an arm of an if-expression whose if-part is not a constant
11245 expression */
11246 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011247 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011249 ++pcpcc;
11250 ppc = (char**) pcpcc;
11251 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 { /* SCO 3.2v4 cc rejects this. */
11253 char *t;
11254 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011255
Martin v. Löwis11437992002-04-12 09:54:03 +000011256 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011257 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011258 }
11259 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11260 int x[] = {25, 17};
11261 const int *foo = &x[0];
11262 ++foo;
11263 }
11264 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11265 typedef const int *iptr;
11266 iptr p = 0;
11267 ++p;
11268 }
11269 { /* AIX XL C 1.02.0.0 rejects this saying
11270 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11271 struct s { int j; const int *ap[3]; };
11272 struct s *b; b->j = 5;
11273 }
11274 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11275 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011276 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011277 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011278 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011279#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011280
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 ;
11282 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011283}
Martin v. Löwis11437992002-04-12 09:54:03 +000011284_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011285if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011286 ac_cv_c_const=yes
11287else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011288 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011291fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11293$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011294if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011296$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297
11298fi
11299
Michael W. Hudson54241132001-12-07 15:38:26 +000011300
Guido van Rossumda88dad1995-01-26 00:46:29 +000011301works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11303$as_echo_n "checking for working volatile... " >&6; }
11304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011305/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011306
Martin v. Löwis11437992002-04-12 09:54:03 +000011307int
11308main ()
11309{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011310volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 ;
11312 return 0;
11313}
11314_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011315if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011316 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011317else
Skip Montanaro6dead952003-09-25 14:50:04 +000011318
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011319$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011320
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011321
Guido van Rossum627b2d71993-12-24 10:39:16 +000011322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11325$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011326
Guido van Rossumda88dad1995-01-26 00:46:29 +000011327works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11329$as_echo_n "checking for working signed char... " >&6; }
11330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011331/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011332
Martin v. Löwis11437992002-04-12 09:54:03 +000011333int
11334main ()
11335{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011336signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 ;
11338 return 0;
11339}
11340_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011341if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011342 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011343else
Skip Montanaro6dead952003-09-25 14:50:04 +000011344
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011345$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011346
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011347
Guido van Rossum7f43da71994-08-01 12:15:30 +000011348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11351$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011352
Guido van Rossumda88dad1995-01-26 00:46:29 +000011353have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11355$as_echo_n "checking for prototypes... " >&6; }
11356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011357/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011358int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011359int
11360main ()
11361{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011362return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011363 ;
11364 return 0;
11365}
11366_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011368
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011369$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011370
Matthias Klosec511b472010-05-08 11:01:39 +000011371 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11375$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011376
Guido van Rossumda88dad1995-01-26 00:46:29 +000011377works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11379$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011381/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011382
11383#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011384int foo(int x, ...) {
11385 va_list va;
11386 va_start(va, x);
11387 va_arg(va, int);
11388 va_arg(va, char *);
11389 va_arg(va, double);
11390 return 0;
11391}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011392
Martin v. Löwis11437992002-04-12 09:54:03 +000011393int
11394main ()
11395{
Guido van Rossum90eea071996-08-30 20:58:57 +000011396return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011402
11403
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011405
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011406 works=yes
11407
Guido van Rossum627b2d71993-12-24 10:39:16 +000011408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11411$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011412
Martin v. Löwisd6320502004-08-12 13:45:08 +000011413# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11415$as_echo_n "checking for socketpair... " >&6; }
11416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011417/* end confdefs.h. */
11418
11419#include <sys/types.h>
11420#include <sys/socket.h>
11421
11422int
11423main ()
11424{
11425void *x=socketpair
11426 ;
11427 return 0;
11428}
11429_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011430if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011431
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011432$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011433
Matthias Klosec511b472010-05-08 11:01:39 +000011434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011435$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011436else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11438$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011439
11440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011442
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011443# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11445$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011447/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011448#include <sys/types.h>
11449#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011450int
11451main ()
11452{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011453struct sockaddr x;
11454x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 ;
11456 return 0;
11457}
11458_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011459if ac_fn_c_try_compile "$LINENO"; then :
11460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11461$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011462
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011463$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011464
11465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11467$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011468
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011471
Guido van Rossumda88dad1995-01-26 00:46:29 +000011472va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11474$as_echo_n "checking whether va_list is an array... " >&6; }
11475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011476/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011477
11478#ifdef HAVE_STDARG_PROTOTYPES
11479#include <stdarg.h>
11480#else
11481#include <varargs.h>
11482#endif
11483
Martin v. Löwis11437992002-04-12 09:54:03 +000011484int
11485main ()
11486{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011487va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 ;
11489 return 0;
11490}
11491_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011492if ac_fn_c_try_compile "$LINENO"; then :
11493
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011494else
Skip Montanaro6dead952003-09-25 14:50:04 +000011495
Martin v. Löwis11437992002-04-12 09:54:03 +000011496
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011497$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011498
Guido van Rossumda88dad1995-01-26 00:46:29 +000011499 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011500
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11504$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011505
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011506# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011507
11508
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011509ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011510if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011512 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011513
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11515$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011516 OLD_CFLAGS=$CFLAGS
11517 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011519/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011520
11521# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011522
Martin v. Löwis11437992002-04-12 09:54:03 +000011523int
11524main ()
11525{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011526
11527 char *name;
11528 struct hostent *he, *res;
11529 char buffer[2048];
11530 int buflen = 2048;
11531 int h_errnop;
11532
11533 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011534
11535 ;
11536 return 0;
11537}
11538_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011540
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011541 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011542
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011544$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011545
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11547$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011548
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011549else
Skip Montanaro6dead952003-09-25 14:50:04 +000011550
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11552$as_echo "no" >&6; }
11553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11554$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011556/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011557
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011558# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011559
Martin v. Löwis11437992002-04-12 09:54:03 +000011560int
11561main ()
11562{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011563
11564 char *name;
11565 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011566 char buffer[2048];
11567 int buflen = 2048;
11568 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011569
Matthias Klosec511b472010-05-08 11:01:39 +000011570 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
11572 ;
11573 return 0;
11574}
11575_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011576if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011577
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011578 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011579
Martin v. Löwis11437992002-04-12 09:54:03 +000011580
Matthias Klosec511b472010-05-08 11:01:39 +000011581$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11584$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011585
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011586else
Skip Montanaro6dead952003-09-25 14:50:04 +000011587
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11589$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11591$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11593/* end confdefs.h. */
11594
11595# include <netdb.h>
11596
11597int
11598main ()
11599{
11600
11601 char *name;
11602 struct hostent *he;
11603 struct hostent_data data;
11604
11605 (void) gethostbyname_r(name, he, &data);
11606
11607 ;
11608 return 0;
11609}
11610_ACEOF
11611if ac_fn_c_try_compile "$LINENO"; then :
11612
11613 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11614
11615
11616$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11617
11618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11619$as_echo "yes" >&6; }
11620
11621else
11622
11623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11624$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011625
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011628
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011631
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011634 CFLAGS=$OLD_CFLAGS
11635
11636else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011637
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011638 for ac_func in gethostbyname
11639do :
11640 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011641if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011642 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011643#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011644_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011645
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011646fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011647done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011648
Michael W. Hudson54241132001-12-07 15:38:26 +000011649
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011650fi
11651
Michael W. Hudson54241132001-12-07 15:38:26 +000011652
11653
11654
11655
11656
11657
Guido van Rossum627b2d71993-12-24 10:39:16 +000011658# checks for system services
11659# (none yet)
11660
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011661# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011662ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011663if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011664
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11667$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011668if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011669 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011670else
Martin v. Löwis11437992002-04-12 09:54:03 +000011671 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011672LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011675
Martin v. Löwiseba40652007-08-30 20:10:57 +000011676/* Override any GCC internal prototype to avoid an error.
11677 Use char because int might match the return type of a GCC
11678 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011679#ifdef __cplusplus
11680extern "C"
11681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011682char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011683int
11684main ()
11685{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011686return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011687 ;
11688 return 0;
11689}
11690_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011691if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011692 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011694 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011695fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011696rm -f core conftest.err conftest.$ac_objext \
11697 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011698LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011699fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11701$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011702if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011703 cat >>confdefs.h <<_ACEOF
11704#define HAVE_LIBIEEE 1
11705_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011706
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011707 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011708
Guido van Rossum627b2d71993-12-24 10:39:16 +000011709fi
11710
Michael W. Hudson54241132001-12-07 15:38:26 +000011711
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011712fi
11713
Michael W. Hudson54241132001-12-07 15:38:26 +000011714
Guido van Rossum7f253911997-05-09 02:42:48 +000011715# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11717$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011718
Martin v. Löwiseba40652007-08-30 20:10:57 +000011719# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011720if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011721 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011722if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011723then
11724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011725$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011726
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11728$as_echo "yes" >&6; }
11729else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11730$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011731fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011732else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11734$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011735fi
11736
Guido van Rossum7f253911997-05-09 02:42:48 +000011737
Guido van Rossum7f43da71994-08-01 12:15:30 +000011738# check for --with-libm=...
11739
Guido van Rossum563e7081996-09-10 18:20:48 +000011740case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011741Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011742BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011743*) LIBM=-lm
11744esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11746$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011747
Martin v. Löwiseba40652007-08-30 20:10:57 +000011748# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011749if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011750 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011751if test "$withval" = no
11752then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11754$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011755elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011756then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11758$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011759else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011760fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11763$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011764fi
11765
Guido van Rossum7f43da71994-08-01 12:15:30 +000011766
11767# check for --with-libc=...
11768
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11770$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011771
Martin v. Löwiseba40652007-08-30 20:10:57 +000011772# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011773if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011774 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011775if test "$withval" = no
11776then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11778$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011779elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011780then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11782$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011783else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011784fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011785else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11787$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011788fi
11789
Guido van Rossum7f43da71994-08-01 12:15:30 +000011790
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011791# **************************************************
11792# * Check for various properties of floating point *
11793# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011794
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11796$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011797if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011798 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011799else
11800
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011801if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011802 ac_cv_little_endian_double=no
11803else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011805/* end confdefs.h. */
11806
11807#include <string.h>
11808int main() {
11809 double x = 9006104071832581.0;
11810 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11811 return 0;
11812 else
11813 return 1;
11814}
11815
11816_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011817if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011818 ac_cv_little_endian_double=yes
11819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011821fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11823 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011824fi
11825
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011826fi
11827
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11829$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011830if test "$ac_cv_little_endian_double" = yes
11831then
11832
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011833$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011834
11835fi
11836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11838$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011839if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011840 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011841else
11842
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011843if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011844 ac_cv_big_endian_double=no
11845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011847/* end confdefs.h. */
11848
11849#include <string.h>
11850int main() {
11851 double x = 9006104071832581.0;
11852 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11853 return 0;
11854 else
11855 return 1;
11856}
11857
11858_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011859if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011860 ac_cv_big_endian_double=yes
11861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011862 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011863fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011866fi
11867
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011868fi
11869
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11871$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011872if test "$ac_cv_big_endian_double" = yes
11873then
11874
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011875$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011876
11877fi
11878
11879# Some ARM platforms use a mixed-endian representation for doubles.
11880# While Python doesn't currently have full support for these platforms
11881# (see e.g., issue 1762561), we can at least make sure that float <-> string
11882# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11884$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011885if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011886 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011887else
11888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011889if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011890 ac_cv_mixed_endian_double=no
11891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011893/* end confdefs.h. */
11894
11895#include <string.h>
11896int main() {
11897 double x = 9006104071832581.0;
11898 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11899 return 0;
11900 else
11901 return 1;
11902}
11903
11904_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011905if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011906 ac_cv_mixed_endian_double=yes
11907else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011908 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011912fi
11913
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011914fi
11915
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11917$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011918if test "$ac_cv_mixed_endian_double" = yes
11919then
11920
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011921$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011922
11923fi
11924
11925# The short float repr introduced in Python 3.1 requires the
11926# correctly-rounded string <-> double conversion functions from
11927# Python/dtoa.c, which in turn require that the FPU uses 53-bit
11928# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000011929# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011930# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000011931
11932# This inline assembler syntax may also work for suncc and icc,
11933# so we try it on all platforms.
11934
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11936$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011938/* end confdefs.h. */
11939
11940int
11941main ()
11942{
11943
Mark Dickinsona548dee2009-11-15 13:12:43 +000011944 unsigned short cw;
11945 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11946 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011947
11948 ;
11949 return 0;
11950}
11951_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011952if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011953 have_gcc_asm_for_x87=yes
11954else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011955 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011956fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11959$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000011960if test "$have_gcc_asm_for_x87" = yes
11961then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011962
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011963$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011964
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011965fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000011966
Mark Dickinson04b27232009-01-04 12:29:36 +000011967# Detect whether system arithmetic is subject to x87-style double
11968# rounding issues. The result of this test has little meaning on non
11969# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11970# mode is round-to-nearest and double rounding issues are present, and
11971# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11973$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000011974# $BASECFLAGS may affect the result
11975ac_save_cc="$CC"
11976CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011977if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000011978 ac_cv_x87_double_rounding=no
11979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000011981/* end confdefs.h. */
11982
11983#include <stdlib.h>
11984#include <math.h>
11985int main() {
11986 volatile double x, y, z;
11987 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11988 x = 0.99999999999999989; /* 1-2**-53 */
11989 y = 1./x;
11990 if (y != 1.)
11991 exit(0);
11992 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11993 x = 1e16;
11994 y = 2.99999;
11995 z = x + y;
11996 if (z != 1e16+4.)
11997 exit(0);
11998 /* both tests show evidence of double rounding */
11999 exit(1);
12000}
12001
12002_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012003if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012004 ac_cv_x87_double_rounding=no
12005else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012006 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012007fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12009 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012010fi
12011
Mark Dickinson99abd142009-10-24 13:44:16 +000012012CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12014$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012015if test "$ac_cv_x87_double_rounding" = yes
12016then
12017
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012019
12020fi
12021
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012022# ************************************
12023# * Check for mathematical functions *
12024# ************************************
12025
12026LIBS_SAVE=$LIBS
12027LIBS="$LIBS $LIBM"
12028
Mark Dickinson265d7382008-04-21 22:32:24 +000012029# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12030# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12032$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012033if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012034 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012035else
12036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012037if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012038 ac_cv_tanh_preserves_zero_sign=no
12039else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012041/* end confdefs.h. */
12042
12043#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012044#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012045int main() {
12046 /* return 0 if either negative zeros don't exist
12047 on this platform or if negative zeros exist
12048 and tanh(-0.) == -0. */
12049 if (atan2(0., -1.) == atan2(-0., -1.) ||
12050 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12051 else exit(1);
12052}
12053
12054_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012055if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012056 ac_cv_tanh_preserves_zero_sign=yes
12057else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012058 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12061 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012062fi
12063
Mark Dickinson265d7382008-04-21 22:32:24 +000012064fi
12065
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12067$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012068if test "$ac_cv_tanh_preserves_zero_sign" = yes
12069then
12070
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012071$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012072
12073fi
12074
Mark Dickinson65898e02009-09-05 10:27:00 +000012075for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012076do :
12077 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12078ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012079if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012080 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012081#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012082_ACEOF
12083
12084fi
12085done
12086
Mark Dickinson65898e02009-09-05 10:27:00 +000012087for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012088do :
12089 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12090ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012091if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012092 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012093#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012094_ACEOF
12095
12096fi
12097done
12098
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012099ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12100"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012101if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012102 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012103else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012104 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012105fi
12106
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012107cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012108#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012109_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012110ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12111"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012112if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012114else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012115 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012116fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012117
12118cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012119#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012120_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012121ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12122"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012123if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012124 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012126 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012127fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012128
12129cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012130#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012131_ACEOF
12132
12133
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012134LIBS=$LIBS_SAVE
12135
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012136# For multiprocessing module, check that sem_open
12137# actually works. For FreeBSD versions <= 7.2,
12138# the kernel module that provides POSIX semaphores
12139# isn't loaded by default, so an attempt to call
12140# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12142$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012143if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012144 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012146 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012147 ac_cv_posix_semaphores_enabled=yes
12148else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012150/* end confdefs.h. */
12151
12152#include <unistd.h>
12153#include <fcntl.h>
12154#include <stdio.h>
12155#include <semaphore.h>
12156#include <sys/stat.h>
12157
12158int main(void) {
12159 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12160 if (a == SEM_FAILED) {
12161 perror("sem_open");
12162 return 1;
12163 }
12164 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012165 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012166 return 0;
12167}
12168
12169_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012170if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012171 ac_cv_posix_semaphores_enabled=yes
12172else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012173 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012174fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12176 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012177fi
12178
12179
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012180fi
12181
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12183$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012184if test $ac_cv_posix_semaphores_enabled = no
12185then
12186
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012187$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012188
12189fi
12190
12191# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12193$as_echo_n "checking for broken sem_getvalue... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012194if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012195 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012197 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012198 ac_cv_broken_sem_getvalue=yes
12199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012201/* end confdefs.h. */
12202
12203#include <unistd.h>
12204#include <fcntl.h>
12205#include <stdio.h>
12206#include <semaphore.h>
12207#include <sys/stat.h>
12208
12209int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012210 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012211 int count;
12212 int res;
12213 if(a==SEM_FAILED){
12214 perror("sem_open");
12215 return 1;
12216
12217 }
12218 res = sem_getvalue(a, &count);
12219 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012220 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012221 return res==-1 ? 1 : 0;
12222}
12223
12224_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012225if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012226 ac_cv_broken_sem_getvalue=no
12227else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012228 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012229fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12231 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012232fi
12233
12234
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012235fi
12236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12238$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012239if test $ac_cv_broken_sem_getvalue = yes
12240then
12241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012242$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012243
12244fi
12245
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012246# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12248$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012249# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012250if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012251 enableval=$enable_big_digits; case $enable_big_digits in
12252yes)
12253 enable_big_digits=30 ;;
12254no)
12255 enable_big_digits=15 ;;
1225615|30)
12257 ;;
12258*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012259 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 +000012260esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12262$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012263
12264cat >>confdefs.h <<_ACEOF
12265#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12266_ACEOF
12267
12268
12269else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12271$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012272fi
12273
12274
Guido van Rossumef2255b2000-03-10 22:30:29 +000012275# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012276ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012277if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012278
12279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012281
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012282 wchar_h="yes"
12283
Guido van Rossumef2255b2000-03-10 22:30:29 +000012284else
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012286
12287fi
12288
Michael W. Hudson54241132001-12-07 15:38:26 +000012289
Martin v. Löwis11437992002-04-12 09:54:03 +000012290
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012291# determine wchar_t size
12292if test "$wchar_h" = yes
12293then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012294 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012295# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12296# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12297# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12299$as_echo_n "checking size of wchar_t... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012300if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012301 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012302else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012303 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12304"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012305
Martin v. Löwis11437992002-04-12 09:54:03 +000012306else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012307 if test "$ac_cv_type_wchar_t" = yes; then
12308 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12309$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012310as_fn_error 77 "cannot compute sizeof (wchar_t)
12311See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012312 else
12313 ac_cv_sizeof_wchar_t=0
12314 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012315fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012316
Martin v. Löwis11437992002-04-12 09:54:03 +000012317fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12319$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012320
12321
12322
Martin v. Löwis11437992002-04-12 09:54:03 +000012323cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012324#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012325_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012326
Michael W. Hudson54241132001-12-07 15:38:26 +000012327
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012328fi
12329
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12331$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012332have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012334/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012335
12336#include <tcl.h>
12337#if TCL_UTF_MAX != 6
12338# error "NOT UCS4_TCL"
12339#endif
12340int
12341main ()
12342{
12343
12344 ;
12345 return 0;
12346}
12347_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012348if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012349
12350
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012351$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012352
12353 have_ucs4_tcl=yes
12354
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12358$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012359
Skip Montanaro6dead952003-09-25 14:50:04 +000012360# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012361if test "$wchar_h" = yes
12362then
12363 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12365$as_echo_n "checking whether wchar_t is signed... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012366 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012367 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012368else
12369
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012370 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012371 ac_cv_wchar_t_signed=yes
12372else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012374/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012375
12376 #include <wchar.h>
12377 int main()
12378 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012379 /* Success: exit code 0 */
12380 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012381 }
12382
12383_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012384if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012385 ac_cv_wchar_t_signed=yes
12386else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012387 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012388fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12390 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012391fi
12392
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012393fi
12394
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12396$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012397fi
12398
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12400$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012401# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012402if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012403 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012404else
12405 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012406fi
12407
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012408
12409if test $enable_unicode = yes
12410then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012411 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012412 case "$have_ucs4_tcl" in
12413 yes) enable_unicode="ucs4"
12414 ;;
12415 *) enable_unicode="ucs2"
12416 ;;
12417 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012418fi
12419
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012420
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012421case "$enable_unicode" in
12422ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012423 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012424
12425 ;;
12426ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012427 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012428
12429 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012430*) 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 +000012431esac
12432
Michael W. Hudson54241132001-12-07 15:38:26 +000012433
Martin v. Löwis11437992002-04-12 09:54:03 +000012434
12435
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012436if test "$enable_unicode" = "no"
12437then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012438 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12440$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012441else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012442 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012443
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012444$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012445
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012446
12447 # wchar_t is only usable if it maps to an unsigned type
12448 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012449 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012450 then
12451 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012452
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012453$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012454
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012455 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012456
12457 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12458 then
12459 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012460 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012461
12462 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12463 then
12464 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012465 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012466
12467 else
12468 PY_UNICODE_TYPE="no type found"
12469 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12471$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012472fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012473
12474# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12476$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012477if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012478 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012480 ac_cv_c_bigendian=unknown
12481 # See if we're dealing with a universal compiler.
12482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12483/* end confdefs.h. */
12484#ifndef __APPLE_CC__
12485 not a universal capable compiler
12486 #endif
12487 typedef int dummy;
12488
Skip Montanaro6dead952003-09-25 14:50:04 +000012489_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012490if ac_fn_c_try_compile "$LINENO"; then :
12491
12492 # Check for potential -arch flags. It is not universal unless
12493 # there are at least two -arch flags with different values.
12494 ac_arch=
12495 ac_prev=
12496 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12497 if test -n "$ac_prev"; then
12498 case $ac_word in
12499 i?86 | x86_64 | ppc | ppc64)
12500 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12501 ac_arch=$ac_word
12502 else
12503 ac_cv_c_bigendian=universal
12504 break
12505 fi
12506 ;;
12507 esac
12508 ac_prev=
12509 elif test "x$ac_word" = "x-arch"; then
12510 ac_prev=arch
12511 fi
12512 done
12513fi
12514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12515 if test $ac_cv_c_bigendian = unknown; then
12516 # See if sys/param.h defines the BYTE_ORDER macro.
12517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012518/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012519#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012520 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012521
Martin v. Löwis11437992002-04-12 09:54:03 +000012522int
12523main ()
12524{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012525#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12526 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12527 && LITTLE_ENDIAN)
12528 bogus endian macros
12529 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012530
12531 ;
12532 return 0;
12533}
12534_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012535if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012536 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012538/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012539#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012540 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012541
Martin v. Löwis11437992002-04-12 09:54:03 +000012542int
12543main ()
12544{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012545#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012546 not big endian
12547 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012548
12549 ;
12550 return 0;
12551}
12552_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012553if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012554 ac_cv_c_bigendian=yes
12555else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012556 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012559fi
12560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12561 fi
12562 if test $ac_cv_c_bigendian = unknown; then
12563 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012565/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012566#include <limits.h>
12567
Martin v. Löwis11437992002-04-12 09:54:03 +000012568int
12569main ()
12570{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12572 bogus endian macros
12573 #endif
12574
Martin v. Löwis11437992002-04-12 09:54:03 +000012575 ;
12576 return 0;
12577}
12578_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012579if ac_fn_c_try_compile "$LINENO"; then :
12580 # It does; now see whether it defined to _BIG_ENDIAN or not.
12581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12582/* end confdefs.h. */
12583#include <limits.h>
12584
12585int
12586main ()
12587{
12588#ifndef _BIG_ENDIAN
12589 not big endian
12590 #endif
12591
12592 ;
12593 return 0;
12594}
12595_ACEOF
12596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012597 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012599 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012600fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12602fi
12603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12604 fi
12605 if test $ac_cv_c_bigendian = unknown; then
12606 # Compile a test program.
12607 if test "$cross_compiling" = yes; then :
12608 # Try to guess by grepping values from an object file.
12609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12610/* end confdefs.h. */
12611short int ascii_mm[] =
12612 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12613 short int ascii_ii[] =
12614 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12615 int use_ascii (int i) {
12616 return ascii_mm[i] + ascii_ii[i];
12617 }
12618 short int ebcdic_ii[] =
12619 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12620 short int ebcdic_mm[] =
12621 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12622 int use_ebcdic (int i) {
12623 return ebcdic_mm[i] + ebcdic_ii[i];
12624 }
12625 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012627int
12628main ()
12629{
12630return use_ascii (foo) == use_ebcdic (foo);
12631 ;
12632 return 0;
12633}
12634_ACEOF
12635if ac_fn_c_try_compile "$LINENO"; then :
12636 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12637 ac_cv_c_bigendian=yes
12638 fi
12639 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12640 if test "$ac_cv_c_bigendian" = unknown; then
12641 ac_cv_c_bigendian=no
12642 else
12643 # finding both strings is unlikely to happen, but who knows?
12644 ac_cv_c_bigendian=unknown
12645 fi
12646 fi
12647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012651/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012652$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012653int
12654main ()
12655{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012656
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657 /* Are we little or big endian? From Harbison&Steele. */
12658 union
12659 {
12660 long int l;
12661 char c[sizeof (long int)];
12662 } u;
12663 u.l = 1;
12664 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012665
12666 ;
12667 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012668}
Martin v. Löwis11437992002-04-12 09:54:03 +000012669_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012670if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012671 ac_cv_c_bigendian=no
12672else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012673 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012674fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012678
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012679 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012680fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12682$as_echo "$ac_cv_c_bigendian" >&6; }
12683 case $ac_cv_c_bigendian in #(
12684 yes)
12685 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12686;; #(
12687 no)
12688 ;; #(
12689 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012690
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012691$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012692
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012693 ;; #(
12694 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012695 as_fn_error $? "unknown endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012696 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12697 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012698
Michael W. Hudson54241132001-12-07 15:38:26 +000012699
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012700# Check whether right shifting a negative integer extends the sign bit
12701# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12703$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012704if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012705 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012706else
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012708if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012709 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012710else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012712/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012713
12714int main()
12715{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012716 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012717}
12718
Martin v. Löwis11437992002-04-12 09:54:03 +000012719_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012720if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012721 ac_cv_rshift_extends_sign=yes
12722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012723 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012724fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12726 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012727fi
12728
Martin v. Löwiseba40652007-08-30 20:10:57 +000012729fi
12730
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12732$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012733if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012734then
Martin v. Löwis11437992002-04-12 09:54:03 +000012735
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012736$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012737
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012738fi
12739
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012740# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12742$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012743if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012744 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012745else
Martin v. Löwis11437992002-04-12 09:54:03 +000012746
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012748/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012749#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012750int
12751main ()
12752{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012753
12754 FILE *f = fopen("/dev/null", "r");
12755 flockfile(f);
12756 getc_unlocked(f);
12757 funlockfile(f);
12758
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 ;
12760 return 0;
12761}
12762_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012763if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012764 ac_cv_have_getc_unlocked=yes
12765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766 ac_cv_have_getc_unlocked=no
12767fi
12768rm -f core conftest.err conftest.$ac_objext \
12769 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012771
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12773$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012774if test "$ac_cv_have_getc_unlocked" = yes
12775then
Martin v. Löwis11437992002-04-12 09:54:03 +000012776
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012777$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012778
12779fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012780
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012781# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012782# save the value of LIBS so we don't actually link Python with readline
12783LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012784
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012785# On some systems we need to link readline to a termcap compatible
12786# library. NOTE: Keep the precedence of listed libraries synchronised
12787# with setup.py.
12788py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12790$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012791for py_libtermcap in "" ncursesw ncurses curses termcap; do
12792 if test -z "$py_libtermcap"; then
12793 READLINE_LIBS="-lreadline"
12794 else
12795 READLINE_LIBS="-lreadline -l$py_libtermcap"
12796 fi
12797 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012799/* end confdefs.h. */
12800
Martin v. Löwiseba40652007-08-30 20:10:57 +000012801/* Override any GCC internal prototype to avoid an error.
12802 Use char because int might match the return type of a GCC
12803 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012804#ifdef __cplusplus
12805extern "C"
12806#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012807char readline ();
12808int
12809main ()
12810{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012811return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012812 ;
12813 return 0;
12814}
12815_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012816if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012817 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012818fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012819rm -f core conftest.err conftest.$ac_objext \
12820 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012821 if test $py_cv_lib_readline = yes; then
12822 break
12823 fi
12824done
12825# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12826#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012827if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12829$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12832$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012833
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012834$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012835
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012836fi
12837
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012838# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12840$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012841if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012842 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012843else
12844 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012845LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012847/* end confdefs.h. */
12848
Martin v. Löwiseba40652007-08-30 20:10:57 +000012849/* Override any GCC internal prototype to avoid an error.
12850 Use char because int might match the return type of a GCC
12851 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012852#ifdef __cplusplus
12853extern "C"
12854#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012855char rl_callback_handler_install ();
12856int
12857main ()
12858{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012859return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012860 ;
12861 return 0;
12862}
12863_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012864if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012865 ac_cv_lib_readline_rl_callback_handler_install=yes
12866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012867 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012869rm -f core conftest.err conftest.$ac_objext \
12870 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012871LIBS=$ac_check_lib_save_LIBS
12872fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12874$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012875if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012876
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012877$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012878
12879fi
12880
12881
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012882# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012884/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012885#include <readline/readline.h>
12886_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012887if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012888 have_readline=yes
12889else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012890 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000012891
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012892fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012893rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012894if test $have_readline = yes
12895then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012897/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012898#include <readline/readline.h>
12899
12900_ACEOF
12901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012903
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012904$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012905
12906fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012907rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012908
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012910/* end confdefs.h. */
12911#include <readline/readline.h>
12912
12913_ACEOF
12914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012915 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012916
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012917$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012918
12919fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012920rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012921
12922fi
12923
Martin v. Löwis0daad592001-09-30 21:09:59 +000012924# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12926$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012927if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012928 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012929else
Martin v. Löwis11437992002-04-12 09:54:03 +000012930 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012931LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012934
Martin v. Löwiseba40652007-08-30 20:10:57 +000012935/* Override any GCC internal prototype to avoid an error.
12936 Use char because int might match the return type of a GCC
12937 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012938#ifdef __cplusplus
12939extern "C"
12940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012941char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012942int
12943main ()
12944{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012945return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012946 ;
12947 return 0;
12948}
12949_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012950if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012953 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955rm -f core conftest.err conftest.$ac_objext \
12956 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012957LIBS=$ac_check_lib_save_LIBS
12958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12960$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012961if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012962
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012963$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012964
Martin v. Löwis0daad592001-09-30 21:09:59 +000012965fi
12966
Michael W. Hudson54241132001-12-07 15:38:26 +000012967
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012968# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12970$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012971if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012972 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012973else
12974 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012975LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012977/* end confdefs.h. */
12978
12979/* Override any GCC internal prototype to avoid an error.
12980 Use char because int might match the return type of a GCC
12981 builtin and then its argument prototype would still apply. */
12982#ifdef __cplusplus
12983extern "C"
12984#endif
12985char rl_completion_display_matches_hook ();
12986int
12987main ()
12988{
12989return rl_completion_display_matches_hook ();
12990 ;
12991 return 0;
12992}
12993_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012994if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012995 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12996else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012997 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000012998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012999rm -f core conftest.err conftest.$ac_objext \
13000 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013001LIBS=$ac_check_lib_save_LIBS
13002fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13004$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013005if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013006
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013007$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013008
13009fi
13010
13011
Martin v. Löwis0daad592001-09-30 21:09:59 +000013012# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13014$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013015if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013016 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013017else
Martin v. Löwis11437992002-04-12 09:54:03 +000013018 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013019LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013022
Martin v. Löwiseba40652007-08-30 20:10:57 +000013023/* Override any GCC internal prototype to avoid an error.
13024 Use char because int might match the return type of a GCC
13025 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013026#ifdef __cplusplus
13027extern "C"
13028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013029char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013030int
13031main ()
13032{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013033return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013034 ;
13035 return 0;
13036}
13037_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013038if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013039 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013041 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013043rm -f core conftest.err conftest.$ac_objext \
13044 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013045LIBS=$ac_check_lib_save_LIBS
13046fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13048$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013049if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013050
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013051$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013052
Guido van Rossum353ae582001-07-10 16:45:32 +000013053fi
13054
Jack Jansendd19cf82001-12-06 22:36:17 +000013055
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013056# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013058/* end confdefs.h. */
13059#include <readline/readline.h>
13060_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013061if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013062 have_readline=yes
13063else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013064 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013065
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013066fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013067rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013068if test $have_readline = yes
13069then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013071/* end confdefs.h. */
13072#include <readline/readline.h>
13073
13074_ACEOF
13075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013076 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013078$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013079
13080fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013081rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013082
13083fi
13084
Martin v. Löwis82bca632006-02-10 20:49:30 +000013085# End of readline checks: restore LIBS
13086LIBS=$LIBS_no_readline
13087
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13089$as_echo_n "checking for broken nice()... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013090if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013091 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013092else
Martin v. Löwis11437992002-04-12 09:54:03 +000013093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013094if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013095 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013096else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013098/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013099
13100int main()
13101{
13102 int val1 = nice(1);
13103 if (val1 != -1 && val1 == nice(2))
13104 exit(0);
13105 exit(1);
13106}
13107
Martin v. Löwis11437992002-04-12 09:54:03 +000013108_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013110 ac_cv_broken_nice=yes
13111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013113fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13115 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013116fi
13117
Martin v. Löwiseba40652007-08-30 20:10:57 +000013118fi
13119
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13121$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013122if test "$ac_cv_broken_nice" = yes
13123then
Martin v. Löwis11437992002-04-12 09:54:03 +000013124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013125$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013126
13127fi
13128
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13130$as_echo_n "checking for broken poll()... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013131if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013132 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013134 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013135 ac_cv_broken_poll=no
13136else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013138/* end confdefs.h. */
13139
13140#include <poll.h>
13141
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013142int main()
13143{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013144 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013145 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013146
13147 close (42);
13148
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013149 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013150 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013151 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013152 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013153 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013154 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013155 return 1;
13156}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013157
13158_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013159if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013160 ac_cv_broken_poll=yes
13161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013162 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013163fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13165 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013167
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013168fi
13169
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13171$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013172if test "$ac_cv_broken_poll" = yes
13173then
13174
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013175$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013176
13177fi
13178
Brett Cannon43802422005-02-10 20:48:03 +000013179# 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 +000013180# (which is not required by ISO C or UNIX spec) and/or if we support
13181# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013182ac_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 +000013183#include <$ac_cv_struct_tm>
13184
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013185"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013186if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013187
13188cat >>confdefs.h <<_ACEOF
13189#define HAVE_STRUCT_TM_TM_ZONE 1
13190_ACEOF
13191
13192
13193fi
13194
13195if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013197$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013198
13199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13201"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013202if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013203 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013205 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013206fi
13207
Martin v. Löwiseba40652007-08-30 20:10:57 +000013208cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013209#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013210_ACEOF
13211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13213$as_echo_n "checking for tzname... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013214if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013215 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013218/* end confdefs.h. */
13219#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013220#if !HAVE_DECL_TZNAME
13221extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013222#endif
13223
13224int
13225main ()
13226{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013227return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013228 ;
13229 return 0;
13230}
13231_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013232if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013233 ac_cv_var_tzname=yes
13234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013235 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013236fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013237rm -f core conftest.err conftest.$ac_objext \
13238 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013239fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13241$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013242 if test $ac_cv_var_tzname = yes; then
13243
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013244$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013245
13246 fi
13247fi
13248
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013249
Martin v. Löwis1d459062005-03-14 21:23:33 +000013250# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13252$as_echo_n "checking for working tzset()... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013253if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013255else
13256
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013257if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013258 ac_cv_working_tzset=no
13259else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013261/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013262
13263#include <stdlib.h>
13264#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013265#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013266
13267#if HAVE_TZNAME
13268extern char *tzname[];
13269#endif
13270
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013271int main()
13272{
Brett Cannon18367812003-09-19 00:59:16 +000013273 /* Note that we need to ensure that not only does tzset(3)
13274 do 'something' with localtime, but it works as documented
13275 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013276 This includes making sure that tzname is set properly if
13277 tm->tm_zone does not exist since it is the alternative way
13278 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013279
13280 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013281 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013282 */
13283
Martin v. Löwis1d459062005-03-14 21:23:33 +000013284 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013285 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13286
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013287 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013288 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013289 if (localtime(&groundhogday)->tm_hour != 0)
13290 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013291#if HAVE_TZNAME
13292 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13293 if (strcmp(tzname[0], "UTC") ||
13294 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13295 exit(1);
13296#endif
Brett Cannon18367812003-09-19 00:59:16 +000013297
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013298 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013299 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013300 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013301 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013302#if HAVE_TZNAME
13303 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13304 exit(1);
13305#endif
Brett Cannon18367812003-09-19 00:59:16 +000013306
13307 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13308 tzset();
13309 if (localtime(&groundhogday)->tm_hour != 11)
13310 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013311#if HAVE_TZNAME
13312 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13313 exit(1);
13314#endif
13315
13316#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013317 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13318 exit(1);
13319 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13320 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013321#endif
Brett Cannon18367812003-09-19 00:59:16 +000013322
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013323 exit(0);
13324}
13325
13326_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013327if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013328 ac_cv_working_tzset=yes
13329else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013330 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013331fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13333 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013334fi
13335
Martin v. Löwiseba40652007-08-30 20:10:57 +000013336fi
13337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13339$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013340if test "$ac_cv_working_tzset" = yes
13341then
13342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013343$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013344
13345fi
13346
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013347# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13349$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013350if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013351 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013352else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013354/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013355#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013356int
13357main ()
13358{
13359
13360struct stat st;
13361st.st_mtim.tv_nsec = 1;
13362
13363 ;
13364 return 0;
13365}
13366_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013368 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013369else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013370 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13373fi
13374
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13376$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013377if test "$ac_cv_stat_tv_nsec" = yes
13378then
13379
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013380$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013381
13382fi
13383
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013384# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13386$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013387if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013388 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013391/* end confdefs.h. */
13392#include <sys/stat.h>
13393int
13394main ()
13395{
13396
13397struct stat st;
13398st.st_mtimespec.tv_nsec = 1;
13399
13400 ;
13401 return 0;
13402}
13403_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013405 ac_cv_stat_tv_nsec2=yes
13406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013407 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13410fi
13411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13413$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013414if test "$ac_cv_stat_tv_nsec2" = yes
13415then
13416
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013417$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013418
13419fi
13420
Jack Jansen666b1e72001-10-31 12:11:48 +000013421# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13423$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013424if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013425 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013426else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013428/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013429#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013430int
13431main ()
13432{
Jack Jansen666b1e72001-10-31 12:11:48 +000013433
13434 int rtn;
13435 rtn = mvwdelch(0,0,0);
13436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 ;
13438 return 0;
13439}
13440_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013441if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013442 ac_cv_mvwdelch_is_expression=yes
13443else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013444 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13447fi
13448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13450$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013451
13452if test "$ac_cv_mvwdelch_is_expression" = yes
13453then
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013455$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013456
13457fi
13458
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13460$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013461if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013462 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013465/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013466#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013467int
13468main ()
13469{
Jack Jansen666b1e72001-10-31 12:11:48 +000013470
13471 WINDOW *w;
13472 w->_flags = 0;
13473
Martin v. Löwis11437992002-04-12 09:54:03 +000013474 ;
13475 return 0;
13476}
13477_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013478if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013479 ac_cv_window_has_flags=yes
13480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013481 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13484fi
13485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13487$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013488
Jack Jansen666b1e72001-10-31 12:11:48 +000013489
13490if test "$ac_cv_window_has_flags" = yes
13491then
Martin v. Löwis11437992002-04-12 09:54:03 +000013492
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013493$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013494
13495fi
13496
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13498$as_echo_n "checking for is_term_resized... " >&6; }
13499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013500/* end confdefs.h. */
13501#include <curses.h>
13502int
13503main ()
13504{
13505void *x=is_term_resized
13506 ;
13507 return 0;
13508}
13509_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013510if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013512$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013513
Matthias Klosec511b472010-05-08 11:01:39 +000013514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013515$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013516else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13518$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013519
13520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13522
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13524$as_echo_n "checking for resize_term... " >&6; }
13525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013526/* end confdefs.h. */
13527#include <curses.h>
13528int
13529main ()
13530{
13531void *x=resize_term
13532 ;
13533 return 0;
13534}
13535_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013536if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013537
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013538$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013539
Matthias Klosec511b472010-05-08 11:01:39 +000013540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013541$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013542else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13544$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013545
13546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13548
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13550$as_echo_n "checking for resizeterm... " >&6; }
13551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013552/* end confdefs.h. */
13553#include <curses.h>
13554int
13555main ()
13556{
13557void *x=resizeterm
13558 ;
13559 return 0;
13560}
13561_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013562if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013563
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013564$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013565
Matthias Klosec511b472010-05-08 11:01:39 +000013566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013567$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013568else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13570$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013571
13572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13576$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013577
13578if test -r /dev/ptmx
13579then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13581$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013583$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013584
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013585else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13587$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013588fi
13589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13591$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013592
13593if test -r /dev/ptc
13594then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13596$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013597
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013598$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013599
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013600else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13602$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013603fi
13604
Mark Dickinson82864d12009-11-15 16:18:58 +000013605if test "$have_long_long" = yes
13606then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13608$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013609 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013611else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013612 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013613 ac_cv_have_long_long_format=no
13614else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013616/* end confdefs.h. */
13617
13618 #include <stdio.h>
13619 #include <stddef.h>
13620 #include <string.h>
13621
13622 #ifdef HAVE_SYS_TYPES_H
13623 #include <sys/types.h>
13624 #endif
13625
13626 int main()
13627 {
13628 char buffer[256];
13629
13630 if (sprintf(buffer, "%lld", (long long)123) < 0)
13631 return 1;
13632 if (strcmp(buffer, "123"))
13633 return 1;
13634
13635 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13636 return 1;
13637 if (strcmp(buffer, "-123"))
13638 return 1;
13639
13640 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13641 return 1;
13642 if (strcmp(buffer, "123"))
13643 return 1;
13644
13645 return 0;
13646 }
13647
13648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013649if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013650 ac_cv_have_long_long_format=yes
13651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013652 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013653fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013656fi
13657
13658
Mark Dickinson82864d12009-11-15 16:18:58 +000013659fi
13660
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13662$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013663fi
13664
Mark Dickinson5ce84742009-12-31 20:48:04 +000013665if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013666then
13667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013668$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013669
13670fi
13671
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013672if test $ac_sys_system = Darwin
13673then
13674 LIBS="$LIBS -framework CoreFoundation"
13675fi
13676
Mark Dickinson82864d12009-11-15 16:18:58 +000013677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13679$as_echo_n "checking for %zd printf() format support... " >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013680if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013681 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013682else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013683 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013684 ac_cv_have_size_t_format="cross -- assuming yes"
13685
Brett Cannon09d12362006-05-11 05:11:33 +000013686else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013688/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013689
Brett Cannon09d12362006-05-11 05:11:33 +000013690#include <stdio.h>
13691#include <stddef.h>
13692#include <string.h>
13693
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013694#ifdef HAVE_SYS_TYPES_H
13695#include <sys/types.h>
13696#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013697
13698#ifdef HAVE_SSIZE_T
13699typedef ssize_t Py_ssize_t;
13700#elif SIZEOF_VOID_P == SIZEOF_LONG
13701typedef long Py_ssize_t;
13702#else
13703typedef int Py_ssize_t;
13704#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013705
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013706int main()
13707{
13708 char buffer[256];
13709
Brett Cannon09d12362006-05-11 05:11:33 +000013710 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13711 return 1;
13712
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013713 if (strcmp(buffer, "123"))
13714 return 1;
13715
13716 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13717 return 1;
13718
13719 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013720 return 1;
13721
13722 return 0;
13723}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013724
Brett Cannon09d12362006-05-11 05:11:33 +000013725_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013726if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013727 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013729 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013730fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013733fi
13734
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013735fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13737$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013738if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013739
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013740$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013741
13742fi
13743
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013744ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013745#ifdef HAVE_SYS_TYPES_H
13746#include <sys/types.h>
13747#endif
13748#ifdef HAVE_SYS_SOCKET_H
13749#include <sys/socket.h>
13750#endif
13751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013752"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013753if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013754
Martin v. Löwis11437992002-04-12 09:54:03 +000013755else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013757$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013758
13759fi
13760
Michael W. Hudson54241132001-12-07 15:38:26 +000013761
Benjamin Peterson7497e912010-10-16 00:53:39 +000013762case $ac_sys_system in
13763AIX*)
13764
13765$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13766 ;;
13767esac
13768
13769
Michael W. Hudson54241132001-12-07 15:38:26 +000013770
13771
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013772for h in `(cd $srcdir;echo Python/thread_*.h)`
13773do
13774 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13775done
13776
Michael W. Hudson54241132001-12-07 15:38:26 +000013777
Neal Norwitzd24499d2005-12-18 21:36:39 +000013778SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13780$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013781for dir in $SRCDIRS; do
13782 if test ! -d $dir; then
13783 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013784 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013785done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13787$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013788
Guido van Rossum627b2d71993-12-24 10:39:16 +000013789# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013790ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013791
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013792ac_config_files="$ac_config_files Modules/ld_so_aix"
13793
Martin v. Löwis11437992002-04-12 09:54:03 +000013794cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013795# This file is a shell script that caches the results of configure
13796# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013797# scripts and configure runs, see configure's option --config-cache.
13798# It is not useful on other systems. If it contains results you don't
13799# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013800#
Martin v. Löwis11437992002-04-12 09:54:03 +000013801# config.status only pays attention to the cache file if you give it
13802# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013803#
Skip Montanaro6dead952003-09-25 14:50:04 +000013804# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013805# loading this file, other *unset* `ac_cv_foo' will be assigned the
13806# following values.
13807
13808_ACEOF
13809
Guido van Rossumf78abae1997-01-21 22:02:36 +000013810# The following way of writing the cache mishandles newlines in values,
13811# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013812# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013813# Ultrix sh set writes to stderr and can't be redirected directly,
13814# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013815(
13816 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13817 eval ac_val=\$$ac_var
13818 case $ac_val in #(
13819 *${as_nl}*)
13820 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013821 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13822$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013823 esac
13824 case $ac_var in #(
13825 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13827 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013828 esac ;;
13829 esac
13830 done
13831
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013833 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13834 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013835 # `set' does not quote correctly, so add quotes: double-quote
13836 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013838 "s/'/'\\\\''/g;
13839 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013840 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013841 *)
13842 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013843 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013844 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013845 esac |
13846 sort
13847) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013848 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013849 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013850 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013851 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013852 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13853 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013854 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13855 :end' >>confcache
13856if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13857 if test -w "$cache_file"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013858 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013859 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13860$as_echo "$as_me: updating cache $cache_file" >&6;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013861 if test ! -f "$cache_file" || test -h "$cache_file"; then
13862 cat confcache >"$cache_file"
13863 else
13864 case $cache_file in #(
13865 */* | ?:*)
13866 mv -f confcache "$cache_file"$$ &&
13867 mv -f "$cache_file"$$ "$cache_file" ;; #(
13868 *)
13869 mv -f confcache "$cache_file" ;;
13870 esac
13871 fi
13872 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013873 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013874 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13875$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013876 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013877fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013878rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013879
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013880test "x$prefix" = xNONE && prefix=$ac_default_prefix
13881# Let make expand exec_prefix.
13882test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013883
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013884DEFS=-DHAVE_CONFIG_H
13885
Skip Montanaro6dead952003-09-25 14:50:04 +000013886ac_libobjs=
13887ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013888U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013889for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13890 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013892 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000013893 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13894 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013895 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13896 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013897done
13898LIBOBJS=$ac_libobjs
13899
13900LTLIBOBJS=$ac_ltlibobjs
13901
13902
Martin v. Löwis11437992002-04-12 09:54:03 +000013903
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013904
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013905: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013906ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013907ac_clean_files_save=$ac_clean_files
13908ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013909{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13910$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13911as_write_fail=0
13912cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013913#! $SHELL
13914# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013915# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013916# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013917# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013918
Martin v. Löwis11437992002-04-12 09:54:03 +000013919debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013920ac_cs_recheck=false
13921ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013923SHELL=\${CONFIG_SHELL-$SHELL}
13924export SHELL
13925_ASEOF
13926cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13927## -------------------- ##
13928## M4sh Initialization. ##
13929## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013930
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931# Be more Bourne compatible
13932DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013933if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013934 emulate sh
13935 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013936 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013937 # is contrary to our usage. Disable this feature.
13938 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013939 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000013940else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013941 case `(set -o) 2>/dev/null` in #(
13942 *posix*) :
13943 set -o posix ;; #(
13944 *) :
13945 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013946esac
Martin v. Löwis11437992002-04-12 09:54:03 +000013947fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013948
Skip Montanaro6dead952003-09-25 14:50:04 +000013949
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013950as_nl='
13951'
13952export as_nl
13953# Printing a long string crashes Solaris 7 /usr/bin/printf.
13954as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13955as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13956as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13957# Prefer a ksh shell builtin over an external printf program on Solaris,
13958# but without wasting forks for bash or zsh.
13959if test -z "$BASH_VERSION$ZSH_VERSION" \
13960 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13961 as_echo='print -r --'
13962 as_echo_n='print -rn --'
13963elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13964 as_echo='printf %s\n'
13965 as_echo_n='printf %s'
13966else
13967 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13968 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13969 as_echo_n='/usr/ucb/echo -n'
13970 else
13971 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13972 as_echo_n_body='eval
13973 arg=$1;
13974 case $arg in #(
13975 *"$as_nl"*)
13976 expr "X$arg" : "X\\(.*\\)$as_nl";
13977 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13978 esac;
13979 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13980 '
13981 export as_echo_n_body
13982 as_echo_n='sh -c $as_echo_n_body as_echo'
13983 fi
13984 export as_echo_body
13985 as_echo='sh -c $as_echo_body as_echo'
13986fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013987
13988# The user is always right.
13989if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013990 PATH_SEPARATOR=:
13991 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13992 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13993 PATH_SEPARATOR=';'
13994 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997
13998# IFS
13999# We need space, tab and new line, in precisely that order. Quoting is
14000# there to prevent editors from complaining about space-tab.
14001# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14002# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014003IFS=" "" $as_nl"
14004
14005# Find who we are. Look in the path if we contain no directory separator.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014006as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014007case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014008 *[\\/]* ) as_myself=$0 ;;
14009 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014010for as_dir in $PATH
14011do
14012 IFS=$as_save_IFS
14013 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014014 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14015 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014016IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014017
Martin v. Löwiseba40652007-08-30 20:10:57 +000014018 ;;
14019esac
14020# We did not find ourselves, most probably we were run as `sh COMMAND'
14021# in which case we are not to be found in the path.
14022if test "x$as_myself" = x; then
14023 as_myself=$0
14024fi
14025if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014026 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14027 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014028fi
14029
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014030# Unset variables that we do not need and which cause bugs (e.g. in
14031# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14032# suppresses any "Segmentation fault" message there. '((' could
14033# trigger a bug in pdksh 5.2.14.
14034for as_var in BASH_ENV ENV MAIL MAILPATH
14035do eval test x\${$as_var+set} = xset \
14036 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014037done
14038PS1='$ '
14039PS2='> '
14040PS4='+ '
14041
14042# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014043LC_ALL=C
14044export LC_ALL
14045LANGUAGE=C
14046export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014047
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014048# CDPATH.
14049(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14050
14051
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014052# as_fn_error STATUS ERROR [LINENO LOG_FD]
14053# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014054# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14055# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014056# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014057as_fn_error ()
14058{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014059 as_status=$1; test $as_status -eq 0 && as_status=1
14060 if test "$4"; then
14061 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14062 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014063 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014064 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014065 as_fn_exit $as_status
14066} # as_fn_error
14067
14068
14069# as_fn_set_status STATUS
14070# -----------------------
14071# Set $? to STATUS, without forking.
14072as_fn_set_status ()
14073{
14074 return $1
14075} # as_fn_set_status
14076
14077# as_fn_exit STATUS
14078# -----------------
14079# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14080as_fn_exit ()
14081{
14082 set +e
14083 as_fn_set_status $1
14084 exit $1
14085} # as_fn_exit
14086
14087# as_fn_unset VAR
14088# ---------------
14089# Portably unset VAR.
14090as_fn_unset ()
14091{
14092 { eval $1=; unset $1;}
14093}
14094as_unset=as_fn_unset
14095# as_fn_append VAR VALUE
14096# ----------------------
14097# Append the text in VALUE to the end of the definition contained in VAR. Take
14098# advantage of any shell optimizations that allow amortized linear growth over
14099# repeated appends, instead of the typical quadratic growth present in naive
14100# implementations.
14101if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14102 eval 'as_fn_append ()
14103 {
14104 eval $1+=\$2
14105 }'
14106else
14107 as_fn_append ()
14108 {
14109 eval $1=\$$1\$2
14110 }
14111fi # as_fn_append
14112
14113# as_fn_arith ARG...
14114# ------------------
14115# Perform arithmetic evaluation on the ARGs, and store the result in the
14116# global $as_val. Take advantage of shells that can avoid forks. The arguments
14117# must be portable across $(()) and expr.
14118if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14119 eval 'as_fn_arith ()
14120 {
14121 as_val=$(( $* ))
14122 }'
14123else
14124 as_fn_arith ()
14125 {
14126 as_val=`expr "$@" || test $? -eq 1`
14127 }
14128fi # as_fn_arith
14129
14130
Martin v. Löwiseba40652007-08-30 20:10:57 +000014131if expr a : '\(a\)' >/dev/null 2>&1 &&
14132 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14133 as_expr=expr
14134else
14135 as_expr=false
14136fi
14137
14138if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14139 as_basename=basename
14140else
14141 as_basename=false
14142fi
14143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014144if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14145 as_dirname=dirname
14146else
14147 as_dirname=false
14148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014149
Martin v. Löwiseba40652007-08-30 20:10:57 +000014150as_me=`$as_basename -- "$0" ||
14151$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14152 X"$0" : 'X\(//\)$' \| \
14153 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014154$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014155 sed '/^.*\/\([^/][^/]*\)\/*$/{
14156 s//\1/
14157 q
14158 }
14159 /^X\/\(\/\/\)$/{
14160 s//\1/
14161 q
14162 }
14163 /^X\/\(\/\).*/{
14164 s//\1/
14165 q
14166 }
14167 s/.*/./; q'`
14168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014169# Avoid depending upon Character Ranges.
14170as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14171as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14172as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14173as_cr_digits='0123456789'
14174as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014175
14176ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014177case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014178-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014179 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014180 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014181 xy) ECHO_C='\c';;
14182 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14183 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014184 esac;;
14185*)
14186 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014187esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014188
Martin v. Löwis11437992002-04-12 09:54:03 +000014189rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014190if test -d conf$$.dir; then
14191 rm -f conf$$.dir/conf$$.file
14192else
14193 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014194 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014195fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014196if (echo >conf$$.file) 2>/dev/null; then
14197 if ln -s conf$$.file conf$$ 2>/dev/null; then
14198 as_ln_s='ln -s'
14199 # ... but there are two gotchas:
14200 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14201 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14202 # In both cases, we have to default to `cp -p'.
14203 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14204 as_ln_s='cp -p'
14205 elif ln conf$$.file conf$$ 2>/dev/null; then
14206 as_ln_s=ln
14207 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014209 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014210else
14211 as_ln_s='cp -p'
14212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014213rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14214rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014215
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014216
14217# as_fn_mkdir_p
14218# -------------
14219# Create "$as_dir" as a directory, including parents if necessary.
14220as_fn_mkdir_p ()
14221{
14222
14223 case $as_dir in #(
14224 -*) as_dir=./$as_dir;;
14225 esac
14226 test -d "$as_dir" || eval $as_mkdir_p || {
14227 as_dirs=
14228 while :; do
14229 case $as_dir in #(
14230 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14231 *) as_qdir=$as_dir;;
14232 esac
14233 as_dirs="'$as_qdir' $as_dirs"
14234 as_dir=`$as_dirname -- "$as_dir" ||
14235$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14236 X"$as_dir" : 'X\(//\)[^/]' \| \
14237 X"$as_dir" : 'X\(//\)$' \| \
14238 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14239$as_echo X"$as_dir" |
14240 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14241 s//\1/
14242 q
14243 }
14244 /^X\(\/\/\)[^/].*/{
14245 s//\1/
14246 q
14247 }
14248 /^X\(\/\/\)$/{
14249 s//\1/
14250 q
14251 }
14252 /^X\(\/\).*/{
14253 s//\1/
14254 q
14255 }
14256 s/.*/./; q'`
14257 test -d "$as_dir" && break
14258 done
14259 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014260 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014261
14262
14263} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014264if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014265 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014266else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014267 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014268 as_mkdir_p=false
14269fi
14270
Martin v. Löwiseba40652007-08-30 20:10:57 +000014271if test -x / >/dev/null 2>&1; then
14272 as_test_x='test -x'
14273else
14274 if ls -dL / >/dev/null 2>&1; then
14275 as_ls_L_option=L
14276 else
14277 as_ls_L_option=
14278 fi
14279 as_test_x='
14280 eval sh -c '\''
14281 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014282 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014283 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014284 case $1 in #(
14285 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014286 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014287 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014288 ???[sx]*):;;*)false;;esac;fi
14289 '\'' sh
14290 '
14291fi
14292as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014293
14294# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014295as_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 +000014296
14297# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014298as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014299
14300
Martin v. Löwis11437992002-04-12 09:54:03 +000014301exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014302## ----------------------------------- ##
14303## Main body of $CONFIG_STATUS script. ##
14304## ----------------------------------- ##
14305_ASEOF
14306test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014308cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14309# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014310# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014311# values after options handling.
14312ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014313This file was extended by python $as_me 2.7, which was
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014314generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014315
14316 CONFIG_FILES = $CONFIG_FILES
14317 CONFIG_HEADERS = $CONFIG_HEADERS
14318 CONFIG_LINKS = $CONFIG_LINKS
14319 CONFIG_COMMANDS = $CONFIG_COMMANDS
14320 $ $0 $@
14321
Martin v. Löwiseba40652007-08-30 20:10:57 +000014322on `(hostname || uname -n) 2>/dev/null | sed 1q`
14323"
14324
Martin v. Löwis11437992002-04-12 09:54:03 +000014325_ACEOF
14326
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014327case $ac_config_files in *"
14328"*) set x $ac_config_files; shift; ac_config_files=$*;;
14329esac
14330
14331case $ac_config_headers in *"
14332"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14333esac
14334
14335
14336cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014337# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014338config_files="$ac_config_files"
14339config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014340
Martin v. Löwiseba40652007-08-30 20:10:57 +000014341_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014343cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014344ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014345\`$as_me' instantiates files and other configuration actions
14346from templates according to the current configuration. Unless the files
14347and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014348
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014349Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014350
14351 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014352 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014353 --config print configuration, then exit
14354 -q, --quiet, --silent
14355 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 -d, --debug don't remove temporary files
14357 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014358 --file=FILE[:TEMPLATE]
14359 instantiate the configuration file FILE
14360 --header=FILE[:TEMPLATE]
14361 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
14363Configuration files:
14364$config_files
14365
14366Configuration headers:
14367$config_headers
14368
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014369Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014370
Martin v. Löwiseba40652007-08-30 20:10:57 +000014371_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014372cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14373ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014374ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014375python config.status 2.7
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014376configured by $0, generated by GNU Autoconf 2.68,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014377 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014378
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014379Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014380This config.status script is free software; the Free Software Foundation
14381gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014382
14383ac_pwd='$ac_pwd'
14384srcdir='$srcdir'
14385INSTALL='$INSTALL'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014386test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014387_ACEOF
14388
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14390# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014391ac_need_defaults=:
14392while test $# != 0
14393do
14394 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014395 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014396 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14397 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014398 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014400 --*=)
14401 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14402 ac_optarg=
14403 ac_shift=:
14404 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014405 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014406 ac_option=$1
14407 ac_optarg=$2
14408 ac_shift=shift
14409 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 esac
14411
Skip Montanaro6dead952003-09-25 14:50:04 +000014412 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014414 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14415 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014416 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014417 $as_echo "$ac_cs_version"; exit ;;
14418 --config | --confi | --conf | --con | --co | --c )
14419 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014420 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 debug=: ;;
14422 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014423 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014424 case $ac_optarg in
14425 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014426 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014427 esac
14428 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 ac_need_defaults=false;;
14430 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014431 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014432 case $ac_optarg in
14433 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14434 esac
14435 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014437 --he | --h)
14438 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014439 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014440Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014441 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014442 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014443 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14444 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14445 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014446
14447 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014448 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014449Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014451 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014452 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014453
14454 esac
14455 shift
14456done
14457
Skip Montanaro6dead952003-09-25 14:50:04 +000014458ac_configure_extra_args=
14459
14460if $ac_cs_silent; then
14461 exec 6>/dev/null
14462 ac_configure_extra_args="$ac_configure_extra_args --silent"
14463fi
14464
14465_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014466cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014467if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014468 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14469 shift
14470 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14471 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014472 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014473 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014474fi
14475
Martin v. Löwis11437992002-04-12 09:54:03 +000014476_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014477cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014478exec 5>>config.log
14479{
14480 echo
14481 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14482## Running $as_me. ##
14483_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014484 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014485} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014486
Martin v. Löwiseba40652007-08-30 20:10:57 +000014487_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014489_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014491cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014492
14493# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014494for ac_config_target in $ac_config_targets
14495do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014496 case $ac_config_target in
14497 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14498 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14499 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14500 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014501 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14502 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014503 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14504 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014505 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014506 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014507
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014508 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 esac
14510done
14511
Martin v. Löwiseba40652007-08-30 20:10:57 +000014512
Martin v. Löwis11437992002-04-12 09:54:03 +000014513# If the user did not use the arguments to specify the items to instantiate,
14514# then the envvar interface is used. Set only those that are not.
14515# We use the long form for the default assignment because of an extremely
14516# bizarre bug on SunOS 4.1.3.
14517if $ac_need_defaults; then
14518 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14519 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14520fi
14521
Skip Montanaro6dead952003-09-25 14:50:04 +000014522# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014523# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014524# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014525# Hook for its removal unless debugging.
14526# Note that there is a small window in which the directory will not be cleaned:
14527# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014528$debug ||
14529{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014530 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014531 trap 'exit_status=$?
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014532 : "${ac_tmp:=$tmp}"
14533 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014534' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014535 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014536}
Martin v. Löwis11437992002-04-12 09:54:03 +000014537# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014538
Martin v. Löwis11437992002-04-12 09:54:03 +000014539{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014540 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014541 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014542} ||
14543{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014544 tmp=./conf$$-$RANDOM
14545 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014546} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14547ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014549# Set up the scripts for CONFIG_FILES section.
14550# No need to generate them if there are no CONFIG_FILES.
14551# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014552if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014553
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014554
14555ac_cr=`echo X | tr X '\015'`
14556# On cygwin, bash can eat \r inside `` if the user requested igncr.
14557# But we know of no other shell where ac_cr would be empty at this
14558# point, so we can use a bashism as a fallback.
14559if test "x$ac_cr" = x; then
14560 eval ac_cr=\$\'\\r\'
14561fi
14562ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14563if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014564 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014565else
14566 ac_cs_awk_cr=$ac_cr
14567fi
14568
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014569echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014570_ACEOF
14571
Martin v. Löwiseba40652007-08-30 20:10:57 +000014572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014573{
14574 echo "cat >conf$$subs.awk <<_ACEOF" &&
14575 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14576 echo "_ACEOF"
14577} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014578 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14579ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014580ac_delim='%!_!# '
14581for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014582 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014583 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014585 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14586 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014587 break
14588 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014589 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014590 else
14591 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014593done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014594rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014596cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014597cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014598_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014599sed -n '
14600h
14601s/^/S["/; s/!.*/"]=/
14602p
14603g
14604s/^[^!]*!//
14605:repl
14606t repl
14607s/'"$ac_delim"'$//
14608t delim
14609:nl
14610h
14611s/\(.\{148\}\)..*/\1/
14612t more1
14613s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14614p
14615n
14616b repl
14617:more1
14618s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14619p
14620g
14621s/.\{148\}//
14622t nl
14623:delim
14624h
14625s/\(.\{148\}\)..*/\1/
14626t more2
14627s/["\\]/\\&/g; s/^/"/; s/$/"/
14628p
14629b
14630:more2
14631s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14632p
14633g
14634s/.\{148\}//
14635t delim
14636' <conf$$subs.awk | sed '
14637/^[^""]/{
14638 N
14639 s/\n//
14640}
14641' >>$CONFIG_STATUS || ac_write_fail=1
14642rm -f conf$$subs.awk
14643cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14644_ACAWK
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014645cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014646 for (key in S) S_is_set[key] = 1
14647 FS = ""
14648
14649}
14650{
14651 line = $ 0
14652 nfields = split(line, field, "@")
14653 substed = 0
14654 len = length(field[1])
14655 for (i = 2; i < nfields; i++) {
14656 key = field[i]
14657 keylen = length(key)
14658 if (S_is_set[key]) {
14659 value = S[key]
14660 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14661 len += length(value) + length(field[++i])
14662 substed = 1
14663 } else
14664 len += 1 + keylen
14665 }
14666
14667 print line
14668}
14669
14670_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014671_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014672cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14673if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14674 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14675else
14676 cat
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014677fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14678 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014679_ACEOF
14680
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014681# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14682# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014683# trailing colons and then remove the whole line if VPATH becomes empty
14684# (actually we leave an empty line to preserve line numbers).
14685if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014686 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14687h
14688s///
14689s/^/:/
14690s/[ ]*$/:/
14691s/:\$(srcdir):/:/g
14692s/:\${srcdir}:/:/g
14693s/:@srcdir@:/:/g
14694s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014695s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014696x
14697s/\(=[ ]*\).*/\1/
14698G
14699s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014700s/^[^=]*=[ ]*$//
14701}'
14702fi
14703
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014704cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014705fi # test -n "$CONFIG_FILES"
14706
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014707# Set up the scripts for CONFIG_HEADERS section.
14708# No need to generate them if there are no CONFIG_HEADERS.
14709# This happens for instance with `./config.status Makefile'.
14710if test -n "$CONFIG_HEADERS"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014711cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014712BEGIN {
14713_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014714
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014715# Transform confdefs.h into an awk script `defines.awk', embedded as
14716# here-document in config.status, that substitutes the proper values into
14717# config.h.in to produce config.h.
14718
14719# Create a delimiter string that does not exist in confdefs.h, to ease
14720# handling of long lines.
14721ac_delim='%!_!# '
14722for ac_last_try in false false :; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014723 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14724 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014725 break
14726 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014727 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014728 else
14729 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14730 fi
14731done
14732
14733# For the awk script, D is an array of macro values keyed by name,
14734# likewise P contains macro parameters if any. Preserve backslash
14735# newline sequences.
14736
14737ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14738sed -n '
14739s/.\{148\}/&'"$ac_delim"'/g
14740t rset
14741:rset
14742s/^[ ]*#[ ]*define[ ][ ]*/ /
14743t def
14744d
14745:def
14746s/\\$//
14747t bsnl
14748s/["\\]/\\&/g
14749s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14750D["\1"]=" \3"/p
14751s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14752d
14753:bsnl
14754s/["\\]/\\&/g
14755s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14756D["\1"]=" \3\\\\\\n"\\/p
14757t cont
14758s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14759t cont
14760d
14761:cont
14762n
14763s/.\{148\}/&'"$ac_delim"'/g
14764t clear
14765:clear
14766s/\\$//
14767t bsnlc
14768s/["\\]/\\&/g; s/^/"/; s/$/"/p
14769d
14770:bsnlc
14771s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14772b cont
14773' <confdefs.h | sed '
14774s/'"$ac_delim"'/"\\\
14775"/g' >>$CONFIG_STATUS || ac_write_fail=1
14776
14777cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14778 for (key in D) D_is_set[key] = 1
14779 FS = ""
14780}
14781/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14782 line = \$ 0
14783 split(line, arg, " ")
14784 if (arg[1] == "#") {
14785 defundef = arg[2]
14786 mac1 = arg[3]
14787 } else {
14788 defundef = substr(arg[1], 2)
14789 mac1 = arg[2]
14790 }
14791 split(mac1, mac2, "(") #)
14792 macro = mac2[1]
14793 prefix = substr(line, 1, index(line, defundef) - 1)
14794 if (D_is_set[macro]) {
14795 # Preserve the white space surrounding the "#".
14796 print prefix "define", macro P[macro] D[macro]
14797 next
14798 } else {
14799 # Replace #undef with comments. This is necessary, for example,
14800 # in the case of _POSIX_SOURCE, which is predefined and required
14801 # on some systems where configure will not decide to define it.
14802 if (defundef == "undef") {
14803 print "/*", prefix defundef, macro, "*/"
14804 next
14805 }
14806 }
14807}
14808{ print }
14809_ACAWK
14810_ACEOF
14811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014812 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014813fi # test -n "$CONFIG_HEADERS"
14814
14815
14816eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14817shift
14818for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014819do
14820 case $ac_tag in
14821 :[FHLC]) ac_mode=$ac_tag; continue;;
14822 esac
14823 case $ac_mode$ac_tag in
14824 :[FHL]*:*);;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014825 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014826 :[FH]-) ac_tag=-:-;;
14827 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14828 esac
14829 ac_save_IFS=$IFS
14830 IFS=:
14831 set x $ac_tag
14832 IFS=$ac_save_IFS
14833 shift
14834 ac_file=$1
14835 shift
14836
14837 case $ac_mode in
14838 :L) ac_source=$1;;
14839 :[FH])
14840 ac_file_inputs=
14841 for ac_f
14842 do
14843 case $ac_f in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014844 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014845 *) # Look for the file first in the build tree, then in the source tree
14846 # (if the path is not absolute). The absolute path cannot be DOS-style,
14847 # because $ac_f cannot contain `:'.
14848 test -f "$ac_f" ||
14849 case $ac_f in
14850 [\\/$]*) false;;
14851 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14852 esac ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014853 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014854 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014855 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14856 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014857 done
14858
14859 # Let's still pretend it is `configure' which instantiates (i.e., don't
14860 # use $as_me), people would be surprised to read:
14861 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014862 configure_input='Generated from '`
14863 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14864 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014865 if test x"$ac_file" != x-; then
14866 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014867 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14868$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014869 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014870 # Neutralize special characters interpreted by sed in replacement strings.
14871 case $configure_input in #(
14872 *\&* | *\|* | *\\* )
14873 ac_sed_conf_input=`$as_echo "$configure_input" |
14874 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14875 *) ac_sed_conf_input=$configure_input;;
14876 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014877
14878 case $ac_tag in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014879 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14880 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014881 esac
14882 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014883 esac
14884
Martin v. Löwiseba40652007-08-30 20:10:57 +000014885 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014886$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014887 X"$ac_file" : 'X\(//\)[^/]' \| \
14888 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000014889 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014890$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014891 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14892 s//\1/
14893 q
14894 }
14895 /^X\(\/\/\)[^/].*/{
14896 s//\1/
14897 q
14898 }
14899 /^X\(\/\/\)$/{
14900 s//\1/
14901 q
14902 }
14903 /^X\(\/\).*/{
14904 s//\1/
14905 q
14906 }
14907 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014908 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014909 ac_builddir=.
14910
Martin v. Löwiseba40652007-08-30 20:10:57 +000014911case "$ac_dir" in
14912.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14913*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014914 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014915 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014916 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014917 case $ac_top_builddir_sub in
14918 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14919 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14920 esac ;;
14921esac
14922ac_abs_top_builddir=$ac_pwd
14923ac_abs_builddir=$ac_pwd$ac_dir_suffix
14924# for backward compatibility:
14925ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014926
14927case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014928 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014929 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014930 ac_top_srcdir=$ac_top_builddir_sub
14931 ac_abs_top_srcdir=$ac_pwd ;;
14932 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014934 ac_top_srcdir=$srcdir
14935 ac_abs_top_srcdir=$srcdir ;;
14936 *) # Relative name.
14937 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14938 ac_top_srcdir=$ac_top_build_prefix$srcdir
14939 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014940esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014941ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014942
Martin v. Löwis11437992002-04-12 09:54:03 +000014943
Martin v. Löwiseba40652007-08-30 20:10:57 +000014944 case $ac_mode in
14945 :F)
14946 #
14947 # CONFIG_FILE
14948 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014949
14950 case $INSTALL in
14951 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 esac
Brett Cannon19fab762007-06-02 03:02:29 +000014954_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014955
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014957# If the template does not know about datarootdir, expand it.
14958# FIXME: This hack should be removed a few years after 2.60.
14959ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014960ac_sed_dataroot='
14961/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000014962 p
14963 q
14964}
14965/@datadir@/p
14966/@docdir@/p
14967/@infodir@/p
14968/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014969/@mandir@/p'
14970case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014971*datarootdir*) ac_datarootdir_seen=yes;;
14972*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014973 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14974$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014975_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014976cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977 ac_datarootdir_hack='
14978 s&@datadir@&$datadir&g
14979 s&@docdir@&$docdir&g
14980 s&@infodir@&$infodir&g
14981 s&@localedir@&$localedir&g
14982 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014983 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014984esac
14985_ACEOF
14986
14987# Neutralize VPATH when `$srcdir' = `.'.
14988# Shell code in configure.ac might set extrasub.
14989# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014990cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14991ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014992$extrasub
14993_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014995:t
14996/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014997s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000014998s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014999s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015000s&@srcdir@&$ac_srcdir&;t t
15001s&@abs_srcdir@&$ac_abs_srcdir&;t t
15002s&@top_srcdir@&$ac_top_srcdir&;t t
15003s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15004s&@builddir@&$ac_builddir&;t t
15005s&@abs_builddir@&$ac_abs_builddir&;t t
15006s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15007s&@INSTALL@&$ac_INSTALL&;t t
15008$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015009"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015010eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15011 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015012
Martin v. Löwiseba40652007-08-30 20:10:57 +000015013test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015014 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15015 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15016 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015017 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015018which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015019$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015020which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015021
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015022 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 case $ac_file in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015024 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15025 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015026 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015027 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015028 ;;
15029 :H)
15030 #
15031 # CONFIG_HEADER
15032 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015034 {
15035 $as_echo "/* $configure_input */" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015036 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15037 } >"$ac_tmp/config.h" \
15038 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15039 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015040 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15041$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015043 rm -f "$ac_file"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015044 mv "$ac_tmp/config.h" "$ac_file" \
15045 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 fi
15047 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015048 $as_echo "/* $configure_input */" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015049 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15050 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015052 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015053
Martin v. Löwiseba40652007-08-30 20:10:57 +000015054
15055 esac
15056
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015057
15058 case $ac_file$ac_mode in
15059 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15060
15061 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015062done # for ac_tag
15063
Guido van Rossum627b2d71993-12-24 10:39:16 +000015064
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015065as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015066_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015067ac_clean_files=$ac_clean_files_save
15068
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015069test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015070 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015071
Martin v. Löwis11437992002-04-12 09:54:03 +000015072
15073# configure is writing to config.log, and then calls config.status.
15074# config.status does its own redirection, appending to config.log.
15075# Unfortunately, on DOS this fails, as config.log is still kept open
15076# by configure, so config.status won't be able to write to it; its
15077# output is simply discarded. So we exec the FD to /dev/null,
15078# effectively closing config.log, so it can be properly (re)opened and
15079# appended to by config.status. When coming back to configure, we
15080# need to make the FD available again.
15081if test "$no_create" != yes; then
15082 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015083 ac_config_status_args=
15084 test "$silent" = yes &&
15085 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015087 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 exec 5>>config.log
15089 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15090 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015091 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015092fi
15093if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15094 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15095$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015096fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015097
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015098
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015099echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015100if test ! -f Modules/Setup
15101then
15102 cp $srcdir/Modules/Setup.dist Modules/Setup
15103fi
15104
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015105echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015106if test ! -f Modules/Setup.local
15107then
15108 echo "# Edit this file for local setup changes" >Modules/Setup.local
15109fi
15110
15111echo "creating Makefile"
15112$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15113 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015114 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015115
15116case $ac_sys_system in
15117BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015118 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015119
15120 Support for BeOS is deprecated as of Python 2.6.
15121 See PEP 11 for the gory details.
15122 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015123$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015124
15125 Support for BeOS is deprecated as of Python 2.6.
15126 See PEP 11 for the gory details.
15127 " >&2;}
15128 ;;
15129*) ;;
15130esac
15131
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015132mv config.c Modules