blob: 25c4acf8bb55feeab2ac04bae357091904b4e1dc [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004# 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.
Matthias Klose3cef2a92012-03-14 23:39:33 +010095as_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.
Matthias Klose3cef2a92012-03-14 23:39:33 +0100221 # 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
Matthias Klose3cef2a92012-03-14 23:39:33 +0100226 case $- in # ((((
227 *v*x* | *x*v* ) as_opts=-vx ;;
228 *v* ) as_opts=-v ;;
229 *x* ) as_opts=-x ;;
230 * ) as_opts= ;;
231 esac
232 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000233fi
234
235 if test x$as_have_required = xno; then :
236 $as_echo "$0: This script requires a shell more modern than all"
237 $as_echo "$0: the shells that I found on your system."
238 if test x${ZSH_VERSION+set} = xset ; then
239 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241 else
242 $as_echo "$0: Please tell bug-autoconf@gnu.org and
243$0: http://bugs.python.org/ about your system, including
244$0: any error possibly output before this message. Then
245$0: install a modern shell, or manually run the script
246$0: under such a shell if you do have one."
247 fi
248 exit 1
249fi
250fi
251fi
252SHELL=${CONFIG_SHELL-/bin/sh}
253export SHELL
254# Unset more variables known to interfere with behavior of common tools.
255CLICOLOR_FORCE= GREP_OPTIONS=
256unset CLICOLOR_FORCE GREP_OPTIONS
257
258## --------------------- ##
259## M4sh Shell Functions. ##
260## --------------------- ##
261# as_fn_unset VAR
262# ---------------
263# Portably unset VAR.
264as_fn_unset ()
265{
266 { eval $1=; unset $1;}
267}
268as_unset=as_fn_unset
269
270# as_fn_set_status STATUS
271# -----------------------
272# Set $? to STATUS, without forking.
273as_fn_set_status ()
274{
275 return $1
276} # as_fn_set_status
277
278# as_fn_exit STATUS
279# -----------------
280# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281as_fn_exit ()
282{
283 set +e
284 as_fn_set_status $1
285 exit $1
286} # as_fn_exit
287
288# as_fn_mkdir_p
289# -------------
290# Create "$as_dir" as a directory, including parents if necessary.
291as_fn_mkdir_p ()
292{
293
294 case $as_dir in #(
295 -*) as_dir=./$as_dir;;
296 esac
297 test -d "$as_dir" || eval $as_mkdir_p || {
298 as_dirs=
299 while :; do
300 case $as_dir in #(
301 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302 *) as_qdir=$as_dir;;
303 esac
304 as_dirs="'$as_qdir' $as_dirs"
305 as_dir=`$as_dirname -- "$as_dir" ||
306$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307 X"$as_dir" : 'X\(//\)[^/]' \| \
308 X"$as_dir" : 'X\(//\)$' \| \
309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310$as_echo X"$as_dir" |
311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\/\)[^/].*/{
316 s//\1/
317 q
318 }
319 /^X\(\/\/\)$/{
320 s//\1/
321 q
322 }
323 /^X\(\/\).*/{
324 s//\1/
325 q
326 }
327 s/.*/./; q'`
328 test -d "$as_dir" && break
329 done
330 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000332
333
334} # as_fn_mkdir_p
335# as_fn_append VAR VALUE
336# ----------------------
337# Append the text in VALUE to the end of the definition contained in VAR. Take
338# advantage of any shell optimizations that allow amortized linear growth over
339# repeated appends, instead of the typical quadratic growth present in naive
340# implementations.
341if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
342 eval 'as_fn_append ()
343 {
344 eval $1+=\$2
345 }'
346else
347 as_fn_append ()
348 {
349 eval $1=\$$1\$2
350 }
351fi # as_fn_append
352
353# as_fn_arith ARG...
354# ------------------
355# Perform arithmetic evaluation on the ARGs, and store the result in the
356# global $as_val. Take advantage of shells that can avoid forks. The arguments
357# must be portable across $(()) and expr.
358if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359 eval 'as_fn_arith ()
360 {
361 as_val=$(( $* ))
362 }'
363else
364 as_fn_arith ()
365 {
366 as_val=`expr "$@" || test $? -eq 1`
367 }
368fi # as_fn_arith
369
370
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000373# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
374# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000375# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000376as_fn_error ()
377{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000378 as_status=$1; test $as_status -eq 0 && as_status=1
379 if test "$4"; then
380 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
381 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000382 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000383 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000384 as_fn_exit $as_status
385} # as_fn_error
386
Martin v. Löwiseba40652007-08-30 20:10:57 +0000387if expr a : '\(a\)' >/dev/null 2>&1 &&
388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
389 as_expr=expr
390else
391 as_expr=false
392fi
393
394if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
395 as_basename=basename
396else
397 as_basename=false
398fi
399
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000405
Martin v. Löwiseba40652007-08-30 20:10:57 +0000406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000410$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000411 sed '/^.*\/\([^/][^/]*\)\/*$/{
412 s//\1/
413 q
414 }
415 /^X\/\(\/\/\)$/{
416 s//\1/
417 q
418 }
419 /^X\/\(\/\).*/{
420 s//\1/
421 q
422 }
423 s/.*/./; q'`
424
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000425# Avoid depending upon Character Ranges.
426as_cr_letters='abcdefghijklmnopqrstuvwxyz'
427as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
428as_cr_Letters=$as_cr_letters$as_cr_LETTERS
429as_cr_digits='0123456789'
430as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000431
432
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000433 as_lineno_1=$LINENO as_lineno_1a=$LINENO
434 as_lineno_2=$LINENO as_lineno_2a=$LINENO
435 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
436 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
437 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000453 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000454 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000455
456 # Don't try to exec as it changes $[0], causing all sort of problems
457 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000458 # original and so on. Autoconf is especially sensitive to this).
459 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 # Exit status is that of the last command.
461 exit
462}
463
Martin v. Löwiseba40652007-08-30 20:10:57 +0000464ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000465case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000466-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000467 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000472 esac;;
473*)
474 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000476
Martin v. Löwis11437992002-04-12 09:54:03 +0000477rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000482 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000483fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000484if (echo >conf$$.file) 2>/dev/null; then
485 if ln -s conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s='ln -s'
487 # ... but there are two gotchas:
488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
490 # In both cases, we have to default to `cp -p'.
491 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492 as_ln_s='cp -p'
493 elif ln conf$$.file conf$$ 2>/dev/null; then
494 as_ln_s=ln
495 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000498else
499 as_ln_s='cp -p'
500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000501rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
502rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000503
Skip Montanaro6dead952003-09-25 14:50:04 +0000504if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000506else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000507 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000508 as_mkdir_p=false
509fi
510
Martin v. Löwiseba40652007-08-30 20:10:57 +0000511if test -x / >/dev/null 2>&1; then
512 as_test_x='test -x'
513else
514 if ls -dL / >/dev/null 2>&1; then
515 as_ls_L_option=L
516 else
517 as_ls_L_option=
518 fi
519 as_test_x='
520 eval sh -c '\''
521 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524 case $1 in #(
525 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000526 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000528 ???[sx]*):;;*)false;;esac;fi
529 '\'' sh
530 '
531fi
532as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000533
534# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000535as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000536
537# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000539
540
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000541test -n "$DJDIR" || exec 7<&0 </dev/null
542exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
544# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000545# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000546# so uname gets run too.
547ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
548
Martin v. Löwis11437992002-04-12 09:54:03 +0000549#
550# Initializations.
551#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000552ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000553ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000554ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000556cross_compiling=no
557subdirs=
558MFLAGS=
559MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
Martin v. Löwis11437992002-04-12 09:54:03 +0000561# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000562PACKAGE_NAME='python'
563PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000564PACKAGE_VERSION='2.7'
565PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000566PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000567PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569ac_unique_file="Include/object.h"
570# Factoring default headers for most tests.
571ac_includes_default="\
572#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000574# include <sys/types.h>
575#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000576#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000577# include <sys/stat.h>
578#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000579#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <stdlib.h>
581# include <stddef.h>
582#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000583# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000584# include <stdlib.h>
585# endif
586#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000587#ifdef HAVE_STRING_H
588# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <memory.h>
590# endif
591# include <string.h>
592#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <strings.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef HAVE_STDINT_H
600# include <stdint.h>
601#endif
602#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <unistd.h>
604#endif"
605
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000606ac_subst_vars='LTLIBOBJS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000607SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000608THREADHEADERS
609UNICODE_OBJS
610LIBC
611LIBM
612HAVE_GETHOSTBYNAME
613HAVE_GETHOSTBYNAME_R
614HAVE_GETHOSTBYNAME_R_3_ARG
615HAVE_GETHOSTBYNAME_R_5_ARG
616HAVE_GETHOSTBYNAME_R_6_ARG
617LIBOBJS
618TRUE
619MACHDEP_OBJS
620DYNLOADFILE
621DLINCLDIR
622THREADOBJ
623LDLAST
624USE_THREAD_MODULE
625SIGNAL_OBJS
626USE_SIGNAL_MODULE
627LIBFFI_INCLUDEDIR
628PKG_CONFIG
629SHLIBS
630CFLAGSFORSHARED
631LINKFORSHARED
632CCSHARED
633BLDSHARED
634LDCXXSHARED
635LDSHARED
636SO
637LIBTOOL_CRUFT
638OTHER_LIBTOOL_OPT
639UNIVERSAL_ARCH_FLAGS
640BASECFLAGS
641OPT
642LN
643INSTALL_DATA
644INSTALL_SCRIPT
645INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100646HAS_HG
647HGBRANCH
648HGTAG
649HGVERSION
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650SVNVERSION
651ARFLAGS
652AR
653RANLIB
654GNULD
655LINKCC
656RUNSHARED
657INSTSONAME
658LDLIBRARYDIR
659BLDLIBRARY
660DLLLIBRARY
661LDLIBRARY
662LIBRARY
663BUILDEXEEXT
664EGREP
665GREP
666CPP
667MAINCC
668CXX
669OBJEXT
670EXEEXT
671ac_ct_CC
672CPPFLAGS
673LDFLAGS
674CFLAGS
675CC
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CONFIGURE_MACOSX_DEPLOYMENT_TARGET
678EXTRAMACHDEPPATH
679EXTRAPLATDIR
680SGI_ABI
681MACHDEP
682FRAMEWORKINSTALLAPPSPREFIX
683FRAMEWORKUNIXTOOLSPREFIX
684FRAMEWORKALTINSTALLLAST
685FRAMEWORKALTINSTALLFIRST
686FRAMEWORKINSTALLLAST
687FRAMEWORKINSTALLFIRST
688PYTHONFRAMEWORKINSTALLDIR
689PYTHONFRAMEWORKPREFIX
690PYTHONFRAMEWORKDIR
691PYTHONFRAMEWORKIDENTIFIER
692PYTHONFRAMEWORK
693LIPO_32BIT_FLAGS
694ARCH_RUN_32BIT
695UNIVERSALSDK
696CONFIG_ARGS
697SOVERSION
698VERSION
699target_alias
700host_alias
701build_alias
702LIBS
703ECHO_T
704ECHO_N
705ECHO_C
706DEFS
707mandir
708localedir
709libdir
710psdir
711pdfdir
712dvidir
713htmldir
714infodir
715docdir
716oldincludedir
717includedir
718localstatedir
719sharedstatedir
720sysconfdir
721datadir
722datarootdir
723libexecdir
724sbindir
725bindir
726program_transform_name
727prefix
728exec_prefix
729PACKAGE_URL
730PACKAGE_BUGREPORT
731PACKAGE_STRING
732PACKAGE_VERSION
733PACKAGE_TARNAME
734PACKAGE_NAME
735PATH_SEPARATOR
736SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000738ac_user_opts='
739enable_option_checking
740enable_universalsdk
741with_universal_archs
742with_framework_name
743enable_framework
744with_gcc
745with_cxx_main
746with_suffix
747enable_shared
748enable_profiling
749with_pydebug
750enable_toolbox_glue
751with_libs
752with_system_expat
753with_system_ffi
754with_dbmliborder
755with_signal_module
756with_dec_threads
757with_threads
758with_thread
759with_pth
760enable_ipv6
761with_doc_strings
762with_tsc
763with_pymalloc
764with_valgrind
765with_wctype_functions
766with_fpectl
767with_libm
768with_libc
769enable_big_digits
770enable_unicode
771'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000772 ac_precious_vars='build_alias
773host_alias
774target_alias
775CC
776CFLAGS
777LDFLAGS
778LIBS
779CPPFLAGS
780CPP'
781
Guido van Rossum627b2d71993-12-24 10:39:16 +0000782
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000784ac_init_help=
785ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000786ac_unrecognized_opts=
787ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788# The variables have the same names as the options, with
789# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000790cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793no_recursion=
794prefix=NONE
795program_prefix=NONE
796program_suffix=NONE
797program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000799site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802x_includes=NONE
803x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000804
805# Installation directory options.
806# These are left unexpanded so users can "make install exec_prefix=/foo"
807# and all the variables that are supposed to be based on exec_prefix
808# by default will actually change.
809# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000810# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000811bindir='${exec_prefix}/bin'
812sbindir='${exec_prefix}/sbin'
813libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000814datarootdir='${prefix}/share'
815datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816sysconfdir='${prefix}/etc'
817sharedstatedir='${prefix}/com'
818localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819includedir='${prefix}/include'
820oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000821docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
822infodir='${datarootdir}/info'
823htmldir='${docdir}'
824dvidir='${docdir}'
825pdfdir='${docdir}'
826psdir='${docdir}'
827libdir='${exec_prefix}/lib'
828localedir='${datarootdir}/locale'
829mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000832ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835 # If the previous option needs an argument, assign it.
836 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838 ac_prev=
839 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000843 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
844 *=) ac_optarg= ;;
845 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000846 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848 # Accept the important Cygnus configure options, so we can diagnose typos.
849
Martin v. Löwiseba40652007-08-30 20:10:57 +0000850 case $ac_dashdash$ac_option in
851 --)
852 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854 -bindir | --bindir | --bindi | --bind | --bin | --bi)
855 ac_prev=bindir ;;
856 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858
859 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864 -cache-file | --cache-file | --cache-fil | --cache-fi \
865 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
866 ac_prev=cache_file ;;
867 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
868 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 cache_file=$ac_optarg ;;
870
871 --config-cache | -C)
872 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873
Martin v. Löwiseba40652007-08-30 20:10:57 +0000874 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000876 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878
Martin v. Löwiseba40652007-08-30 20:10:57 +0000879 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
880 | --dataroo | --dataro | --datar)
881 ac_prev=datarootdir ;;
882 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
883 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
884 datarootdir=$ac_optarg ;;
885
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000887 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000889 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000890 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000891 ac_useropt_orig=$ac_useropt
892 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
893 case $ac_user_opts in
894 *"
895"enable_$ac_useropt"
896"*) ;;
897 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
898 ac_unrecognized_sep=', ';;
899 esac
900 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000901
902 -docdir | --docdir | --docdi | --doc | --do)
903 ac_prev=docdir ;;
904 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
905 docdir=$ac_optarg ;;
906
907 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
908 ac_prev=dvidir ;;
909 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
910 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
912 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000913 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000915 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000916 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000917 ac_useropt_orig=$ac_useropt
918 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
919 case $ac_user_opts in
920 *"
921"enable_$ac_useropt"
922"*) ;;
923 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
924 ac_unrecognized_sep=', ';;
925 esac
926 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
929 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
930 | --exec | --exe | --ex)
931 ac_prev=exec_prefix ;;
932 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
933 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
934 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
937 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938 # Obsolete; use --with-gas.
939 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 -help | --help | --hel | --he | -h)
942 ac_init_help=long ;;
943 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
944 ac_init_help=recursive ;;
945 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
946 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947
948 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
Martin v. Löwiseba40652007-08-30 20:10:57 +0000953 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
954 ac_prev=htmldir ;;
955 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
956 | --ht=*)
957 htmldir=$ac_optarg ;;
958
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 -includedir | --includedir | --includedi | --included | --include \
960 | --includ | --inclu | --incl | --inc)
961 ac_prev=includedir ;;
962 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
963 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965
966 -infodir | --infodir | --infodi | --infod | --info | --inf)
967 ac_prev=infodir ;;
968 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
971 -libdir | --libdir | --libdi | --libd)
972 ac_prev=libdir ;;
973 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
976 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
977 | --libexe | --libex | --libe)
978 ac_prev=libexecdir ;;
979 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
980 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
Martin v. Löwiseba40652007-08-30 20:10:57 +0000983 -localedir | --localedir | --localedi | --localed | --locale)
984 ac_prev=localedir ;;
985 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
986 localedir=$ac_optarg ;;
987
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000988 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000989 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990 ac_prev=localstatedir ;;
991 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000992 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994
995 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
996 ac_prev=mandir ;;
997 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 # Obsolete; use --without-fp.
1002 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
1004 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 no_create=yes ;;
1007
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1009 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1010 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1013 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1014 | --oldin | --oldi | --old | --ol | --o)
1015 ac_prev=oldincludedir ;;
1016 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1017 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1018 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1022 ac_prev=prefix ;;
1023 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1027 | --program-pre | --program-pr | --program-p)
1028 ac_prev=program_prefix ;;
1029 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1030 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
1033 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1034 | --program-suf | --program-su | --program-s)
1035 ac_prev=program_suffix ;;
1036 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1037 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
1040 -program-transform-name | --program-transform-name \
1041 | --program-transform-nam | --program-transform-na \
1042 | --program-transform-n | --program-transform- \
1043 | --program-transform | --program-transfor \
1044 | --program-transfo | --program-transf \
1045 | --program-trans | --program-tran \
1046 | --progr-tra | --program-tr | --program-t)
1047 ac_prev=program_transform_name ;;
1048 -program-transform-name=* | --program-transform-name=* \
1049 | --program-transform-nam=* | --program-transform-na=* \
1050 | --program-transform-n=* | --program-transform-=* \
1051 | --program-transform=* | --program-transfor=* \
1052 | --program-transfo=* | --program-transf=* \
1053 | --program-trans=* | --program-tran=* \
1054 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
Martin v. Löwiseba40652007-08-30 20:10:57 +00001057 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1058 ac_prev=pdfdir ;;
1059 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1060 pdfdir=$ac_optarg ;;
1061
1062 -psdir | --psdir | --psdi | --psd | --ps)
1063 ac_prev=psdir ;;
1064 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1065 psdir=$ac_optarg ;;
1066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1068 | -silent | --silent | --silen | --sile | --sil)
1069 silent=yes ;;
1070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1072 ac_prev=sbindir ;;
1073 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1074 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
1077 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1078 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1079 | --sharedst | --shareds | --shared | --share | --shar \
1080 | --sha | --sh)
1081 ac_prev=sharedstatedir ;;
1082 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1083 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1084 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1085 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -site | --site | --sit)
1089 ac_prev=site ;;
1090 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1094 ac_prev=srcdir ;;
1095 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1099 | --syscon | --sysco | --sysc | --sys | --sy)
1100 ac_prev=sysconfdir ;;
1101 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1102 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001104
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1111 verbose=yes ;;
1112
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 -version | --version | --versio | --versi | --vers | -V)
1114 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001117 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001120 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001121 ac_useropt_orig=$ac_useropt
1122 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1123 case $ac_user_opts in
1124 *"
1125"with_$ac_useropt"
1126"*) ;;
1127 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1128 ac_unrecognized_sep=', ';;
1129 esac
1130 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
1132 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001133 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001135 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001136 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001137 ac_useropt_orig=$ac_useropt
1138 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139 case $ac_user_opts in
1140 *"
1141"with_$ac_useropt"
1142"*) ;;
1143 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1144 ac_unrecognized_sep=', ';;
1145 esac
1146 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 --x)
1149 # Obsolete; use --with-x.
1150 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
1152 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1153 | --x-incl | --x-inc | --x-in | --x-i)
1154 ac_prev=x_includes ;;
1155 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1156 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
1159 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1160 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1161 ac_prev=x_libraries ;;
1162 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1163 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001166 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1167Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168 ;;
1169
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 *=*)
1171 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1172 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001173 case $ac_envvar in #(
1174 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001175 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001176 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001177 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 export $ac_envvar ;;
1179
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001182 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001184 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001185 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ;;
1187
1188 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001189done
1190
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001193 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194fi
1195
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001196if test -n "$ac_unrecognized_opts"; then
1197 case $enable_option_checking in
1198 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001199 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001200 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1201 esac
1202fi
1203
1204# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001205for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1206 datadir sysconfdir sharedstatedir localstatedir includedir \
1207 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1208 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001210 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001211 # Remove trailing slashes.
1212 case $ac_val in
1213 */ )
1214 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1215 eval $ac_var=\$ac_val;;
1216 esac
1217 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001219 [\\/$]* | ?:[\\/]* ) continue;;
1220 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001222 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001223done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224
Martin v. Löwis11437992002-04-12 09:54:03 +00001225# There might be people who depend on the old broken behavior: `$host'
1226# used to hold the argument of --host etc.
1227# FIXME: To remove some day.
1228build=$build_alias
1229host=$host_alias
1230target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231
Martin v. Löwis11437992002-04-12 09:54:03 +00001232# FIXME: To remove some day.
1233if test "x$host_alias" != x; then
1234 if test "x$build_alias" = x; then
1235 cross_compiling=maybe
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001236 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1237 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 elif test "x$build_alias" != "x$host_alias"; then
1239 cross_compiling=yes
1240 fi
1241fi
1242
1243ac_tool_prefix=
1244test -n "$host_alias" && ac_tool_prefix=$host_alias-
1245
1246test "$silent" = yes && exec 6>/dev/null
1247
Guido van Rossum627b2d71993-12-24 10:39:16 +00001248
Martin v. Löwiseba40652007-08-30 20:10:57 +00001249ac_pwd=`pwd` && test -n "$ac_pwd" &&
1250ac_ls_di=`ls -di .` &&
1251ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001252 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001253test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001254 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001255
1256
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257# Find the source files, if location was not specified.
1258if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001260 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001261 ac_confdir=`$as_dirname -- "$as_myself" ||
1262$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1263 X"$as_myself" : 'X\(//\)[^/]' \| \
1264 X"$as_myself" : 'X\(//\)$' \| \
1265 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1266$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001267 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\/\)[^/].*/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\/\)$/{
1276 s//\1/
1277 q
1278 }
1279 /^X\(\/\).*/{
1280 s//\1/
1281 q
1282 }
1283 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001285 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286 srcdir=..
1287 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288else
1289 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001291if test ! -r "$srcdir/$ac_unique_file"; then
1292 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001293 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001295ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1296ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001297 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001298 pwd)`
1299# When building in place, set srcdir=.
1300if test "$ac_abs_confdir" = "$ac_pwd"; then
1301 srcdir=.
1302fi
1303# Remove unnecessary trailing slashes from srcdir.
1304# Double slashes in file names in object file debugging info
1305# mess up M-x gdb in Emacs.
1306case $srcdir in
1307*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1308esac
1309for ac_var in $ac_precious_vars; do
1310 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1311 eval ac_env_${ac_var}_value=\$${ac_var}
1312 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1313 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1314done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316#
1317# Report the --help message.
1318#
1319if test "$ac_init_help" = "long"; then
1320 # Omit some internal or obsolete options to make the list less imposing.
1321 # This message is too long to be a string in the A/UX 3.1 sh.
1322 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001323\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001324
1325Usage: $0 [OPTION]... [VAR=VALUE]...
1326
1327To assign environment variables (e.g., CC, CFLAGS...), specify them as
1328VAR=VALUE. See below for descriptions of some of the useful variables.
1329
1330Defaults for the options are specified in brackets.
1331
1332Configuration:
1333 -h, --help display this help and exit
1334 --help=short display options specific to this package
1335 --help=recursive display the short help of all the included packages
1336 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001337 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001338 --cache-file=FILE cache test results in FILE [disabled]
1339 -C, --config-cache alias for \`--cache-file=config.cache'
1340 -n, --no-create do not create output files
1341 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1342
Martin v. Löwis11437992002-04-12 09:54:03 +00001343Installation directories:
1344 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001345 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001346 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001347 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001348
1349By default, \`make install' will install all the files in
1350\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1351an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1352for instance \`--prefix=\$HOME'.
1353
1354For better control, use the options below.
1355
1356Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001357 --bindir=DIR user executables [EPREFIX/bin]
1358 --sbindir=DIR system admin executables [EPREFIX/sbin]
1359 --libexecdir=DIR program executables [EPREFIX/libexec]
1360 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1361 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1362 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1363 --libdir=DIR object code libraries [EPREFIX/lib]
1364 --includedir=DIR C header files [PREFIX/include]
1365 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1366 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1367 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1368 --infodir=DIR info documentation [DATAROOTDIR/info]
1369 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1370 --mandir=DIR man documentation [DATAROOTDIR/man]
1371 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1372 --htmldir=DIR html documentation [DOCDIR]
1373 --dvidir=DIR dvi documentation [DOCDIR]
1374 --pdfdir=DIR pdf documentation [DOCDIR]
1375 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001376_ACEOF
1377
1378 cat <<\_ACEOF
1379_ACEOF
1380fi
1381
1382if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001383 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001384 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001385 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 cat <<\_ACEOF
1387
1388Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001389 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1391 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001392 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001393 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001394 --enable-framework[=INSTALLDIR]
1395 Build (MacOSX|Darwin) framework
1396 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001397 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001398 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1399 --enable-ipv6 Enable ipv6 (with ipv4) support
1400 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001401 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001402 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001403 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001404 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Optional Packages:
1407 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1408 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001409 --with-universal-archs=ARCH
1410 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001411 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001412 --with-framework-name=FRAMEWORK
1413 specify an alternate name of the framework built
1414 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001416 --with-cxx-main=<compiler>
1417 compile main() and link python executable with C++
1418 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-suffix=.exe set executable suffix
1420 --with-pydebug build with Py_DEBUG defined
1421 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001422 --with-system-expat build pyexpat module using an installed expat
1423 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001424 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001425 --with-dbmliborder=db1:db2:...
1426 order to check db backends for dbm. Valid value is a
1427 colon separated string with the backend names
1428 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-signal-module disable/enable signal module
1430 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1431 --with(out)-threads[=DIRECTORY]
1432 disable/enable thread support
1433 --with(out)-thread[=DIRECTORY]
1434 deprecated; use --with(out)-threads
1435 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001437 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001439 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001441 --with-fpectl enable SIGFPE catching
1442 --with-libm=STRING math library
1443 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001444
1445Some influential environment variables:
1446 CC C compiler command
1447 CFLAGS C compiler flags
1448 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1449 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001450 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001451 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 CPP C preprocessor
1454
1455Use these variables to override the choices made by `configure' or to help
1456it to find libraries and programs with nonstandard names/locations.
1457
Georg Brandl464432d2009-05-20 18:24:08 +00001458Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001460ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001461fi
1462
1463if test "$ac_init_help" = "recursive"; then
1464 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001466 test -d "$ac_dir" ||
1467 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1468 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 ac_builddir=.
1470
Martin v. Löwiseba40652007-08-30 20:10:57 +00001471case "$ac_dir" in
1472.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1473*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001474 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001475 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001476 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001477 case $ac_top_builddir_sub in
1478 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1479 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1480 esac ;;
1481esac
1482ac_abs_top_builddir=$ac_pwd
1483ac_abs_builddir=$ac_pwd$ac_dir_suffix
1484# for backward compatibility:
1485ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001486
1487case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001488 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001489 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001490 ac_top_srcdir=$ac_top_builddir_sub
1491 ac_abs_top_srcdir=$ac_pwd ;;
1492 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001494 ac_top_srcdir=$srcdir
1495 ac_abs_top_srcdir=$srcdir ;;
1496 *) # Relative name.
1497 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1498 ac_top_srcdir=$ac_top_build_prefix$srcdir
1499 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001500esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001501ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001502
Martin v. Löwiseba40652007-08-30 20:10:57 +00001503 cd "$ac_dir" || { ac_status=$?; continue; }
1504 # Check for guested configure.
1505 if test -f "$ac_srcdir/configure.gnu"; then
1506 echo &&
1507 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1508 elif test -f "$ac_srcdir/configure"; then
1509 echo &&
1510 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001511 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001512 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001513 fi || ac_status=$?
1514 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 done
1516fi
1517
Martin v. Löwiseba40652007-08-30 20:10:57 +00001518test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001519if $ac_init_version; then
1520 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001521python configure 2.7
Matthias Klose3cef2a92012-03-14 23:39:33 +01001522generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001523
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001524Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001525This configure script is free software; the Free Software Foundation
1526gives unlimited permission to copy, distribute and modify it.
1527_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001528 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001529fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001530
1531## ------------------------ ##
1532## Autoconf initialization. ##
1533## ------------------------ ##
1534
1535# ac_fn_c_try_compile LINENO
1536# --------------------------
1537# Try to compile conftest.$ac_ext, and return whether this succeeded.
1538ac_fn_c_try_compile ()
1539{
1540 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1541 rm -f conftest.$ac_objext
1542 if { { ac_try="$ac_compile"
1543case "(($ac_try" in
1544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1545 *) ac_try_echo=$ac_try;;
1546esac
1547eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1548$as_echo "$ac_try_echo"; } >&5
1549 (eval "$ac_compile") 2>conftest.err
1550 ac_status=$?
1551 if test -s conftest.err; then
1552 grep -v '^ *+' conftest.err >conftest.er1
1553 cat conftest.er1 >&5
1554 mv -f conftest.er1 conftest.err
1555 fi
1556 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1557 test $ac_status = 0; } && {
1558 test -z "$ac_c_werror_flag" ||
1559 test ! -s conftest.err
1560 } && test -s conftest.$ac_objext; then :
1561 ac_retval=0
1562else
1563 $as_echo "$as_me: failed program was:" >&5
1564sed 's/^/| /' conftest.$ac_ext >&5
1565
1566 ac_retval=1
1567fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001568 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001569 as_fn_set_status $ac_retval
1570
1571} # ac_fn_c_try_compile
1572
1573# ac_fn_c_try_cpp LINENO
1574# ----------------------
1575# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1576ac_fn_c_try_cpp ()
1577{
1578 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1579 if { { ac_try="$ac_cpp conftest.$ac_ext"
1580case "(($ac_try" in
1581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1582 *) ac_try_echo=$ac_try;;
1583esac
1584eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1585$as_echo "$ac_try_echo"; } >&5
1586 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1587 ac_status=$?
1588 if test -s conftest.err; then
1589 grep -v '^ *+' conftest.err >conftest.er1
1590 cat conftest.er1 >&5
1591 mv -f conftest.er1 conftest.err
1592 fi
1593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001594 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001595 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1596 test ! -s conftest.err
1597 }; then :
1598 ac_retval=0
1599else
1600 $as_echo "$as_me: failed program was:" >&5
1601sed 's/^/| /' conftest.$ac_ext >&5
1602
1603 ac_retval=1
1604fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001605 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001606 as_fn_set_status $ac_retval
1607
1608} # ac_fn_c_try_cpp
1609
1610# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1611# -------------------------------------------------------
1612# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1613# the include files in INCLUDES and setting the cache variable VAR
1614# accordingly.
1615ac_fn_c_check_header_mongrel ()
1616{
1617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001618 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1620$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001621if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001622 $as_echo_n "(cached) " >&6
1623fi
1624eval ac_res=\$$3
1625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1626$as_echo "$ac_res" >&6; }
1627else
1628 # Is the header compilable?
1629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1630$as_echo_n "checking $2 usability... " >&6; }
1631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1632/* end confdefs.h. */
1633$4
1634#include <$2>
1635_ACEOF
1636if ac_fn_c_try_compile "$LINENO"; then :
1637 ac_header_compiler=yes
1638else
1639 ac_header_compiler=no
1640fi
1641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1643$as_echo "$ac_header_compiler" >&6; }
1644
1645# Is the header present?
1646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1647$as_echo_n "checking $2 presence... " >&6; }
1648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1649/* end confdefs.h. */
1650#include <$2>
1651_ACEOF
1652if ac_fn_c_try_cpp "$LINENO"; then :
1653 ac_header_preproc=yes
1654else
1655 ac_header_preproc=no
1656fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001657rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1659$as_echo "$ac_header_preproc" >&6; }
1660
1661# So? What about this header?
1662case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1663 yes:no: )
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1665$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1667$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1668 ;;
1669 no:yes:* )
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1671$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1673$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1675$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1677$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1679$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001680( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001681## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001682## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001683 ) | sed "s/^/$as_me: WARNING: /" >&2
1684 ;;
1685esac
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1687$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001688if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001689 $as_echo_n "(cached) " >&6
1690else
1691 eval "$3=\$ac_header_compiler"
1692fi
1693eval ac_res=\$$3
1694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1695$as_echo "$ac_res" >&6; }
1696fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001697 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001698
1699} # ac_fn_c_check_header_mongrel
1700
1701# ac_fn_c_try_run LINENO
1702# ----------------------
1703# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1704# that executables *can* be run.
1705ac_fn_c_try_run ()
1706{
1707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1708 if { { ac_try="$ac_link"
1709case "(($ac_try" in
1710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711 *) ac_try_echo=$ac_try;;
1712esac
1713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714$as_echo "$ac_try_echo"; } >&5
1715 (eval "$ac_link") 2>&5
1716 ac_status=$?
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1719 { { case "(($ac_try" in
1720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1721 *) ac_try_echo=$ac_try;;
1722esac
1723eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1724$as_echo "$ac_try_echo"; } >&5
1725 (eval "$ac_try") 2>&5
1726 ac_status=$?
1727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1728 test $ac_status = 0; }; }; then :
1729 ac_retval=0
1730else
1731 $as_echo "$as_me: program exited with status $ac_status" >&5
1732 $as_echo "$as_me: failed program was:" >&5
1733sed 's/^/| /' conftest.$ac_ext >&5
1734
1735 ac_retval=$ac_status
1736fi
1737 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001738 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001739 as_fn_set_status $ac_retval
1740
1741} # ac_fn_c_try_run
1742
1743# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1744# -------------------------------------------------------
1745# Tests whether HEADER exists and can be compiled using the include files in
1746# INCLUDES, setting the cache variable VAR accordingly.
1747ac_fn_c_check_header_compile ()
1748{
1749 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1751$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001752if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001753 $as_echo_n "(cached) " >&6
1754else
1755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1756/* end confdefs.h. */
1757$4
1758#include <$2>
1759_ACEOF
1760if ac_fn_c_try_compile "$LINENO"; then :
1761 eval "$3=yes"
1762else
1763 eval "$3=no"
1764fi
1765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1766fi
1767eval ac_res=\$$3
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1769$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001770 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001771
1772} # ac_fn_c_check_header_compile
1773
1774# ac_fn_c_try_link LINENO
1775# -----------------------
1776# Try to link conftest.$ac_ext, and return whether this succeeded.
1777ac_fn_c_try_link ()
1778{
1779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780 rm -f conftest.$ac_objext conftest$ac_exeext
1781 if { { ac_try="$ac_link"
1782case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785esac
1786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787$as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_link") 2>conftest.err
1789 ac_status=$?
1790 if test -s conftest.err; then
1791 grep -v '^ *+' conftest.err >conftest.er1
1792 cat conftest.er1 >&5
1793 mv -f conftest.er1 conftest.err
1794 fi
1795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796 test $ac_status = 0; } && {
1797 test -z "$ac_c_werror_flag" ||
1798 test ! -s conftest.err
1799 } && test -s conftest$ac_exeext && {
1800 test "$cross_compiling" = yes ||
1801 $as_test_x conftest$ac_exeext
1802 }; then :
1803 ac_retval=0
1804else
1805 $as_echo "$as_me: failed program was:" >&5
1806sed 's/^/| /' conftest.$ac_ext >&5
1807
1808 ac_retval=1
1809fi
1810 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1811 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1812 # interfere with the next link command; also delete a directory that is
1813 # left behind by Apple's compiler. We do this before executing the actions.
1814 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001816 as_fn_set_status $ac_retval
1817
1818} # ac_fn_c_try_link
1819
1820# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1821# -------------------------------------------
1822# Tests whether TYPE exists after having included INCLUDES, setting cache
1823# variable VAR accordingly.
1824ac_fn_c_check_type ()
1825{
1826 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1828$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001829if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001830 $as_echo_n "(cached) " >&6
1831else
1832 eval "$3=no"
1833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834/* end confdefs.h. */
1835$4
1836int
1837main ()
1838{
1839if (sizeof ($2))
1840 return 0;
1841 ;
1842 return 0;
1843}
1844_ACEOF
1845if ac_fn_c_try_compile "$LINENO"; then :
1846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847/* end confdefs.h. */
1848$4
1849int
1850main ()
1851{
1852if (sizeof (($2)))
1853 return 0;
1854 ;
1855 return 0;
1856}
1857_ACEOF
1858if ac_fn_c_try_compile "$LINENO"; then :
1859
1860else
1861 eval "$3=yes"
1862fi
1863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001870 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001871
1872} # ac_fn_c_check_type
1873
1874# ac_fn_c_find_uintX_t LINENO BITS VAR
1875# ------------------------------------
1876# Finds an unsigned integer type with width BITS, setting cache variable VAR
1877# accordingly.
1878ac_fn_c_find_uintX_t ()
1879{
1880 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1882$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001883if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001884 $as_echo_n "(cached) " >&6
1885else
1886 eval "$3=no"
1887 # Order is important - never check a type that is potentially smaller
1888 # than half of the expected target width.
1889 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1890 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$ac_includes_default
1894int
1895main ()
1896{
1897static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1898test_array [0] = 0
1899
1900 ;
1901 return 0;
1902}
1903_ACEOF
1904if ac_fn_c_try_compile "$LINENO"; then :
1905 case $ac_type in #(
1906 uint$2_t) :
1907 eval "$3=yes" ;; #(
1908 *) :
1909 eval "$3=\$ac_type" ;;
1910esac
1911fi
1912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001913 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001914
1915else
1916 break
1917fi
1918 done
1919fi
1920eval ac_res=\$$3
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1922$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001923 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001924
1925} # ac_fn_c_find_uintX_t
1926
1927# ac_fn_c_find_intX_t LINENO BITS VAR
1928# -----------------------------------
1929# Finds a signed integer type with width BITS, setting cache variable VAR
1930# accordingly.
1931ac_fn_c_find_intX_t ()
1932{
1933 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1935$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001936if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001937 $as_echo_n "(cached) " >&6
1938else
1939 eval "$3=no"
1940 # Order is important - never check a type that is potentially smaller
1941 # than half of the expected target width.
1942 for ac_type in int$2_t 'int' 'long int' \
1943 'long long int' 'short int' 'signed char'; do
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001947 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001948int
1949main ()
1950{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001951static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001952test_array [0] = 0
1953
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001962 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001963int
1964main ()
1965{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001966static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001967 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1968test_array [0] = 0
1969
1970 ;
1971 return 0;
1972}
1973_ACEOF
1974if ac_fn_c_try_compile "$LINENO"; then :
1975
1976else
1977 case $ac_type in #(
1978 int$2_t) :
1979 eval "$3=yes" ;; #(
1980 *) :
1981 eval "$3=\$ac_type" ;;
1982esac
1983fi
1984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001987 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001988
1989else
1990 break
1991fi
1992 done
1993fi
1994eval ac_res=\$$3
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001998
1999} # ac_fn_c_find_intX_t
2000
2001# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2002# --------------------------------------------
2003# Tries to find the compile-time value of EXPR in a program that includes
2004# INCLUDES, setting VAR accordingly. Returns whether the value could be
2005# computed
2006ac_fn_c_compute_int ()
2007{
2008 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2009 if test "$cross_compiling" = yes; then
2010 # Depending upon the size, compute the lo and hi bounds.
2011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014int
2015main ()
2016{
2017static int test_array [1 - 2 * !(($2) >= 0)];
2018test_array [0] = 0
2019
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025 ac_lo=0 ac_mid=0
2026 while :; do
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$4
2030int
2031main ()
2032{
2033static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2034test_array [0] = 0
2035
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040if ac_fn_c_try_compile "$LINENO"; then :
2041 ac_hi=$ac_mid; break
2042else
2043 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2044 if test $ac_lo -le $ac_mid; then
2045 ac_lo= ac_hi=
2046 break
2047 fi
2048 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2049fi
2050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2051 done
2052else
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) < 0)];
2060test_array [0] = 0
2061
2062 ;
2063 return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_compile "$LINENO"; then :
2067 ac_hi=-1 ac_mid=-1
2068 while :; do
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072int
2073main ()
2074{
2075static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2076test_array [0] = 0
2077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_lo=$ac_mid; break
2084else
2085 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2086 if test $ac_mid -le $ac_hi; then
2087 ac_lo= ac_hi=
2088 break
2089 fi
2090 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093 done
2094else
2095 ac_lo= ac_hi=
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100# Binary search between lo and hi bounds.
2101while test "x$ac_lo" != "x$ac_hi"; do
2102 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2110test_array [0] = 0
2111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_hi=$ac_mid
2118else
2119 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122done
2123case $ac_lo in #((
2124?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2125'') ac_retval=1 ;;
2126esac
2127 else
2128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129/* end confdefs.h. */
2130$4
2131static long int longval () { return $2; }
2132static unsigned long int ulongval () { return $2; }
2133#include <stdio.h>
2134#include <stdlib.h>
2135int
2136main ()
2137{
2138
2139 FILE *f = fopen ("conftest.val", "w");
2140 if (! f)
2141 return 1;
2142 if (($2) < 0)
2143 {
2144 long int i = longval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%ld", i);
2148 }
2149 else
2150 {
2151 unsigned long int i = ulongval ();
2152 if (i != ($2))
2153 return 1;
2154 fprintf (f, "%lu", i);
2155 }
2156 /* Do not output a trailing newline, as this causes \r\n confusion
2157 on some platforms. */
2158 return ferror (f) || fclose (f) != 0;
2159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_run "$LINENO"; then :
2165 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2166else
2167 ac_retval=1
2168fi
2169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2170 conftest.$ac_objext conftest.beam conftest.$ac_ext
2171rm -f conftest.val
2172
2173 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002174 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002175 as_fn_set_status $ac_retval
2176
2177} # ac_fn_c_compute_int
2178
2179# ac_fn_c_check_func LINENO FUNC VAR
2180# ----------------------------------
2181# Tests whether FUNC exists, setting the cache variable VAR accordingly
2182ac_fn_c_check_func ()
2183{
2184 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2186$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002187if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002188 $as_echo_n "(cached) " >&6
2189else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2193 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2194#define $2 innocuous_$2
2195
2196/* System header to define __stub macros and hopefully few prototypes,
2197 which can conflict with char $2 (); below.
2198 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2199 <limits.h> exists even on freestanding compilers. */
2200
2201#ifdef __STDC__
2202# include <limits.h>
2203#else
2204# include <assert.h>
2205#endif
2206
2207#undef $2
2208
2209/* Override any GCC internal prototype to avoid an error.
2210 Use char because int might match the return type of a GCC
2211 builtin and then its argument prototype would still apply. */
2212#ifdef __cplusplus
2213extern "C"
2214#endif
2215char $2 ();
2216/* The GNU C library defines this for functions which it implements
2217 to always fail with ENOSYS. Some functions are actually named
2218 something starting with __ and the normal name is an alias. */
2219#if defined __stub_$2 || defined __stub___$2
2220choke me
2221#endif
2222
2223int
2224main ()
2225{
2226return $2 ();
2227 ;
2228 return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_link "$LINENO"; then :
2232 eval "$3=yes"
2233else
2234 eval "$3=no"
2235fi
2236rm -f core conftest.err conftest.$ac_objext \
2237 conftest$ac_exeext conftest.$ac_ext
2238fi
2239eval ac_res=\$$3
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002243
2244} # ac_fn_c_check_func
2245
2246# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2247# ----------------------------------------------------
2248# Tries to find if the field MEMBER exists in type AGGR, after including
2249# INCLUDES, setting cache variable VAR accordingly.
2250ac_fn_c_check_member ()
2251{
2252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2254$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002255if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002256 $as_echo_n "(cached) " >&6
2257else
2258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259/* end confdefs.h. */
2260$5
2261int
2262main ()
2263{
2264static $2 ac_aggr;
2265if (ac_aggr.$3)
2266return 0;
2267 ;
2268 return 0;
2269}
2270_ACEOF
2271if ac_fn_c_try_compile "$LINENO"; then :
2272 eval "$4=yes"
2273else
2274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h. */
2276$5
2277int
2278main ()
2279{
2280static $2 ac_aggr;
2281if (sizeof ac_aggr.$3)
2282return 0;
2283 ;
2284 return 0;
2285}
2286_ACEOF
2287if ac_fn_c_try_compile "$LINENO"; then :
2288 eval "$4=yes"
2289else
2290 eval "$4=no"
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295fi
2296eval ac_res=\$$4
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2298$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002299 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002300
2301} # ac_fn_c_check_member
2302
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002303# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2304# ---------------------------------------------
2305# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2306# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002307ac_fn_c_check_decl ()
2308{
2309 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002310 as_decl_name=`echo $2|sed 's/ *(.*//'`
2311 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2313$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002314if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002315 $as_echo_n "(cached) " >&6
2316else
2317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318/* end confdefs.h. */
2319$4
2320int
2321main ()
2322{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002323#ifndef $as_decl_name
2324#ifdef __cplusplus
2325 (void) $as_decl_use;
2326#else
2327 (void) $as_decl_name;
2328#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002329#endif
2330
2331 ;
2332 return 0;
2333}
2334_ACEOF
2335if ac_fn_c_try_compile "$LINENO"; then :
2336 eval "$3=yes"
2337else
2338 eval "$3=no"
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342eval ac_res=\$$3
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002345 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002346
2347} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002348cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002349This file contains any messages produced by compilers while
2350running configure, to aid debugging if configure makes a mistake.
2351
Martin v. Löwis174440b2008-10-03 08:59:41 +00002352It was created by python $as_me 2.7, which was
Matthias Klose3cef2a92012-03-14 23:39:33 +01002353generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002354
2355 $ $0 $@
2356
2357_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002358exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002359{
2360cat <<_ASUNAME
2361## --------- ##
2362## Platform. ##
2363## --------- ##
2364
2365hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2366uname -m = `(uname -m) 2>/dev/null || echo unknown`
2367uname -r = `(uname -r) 2>/dev/null || echo unknown`
2368uname -s = `(uname -s) 2>/dev/null || echo unknown`
2369uname -v = `(uname -v) 2>/dev/null || echo unknown`
2370
2371/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2372/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2373
2374/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2375/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2376/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002377/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002378/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2379/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2380/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2381
2382_ASUNAME
2383
2384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002389 $as_echo "PATH: $as_dir"
2390 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002391IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002392
2393} >&5
2394
2395cat >&5 <<_ACEOF
2396
2397
2398## ----------- ##
2399## Core tests. ##
2400## ----------- ##
2401
2402_ACEOF
2403
2404
2405# Keep a trace of the command line.
2406# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002407# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002408# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002411ac_configure_args0=
2412ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_must_keep_next=false
2414for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002415do
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 for ac_arg
2417 do
2418 case $ac_arg in
2419 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2420 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2421 | -silent | --silent | --silen | --sile | --sil)
2422 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002423 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002424 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 esac
2426 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002427 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002429 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002431 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 case $ac_arg in
2434 *=* | --config-cache | -C | -disable-* | --disable-* \
2435 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2436 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2437 | -with-* | --with-* | -without-* | --without-* | --x)
2438 case "$ac_configure_args0 " in
2439 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2440 esac
2441 ;;
2442 -* ) ac_must_keep_next=true ;;
2443 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002445 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 ;;
2447 esac
2448 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002449done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002450{ ac_configure_args0=; unset ac_configure_args0;}
2451{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453# When interrupted or exit'd, cleanup temporary files, and complete
2454# config.log. We remove comments because anyway the quotes in there
2455# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002456# WARNING: Use '\'' to represent an apostrophe within the trap.
2457# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002458trap 'exit_status=$?
2459 # Save into config.log some information that might help in debugging.
2460 {
2461 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002462
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002463 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002464## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002465## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 echo
2467 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468(
2469 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2470 eval ac_val=\$$ac_var
2471 case $ac_val in #(
2472 *${as_nl}*)
2473 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002474 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2475$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002476 esac
2477 case $ac_var in #(
2478 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002479 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2480 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002481 esac ;;
2482 esac
2483 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002485 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2486 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002488 "s/'\''/'\''\\\\'\'''\''/g;
2489 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2490 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002491 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002492 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002493 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002494 esac |
2495 sort
2496)
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002498
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002499 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002500## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002501## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 echo
2503 for ac_var in $ac_subst_vars
2504 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505 eval ac_val=\$$ac_var
2506 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002509 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 done | sort
2511 echo
2512
2513 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002514 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002515## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002516## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 echo
2518 for ac_var in $ac_subst_files
2519 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002520 eval ac_val=\$$ac_var
2521 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002522 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002523 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002524 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 done | sort
2526 echo
2527 fi
2528
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002530 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002531## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002532## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002534 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
2536 fi
2537 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002538 $as_echo "$as_me: caught signal $ac_signal"
2539 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541 rm -f core *.core core.conftest.* &&
2542 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002544' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002545for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002546 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002547done
2548ac_signal=0
2549
2550# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002551rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002552
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002553$as_echo "/* confdefs.h */" > confdefs.h
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555# Predefined preprocessor variables.
2556
2557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_NAME "$PACKAGE_NAME"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_VERSION "$PACKAGE_VERSION"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_STRING "$PACKAGE_STRING"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2575_ACEOF
2576
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_URL "$PACKAGE_URL"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581
2582# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002583# Prefer an explicitly selected file to automatically selected ones.
2584ac_site_file1=NONE
2585ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002586if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002587 # We do not want a PATH search for config.site.
2588 case $CONFIG_SITE in #((
2589 -*) ac_site_file1=./$CONFIG_SITE;;
2590 */*) ac_site_file1=$CONFIG_SITE;;
2591 *) ac_site_file1=./$CONFIG_SITE;;
2592 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002594 ac_site_file1=$prefix/share/config.site
2595 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002597 ac_site_file1=$ac_default_prefix/share/config.site
2598 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002600for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002602 test "x$ac_site_file" = xNONE && continue
2603 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2605$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002607 . "$ac_site_file" \
2608 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2610as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002611See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612 fi
2613done
2614
2615if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002616 # Some versions of bash will fail to source /dev/null (special files
2617 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2618 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2620$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002622 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2623 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 esac
2625 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2628$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 >$cache_file
2630fi
2631
2632# Check that the precious variables saved in the cache have kept the same
2633# value.
2634ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002635for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2637 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002638 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2639 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 case $ac_old_set,$ac_new_set in
2641 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2643$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 ac_cache_corrupted=: ;;
2645 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2647$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_cache_corrupted=: ;;
2649 ,);;
2650 *)
2651 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002652 # differences in whitespace do not lead to failure.
2653 ac_old_val_w=`echo x $ac_old_val`
2654 ac_new_val_w=`echo x $ac_new_val`
2655 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2657$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2658 ac_cache_corrupted=:
2659 else
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2661$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2662 eval $ac_var=\$ac_old_val
2663 fi
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2665$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2667$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 fi;;
2669 esac
2670 # Pass precious variables to config.status.
2671 if test "$ac_new_set" = set; then
2672 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002673 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 *) ac_arg=$ac_var=$ac_new_val ;;
2675 esac
2676 case " $ac_configure_args " in
2677 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002678 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 esac
2680 fi
2681done
2682if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2686$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002687 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002689## -------------------- ##
2690## Main body of script. ##
2691## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002692
Guido van Rossum7f43da71994-08-01 12:15:30 +00002693ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2697ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698
Guido van Rossum627b2d71993-12-24 10:39:16 +00002699
Michael W. Hudson54241132001-12-07 15:38:26 +00002700
Martin v. Löwiseba40652007-08-30 20:10:57 +00002701ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002702
2703
Martin v. Löwis11437992002-04-12 09:54:03 +00002704
Georg Brandlbcd64a32009-03-31 21:45:18 +00002705if test "$prefix" != "/"; then
2706 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2707fi
2708
2709
Martin v. Löwis11437992002-04-12 09:54:03 +00002710
2711
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002712# We don't use PACKAGE_ variables, and they cause conflicts
2713# with other autoconf-based packages that include Python.h
2714grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2715rm confdefs.h
2716mv confdefs.h.new confdefs.h
2717
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002718
Martin v. Löwis174440b2008-10-03 08:59:41 +00002719VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002720
Martin v. Löwis1142de32002-03-29 16:28:31 +00002721
2722SOVERSION=1.0
2723
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002724# The later defininition of _XOPEN_SOURCE disables certain features
2725# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2726
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002727$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002728
2729
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002730# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2731# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2732# them.
2733
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002734$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002735
2736
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002737# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2738# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2739# them.
2740
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002741$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002742
2743
Martin v. Löwisd6320502004-08-12 13:45:08 +00002744# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2745# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2746
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002747$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002748
2749
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002750# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2751# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2752# them.
2753
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002754$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002755
2756
2757
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002758define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002759
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002760# Arguments passed to configure.
2761
2762CONFIG_ARGS="$ac_configure_args"
2763
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2765$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002766# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002767if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002768 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002769 case $enableval in
2770 yes)
2771 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002772 if test ! -d "${enableval}"
2773 then
2774 enableval=/
2775 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002776 ;;
2777 esac
2778 case $enableval in
2779 no)
2780 UNIVERSALSDK=
2781 enable_universalsdk=
2782 ;;
2783 *)
2784 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002785 if test ! -d "${UNIVERSALSDK}"
2786 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002787 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002788 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002789 ;;
2790 esac
2791
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002792
Ronald Oussoren988117f2006-04-29 11:31:35 +00002793else
2794
2795 UNIVERSALSDK=
2796 enable_universalsdk=
2797
Martin v. Löwiseba40652007-08-30 20:10:57 +00002798fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002799
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002800if test -n "${UNIVERSALSDK}"
2801then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2803$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002804else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2806$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002807fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002808
Martin v. Löwiseba40652007-08-30 20:10:57 +00002809
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002810
2811
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002812UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002813
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2815$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002816
2817# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002818if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002819 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2821$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002822 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002823 if test "${enable_universalsdk}" ; then
2824 :
2825 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002826 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002827 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002828
2829else
2830
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2832$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002833
2834fi
2835
2836
2837
2838
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002839
2840# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002841if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002842 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002843 if test "${enable_framework}"; then
2844 :
2845 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002846 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002847 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002848 PYTHONFRAMEWORK=${withval}
2849 PYTHONFRAMEWORKDIR=${withval}.framework
2850 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2851
2852else
2853
2854 PYTHONFRAMEWORK=Python
2855 PYTHONFRAMEWORKDIR=Python.framework
2856 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2857
2858fi
2859
Martin v. Löwiseba40652007-08-30 20:10:57 +00002860# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002861if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002862 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002863 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002864 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002865 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002866 esac
2867 case $enableval in
2868 no)
2869 PYTHONFRAMEWORK=
2870 PYTHONFRAMEWORKDIR=no-framework
2871 PYTHONFRAMEWORKPREFIX=
2872 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002873 FRAMEWORKINSTALLFIRST=
2874 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002875 FRAMEWORKALTINSTALLFIRST=
2876 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002877 if test "x${prefix}" = "xNONE"; then
2878 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2879 else
2880 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2881 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002882 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002883 ;;
2884 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002885 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002886 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002887 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002888 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002889 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2890 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002891 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002892
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002893 if test "x${prefix}" = "xNONE" ; then
2894 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002895
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002896 else
2897 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2898 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002899
2900 case "${enableval}" in
2901 /System*)
2902 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2903 if test "${prefix}" = "NONE" ; then
2904 # See below
2905 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2906 fi
2907 ;;
2908
2909 /Library*)
2910 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2911 ;;
2912
2913 */Library/Frameworks)
2914 MDIR="`dirname "${enableval}"`"
2915 MDIR="`dirname "${MDIR}"`"
2916 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2917
2918 if test "${prefix}" = "NONE"; then
2919 # User hasn't specified the
2920 # --prefix option, but wants to install
2921 # the framework in a non-default location,
2922 # ensure that the compatibility links get
2923 # installed relative to that prefix as well
2924 # instead of in /usr/local.
2925 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2926 fi
2927 ;;
2928
2929 *)
2930 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2931 ;;
2932 esac
2933
Jack Jansen127e56e2001-09-11 14:41:54 +00002934 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002935
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002936 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002937 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002938 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002939
Martin v. Löwiseba40652007-08-30 20:10:57 +00002940 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002941
Martin v. Löwiseba40652007-08-30 20:10:57 +00002942 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002943
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002944 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2945
2946 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2947
Jack Jansene578a632001-08-15 01:27:14 +00002948 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
Guido van Rossum563e7081996-09-10 18:20:48 +00002950else
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
Jack Jansene578a632001-08-15 01:27:14 +00002952 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002953 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002954 PYTHONFRAMEWORKPREFIX=
2955 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002956 FRAMEWORKINSTALLFIRST=
2957 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002958 FRAMEWORKALTINSTALLFIRST=
2959 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002960 if test "x${prefix}" = "xNONE" ; then
2961 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2962 else
2963 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2964 fi
Jack Jansene578a632001-08-15 01:27:14 +00002965 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002966
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002967
Martin v. Löwiseba40652007-08-30 20:10:57 +00002968fi
2969
Michael W. Hudson54241132001-12-07 15:38:26 +00002970
2971
2972
2973
Jack Jansene578a632001-08-15 01:27:14 +00002974
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002975
2976
Ronald Oussoren5b787322006-06-06 19:50:24 +00002977
2978
2979
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002980
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002981
Jack Jansene578a632001-08-15 01:27:14 +00002982##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00002983## AS_HELP_STRING([--with-dyld],
2984## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002985##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002986# Set name for machine-dependent library files
2987
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2989$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002990if test -z "$MACHDEP"
2991then
Guido van Rossum563e7081996-09-10 18:20:48 +00002992 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002993 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002994 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002995 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002996 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002997 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002998 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002999 ac_md_system=`echo $ac_sys_system |
3000 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3001 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003002 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003003 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003004
Guido van Rossum07397971997-04-29 21:49:50 +00003005 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003006 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003007 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003008 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003009 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003010 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003011 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003012 esac
3013fi
Guido van Rossum91922671997-10-09 20:24:13 +00003014
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003015# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3016# disable features if it is defined, without any means to access these
3017# features as extensions. For these systems, we skip the definition of
3018# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3019# some feature, make sure there is no alternative way to access this
3020# feature. Also, when using wildcards, make sure you have verified the
3021# need for not defining _XOPEN_SOURCE on all systems matching the
3022# wildcard, and that the wildcard does not include future systems
3023# (which may remove their limitations).
3024case $ac_sys_system/$ac_sys_release in
3025 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3026 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003027 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003028 # In addition, Stefan Krah confirms that issue #1244610 exists through
3029 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003030 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003031 define_xopen_source=no
3032 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3033 # also defined. This can be overridden by defining _BSD_SOURCE
3034 # As this has a different meaning on Linux, only define it on OpenBSD
3035
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003036$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003037
3038 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003039 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003040 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3041 # also defined. This can be overridden by defining _BSD_SOURCE
3042 # As this has a different meaning on Linux, only define it on OpenBSD
3043
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003044$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003045
3046 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003047 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3048 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3049 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003050 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 +00003051 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003052 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3053 # request to enable features supported by the standard as a request
3054 # to disable features not supported by the standard. The best way
3055 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3056 # entirely and define __EXTENSIONS__ instead.
3057 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003058 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003059 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3060 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003061 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003062 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003063 define_xopen_source=no;;
3064 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003065 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003066 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003067 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003068 # On FreeBSD 4, the math functions C89 does not cover are never defined
3069 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3070 FreeBSD/4.*)
3071 define_xopen_source=no;;
3072 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3073 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3074 # identifies itself as Darwin/7.*
3075 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3076 # disables platform specific features beyond repair.
3077 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3078 # has no effect, don't bother defining them
3079 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003080 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003081 Darwin/1[0-9].*)
3082 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003083 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3084 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3085 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003086 AIX/4)
3087 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003088 AIX/5)
3089 if test `uname -r` -eq 1; then
3090 define_xopen_source=no
3091 fi
3092 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003093 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3094 # defining NI_NUMERICHOST.
3095 QNX/6.3.2)
3096 define_xopen_source=no
3097 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003098
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003099esac
3100
3101if test $define_xopen_source = yes
3102then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003104$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003105
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003106
3107 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3108 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3109 # several APIs are not declared. Since this is also needed in some
3110 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003111
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003112$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003113
3114
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003115
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003116$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003117
3118
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003119fi
3120
Guido van Rossum91922671997-10-09 20:24:13 +00003121#
3122# SGI compilers allow the specification of the both the ABI and the
3123# ISA on the command line. Depending on the values of these switches,
3124# different and often incompatable code will be generated.
3125#
3126# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3127# thus supply support for various ABI/ISA combinations. The MACHDEP
3128# variable is also adjusted.
3129#
3130
3131if test ! -z "$SGI_ABI"
3132then
3133 CC="cc $SGI_ABI"
3134 LDFLAGS="$SGI_ABI $LDFLAGS"
3135 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3138$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003139
Jack Jansen83f898c2002-12-30 22:23:40 +00003140# And add extra plat-mac for darwin
3141
Jack Jansen7b59b422003-03-17 15:44:10 +00003142
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3144$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003145if test -z "$EXTRAPLATDIR"
3146then
3147 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003148 darwin)
3149 EXTRAPLATDIR="\$(PLATMACDIRS)"
3150 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3151 ;;
3152 *)
3153 EXTRAPLATDIR=""
3154 EXTRAMACHDEPPATH=""
3155 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003156 esac
3157fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3159$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003160
Jack Jansen6b08a402004-06-03 12:41:45 +00003161# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3162# it may influence the way we can build extensions, so distutils
3163# needs to check it
3164
Ronald Oussoren988117f2006-04-29 11:31:35 +00003165
Jack Jansen6b08a402004-06-03 12:41:45 +00003166CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003167EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003168
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3170$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003171ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3173$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003174
Guido van Rossum627b2d71993-12-24 10:39:16 +00003175# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003176
3177# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3178# for debug/optimization stuff. BASECFLAGS is for flags that are required
3179# just to get things to compile and link. Users are free to override OPT
3180# when running configure or make. The build should not break if they do.
3181# BASECFLAGS should generally not be messed with, however.
3182
3183# XXX shouldn't some/most/all of this code be merged with the stuff later
3184# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3186$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003187
Martin v. Löwiseba40652007-08-30 20:10:57 +00003188# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003189if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003190 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003191 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003192 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003193 without_gcc=yes;;
3194 yes) CC=gcc
3195 without_gcc=no;;
3196 *) CC=$withval
3197 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003198 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003199else
Martin v. Löwis11437992002-04-12 09:54:03 +00003200
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003201 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003202 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003203 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003204 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003205 case $BE_HOST_CPU in
3206 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003207 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003208 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003209 BASECFLAGS="$BASECFLAGS -export pragma"
3210 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003211 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003212 ;;
3213 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003214 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003215 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003216 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003217 ;;
3218 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003219 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003220 ;;
3221 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003222 AR="\$(srcdir)/Modules/ar_beos"
3223 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003224 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003225 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003226 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227fi
3228
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3230$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003231
Guido van Rossum8b131c51995-03-09 14:10:13 +00003232# If the user switches compilers, we can't believe the cache
3233if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3234then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003235 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003236(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003237fi
3238
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003239# If the user set CFLAGS, use this instead of the automatically
3240# determined setting
3241preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003242ac_ext=c
3243ac_cpp='$CPP $CPPFLAGS'
3244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3246ac_compiler_gnu=$ac_cv_c_compiler_gnu
3247if test -n "$ac_tool_prefix"; then
3248 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3249set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3251$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003252if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003253 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003254else
3255 if test -n "$CC"; then
3256 ac_cv_prog_CC="$CC" # Let the user override the test.
3257else
Martin v. Löwis11437992002-04-12 09:54:03 +00003258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3259for as_dir in $PATH
3260do
3261 IFS=$as_save_IFS
3262 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003263 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003264 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 +00003265 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003266 $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 +00003267 break 2
3268 fi
3269done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003270 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003271IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003272
Jack Jansendd19cf82001-12-06 22:36:17 +00003273fi
3274fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003275CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003276if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3278$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3281$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003282fi
3283
Martin v. Löwiseba40652007-08-30 20:10:57 +00003284
Martin v. Löwis11437992002-04-12 09:54:03 +00003285fi
3286if test -z "$ac_cv_prog_CC"; then
3287 ac_ct_CC=$CC
3288 # Extract the first word of "gcc", so it can be a program name with args.
3289set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3291$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003292if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003293 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003294else
3295 if test -n "$ac_ct_CC"; then
3296 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3297else
3298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3299for as_dir in $PATH
3300do
3301 IFS=$as_save_IFS
3302 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003303 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003304 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 +00003305 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003306 $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 +00003307 break 2
3308 fi
3309done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003310 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003311IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003312
3313fi
3314fi
3315ac_ct_CC=$ac_cv_prog_ac_ct_CC
3316if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3318$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003319else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3321$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003322fi
3323
Martin v. Löwiseba40652007-08-30 20:10:57 +00003324 if test "x$ac_ct_CC" = x; then
3325 CC=""
3326 else
3327 case $cross_compiling:$ac_tool_warned in
3328yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003329{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3330$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003331ac_tool_warned=yes ;;
3332esac
3333 CC=$ac_ct_CC
3334 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003335else
3336 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003337fi
3338
Jack Jansendd19cf82001-12-06 22:36:17 +00003339if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003340 if test -n "$ac_tool_prefix"; then
3341 # 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 +00003342set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3344$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003345if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003346 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003347else
3348 if test -n "$CC"; then
3349 ac_cv_prog_CC="$CC" # Let the user override the test.
3350else
Martin v. Löwis11437992002-04-12 09:54:03 +00003351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3352for as_dir in $PATH
3353do
3354 IFS=$as_save_IFS
3355 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003356 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003357 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 +00003358 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003359 $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 +00003360 break 2
3361 fi
3362done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003363 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003364IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003365
3366fi
3367fi
3368CC=$ac_cv_prog_CC
3369if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3371$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003372else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3374$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003375fi
3376
Martin v. Löwiseba40652007-08-30 20:10:57 +00003377
Martin v. Löwis11437992002-04-12 09:54:03 +00003378 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003379fi
3380if test -z "$CC"; then
3381 # Extract the first word of "cc", so it can be a program name with args.
3382set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3384$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003385if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003386 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003387else
3388 if test -n "$CC"; then
3389 ac_cv_prog_CC="$CC" # Let the user override the test.
3390else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003391 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3393for as_dir in $PATH
3394do
3395 IFS=$as_save_IFS
3396 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003397 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003398 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 +00003399 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3400 ac_prog_rejected=yes
3401 continue
3402 fi
3403 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003405 break 2
3406 fi
3407done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003408 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003409IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003410
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003411if test $ac_prog_rejected = yes; then
3412 # We found a bogon in the path, so make sure we never use it.
3413 set dummy $ac_cv_prog_CC
3414 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003415 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003416 # We chose a different compiler from the bogus one.
3417 # However, it has the same basename, so the bogon will be chosen
3418 # first if we set CC to just the basename; use the full file name.
3419 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003420 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003421 fi
3422fi
3423fi
3424fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003425CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003426if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3428$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003429else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3431$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003432fi
3433
Martin v. Löwiseba40652007-08-30 20:10:57 +00003434
Martin v. Löwis11437992002-04-12 09:54:03 +00003435fi
3436if test -z "$CC"; then
3437 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003438 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 do
3440 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3441set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3443$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003444if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003445 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003446else
3447 if test -n "$CC"; then
3448 ac_cv_prog_CC="$CC" # Let the user override the test.
3449else
Martin v. Löwis11437992002-04-12 09:54:03 +00003450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3451for as_dir in $PATH
3452do
3453 IFS=$as_save_IFS
3454 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003455 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003456 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 +00003457 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003458 $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 +00003459 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003460 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003461done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003462 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003463IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003464
3465fi
3466fi
3467CC=$ac_cv_prog_CC
3468if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3470$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3473$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003474fi
3475
Martin v. Löwiseba40652007-08-30 20:10:57 +00003476
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 test -n "$CC" && break
3478 done
3479fi
3480if test -z "$CC"; then
3481 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003482 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003483do
3484 # Extract the first word of "$ac_prog", so it can be a program name with args.
3485set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3487$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003488if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003489 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003490else
3491 if test -n "$ac_ct_CC"; then
3492 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3493else
3494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3495for as_dir in $PATH
3496do
3497 IFS=$as_save_IFS
3498 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003499 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003500 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 +00003501 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003502 $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 +00003503 break 2
3504 fi
3505done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003506 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003507IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003508
Martin v. Löwis11437992002-04-12 09:54:03 +00003509fi
3510fi
3511ac_ct_CC=$ac_cv_prog_ac_ct_CC
3512if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3514$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3517$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003518fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003519
Martin v. Löwiseba40652007-08-30 20:10:57 +00003520
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 test -n "$ac_ct_CC" && break
3522done
Michael W. Hudson54241132001-12-07 15:38:26 +00003523
Martin v. Löwiseba40652007-08-30 20:10:57 +00003524 if test "x$ac_ct_CC" = x; then
3525 CC=""
3526 else
3527 case $cross_compiling:$ac_tool_warned in
3528yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003529{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3530$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003531ac_tool_warned=yes ;;
3532esac
3533 CC=$ac_ct_CC
3534 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003535fi
3536
3537fi
3538
3539
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003540test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3541$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003542as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003543See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003544
3545# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003546$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3547set X $ac_compile
3548ac_compiler=$2
3549for ac_option in --version -v -V -qversion; do
3550 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003551case "(($ac_try" in
3552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3553 *) ac_try_echo=$ac_try;;
3554esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3556$as_echo "$ac_try_echo"; } >&5
3557 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003559 if test -s conftest.err; then
3560 sed '10a\
3561... rest of stderr output deleted ...
3562 10q' conftest.err >conftest.er1
3563 cat conftest.er1 >&5
3564 fi
3565 rm -f conftest.er1 conftest.err
3566 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3567 test $ac_status = 0; }
3568done
Martin v. Löwis11437992002-04-12 09:54:03 +00003569
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003571/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003572
Martin v. Löwis11437992002-04-12 09:54:03 +00003573int
3574main ()
3575{
3576
3577 ;
3578 return 0;
3579}
3580_ACEOF
3581ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003582ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003583# Try to create an executable without -o first, disregard a.out.
3584# It will help us diagnose broken compilers, and finding out an intuition
3585# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3587$as_echo_n "checking whether the C compiler works... " >&6; }
3588ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3589
3590# The possible output files:
3591ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3592
Martin v. Löwiseba40652007-08-30 20:10:57 +00003593ac_rmfiles=
3594for ac_file in $ac_files
3595do
3596 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003597 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003598 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3599 esac
3600done
3601rm -f $ac_rmfiles
3602
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003603if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003604case "(($ac_try" in
3605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3606 *) ac_try_echo=$ac_try;;
3607esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003608eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3609$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003610 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003612 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3613 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003614 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3615# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3616# in a Makefile. We should not override ac_cv_exeext if it was cached,
3617# so that the user can short-circuit this test for compilers unknown to
3618# Autoconf.
3619for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003620do
3621 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003623 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003624 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003625 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003626 # We found the default executable, but exeext='' is most
3627 # certainly right.
3628 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003629 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003630 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631 then :; else
3632 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3633 fi
3634 # We set ac_cv_exeext here because the later test for it is not
3635 # safe: cross compilers may not add the suffix if given an `-o'
3636 # argument, so we may need to know it at that point already.
3637 # Even if this section looks crufty: it has the advantage of
3638 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003639 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003640 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003641 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 esac
3643done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003644test "$ac_cv_exeext" = no && ac_cv_exeext=
3645
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003646else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003647 ac_file=''
3648fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003649if test -z "$ac_file"; then :
3650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3651$as_echo "no" >&6; }
3652$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003653sed 's/^/| /' conftest.$ac_ext >&5
3654
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003655{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003657as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003658See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003659else
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3661$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003662fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3664$as_echo_n "checking for C compiler default output file name... " >&6; }
3665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3666$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003667ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003668
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003669rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003670ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3672$as_echo_n "checking for suffix of executables... " >&6; }
3673if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003674case "(($ac_try" in
3675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3676 *) ac_try_echo=$ac_try;;
3677esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003678eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3679$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003680 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003681 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3683 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3685# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3686# work properly (i.e., refer to `conftest.exe'), while it won't with
3687# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003688for ac_file in conftest.exe conftest conftest.*; do
3689 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003691 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003693 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 * ) break;;
3695 esac
3696done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003697else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003698 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3699$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003700as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003701See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003702fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003703rm -f conftest conftest$ac_cv_exeext
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3705$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003706
3707rm -f conftest.$ac_ext
3708EXEEXT=$ac_cv_exeext
3709ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3711/* end confdefs.h. */
3712#include <stdio.h>
3713int
3714main ()
3715{
3716FILE *f = fopen ("conftest.out", "w");
3717 return ferror (f) || fclose (f) != 0;
3718
3719 ;
3720 return 0;
3721}
Skip Montanaro6dead952003-09-25 14:50:04 +00003722_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003723ac_clean_files="$ac_clean_files conftest.out"
3724# Check that the compiler produces executables we can run. If not, either
3725# the compiler is broken, or we cross compile.
3726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3727$as_echo_n "checking whether we are cross compiling... " >&6; }
3728if test "$cross_compiling" != yes; then
3729 { { ac_try="$ac_link"
3730case "(($ac_try" in
3731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3732 *) ac_try_echo=$ac_try;;
3733esac
3734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3735$as_echo "$ac_try_echo"; } >&5
3736 (eval "$ac_link") 2>&5
3737 ac_status=$?
3738 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3739 test $ac_status = 0; }
3740 if { ac_try='./conftest$ac_cv_exeext'
3741 { { case "(($ac_try" in
3742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3743 *) ac_try_echo=$ac_try;;
3744esac
3745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3746$as_echo "$ac_try_echo"; } >&5
3747 (eval "$ac_try") 2>&5
3748 ac_status=$?
3749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3750 test $ac_status = 0; }; }; then
3751 cross_compiling=no
3752 else
3753 if test "$cross_compiling" = maybe; then
3754 cross_compiling=yes
3755 else
3756 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003758as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003759If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01003760See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003761 fi
3762 fi
3763fi
3764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3765$as_echo "$cross_compiling" >&6; }
3766
3767rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3768ac_clean_files=$ac_clean_files_save
3769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3770$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003771if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003772 $as_echo_n "(cached) " >&6
3773else
3774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003776
Martin v. Löwis11437992002-04-12 09:54:03 +00003777int
3778main ()
3779{
3780
3781 ;
3782 return 0;
3783}
3784_ACEOF
3785rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003787case "(($ac_try" in
3788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3789 *) ac_try_echo=$ac_try;;
3790esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003791eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3792$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003793 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3796 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003797 for ac_file in conftest.o conftest.obj conftest.*; do
3798 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003800 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3802 break;;
3803 esac
3804done
3805else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003806 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003807sed 's/^/| /' conftest.$ac_ext >&5
3808
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003809{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003811as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01003812See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003813fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003814rm -f conftest.$ac_cv_objext conftest.$ac_ext
3815fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3817$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003818OBJEXT=$ac_cv_objext
3819ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3821$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003822if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003823 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828int
3829main ()
3830{
3831#ifndef __GNUC__
3832 choke me
3833#endif
3834
3835 ;
3836 return 0;
3837}
3838_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003839if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003840 ac_compiler_gnu=yes
3841else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003842 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003845ac_cv_c_compiler_gnu=$ac_compiler_gnu
3846
3847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3849$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3850if test $ac_compiler_gnu = yes; then
3851 GCC=yes
3852else
3853 GCC=
3854fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003855ac_test_CFLAGS=${CFLAGS+set}
3856ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3858$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003859if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003860 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003861else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003862 ac_save_c_werror_flag=$ac_c_werror_flag
3863 ac_c_werror_flag=yes
3864 ac_cv_prog_cc_g=no
3865 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003868
Martin v. Löwis11437992002-04-12 09:54:03 +00003869int
3870main ()
3871{
3872
3873 ;
3874 return 0;
3875}
3876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003877if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003878 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003880 CFLAGS=""
3881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003882/* end confdefs.h. */
3883
3884int
3885main ()
3886{
3887
3888 ;
3889 return 0;
3890}
3891_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003892if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003893
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003894else
3895 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003898/* end confdefs.h. */
3899
3900int
3901main ()
3902{
3903
3904 ;
3905 return 0;
3906}
3907_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003908if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003909 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3916 ac_c_werror_flag=$ac_save_c_werror_flag
3917fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3919$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003920if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003921 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003922elif test $ac_cv_prog_cc_g = yes; then
3923 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003924 CFLAGS="-g -O2"
3925 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003926 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003927 fi
3928else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003929 if test "$GCC" = yes; then
3930 CFLAGS="-O2"
3931 else
3932 CFLAGS=
3933 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003934fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3936$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003937if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003938 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003939else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003940 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003941ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003943/* end confdefs.h. */
3944#include <stdarg.h>
3945#include <stdio.h>
3946#include <sys/types.h>
3947#include <sys/stat.h>
3948/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3949struct buf { int x; };
3950FILE * (*rcsopen) (struct buf *, struct stat *, int);
3951static char *e (p, i)
3952 char **p;
3953 int i;
3954{
3955 return p[i];
3956}
3957static char *f (char * (*g) (char **, int), char **p, ...)
3958{
3959 char *s;
3960 va_list v;
3961 va_start (v,p);
3962 s = g (p, va_arg (v,int));
3963 va_end (v);
3964 return s;
3965}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003966
3967/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3968 function prototypes and stuff, but not '\xHH' hex character constants.
3969 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003970 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003971 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3972 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003973 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003974int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3975
Martin v. Löwiseba40652007-08-30 20:10:57 +00003976/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3977 inside strings and character constants. */
3978#define FOO(x) 'x'
3979int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3980
Skip Montanaro6dead952003-09-25 14:50:04 +00003981int test (int i, double x);
3982struct s1 {int (*f) (int a);};
3983struct s2 {int (*f) (double a);};
3984int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3985int argc;
3986char **argv;
3987int
3988main ()
3989{
3990return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3991 ;
3992 return 0;
3993}
3994_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003995for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3996 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003997do
3998 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003999 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004000 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004002rm -f core conftest.err conftest.$ac_objext
4003 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004004done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004005rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004006CC=$ac_save_CC
4007
4008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004009# AC_CACHE_VAL
4010case "x$ac_cv_prog_cc_c89" in
4011 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4013$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004014 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4016$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004017 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004018 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4020$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004021esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004022if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004023
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004024fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004025
Martin v. Löwis11437992002-04-12 09:54:03 +00004026ac_ext=c
4027ac_cpp='$CPP $CPPFLAGS'
4028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4030ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004031
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004032if test ! -z "$preset_cflags"
4033then
4034 CFLAGS=$preset_cflags
4035fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004036
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004037
4038
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4040$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004041
Martin v. Löwiseba40652007-08-30 20:10:57 +00004042# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004043if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004044 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004045
4046 case $withval in
4047 no) with_cxx_main=no
4048 MAINCC='$(CC)';;
4049 yes) with_cxx_main=yes
4050 MAINCC='$(CXX)';;
4051 *) with_cxx_main=yes
4052 MAINCC=$withval
4053 if test -z "$CXX"
4054 then
4055 CXX=$withval
4056 fi;;
4057 esac
4058else
4059
4060 with_cxx_main=no
4061 MAINCC='$(CC)'
4062
Martin v. Löwiseba40652007-08-30 20:10:57 +00004063fi
4064
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4066$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004067
4068preset_cxx="$CXX"
4069if test -z "$CXX"
4070then
4071 case "$CC" in
4072 gcc) # Extract the first word of "g++", so it can be a program name with args.
4073set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4075$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004076if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004077 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004078else
4079 case $CXX in
4080 [\\/]* | ?:[\\/]*)
4081 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4082 ;;
4083 *)
4084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4085for as_dir in notfound
4086do
4087 IFS=$as_save_IFS
4088 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004089 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004090 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 +00004091 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004092 $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 +00004093 break 2
4094 fi
4095done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004096 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004097IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004098
4099 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4100 ;;
4101esac
4102fi
4103CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004104if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4106$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004107else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4109$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004111
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004112 ;;
4113 cc) # Extract the first word of "c++", so it can be a program name with args.
4114set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4116$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004117if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004118 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004119else
4120 case $CXX in
4121 [\\/]* | ?:[\\/]*)
4122 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4123 ;;
4124 *)
4125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4126for as_dir in notfound
4127do
4128 IFS=$as_save_IFS
4129 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004130 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004131 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 +00004132 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004133 $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 +00004134 break 2
4135 fi
4136done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004137 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004138IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004139
4140 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4141 ;;
4142esac
4143fi
4144CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004145if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4147$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004148else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4150$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004152
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004153 ;;
4154 esac
4155 if test "$CXX" = "notfound"
4156 then
4157 CXX=""
4158 fi
4159fi
4160if test -z "$CXX"
4161then
4162 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4163do
4164 # Extract the first word of "$ac_prog", so it can be a program name with args.
4165set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4167$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004168if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004169 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004170else
4171 if test -n "$CXX"; then
4172 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4173else
4174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4175for as_dir in $PATH
4176do
4177 IFS=$as_save_IFS
4178 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004179 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004180 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 +00004181 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004182 $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 +00004183 break 2
4184 fi
4185done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004186 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004187IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004188
4189fi
4190fi
4191CXX=$ac_cv_prog_CXX
4192if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4194$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004195else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4197$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004198fi
4199
Martin v. Löwiseba40652007-08-30 20:10:57 +00004200
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004201 test -n "$CXX" && break
4202done
4203test -n "$CXX" || CXX="notfound"
4204
4205 if test "$CXX" = "notfound"
4206 then
4207 CXX=""
4208 fi
4209fi
4210if test "$preset_cxx" != "$CXX"
4211then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004212 { $as_echo "$as_me:${as_lineno-$LINENO}: 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 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004217$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004218
4219 By default, distutils will build C++ extension modules with \"$CXX\".
4220 If this is not intended, then set CXX on the configure command line.
4221 " >&2;}
4222fi
4223
4224
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004225# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004226
4227ac_ext=c
4228ac_cpp='$CPP $CPPFLAGS'
4229ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4230ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4231ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4233$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004234# On Suns, sometimes $CPP names a directory.
4235if test -n "$CPP" && test -d "$CPP"; then
4236 CPP=
4237fi
4238if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004239 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004240 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004241else
Martin v. Löwis11437992002-04-12 09:54:03 +00004242 # Double quotes because CPP needs to be expanded
4243 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4244 do
4245 ac_preproc_ok=false
4246for ac_c_preproc_warn_flag in '' yes
4247do
4248 # Use a header file that comes with gcc, so configuring glibc
4249 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004250 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4251 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004252 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004255/* end confdefs.h. */
4256#ifdef __STDC__
4257# include <limits.h>
4258#else
4259# include <assert.h>
4260#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004261 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004262_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004263if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004264
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004265else
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 # Broken: fails on valid input.
4267continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004268fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004269rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004270
Martin v. Löwiseba40652007-08-30 20:10:57 +00004271 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004272 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004275#include <ac_nonexistent.h>
4276_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004277if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004278 # Broken: success on invalid input.
4279continue
4280else
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 # Passes both tests.
4282ac_preproc_ok=:
4283break
4284fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004285rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004286
4287done
4288# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004289rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004290if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004291 break
4292fi
4293
4294 done
4295 ac_cv_prog_CPP=$CPP
4296
4297fi
4298 CPP=$ac_cv_prog_CPP
4299else
4300 ac_cv_prog_CPP=$CPP
4301fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4303$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004304ac_preproc_ok=false
4305for ac_c_preproc_warn_flag in '' yes
4306do
4307 # Use a header file that comes with gcc, so configuring glibc
4308 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004309 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4310 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004311 # On the NeXT, cc -E runs the code through the compiler's parser,
4312 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004314/* end confdefs.h. */
4315#ifdef __STDC__
4316# include <limits.h>
4317#else
4318# include <assert.h>
4319#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004320 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004322if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004323
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004324else
Martin v. Löwis11437992002-04-12 09:54:03 +00004325 # Broken: fails on valid input.
4326continue
4327fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004328rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004329
Martin v. Löwiseba40652007-08-30 20:10:57 +00004330 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004331 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004334#include <ac_nonexistent.h>
4335_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004336if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004337 # Broken: success on invalid input.
4338continue
4339else
Martin v. Löwis11437992002-04-12 09:54:03 +00004340 # Passes both tests.
4341ac_preproc_ok=:
4342break
4343fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004344rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004345
4346done
4347# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004348rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004349if $ac_preproc_ok; then :
4350
Martin v. Löwis11437992002-04-12 09:54:03 +00004351else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004352 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004354as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004355See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004356fi
4357
4358ac_ext=c
4359ac_cpp='$CPP $CPPFLAGS'
4360ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4361ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4362ac_compiler_gnu=$ac_cv_c_compiler_gnu
4363
4364
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4366$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004367if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004368 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004369else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004370 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004371 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004372 # Loop through the user's path and test for each of PROGNAME-LIST
4373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004374for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4375do
4376 IFS=$as_save_IFS
4377 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004378 for ac_prog in grep ggrep; do
4379 for ac_exec_ext in '' $ac_executable_extensions; do
4380 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4381 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4382# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004383 # Check for GNU $ac_path_GREP
4384case `"$ac_path_GREP" --version 2>&1` in
4385*GNU*)
4386 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4387*)
4388 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004389 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004390 while :
4391 do
4392 cat "conftest.in" "conftest.in" >"conftest.tmp"
4393 mv "conftest.tmp" "conftest.in"
4394 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004395 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004396 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4397 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004398 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004399 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4400 # Best one so far, save it but keep looking for a better one
4401 ac_cv_path_GREP="$ac_path_GREP"
4402 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004403 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004404 # 10*(2^10) chars as input seems more than enough
4405 test $ac_count -gt 10 && break
4406 done
4407 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4408esac
4409
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004410 $ac_path_GREP_found && break 3
4411 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004412 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004413 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004414IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004415 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004416 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 +00004417 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004418else
4419 ac_cv_path_GREP=$GREP
4420fi
4421
Martin v. Löwiseba40652007-08-30 20:10:57 +00004422fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4424$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004425 GREP="$ac_cv_path_GREP"
4426
4427
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4429$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004430if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004431 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004432else
4433 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4434 then ac_cv_path_EGREP="$GREP -E"
4435 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004436 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004437 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004438 # Loop through the user's path and test for each of PROGNAME-LIST
4439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004440for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4441do
4442 IFS=$as_save_IFS
4443 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004444 for ac_prog in egrep; do
4445 for ac_exec_ext in '' $ac_executable_extensions; do
4446 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4447 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4448# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004449 # Check for GNU $ac_path_EGREP
4450case `"$ac_path_EGREP" --version 2>&1` in
4451*GNU*)
4452 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4453*)
4454 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004455 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004456 while :
4457 do
4458 cat "conftest.in" "conftest.in" >"conftest.tmp"
4459 mv "conftest.tmp" "conftest.in"
4460 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004461 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004462 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4463 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004464 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004465 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4466 # Best one so far, save it but keep looking for a better one
4467 ac_cv_path_EGREP="$ac_path_EGREP"
4468 ac_path_EGREP_max=$ac_count
4469 fi
4470 # 10*(2^10) chars as input seems more than enough
4471 test $ac_count -gt 10 && break
4472 done
4473 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4474esac
4475
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004476 $ac_path_EGREP_found && break 3
4477 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004478 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004479 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004481 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004482 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 +00004483 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004484else
4485 ac_cv_path_EGREP=$EGREP
4486fi
4487
Martin v. Löwiseba40652007-08-30 20:10:57 +00004488 fi
4489fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4491$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004492 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004493
4494
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4496$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004497if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004498 $as_echo_n "(cached) " >&6
4499else
4500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004501/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004502#include <stdlib.h>
4503#include <stdarg.h>
4504#include <string.h>
4505#include <float.h>
4506
4507int
4508main ()
4509{
4510
4511 ;
4512 return 0;
4513}
4514_ACEOF
4515if ac_fn_c_try_compile "$LINENO"; then :
4516 ac_cv_header_stdc=yes
4517else
4518 ac_cv_header_stdc=no
4519fi
4520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4521
4522if test $ac_cv_header_stdc = yes; then
4523 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4525/* end confdefs.h. */
4526#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004527
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004528_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004530 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004531
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004533 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004534fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004535rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004536
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004537fi
4538
4539if test $ac_cv_header_stdc = yes; then
4540 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4542/* end confdefs.h. */
4543#include <stdlib.h>
4544
4545_ACEOF
4546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4547 $EGREP "free" >/dev/null 2>&1; then :
4548
4549else
4550 ac_cv_header_stdc=no
4551fi
4552rm -f conftest*
4553
4554fi
4555
4556if test $ac_cv_header_stdc = yes; then
4557 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4558 if test "$cross_compiling" = yes; then :
4559 :
4560else
4561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4562/* end confdefs.h. */
4563#include <ctype.h>
4564#include <stdlib.h>
4565#if ((' ' & 0x0FF) == 0x020)
4566# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4567# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4568#else
4569# define ISLOWER(c) \
4570 (('a' <= (c) && (c) <= 'i') \
4571 || ('j' <= (c) && (c) <= 'r') \
4572 || ('s' <= (c) && (c) <= 'z'))
4573# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4574#endif
4575
4576#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4577int
4578main ()
4579{
4580 int i;
4581 for (i = 0; i < 256; i++)
4582 if (XOR (islower (i), ISLOWER (i))
4583 || toupper (i) != TOUPPER (i))
4584 return 2;
4585 return 0;
4586}
4587_ACEOF
4588if ac_fn_c_try_run "$LINENO"; then :
4589
4590else
4591 ac_cv_header_stdc=no
4592fi
4593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4594 conftest.$ac_objext conftest.beam conftest.$ac_ext
4595fi
4596
4597fi
4598fi
4599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4600$as_echo "$ac_cv_header_stdc" >&6; }
4601if test $ac_cv_header_stdc = yes; then
4602
4603$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4604
4605fi
4606
4607# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4608for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4609 inttypes.h stdint.h unistd.h
4610do :
4611 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4612ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4613"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004614if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004615 cat >>confdefs.h <<_ACEOF
4616#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4617_ACEOF
4618
4619fi
4620
4621done
4622
4623
4624
4625 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01004626if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004627 MINIX=yes
4628else
4629 MINIX=
4630fi
4631
4632
4633 if test "$MINIX" = yes; then
4634
4635$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4636
4637
4638$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4639
4640
4641$as_echo "#define _MINIX 1" >>confdefs.h
4642
4643 fi
4644
4645
4646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4647$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004648if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004649 $as_echo_n "(cached) " >&6
4650else
4651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4652/* end confdefs.h. */
4653
4654# define __EXTENSIONS__ 1
4655 $ac_includes_default
4656int
4657main ()
4658{
4659
4660 ;
4661 return 0;
4662}
4663_ACEOF
4664if ac_fn_c_try_compile "$LINENO"; then :
4665 ac_cv_safe_to_define___extensions__=yes
4666else
4667 ac_cv_safe_to_define___extensions__=no
4668fi
4669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4670fi
4671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4672$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4673 test $ac_cv_safe_to_define___extensions__ = yes &&
4674 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4675
4676 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4677
4678 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4679
4680 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4681
4682 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4683
4684
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004685
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004686# Check for unsupported systems
4687case $ac_sys_system/$ac_sys_release in
4688atheos*|Linux*/1*)
4689 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4690 echo See README for details.
4691 exit 1;;
4692esac
4693
4694
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4696$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004697
4698# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004699if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004700 withval=$with_suffix;
4701 case $withval in
4702 no) EXEEXT=;;
4703 yes) EXEEXT=.exe;;
4704 *) EXEEXT=$withval;;
4705 esac
4706fi
4707
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4709$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004710
4711# Test whether we're running on a non-case-sensitive system, in which
4712# case we give a warning if no ext is given
4713
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4715$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004716if test ! -d CaseSensitiveTestDir; then
4717mkdir CaseSensitiveTestDir
4718fi
4719
4720if test -d casesensitivetestdir
4721then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4723$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004724 BUILDEXEEXT=.exe
4725else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4727$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004728 BUILDEXEEXT=$EXEEXT
4729fi
4730rmdir CaseSensitiveTestDir
4731
4732case $MACHDEP in
4733bsdos*)
4734 case $CC in
4735 gcc) CC="$CC -D_HAVE_BSDI";;
4736 esac;;
4737esac
4738
4739case $ac_sys_system in
4740hp*|HP*)
4741 case $CC in
4742 cc|*/cc) CC="$CC -Ae";;
4743 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004744SunOS*)
4745 # Some functions have a prototype only with that define, e.g. confstr
4746
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004747$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004748
4749 ;;
4750esac
4751
4752
4753
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4755$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004756if test -z "$LIBRARY"
4757then
4758 LIBRARY='libpython$(VERSION).a'
4759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4761$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004762
4763# LDLIBRARY is the name of the library to link against (as opposed to the
4764# name of the library into which to insert object files). BLDLIBRARY is also
4765# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4766# is blank as the main program is not linked directly against LDLIBRARY.
4767# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4768# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4769# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4770# DLLLIBRARY is the shared (i.e., DLL) library.
4771#
4772# RUNSHARED is used to run shared python without installed libraries
4773#
4774# INSTSONAME is the name of the shared library that will be use to install
4775# on the system - some systems like version suffix, others don't
4776
4777
4778
4779
4780
4781
4782LDLIBRARY="$LIBRARY"
4783BLDLIBRARY='$(LDLIBRARY)'
4784INSTSONAME='$(LDLIBRARY)'
4785DLLLIBRARY=''
4786LDLIBRARYDIR=''
4787RUNSHARED=''
4788
4789# LINKCC is the command that links the python executable -- default is $(CC).
4790# If CXX is set, and if it is needed to link a main function that was
4791# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4792# python might then depend on the C++ runtime
4793# This is altered for AIX in order to build the export list before
4794# linking.
4795
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4797$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004798if test -z "$LINKCC"
4799then
4800 LINKCC='$(PURIFY) $(MAINCC)'
4801 case $ac_sys_system in
4802 AIX*)
4803 exp_extra="\"\""
4804 if test $ac_sys_release -ge 5 -o \
4805 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4806 exp_extra="."
4807 fi
4808 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004809 QNX*)
4810 # qcc must be used because the other compilers do not
4811 # support -N.
4812 LINKCC=qcc;;
4813 esac
4814fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4816$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004817
4818# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4819# make sure we default having it set to "no": this is used by
4820# distutils.unixccompiler to know if it should add --enable-new-dtags
4821# to linker command lines, and failing to detect GNU ld simply results
4822# in the same bahaviour as before.
4823
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4825$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004826ac_prog=ld
4827if test "$GCC" = yes; then
4828 ac_prog=`$CC -print-prog-name=ld`
4829fi
4830case `"$ac_prog" -V 2>&1 < /dev/null` in
4831 *GNU*)
4832 GNULD=yes;;
4833 *)
4834 GNULD=no;;
4835esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4837$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004838
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4840$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004841# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004842if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004843 enableval=$enable_shared;
4844fi
4845
4846
4847if test -z "$enable_shared"
4848then
4849 case $ac_sys_system in
4850 CYGWIN* | atheos*)
4851 enable_shared="yes";;
4852 *)
4853 enable_shared="no";;
4854 esac
4855fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4857$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004858
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4860$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004861# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004862if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004863 enableval=$enable_profiling; ac_save_cc="$CC"
4864 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004865 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004866 ac_enable_profiling="no"
4867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004869/* end confdefs.h. */
4870int main() { return 0; }
4871_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004872if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004873 ac_enable_profiling="yes"
4874else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004875 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004876fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004879fi
4880
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004881 CC="$ac_save_cc"
4882fi
4883
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4885$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004886
4887case "$ac_enable_profiling" in
4888 "yes")
4889 BASECFLAGS="-pg $BASECFLAGS"
4890 LDFLAGS="-pg $LDFLAGS"
4891 ;;
4892esac
4893
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4895$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004896
4897# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4898# library that we build, but we do not want to link against it (we
4899# will find it with a -framework option). For this reason there is an
4900# extra variable BLDLIBRARY against which Python and the extension
4901# modules are linked, BLDLIBRARY. This is normally the same as
4902# LDLIBRARY, but empty for MacOSX framework builds.
4903if test "$enable_framework"
4904then
4905 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4906 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4907 BLDLIBRARY=''
4908else
4909 BLDLIBRARY='$(LDLIBRARY)'
4910fi
4911
4912# Other platforms follow
4913if test $enable_shared = "yes"; then
4914
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004915$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004916
4917 case $ac_sys_system in
4918 BeOS*)
4919 LDLIBRARY='libpython$(VERSION).so'
4920 ;;
4921 CYGWIN*)
4922 LDLIBRARY='libpython$(VERSION).dll.a'
4923 DLLLIBRARY='libpython$(VERSION).dll'
4924 ;;
4925 SunOS*)
4926 LDLIBRARY='libpython$(VERSION).so'
4927 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4928 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4929 INSTSONAME="$LDLIBRARY".$SOVERSION
4930 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02004931 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004932 LDLIBRARY='libpython$(VERSION).so'
4933 BLDLIBRARY='-L. -lpython$(VERSION)'
4934 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4935 case $ac_sys_system in
4936 FreeBSD*)
4937 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4938 ;;
4939 esac
4940 INSTSONAME="$LDLIBRARY".$SOVERSION
4941 ;;
4942 hp*|HP*)
4943 case `uname -m` in
4944 ia64)
4945 LDLIBRARY='libpython$(VERSION).so'
4946 ;;
4947 *)
4948 LDLIBRARY='libpython$(VERSION).sl'
4949 ;;
4950 esac
4951 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4952 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4953 ;;
4954 OSF*)
4955 LDLIBRARY='libpython$(VERSION).so'
4956 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4957 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4958 ;;
4959 atheos*)
4960 LDLIBRARY='libpython$(VERSION).so'
4961 BLDLIBRARY='-L. -lpython$(VERSION)'
4962 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4963 ;;
4964 Darwin*)
4965 LDLIBRARY='libpython$(VERSION).dylib'
4966 BLDLIBRARY='-L. -lpython$(VERSION)'
4967 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4968 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00004969 AIX*)
4970 LDLIBRARY='libpython$(VERSION).so'
4971 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4972 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004973
4974 esac
4975else # shared is disabled
4976 case $ac_sys_system in
4977 CYGWIN*)
4978 BLDLIBRARY='$(LIBRARY)'
4979 LDLIBRARY='libpython$(VERSION).dll.a'
4980 ;;
4981 esac
4982fi
4983
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4985$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004986
4987if test -n "$ac_tool_prefix"; then
4988 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4989set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4991$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004992if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004993 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004994else
4995 if test -n "$RANLIB"; then
4996 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4997else
4998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4999for as_dir in $PATH
5000do
5001 IFS=$as_save_IFS
5002 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005003 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005004 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5005 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005007 break 2
5008 fi
5009done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005010 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005011IFS=$as_save_IFS
5012
5013fi
5014fi
5015RANLIB=$ac_cv_prog_RANLIB
5016if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5018$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5021$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005022fi
5023
5024
5025fi
5026if test -z "$ac_cv_prog_RANLIB"; then
5027 ac_ct_RANLIB=$RANLIB
5028 # Extract the first word of "ranlib", so it can be a program name with args.
5029set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5031$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005032if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005033 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005034else
5035 if test -n "$ac_ct_RANLIB"; then
5036 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5037else
5038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5039for as_dir in $PATH
5040do
5041 IFS=$as_save_IFS
5042 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005043 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005044 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5045 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005047 break 2
5048 fi
5049done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005050 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005051IFS=$as_save_IFS
5052
5053fi
5054fi
5055ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5056if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5058$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5061$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005062fi
5063
5064 if test "x$ac_ct_RANLIB" = x; then
5065 RANLIB=":"
5066 else
5067 case $cross_compiling:$ac_tool_warned in
5068yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005071ac_tool_warned=yes ;;
5072esac
5073 RANLIB=$ac_ct_RANLIB
5074 fi
5075else
5076 RANLIB="$ac_cv_prog_RANLIB"
5077fi
5078
5079
5080for ac_prog in ar aal
5081do
5082 # Extract the first word of "$ac_prog", so it can be a program name with args.
5083set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5085$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005086if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005087 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005088else
5089 if test -n "$AR"; then
5090 ac_cv_prog_AR="$AR" # Let the user override the test.
5091else
5092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5093for as_dir in $PATH
5094do
5095 IFS=$as_save_IFS
5096 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005097 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005098 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5099 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005100 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005101 break 2
5102 fi
5103done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005104 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005105IFS=$as_save_IFS
5106
5107fi
5108fi
5109AR=$ac_cv_prog_AR
5110if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5112$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005113else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5115$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005116fi
5117
5118
5119 test -n "$AR" && break
5120done
5121test -n "$AR" || AR="ar"
5122
5123
5124# tweak ARFLAGS only if the user didn't set it on the command line
5125
5126if test -z "$ARFLAGS"
5127then
5128 ARFLAGS="rc"
5129fi
5130
5131
5132# Extract the first word of "svnversion", so it can be a program name with args.
5133set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5135$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005136if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005137 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005138else
5139 if test -n "$SVNVERSION"; then
5140 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5141else
5142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5143for as_dir in $PATH
5144do
5145 IFS=$as_save_IFS
5146 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005147 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005148 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5149 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005151 break 2
5152 fi
5153done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005154 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005155IFS=$as_save_IFS
5156
5157 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5158fi
5159fi
5160SVNVERSION=$ac_cv_prog_SVNVERSION
5161if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5163$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005164else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5166$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005167fi
5168
5169
5170if test $SVNVERSION = found
5171then
5172 SVNVERSION="svnversion \$(srcdir)"
5173else
5174 SVNVERSION="echo Unversioned directory"
5175fi
5176
Georg Brandl3a5508e2011-03-06 10:42:21 +01005177
5178
5179
5180# Extract the first word of "hg", so it can be a program name with args.
5181set dummy hg; ac_word=$2
5182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5183$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005184if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005185 $as_echo_n "(cached) " >&6
5186else
5187 if test -n "$HAS_HG"; then
5188 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5189else
5190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5191for as_dir in $PATH
5192do
5193 IFS=$as_save_IFS
5194 test -z "$as_dir" && as_dir=.
5195 for ac_exec_ext in '' $ac_executable_extensions; do
5196 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5197 ac_cv_prog_HAS_HG="found"
5198 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5199 break 2
5200 fi
5201done
5202 done
5203IFS=$as_save_IFS
5204
5205 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5206fi
5207fi
5208HAS_HG=$ac_cv_prog_HAS_HG
5209if test -n "$HAS_HG"; then
5210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5211$as_echo "$HAS_HG" >&6; }
5212else
5213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5214$as_echo "no" >&6; }
5215fi
5216
5217
5218if test $HAS_HG = found
5219then
5220 HGVERSION="hg id -i \$(srcdir)"
5221 HGTAG="hg id -t \$(srcdir)"
5222 HGBRANCH="hg id -b \$(srcdir)"
5223else
5224 HGVERSION=""
5225 HGTAG=""
5226 HGBRANCH=""
5227fi
5228
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005229case $MACHDEP in
5230bsdos*|hp*|HP*)
5231 # install -d does not work on BSDI or HP-UX
5232 if test -z "$INSTALL"
5233 then
5234 INSTALL="${srcdir}/install-sh -c"
5235 fi
5236esac
5237ac_aux_dir=
5238for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005239 if test -f "$ac_dir/install-sh"; then
5240 ac_aux_dir=$ac_dir
5241 ac_install_sh="$ac_aux_dir/install-sh -c"
5242 break
5243 elif test -f "$ac_dir/install.sh"; then
5244 ac_aux_dir=$ac_dir
5245 ac_install_sh="$ac_aux_dir/install.sh -c"
5246 break
5247 elif test -f "$ac_dir/shtool"; then
5248 ac_aux_dir=$ac_dir
5249 ac_install_sh="$ac_aux_dir/shtool install -c"
5250 break
5251 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005252done
5253if test -z "$ac_aux_dir"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005254 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005255fi
5256
5257# These three variables are undocumented and unsupported,
5258# and are intended to be withdrawn in a future Autoconf release.
5259# They can cause serious problems if a builder's source tree is in a directory
5260# whose full name contains unusual characters.
5261ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5262ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5263ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5264
5265
5266# Find a good install program. We prefer a C program (faster),
5267# so one script is as good as another. But avoid the broken or
5268# incompatible versions:
5269# SysV /etc/install, /usr/sbin/install
5270# SunOS /usr/etc/install
5271# IRIX /sbin/install
5272# AIX /bin/install
5273# AmigaOS /C/install, which installs bootblocks on floppy discs
5274# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5275# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5276# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5277# OS/2's system install, which has a completely different semantic
5278# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005279# Reject install programs that cannot install multiple files.
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5281$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005282if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005283if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005284 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005285else
5286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5287for as_dir in $PATH
5288do
5289 IFS=$as_save_IFS
5290 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005291 # Account for people who put trailing slashes in PATH elements.
5292case $as_dir/ in #((
5293 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005294 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005295 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005296 /usr/ucb/* ) ;;
5297 *)
5298 # OSF1 and SCO ODT 3.0 have their own names for install.
5299 # Don't use installbsd from OSF since it installs stuff as root
5300 # by default.
5301 for ac_prog in ginstall scoinst install; do
5302 for ac_exec_ext in '' $ac_executable_extensions; do
5303 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5304 if test $ac_prog = install &&
5305 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5306 # AIX install. It has an incompatible calling convention.
5307 :
5308 elif test $ac_prog = install &&
5309 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5310 # program-specific install script used by HP pwplus--don't use.
5311 :
5312 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005313 rm -rf conftest.one conftest.two conftest.dir
5314 echo one > conftest.one
5315 echo two > conftest.two
5316 mkdir conftest.dir
5317 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5318 test -s conftest.one && test -s conftest.two &&
5319 test -s conftest.dir/conftest.one &&
5320 test -s conftest.dir/conftest.two
5321 then
5322 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5323 break 3
5324 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005325 fi
5326 fi
5327 done
5328 done
5329 ;;
5330esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005331
5332 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005333IFS=$as_save_IFS
5334
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005335rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005336
5337fi
5338 if test "${ac_cv_path_install+set}" = set; then
5339 INSTALL=$ac_cv_path_install
5340 else
5341 # As a last resort, use the slow shell script. Don't cache a
5342 # value for INSTALL within a source directory, because that will
5343 # break other packages using the cache if that directory is
5344 # removed, or if the value is a relative name.
5345 INSTALL=$ac_install_sh
5346 fi
5347fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5349$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005350
5351# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5352# It thinks the first close brace ends the variable substitution.
5353test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5354
5355test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5356
5357test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5358
5359
5360# Not every filesystem supports hard links
5361
5362if test -z "$LN" ; then
5363 case $ac_sys_system in
5364 BeOS*) LN="ln -s";;
5365 CYGWIN*) LN="ln -s";;
5366 atheos*) LN="ln -s";;
5367 *) LN=ln;;
5368 esac
5369fi
5370
5371# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5373$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005374
5375# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005376if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005377 withval=$with_pydebug;
5378if test "$withval" != no
5379then
5380
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005381$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005382
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5384$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005385 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005386else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5387$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005388fi
5389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5391$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005392fi
5393
5394
5395# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5396# merged with this chunk of code?
5397
5398# Optimizer/debugger flags
5399# ------------------------
5400# (The following bit of code is complicated enough - please keep things
5401# indented properly. Just pretend you're editing Python code. ;-)
5402
5403# There are two parallel sets of case statements below, one that checks to
5404# see if OPT was set and one that does BASECFLAGS setting based upon
5405# compiler and platform. BASECFLAGS tweaks need to be made even if the
5406# user set OPT.
5407
5408# tweak OPT based on compiler and platform, only if the user didn't set
5409# it on the command line
5410
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005411if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005412then
5413 case $GCC in
5414 yes)
5415 if test "$CC" != 'g++' ; then
5416 STRICT_PROTO="-Wstrict-prototypes"
5417 fi
5418 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5419 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5420 WRAP="-fwrapv"
5421 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005422
5423 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005424 case $CC in
5425 *clang*) WRAP="-fwrapv"
5426 ;;
5427 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005428
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005429 case $ac_cv_prog_cc_g in
5430 yes)
5431 if test "$Py_DEBUG" = 'true' ; then
5432 # Optimization messes up debuggers, so turn it off for
5433 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005434 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005435 else
5436 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5437 fi
5438 ;;
5439 *)
5440 OPT="-O3 -Wall $STRICT_PROTO"
5441 ;;
5442 esac
5443 case $ac_sys_system in
5444 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5445 ;;
5446 esac
5447 ;;
5448
5449 *)
5450 OPT="-O"
5451 ;;
5452 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005453fi
5454
5455
5456
5457# The -arch flags for universal builds on OSX
5458UNIVERSAL_ARCH_FLAGS=
5459
5460
5461# tweak BASECFLAGS based on compiler and platform
5462case $GCC in
5463yes)
5464 # Python violates C99 rules, by casting between incompatible
5465 # pointer types. GCC may generate bad code as a result of that,
5466 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5468$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005469 ac_save_cc="$CC"
5470 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005471 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005472 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005475/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005476
5477int
5478main ()
5479{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005480
Gregory P. Smith373469a2009-11-01 21:03:38 +00005481 ;
5482 return 0;
5483}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005484_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005485if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005486 ac_cv_no_strict_aliasing_ok=yes
5487else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005488 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005489fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005491fi
5492
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005493 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5495$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496 if test $ac_cv_no_strict_aliasing_ok = yes
5497 then
5498 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5499 fi
5500
5501 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5502 # support. Without this, treatment of subnormals doesn't follow
5503 # the standard.
5504 case $ac_sys_machine in
5505 alpha*)
5506 BASECFLAGS="$BASECFLAGS -mieee"
5507 ;;
5508 esac
5509
5510 case $ac_sys_system in
5511 SCO_SV*)
5512 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5513 ;;
5514 # is there any other compiler on Darwin besides gcc?
5515 Darwin*)
5516 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5517 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005518 if test "${CC}" = gcc
5519 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5521$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005522 case "${UNIVERSALSDK}" in
5523 */MacOSX10.4u.sdk)
5524 # Build using 10.4 SDK, force usage of gcc when the
5525 # compiler is gcc, otherwise the user will get very
5526 # confusing error messages when building on OSX 10.6
5527 CC=gcc-4.0
5528 CPP=cpp-4.0
5529 ;;
5530 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5532$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005533 fi
5534
5535 # Calculate the right deployment target for this build.
5536 #
5537 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5538 if test ${cur_target} '>' 10.2; then
5539 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005540 if test ${enable_universalsdk}; then
5541 if test "${UNIVERSAL_ARCHS}" = "all"; then
5542 # Ensure that the default platform for a
5543 # 4-way universal build is OSX 10.5,
5544 # that's the first OS release where
5545 # 4-way builds make sense.
5546 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005547
5548 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5549 cur_target='10.5'
5550
5551 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5552 cur_target='10.5'
5553
5554 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5555 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005556 fi
5557 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005558 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005559 # On Intel macs default to a deployment
5560 # target of 10.4, that's the first OSX
5561 # release with Intel support.
5562 cur_target="10.4"
5563 fi
5564 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005565 fi
5566 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5567
5568 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5569 # environment with a value that is the same as what we'll use
5570 # in the Makefile to ensure that we'll get the same compiler
5571 # environment during configure and build time.
5572 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5573 export MACOSX_DEPLOYMENT_TARGET
5574 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5575
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005576 if test "${enable_universalsdk}"; then
5577 UNIVERSAL_ARCH_FLAGS=""
5578 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5579 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5580 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005581 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005582
5583 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5584 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5585 LIPO_32BIT_FLAGS=""
5586 ARCH_RUN_32BIT="true"
5587
5588 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5589 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5590 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005591 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005592
5593 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5594 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5595 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005596 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005597
5598 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5599 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5600 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005601 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005602
5603 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005604 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 +00005605
5606 fi
5607
5608
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005609 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5610 if test "${UNIVERSALSDK}" != "/"
5611 then
5612 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5613 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5614 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005615 fi
5616
5617 fi
5618
5619
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005620 ;;
5621 OSF*)
5622 BASECFLAGS="$BASECFLAGS -mieee"
5623 ;;
5624 esac
5625 ;;
5626
5627*)
5628 case $ac_sys_system in
5629 OpenUNIX*|UnixWare*)
5630 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5631 ;;
5632 OSF*)
5633 BASECFLAGS="$BASECFLAGS -ieee -std"
5634 ;;
5635 SCO_SV*)
5636 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5637 ;;
5638 esac
5639 ;;
5640esac
5641
5642if test "$Py_DEBUG" = 'true'; then
5643 :
5644else
5645 OPT="-DNDEBUG $OPT"
5646fi
5647
5648if test "$ac_arch_flags"
5649then
5650 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5651fi
5652
5653# disable check for icc since it seems to pass, but generates a warning
5654if test "$CC" = icc
5655then
5656 ac_cv_opt_olimit_ok=no
5657fi
5658
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5660$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005661if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005662 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005663else
5664 ac_save_cc="$CC"
5665CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005667/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005668
5669int
5670main ()
5671{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005672
Gregory P. Smith373469a2009-11-01 21:03:38 +00005673 ;
5674 return 0;
5675}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005676_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005677if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005678 ac_cv_opt_olimit_ok=yes
5679else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005680 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005681
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005682fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005684CC="$ac_save_cc"
5685fi
5686
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5688$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005689if test $ac_cv_opt_olimit_ok = yes; then
5690 case $ac_sys_system in
5691 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5692 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5693 # environment?
5694 Darwin*)
5695 ;;
5696 *)
5697 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5698 ;;
5699 esac
5700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5702$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005703 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005704 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005705else
5706 ac_save_cc="$CC"
5707 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005709/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005710
5711int
5712main ()
5713{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005714
Gregory P. Smith373469a2009-11-01 21:03:38 +00005715 ;
5716 return 0;
5717}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005718_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005719if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005720 ac_cv_olimit_ok=yes
5721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005722 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005723
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005724fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005726 CC="$ac_save_cc"
5727fi
5728
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5730$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005731 if test $ac_cv_olimit_ok = yes; then
5732 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5733 fi
5734fi
5735
5736# Check whether GCC supports PyArg_ParseTuple format
5737if test "$GCC" = "yes"
5738then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5740$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005741 save_CFLAGS=$CFLAGS
5742 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005744/* end confdefs.h. */
5745
5746 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005747int
5748main ()
5749{
5750
5751 ;
5752 return 0;
5753}
Matthias Klosec511b472010-05-08 11:01:39 +00005754
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005755_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005756if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005757
Matthias Klosec511b472010-05-08 11:01:39 +00005758
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005759$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005760
Matthias Klosec511b472010-05-08 11:01:39 +00005761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005762$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005763
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005764else
Matthias Klosec511b472010-05-08 11:01:39 +00005765
5766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005767$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005768
5769fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5771 CFLAGS=$save_CFLAGS
5772fi
5773
5774# On some compilers, pthreads are available without further options
5775# (e.g. MacOS X). On some of these systems, the compiler will not
5776# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5777# So we have to see first whether pthreads are available without
5778# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5780$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005781if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005782 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005784 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005785 ac_cv_pthread_is_default=no
5786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005788/* end confdefs.h. */
5789
5790#include <pthread.h>
5791
5792void* routine(void* p){return NULL;}
5793
5794int main(){
5795 pthread_t p;
5796 if(pthread_create(&p,NULL,routine,NULL)!=0)
5797 return 1;
5798 (void)pthread_detach(p);
5799 return 0;
5800}
5801
5802_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005803if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005804
5805 ac_cv_pthread_is_default=yes
5806 ac_cv_kthread=no
5807 ac_cv_pthread=no
5808
5809else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005810 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005811fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5813 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005814fi
5815
5816
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005817fi
5818
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5820$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005821
5822
5823if test $ac_cv_pthread_is_default = yes
5824then
5825 ac_cv_kpthread=no
5826else
5827# -Kpthread, if available, provides the right #defines
5828# and linker options to make pthread_create available
5829# Some compilers won't report that they do not support -Kpthread,
5830# so we need to run a program to see whether it really made the
5831# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5833$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005834if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005835 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005836else
5837 ac_save_cc="$CC"
5838CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005839if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005840 ac_cv_kpthread=no
5841else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005843/* end confdefs.h. */
5844
5845#include <pthread.h>
5846
5847void* routine(void* p){return NULL;}
5848
5849int main(){
5850 pthread_t p;
5851 if(pthread_create(&p,NULL,routine,NULL)!=0)
5852 return 1;
5853 (void)pthread_detach(p);
5854 return 0;
5855}
5856
5857_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005858if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005859 ac_cv_kpthread=yes
5860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005861 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005862fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5864 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005865fi
5866
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005867CC="$ac_save_cc"
5868fi
5869
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5871$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005872fi
5873
5874if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5875then
5876# -Kthread, if available, provides the right #defines
5877# and linker options to make pthread_create available
5878# Some compilers won't report that they do not support -Kthread,
5879# so we need to run a program to see whether it really made the
5880# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5882$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005883if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005884 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005885else
5886 ac_save_cc="$CC"
5887CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005888if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005889 ac_cv_kthread=no
5890else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005892/* end confdefs.h. */
5893
5894#include <pthread.h>
5895
5896void* routine(void* p){return NULL;}
5897
5898int main(){
5899 pthread_t p;
5900 if(pthread_create(&p,NULL,routine,NULL)!=0)
5901 return 1;
5902 (void)pthread_detach(p);
5903 return 0;
5904}
5905
5906_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005907if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005908 ac_cv_kthread=yes
5909else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005910 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005911fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005914fi
5915
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005916CC="$ac_save_cc"
5917fi
5918
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5920$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005921fi
5922
5923if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5924then
5925# -pthread, if available, provides the right #defines
5926# and linker options to make pthread_create available
5927# Some compilers won't report that they do not support -pthread,
5928# so we need to run a program to see whether it really made the
5929# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5931$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005932if ${ac_cv_thread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005933 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005934else
5935 ac_save_cc="$CC"
5936CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005937if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005938 ac_cv_pthread=no
5939else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005941/* end confdefs.h. */
5942
5943#include <pthread.h>
5944
5945void* routine(void* p){return NULL;}
5946
5947int main(){
5948 pthread_t p;
5949 if(pthread_create(&p,NULL,routine,NULL)!=0)
5950 return 1;
5951 (void)pthread_detach(p);
5952 return 0;
5953}
5954
5955_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005956if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005957 ac_cv_pthread=yes
5958else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005959 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005963fi
5964
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005965CC="$ac_save_cc"
5966fi
5967
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5969$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005970fi
5971
5972# If we have set a CC compiler flag for thread support then
5973# check if it works for CXX, too.
5974ac_cv_cxx_thread=no
5975if test ! -z "$CXX"
5976then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5978$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005979ac_save_cxx="$CXX"
5980
5981if test "$ac_cv_kpthread" = "yes"
5982then
5983 CXX="$CXX -Kpthread"
5984 ac_cv_cxx_thread=yes
5985elif test "$ac_cv_kthread" = "yes"
5986then
5987 CXX="$CXX -Kthread"
5988 ac_cv_cxx_thread=yes
5989elif test "$ac_cv_pthread" = "yes"
5990then
5991 CXX="$CXX -pthread"
5992 ac_cv_cxx_thread=yes
5993fi
5994
5995if test $ac_cv_cxx_thread = yes
5996then
5997 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5998 $CXX -c conftest.$ac_ext 2>&5
5999 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6000 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6001 then
6002 ac_cv_cxx_thread=yes
6003 else
6004 ac_cv_cxx_thread=no
6005 fi
6006 rm -fr conftest*
6007fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6009$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006010fi
6011CXX="$ac_save_cxx"
6012
6013
6014# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6016$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006017if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006018 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006021/* end confdefs.h. */
6022#include <stdlib.h>
6023#include <stdarg.h>
6024#include <string.h>
6025#include <float.h>
6026
6027int
6028main ()
6029{
6030
6031 ;
6032 return 0;
6033}
6034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006035if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006036 ac_cv_header_stdc=yes
6037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006038 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006039fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6041
6042if test $ac_cv_header_stdc = yes; then
6043 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006045/* end confdefs.h. */
6046#include <string.h>
6047
6048_ACEOF
6049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006050 $EGREP "memchr" >/dev/null 2>&1; then :
6051
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006052else
6053 ac_cv_header_stdc=no
6054fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006055rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006056
6057fi
6058
6059if test $ac_cv_header_stdc = yes; then
6060 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006062/* end confdefs.h. */
6063#include <stdlib.h>
6064
6065_ACEOF
6066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006067 $EGREP "free" >/dev/null 2>&1; then :
6068
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006069else
6070 ac_cv_header_stdc=no
6071fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006072rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006073
6074fi
6075
6076if test $ac_cv_header_stdc = yes; then
6077 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006078 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006079 :
6080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006082/* end confdefs.h. */
6083#include <ctype.h>
6084#include <stdlib.h>
6085#if ((' ' & 0x0FF) == 0x020)
6086# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6087# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6088#else
6089# define ISLOWER(c) \
6090 (('a' <= (c) && (c) <= 'i') \
6091 || ('j' <= (c) && (c) <= 'r') \
6092 || ('s' <= (c) && (c) <= 'z'))
6093# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6094#endif
6095
6096#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6097int
6098main ()
6099{
6100 int i;
6101 for (i = 0; i < 256; i++)
6102 if (XOR (islower (i), ISLOWER (i))
6103 || toupper (i) != TOUPPER (i))
6104 return 2;
6105 return 0;
6106}
6107_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006108if ac_fn_c_try_run "$LINENO"; then :
6109
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006111 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006112fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6114 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006115fi
6116
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006117fi
6118fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6120$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006121if test $ac_cv_header_stdc = yes; then
6122
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006123$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006124
6125fi
6126
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006127for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6128fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006129ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006130shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006131unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006132sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6133sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006134sys/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 +00006135sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006136sys/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 +00006137sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006138bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006139do :
6140 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6141ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006142if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006143 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006144#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006145_ACEOF
6146
6147fi
6148
Guido van Rossum627b2d71993-12-24 10:39:16 +00006149done
6150
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006151ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006152for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006153 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6155$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006156if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006157 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006158else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006160/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006161#include <sys/types.h>
6162#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006163
Martin v. Löwis11437992002-04-12 09:54:03 +00006164int
6165main ()
6166{
6167if ((DIR *) 0)
6168return 0;
6169 ;
6170 return 0;
6171}
6172_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006173if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006174 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006175else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006176 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006179fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006180eval ac_res=\$$as_ac_Header
6181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6182$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006183if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006184 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006185#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006186_ACEOF
6187
6188ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006189fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006190
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006191done
6192# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6193if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6195$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006196if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006197 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006198else
Martin v. Löwis11437992002-04-12 09:54:03 +00006199 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006202
Martin v. Löwiseba40652007-08-30 20:10:57 +00006203/* Override any GCC internal prototype to avoid an error.
6204 Use char because int might match the return type of a GCC
6205 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006206#ifdef __cplusplus
6207extern "C"
6208#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006209char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006210int
6211main ()
6212{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006213return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006214 ;
6215 return 0;
6216}
6217_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006218for ac_lib in '' dir; do
6219 if test -z "$ac_lib"; then
6220 ac_res="none required"
6221 else
6222 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006223 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006224 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006225 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006226 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006227fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006228rm -f core conftest.err conftest.$ac_objext \
6229 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006230 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006231 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006233done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006234if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006235
Martin v. Löwiseba40652007-08-30 20:10:57 +00006236else
6237 ac_cv_search_opendir=no
6238fi
6239rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006240LIBS=$ac_func_search_save_LIBS
6241fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6243$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006244ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006245if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006246 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006247
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006248fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006249
Michael W. Hudson54241132001-12-07 15:38:26 +00006250else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6252$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006253if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006254 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006255else
6256 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006259
Martin v. Löwiseba40652007-08-30 20:10:57 +00006260/* Override any GCC internal prototype to avoid an error.
6261 Use char because int might match the return type of a GCC
6262 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006263#ifdef __cplusplus
6264extern "C"
6265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006266char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006267int
6268main ()
6269{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006270return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006271 ;
6272 return 0;
6273}
6274_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006275for ac_lib in '' x; do
6276 if test -z "$ac_lib"; then
6277 ac_res="none required"
6278 else
6279 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006280 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006281 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006282 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006283 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006284fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006285rm -f core conftest.err conftest.$ac_objext \
6286 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006287 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006288 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006290done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006291if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006292
Martin v. Löwiseba40652007-08-30 20:10:57 +00006293else
6294 ac_cv_search_opendir=no
6295fi
6296rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006297LIBS=$ac_func_search_save_LIBS
6298fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6300$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006301ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006302if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006303 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006304
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006305fi
6306
6307fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006308
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6310$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006311if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006312 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006315/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006316#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317int
6318main ()
6319{
6320return makedev(0, 0);
6321 ;
6322 return 0;
6323}
6324_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006325if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006326 ac_cv_header_sys_types_h_makedev=yes
6327else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006328 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006329fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006330rm -f core conftest.err conftest.$ac_objext \
6331 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006332
6333fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6335$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006336
6337if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006338ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006339if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006340
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006341$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006342
6343fi
6344
6345
6346
6347 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006348 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006349if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006350
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006351$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006352
6353fi
6354
6355
6356 fi
6357fi
6358
Michael W. Hudson54241132001-12-07 15:38:26 +00006359
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006361for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006362do :
6363 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006364#ifdef HAVE_CURSES_H
6365#include <curses.h>
6366#endif
6367
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006368"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006369if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006370 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006371#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006372_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006373
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006374fi
6375
6376done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006377
6378
Martin v. Löwis11017b12006-01-14 18:12:57 +00006379# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006380for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006381do :
6382 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 +00006383#ifdef HAVE_ASM_TYPES_H
6384#include <asm/types.h>
6385#endif
6386#ifdef HAVE_SYS_SOCKET_H
6387#include <sys/socket.h>
6388#endif
6389
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006390"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006391if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006392 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006393#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006394_ACEOF
6395
6396fi
6397
6398done
6399
6400
Guido van Rossum627b2d71993-12-24 10:39:16 +00006401# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006402was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6404$as_echo_n "checking for clock_t in time.h... " >&6; }
6405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006406/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006407#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006408
6409_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006411 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006412 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006413else
Martin v. Löwis11437992002-04-12 09:54:03 +00006414
6415
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006416$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006417
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006418
Guido van Rossum627b2d71993-12-24 10:39:16 +00006419fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006420rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006421
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6423$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006424
Neal Norwitz11690112002-07-30 01:08:28 +00006425# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6427$as_echo_n "checking for makedev... " >&6; }
6428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006429/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006430
6431#if defined(MAJOR_IN_MKDEV)
6432#include <sys/mkdev.h>
6433#elif defined(MAJOR_IN_SYSMACROS)
6434#include <sys/sysmacros.h>
6435#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006436#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006437#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006438int
6439main ()
6440{
6441 makedev(0, 0)
6442 ;
6443 return 0;
6444}
6445_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006446if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006447 ac_cv_has_makedev=yes
6448else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006449 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006450fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006451rm -f core conftest.err conftest.$ac_objext \
6452 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006453if test "$ac_cv_has_makedev" = "no"; then
6454 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006456/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006457
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006458#define _OSF_SOURCE 1
6459#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006460
Neal Norwitz11690112002-07-30 01:08:28 +00006461int
6462main ()
6463{
6464 makedev(0, 0)
6465 ;
6466 return 0;
6467}
6468_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006469if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006470 ac_cv_has_makedev=yes
6471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006472 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006474rm -f core conftest.err conftest.$ac_objext \
6475 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006476 if test "$ac_cv_has_makedev" = "yes"; then
6477
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006478$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006479
6480 fi
6481fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6483$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006484if test "$ac_cv_has_makedev" = "yes"; then
6485
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006486$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006487
6488fi
6489
Martin v. Löwis399a6892002-10-04 10:22:02 +00006490# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6491# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6492# defined, but the compiler does not support pragma redefine_extname,
6493# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6494# structures (such as rlimit64) without declaring them. As a
6495# work-around, disable LFS on such configurations
6496
6497use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6499$as_echo_n "checking Solaris LFS bug... " >&6; }
6500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006501/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006502
6503#define _LARGEFILE_SOURCE 1
6504#define _FILE_OFFSET_BITS 64
6505#include <sys/resource.h>
6506
Martin v. Löwis399a6892002-10-04 10:22:02 +00006507int
6508main ()
6509{
6510struct rlimit foo;
6511 ;
6512 return 0;
6513}
6514_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006515if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006516 sol_lfs_bug=no
6517else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006518 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6522$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006523if test "$sol_lfs_bug" = "yes"; then
6524 use_lfs=no
6525fi
6526
6527if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006528# Two defines needed to enable largefile support on various platforms
6529# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006530case $ac_sys_system/$ac_sys_release in
6531AIX*)
6532
6533$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6534
6535 ;;
6536esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006537
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006538$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006539
6540
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006541$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006542
Martin v. Löwis399a6892002-10-04 10:22:02 +00006543fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006544
Guido van Rossum84e7b241996-08-19 21:59:00 +00006545# Add some code to confdefs.h so that the test for off_t works on SCO
6546cat >> confdefs.h <<\EOF
6547#if defined(SCO_DS)
6548#undef _OFF_T
6549#endif
6550EOF
6551
Guido van Rossumef2255b2000-03-10 22:30:29 +00006552# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006553ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006554if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006555
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006556else
Martin v. Löwis11437992002-04-12 09:54:03 +00006557
6558cat >>confdefs.h <<_ACEOF
6559#define mode_t int
6560_ACEOF
6561
6562fi
6563
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006564ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006565if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006566
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567else
Martin v. Löwis11437992002-04-12 09:54:03 +00006568
6569cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006570#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006571_ACEOF
6572
6573fi
6574
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006575ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006576if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006577
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006578else
Martin v. Löwis11437992002-04-12 09:54:03 +00006579
6580cat >>confdefs.h <<_ACEOF
6581#define pid_t int
6582_ACEOF
6583
6584fi
6585
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006586
Martin v. Löwis11437992002-04-12 09:54:03 +00006587cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006588#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006589_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006590
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006591ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006592if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006593
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006594else
Martin v. Löwis11437992002-04-12 09:54:03 +00006595
6596cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006597#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006598_ACEOF
6599
6600fi
6601
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6603$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006604if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006606else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006608/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006609#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006610
6611_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006613 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006614 ac_cv_type_uid_t=yes
6615else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006616 ac_cv_type_uid_t=no
6617fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006618rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006619
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006620fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6622$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006623if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006624
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006625$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006626
6627
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006628$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006629
6630fi
6631
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006632ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6633case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006634 no|yes) ;; #(
6635 *)
6636
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006637$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006638
6639
6640cat >>confdefs.h <<_ACEOF
6641#define uint32_t $ac_cv_c_uint32_t
6642_ACEOF
6643;;
6644 esac
6645
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006646ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6647case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006648 no|yes) ;; #(
6649 *)
6650
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006651$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006652
6653
6654cat >>confdefs.h <<_ACEOF
6655#define uint64_t $ac_cv_c_uint64_t
6656_ACEOF
6657;;
6658 esac
6659
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006660ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6661case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006662 no|yes) ;; #(
6663 *)
6664
6665cat >>confdefs.h <<_ACEOF
6666#define int32_t $ac_cv_c_int32_t
6667_ACEOF
6668;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006669esac
6670
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006671ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6672case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006673 no|yes) ;; #(
6674 *)
6675
6676cat >>confdefs.h <<_ACEOF
6677#define int64_t $ac_cv_c_int64_t
6678_ACEOF
6679;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006680esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006681
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006682ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006683if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006684
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006685$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006686
6687fi
6688
Jack Jansendd19cf82001-12-06 22:36:17 +00006689
Michael W. Hudson54241132001-12-07 15:38:26 +00006690# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006691# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006692# The cast to long int works around a bug in the HP C Compiler
6693# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6694# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6695# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6697$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006698if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006699 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006701 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 +00006702
Martin v. Löwis11437992002-04-12 09:54:03 +00006703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006704 if test "$ac_cv_type_int" = yes; then
6705 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006707as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006708See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006709 else
6710 ac_cv_sizeof_int=0
6711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006713
Martin v. Löwis11437992002-04-12 09:54:03 +00006714fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6716$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006717
6718
6719
Martin v. Löwis11437992002-04-12 09:54:03 +00006720cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006721#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006722_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006723
6724
Martin v. Löwiseba40652007-08-30 20:10:57 +00006725# The cast to long int works around a bug in the HP C Compiler
6726# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6727# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6728# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6730$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006731if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006732 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006733else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006734 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 +00006735
Martin v. Löwis11437992002-04-12 09:54:03 +00006736else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006737 if test "$ac_cv_type_long" = yes; then
6738 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006740as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006741See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006742 else
6743 ac_cv_sizeof_long=0
6744 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006745fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006746
Martin v. Löwis11437992002-04-12 09:54:03 +00006747fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6749$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750
6751
6752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006754#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006755_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006756
6757
Martin v. Löwiseba40652007-08-30 20:10:57 +00006758# The cast to long int works around a bug in the HP C Compiler
6759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6761# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6763$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006764if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006765 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006767 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 +00006768
Martin v. Löwis11437992002-04-12 09:54:03 +00006769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006770 if test "$ac_cv_type_void_p" = yes; then
6771 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6772$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006773as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006774See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006775 else
6776 ac_cv_sizeof_void_p=0
6777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006778fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006779
Martin v. Löwis11437992002-04-12 09:54:03 +00006780fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6782$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006783
6784
6785
Martin v. Löwis11437992002-04-12 09:54:03 +00006786cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006787#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006788_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006789
6790
Martin v. Löwiseba40652007-08-30 20:10:57 +00006791# The cast to long int works around a bug in the HP C Compiler
6792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6794# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6796$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006797if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006800 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 +00006801
Martin v. Löwis11437992002-04-12 09:54:03 +00006802else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006803 if test "$ac_cv_type_short" = yes; then
6804 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006806as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006807See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006808 else
6809 ac_cv_sizeof_short=0
6810 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006811fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006812
Martin v. Löwis11437992002-04-12 09:54:03 +00006813fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6815$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006816
6817
6818
Martin v. Löwis11437992002-04-12 09:54:03 +00006819cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006820#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006821_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006822
6823
Martin v. Löwiseba40652007-08-30 20:10:57 +00006824# The cast to long int works around a bug in the HP C Compiler
6825# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6826# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6827# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6829$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006830if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006833 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 +00006834
Martin v. Löwis11437992002-04-12 09:54:03 +00006835else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006836 if test "$ac_cv_type_float" = yes; then
6837 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006839as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006840See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006841 else
6842 ac_cv_sizeof_float=0
6843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006844fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006845
Martin v. Löwis11437992002-04-12 09:54:03 +00006846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6848$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006849
6850
6851
Martin v. Löwis11437992002-04-12 09:54:03 +00006852cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006853#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006854_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006855
6856
Martin v. Löwiseba40652007-08-30 20:10:57 +00006857# The cast to long int works around a bug in the HP C Compiler
6858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6860# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6862$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006863if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006865else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006866 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 +00006867
Martin v. Löwis11437992002-04-12 09:54:03 +00006868else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006869 if test "$ac_cv_type_double" = yes; then
6870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006872as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006873See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006874 else
6875 ac_cv_sizeof_double=0
6876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006877fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006878
Martin v. Löwis11437992002-04-12 09:54:03 +00006879fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6881$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006882
6883
6884
Martin v. Löwis11437992002-04-12 09:54:03 +00006885cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006886#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006887_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006888
6889
Martin v. Löwiseba40652007-08-30 20:10:57 +00006890# The cast to long int works around a bug in the HP C Compiler
6891# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6892# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6893# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6895$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006896if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006897 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006898else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006899 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 +00006900
Martin v. Löwis11437992002-04-12 09:54:03 +00006901else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006902 if test "$ac_cv_type_fpos_t" = yes; then
6903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006905as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006906See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006907 else
6908 ac_cv_sizeof_fpos_t=0
6909 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006910fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006911
Martin v. Löwis11437992002-04-12 09:54:03 +00006912fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6914$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006915
6916
6917
Martin v. Löwis11437992002-04-12 09:54:03 +00006918cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006919#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006920_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006921
Michael W. Hudson54241132001-12-07 15:38:26 +00006922
Martin v. Löwiseba40652007-08-30 20:10:57 +00006923# The cast to long int works around a bug in the HP C Compiler
6924# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6925# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6926# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6928$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006929if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006932 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 +00006933
Martin v. Löwis18e16552006-02-15 17:27:45 +00006934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006935 if test "$ac_cv_type_size_t" = yes; then
6936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006938as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006939See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006940 else
6941 ac_cv_sizeof_size_t=0
6942 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006943fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006944
Martin v. Löwis18e16552006-02-15 17:27:45 +00006945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6947$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006948
6949
6950
Martin v. Löwis18e16552006-02-15 17:27:45 +00006951cat >>confdefs.h <<_ACEOF
6952#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6953_ACEOF
6954
6955
Christian Heimes951cc0f2008-01-31 23:08:23 +00006956# The cast to long int works around a bug in the HP C Compiler
6957# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6958# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6959# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6961$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006962if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006963 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00006964else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006965 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 +00006966
Christian Heimes951cc0f2008-01-31 23:08:23 +00006967else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006968 if test "$ac_cv_type_pid_t" = yes; then
6969 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006971as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006972See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006973 else
6974 ac_cv_sizeof_pid_t=0
6975 fi
6976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006977
Christian Heimes951cc0f2008-01-31 23:08:23 +00006978fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6980$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006981
6982
6983
6984cat >>confdefs.h <<_ACEOF
6985#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6986_ACEOF
6987
6988
Michael W. Hudson54241132001-12-07 15:38:26 +00006989
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6991$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006992have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006994/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006995
Martin v. Löwis11437992002-04-12 09:54:03 +00006996int
6997main ()
6998{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006999long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007000 ;
7001 return 0;
7002}
7003_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007004if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007005
7006
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007007$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007008
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007009 have_long_long=yes
7010
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7014$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007015if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007016# The cast to long int works around a bug in the HP C Compiler
7017# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7018# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7019# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7021$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007022if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007023 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007025 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 +00007026
Martin v. Löwis11437992002-04-12 09:54:03 +00007027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007028 if test "$ac_cv_type_long_long" = yes; then
7029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007031as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007032See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007033 else
7034 ac_cv_sizeof_long_long=0
7035 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007036fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007037
Martin v. Löwis11437992002-04-12 09:54:03 +00007038fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7040$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007041
7042
7043
Martin v. Löwis11437992002-04-12 09:54:03 +00007044cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007045#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007046_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007047
Michael W. Hudson54241132001-12-07 15:38:26 +00007048
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007049fi
7050
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7052$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007053have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007055/* end confdefs.h. */
7056
7057int
7058main ()
7059{
Matthias Klosec511b472010-05-08 11:01:39 +00007060long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007061 ;
7062 return 0;
7063}
7064_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007065if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007066
7067
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007068$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007069
7070 have_long_double=yes
7071
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007072fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7075$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007076if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007077# The cast to long int works around a bug in the HP C Compiler
7078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7080# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7082$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007083if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007084 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007086 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 +00007087
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007089 if test "$ac_cv_type_long_double" = yes; then
7090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007092as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007093See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007094 else
7095 ac_cv_sizeof_long_double=0
7096 fi
7097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007098
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007099fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7101$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007102
7103
7104
7105cat >>confdefs.h <<_ACEOF
7106#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7107_ACEOF
7108
7109
7110fi
7111
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7113$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007114have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007116/* end confdefs.h. */
7117
7118int
7119main ()
7120{
7121_Bool x; x = (_Bool)0;
7122 ;
7123 return 0;
7124}
7125_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007126if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007127
7128
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007129$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007130
7131 have_c99_bool=yes
7132
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7136$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007137if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007138# The cast to long int works around a bug in the HP C Compiler
7139# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7140# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7141# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7143$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007144if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007145 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007146else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007147 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 +00007148
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007149else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007150 if test "$ac_cv_type__Bool" = yes; then
7151 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007153as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007154See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155 else
7156 ac_cv_sizeof__Bool=0
7157 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007158fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007159
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007160fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7162$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007163
7164
7165
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007166cat >>confdefs.h <<_ACEOF
7167#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7168_ACEOF
7169
7170
7171fi
7172
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007173ac_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 +00007174 #include <stdint.h>
7175 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007176 #ifdef HAVE_INTTYPES_H
7177 #include <inttypes.h>
7178 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007179"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007180if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007181
7182cat >>confdefs.h <<_ACEOF
7183#define HAVE_UINTPTR_T 1
7184_ACEOF
7185
Martin v. Löwiseba40652007-08-30 20:10:57 +00007186# The cast to long int works around a bug in the HP C Compiler
7187# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7188# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7189# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7191$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007192if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007193 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007194else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007195 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 +00007196
Martin v. Löwis11437992002-04-12 09:54:03 +00007197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007198 if test "$ac_cv_type_uintptr_t" = yes; then
7199 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007201as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007202See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007203 else
7204 ac_cv_sizeof_uintptr_t=0
7205 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007206fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007207
Martin v. Löwis11437992002-04-12 09:54:03 +00007208fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7210$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007211
7212
7213
Martin v. Löwis11437992002-04-12 09:54:03 +00007214cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007215#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007216_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007217
Michael W. Hudson54241132001-12-07 15:38:26 +00007218
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007219fi
7220
Martin v. Löwisebe26702006-10-02 14:55:51 +00007221
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007222# The cast to long int works around a bug in the HP C Compiler
7223# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7224# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7225# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7227$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007228if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007229 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007230else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007231 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007232#ifdef HAVE_SYS_TYPES_H
7233#include <sys/types.h>
7234#endif
7235
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007236"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007237
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007239 if test "$ac_cv_type_off_t" = yes; then
7240 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007242as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007243See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007244 else
7245 ac_cv_sizeof_off_t=0
7246 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007247fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007248
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007249fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7251$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007252
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007253
7254
Martin v. Löwis11437992002-04-12 09:54:03 +00007255cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007256#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007257_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007258
Michael W. Hudson54241132001-12-07 15:38:26 +00007259
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7262$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007263if test "$have_long_long" = yes
7264then
7265if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007266 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007268$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007269
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7271$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7274$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007275fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007276else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7278$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007279fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007280
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007281# The cast to long int works around a bug in the HP C Compiler
7282# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7283# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7284# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7286$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007287if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007288 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007289else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007290 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007291#ifdef HAVE_SYS_TYPES_H
7292#include <sys/types.h>
7293#endif
7294#ifdef HAVE_TIME_H
7295#include <time.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_time_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 (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007305See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007306 else
7307 ac_cv_sizeof_time_t=0
7308 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007309fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007310
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007311fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7313$as_echo "$ac_cv_sizeof_time_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
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007318#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007319_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007320
Michael W. Hudson54241132001-12-07 15:38:26 +00007321
7322
Trent Mick635f6fb2000-08-23 21:33:05 +00007323# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007324ac_save_cc="$CC"
7325if test "$ac_cv_kpthread" = "yes"
7326then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007327elif test "$ac_cv_kthread" = "yes"
7328then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007329elif test "$ac_cv_pthread" = "yes"
7330then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007331fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7333$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007334have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007336/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007337
7338 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007339int
7340main ()
7341{
Guido van Rossum12580492000-09-24 16:47:19 +00007342pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007343 ;
7344 return 0;
7345}
Matthias Klosec511b472010-05-08 11:01:39 +00007346
Martin v. Löwis11437992002-04-12 09:54:03 +00007347_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007348if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007349 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7353$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007354if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007355 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007356# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7357# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7358# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7360$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007361if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007362 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007363else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007364 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007365#ifdef HAVE_PTHREAD_H
7366#include <pthread.h>
7367#endif
7368
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007369"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007370
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007371else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007372 if test "$ac_cv_type_pthread_t" = yes; then
7373 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7374$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007375as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007376See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007377 else
7378 ac_cv_sizeof_pthread_t=0
7379 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007380fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007381
Trent Mick635f6fb2000-08-23 21:33:05 +00007382fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7384$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007385
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007386
7387
Martin v. Löwis11437992002-04-12 09:54:03 +00007388cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007389#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007390_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007391
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007392
Trent Mick635f6fb2000-08-23 21:33:05 +00007393fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007394CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007395
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7397$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007398# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007399if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007400 enableval=$enable_toolbox_glue;
7401fi
Jack Jansene578a632001-08-15 01:27:14 +00007402
7403
7404if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007405then
Jack Jansene578a632001-08-15 01:27:14 +00007406 case $ac_sys_system/$ac_sys_release in
7407 Darwin/*)
7408 enable_toolbox_glue="yes";;
7409 *)
7410 enable_toolbox_glue="no";;
7411 esac
7412fi
7413case "$enable_toolbox_glue" in
7414yes)
Jack Jansene578a632001-08-15 01:27:14 +00007415 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007416 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007417
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007418$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007419
7420 ;;
7421*)
Jack Jansene578a632001-08-15 01:27:14 +00007422 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007423 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007424 ;;
7425esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7427$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007428
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007429
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007430
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007431case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007432 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007433 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7434 ;;
7435 Darwin/*)
7436 OTHER_LIBTOOL_OPT=""
7437 ;;
7438esac
7439
7440
Ronald Oussoren25967582009-09-06 10:00:26 +00007441ARCH_RUN_32BIT=""
7442
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007443case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007444 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007445 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7446 if test "${enable_universalsdk}"; then
7447 :
7448 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007449 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007450 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007451 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007452 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007453 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007454 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007455 if test ${gcc_version} '<' 4.0
7456 then
7457 LIBTOOL_CRUFT="-lcc_dynamic"
7458 else
7459 LIBTOOL_CRUFT=""
7460 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007461 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007462 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007465/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007466
Ronald Oussoren25967582009-09-06 10:00:26 +00007467 #include <unistd.h>
7468 int main(int argc, char*argv[])
7469 {
7470 if (sizeof(long) == 4) {
7471 return 0;
7472 } else {
7473 return 1;
7474 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007475 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007476
Ronald Oussoren25967582009-09-06 10:00:26 +00007477_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007478if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007479 ac_osx_32bit=yes
7480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007481 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007482fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7484 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007485fi
7486
7487
Ronald Oussoren25967582009-09-06 10:00:26 +00007488 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007489 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007490 i386)
7491 MACOSX_DEFAULT_ARCH="i386"
7492 ;;
7493 ppc)
7494 MACOSX_DEFAULT_ARCH="ppc"
7495 ;;
7496 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007497 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007498 ;;
7499 esac
7500 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007501 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007502 i386)
7503 MACOSX_DEFAULT_ARCH="x86_64"
7504 ;;
7505 ppc)
7506 MACOSX_DEFAULT_ARCH="ppc64"
7507 ;;
7508 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007509 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007510 ;;
7511 esac
7512
7513 #ARCH_RUN_32BIT="true"
7514 fi
7515
7516 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007517 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007518 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007519esac
7520
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7522$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007523if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007524then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007525 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007526 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007527 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007528
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007529$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007530
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7532$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007533 if test $enable_shared = "yes"
7534 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007535 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 +00007536 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007537else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7539$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007540fi
7541
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7543$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007544case $ac_sys_system/$ac_sys_release in
7545 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007546
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007547$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007548
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7550$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007551 ;;
7552 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007555 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007556esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007557
Guido van Rossum0a516c91994-09-12 10:58:40 +00007558# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007559
Michael W. Hudson54241132001-12-07 15:38:26 +00007560
7561
7562
7563
Ronald Oussoren75912852010-04-08 08:13:31 +00007564
Guido van Rossum0a516c91994-09-12 10:58:40 +00007565# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007566# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7568$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007569if test -z "$SO"
7570then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007571 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007572 hp*|HP*)
7573 case `uname -m` in
7574 ia64) SO=.so;;
7575 *) SO=.sl;;
7576 esac
7577 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007578 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007579 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007580 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007581else
7582 # this might also be a termcap variable, see #610332
7583 echo
7584 echo '====================================================================='
7585 echo '+ +'
7586 echo '+ WARNING: You have set SO in your environment. +'
7587 echo '+ Do you really mean to change the extension for shared libraries? +'
7588 echo '+ Continuing in 10 seconds to let you to ponder. +'
7589 echo '+ +'
7590 echo '====================================================================='
7591 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007592fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7594$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007595
Ronald Oussoren79f90492009-01-02 10:44:46 +00007596
Neal Norwitz58e28882006-05-19 07:00:58 +00007597cat >>confdefs.h <<_ACEOF
7598#define SHLIB_EXT "$SO"
7599_ACEOF
7600
Guido van Rossum0a516c91994-09-12 10:58:40 +00007601# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007602# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007603# (Shared libraries in this instance are shared modules to be loaded into
7604# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7606$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007607if test -z "$LDSHARED"
7608then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007609 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007610 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007611 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007612 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007613 ;;
7614 BeOS*)
7615 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007616 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007617 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007618 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007619 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007620 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007621 if test "$GCC" = "yes" ; then
7622 LDSHARED='$(CC) -shared'
7623 LDCXXSHARED='$(CXX) -shared'
7624 else
7625 LDSHARED='$(CC) -G'
7626 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007627 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007628 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007629 if test "$GCC" = "yes" ; then
7630 LDSHARED='$(CC) -shared'
7631 LDCXXSHARED='$(CXX) -shared'
7632 else
7633 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007634 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007635 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007636 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007637 LDSHARED='$(CC) -bundle'
7638 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007639 if test "$enable_framework" ; then
7640 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007641 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7642 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007643 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007644 else
7645 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007646 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007647 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007648 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007649 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007650 LDSHARED='$(CC) -bundle'
7651 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007652 if test "$enable_framework" ; then
7653 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007654 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7655 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007656 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007657 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007658 # No framework, use the Python app as bundle-loader
7659 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007660 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007661 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007662 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007663 Darwin/*)
7664 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7665 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007666
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007667 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007668 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007669 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007670 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007671 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007672 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7673 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007674 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007675 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007676 LDSHARED='$(CC) -bundle'
7677 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007678 if test "$enable_framework" ; then
7679 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007680 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7681 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007682 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007683 else
7684 # No framework, use the Python app as bundle-loader
7685 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7686 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007687 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007688 fi
7689 fi
7690 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007691 Linux*|GNU*|QNX*)
7692 LDSHARED='$(CC) -shared'
7693 LDCXXSHARED='$(CXX) -shared';;
7694 BSD/OS*/4*)
7695 LDSHARED="gcc -shared"
7696 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007697 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007698 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007699 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007700 LDSHARED='$(CC) -shared'
7701 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007702 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007703 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007704 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007705 OpenBSD*)
7706 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7707 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007708 LDSHARED='$(CC) -shared $(CCSHARED)'
7709 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007710 else
7711 case `uname -r` in
7712 [01].* | 2.[0-7] | 2.[0-7].*)
7713 LDSHARED="ld -Bshareable ${LDFLAGS}"
7714 ;;
7715 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007716 LDSHARED='$(CC) -shared $(CCSHARED)'
7717 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007718 ;;
7719 esac
7720 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007721 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007722 LDSHARED='$(CC) -shared'
7723 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007724 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007725 if test "$GCC" = "yes" ; then
7726 LDSHARED='$(CC) -shared'
7727 LDCXXSHARED='$(CXX) -shared'
7728 else
7729 LDSHARED='$(CC) -G'
7730 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007731 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007732 SCO_SV*)
7733 LDSHARED='$(CC) -Wl,-G,-Bexport'
7734 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7735 CYGWIN*)
7736 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7737 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7738 atheos*)
7739 LDSHARED="gcc -shared"
7740 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007741 *) LDSHARED="ld";;
7742 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007743fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7745$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007746LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007747BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007748# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007749# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7751$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007752if test -z "$CCSHARED"
7753then
Guido van Rossum07397971997-04-29 21:49:50 +00007754 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007755 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007756 then CCSHARED="-fPIC";
7757 elif test `uname -p` = sparc;
7758 then CCSHARED="-xcode=pic32";
7759 else CCSHARED="-Kpic";
7760 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007761 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007762 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007763 else CCSHARED="+z";
7764 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007765 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007766 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007767 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007768 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007769 if test "$GCC" = "yes"
7770 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007771 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007772 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007773 SCO_SV*)
7774 if test "$GCC" = "yes"
7775 then CCSHARED="-fPIC"
7776 else CCSHARED="-Kpic -belf"
7777 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007778 IRIX*/6*) case $CC in
7779 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007780 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007781 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007782 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007783 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007784fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7786$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007787# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007788# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7790$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007791if test -z "$LINKFORSHARED"
7792then
Guido van Rossum07397971997-04-29 21:49:50 +00007793 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007794 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007795 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007796 LINKFORSHARED="-Wl,-E -Wl,+s";;
7797# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007798 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007799 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007800 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007802 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7803 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007804 # not used by the core itself but which needs to be in the core so
7805 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007806 # -prebind is no longer used, because it actually seems to give a
7807 # slowdown in stead of a speedup, maybe due to the large number of
7808 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007809
7810 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007811 if test "$enable_framework"
7812 then
Jack Jansenda49e192005-01-07 13:08:22 +00007813 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007814 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007815 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007816 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007817 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007818 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007819 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007820 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7821 then
7822 LINKFORSHARED="-Wl,--export-dynamic"
7823 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007824 SunOS/5*) case $CC in
7825 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007826 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007827 then
7828 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007829 fi;;
7830 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007831 CYGWIN*)
7832 if test $enable_shared = "no"
7833 then
7834 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7835 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007836 QNX*)
7837 # -Wl,-E causes the symbols to be added to the dynamic
7838 # symbol table so that they can be found when a module
7839 # is loaded. -N 2048K causes the stack size to be set
7840 # to 2048 kilobytes so that the stack doesn't overflow
7841 # when running test_compile.py.
7842 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007843 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007844fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7846$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007847
Michael W. Hudson54241132001-12-07 15:38:26 +00007848
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007849
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7851$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007852if test ! "$LIBRARY" = "$LDLIBRARY"
7853then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007854 case $ac_sys_system in
7855 CYGWIN*)
7856 # Cygwin needs CCSHARED when building extension DLLs
7857 # but not when building the interpreter DLL.
7858 CFLAGSFORSHARED='';;
7859 *)
7860 CFLAGSFORSHARED='$(CCSHARED)'
7861 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007862fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7864$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007865
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007866# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7867# library (with --enable-shared).
7868# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007869# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7870# if it is not required, since it creates a dependency of the shared library
7871# to LIBS. This, in turn, means that applications linking the shared libpython
7872# don't need to link LIBS explicitly. The default should be only changed
7873# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007874
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7876$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007877case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007878 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007879 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007880esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7882$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007883
7884
Guido van Rossum627b2d71993-12-24 10:39:16 +00007885# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7887$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007888if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007889 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007890else
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007892LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007895
Martin v. Löwiseba40652007-08-30 20:10:57 +00007896/* Override any GCC internal prototype to avoid an error.
7897 Use char because int might match the return type of a GCC
7898 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007899#ifdef __cplusplus
7900extern "C"
7901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007902char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007903int
7904main ()
7905{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007906return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007907 ;
7908 return 0;
7909}
7910_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007911if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007912 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007913else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007914 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007915fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007916rm -f core conftest.err conftest.$ac_objext \
7917 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007918LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007919fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7921$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007922if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 cat >>confdefs.h <<_ACEOF
7924#define HAVE_LIBDL 1
7925_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007926
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007927 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007928
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007929fi
7930 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7932$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007933if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007934 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007935else
Martin v. Löwis11437992002-04-12 09:54:03 +00007936 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007937LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007940
Martin v. Löwiseba40652007-08-30 20:10:57 +00007941/* Override any GCC internal prototype to avoid an error.
7942 Use char because int might match the return type of a GCC
7943 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007944#ifdef __cplusplus
7945extern "C"
7946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007947char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007948int
7949main ()
7950{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007951return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 ;
7953 return 0;
7954}
7955_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007956if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007958else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007959 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007961rm -f core conftest.err conftest.$ac_objext \
7962 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007963LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007964fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7966$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007967if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 cat >>confdefs.h <<_ACEOF
7969#define HAVE_LIBDLD 1
7970_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007971
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007972 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007973
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007974fi
7975 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007976
Ronald Oussoren79f90492009-01-02 10:44:46 +00007977# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007978if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7980$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007981if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007982 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007983else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007984 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007987
Martin v. Löwiseba40652007-08-30 20:10:57 +00007988/* Override any GCC internal prototype to avoid an error.
7989 Use char because int might match the return type of a GCC
7990 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007991#ifdef __cplusplus
7992extern "C"
7993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007994char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007995int
7996main ()
7997{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007998return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 ;
8000 return 0;
8001}
8002_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008003for ac_lib in '' pthread rt posix4; do
8004 if test -z "$ac_lib"; then
8005 ac_res="none required"
8006 else
8007 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008008 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008009 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008010 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008011 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008012fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008013rm -f core conftest.err conftest.$ac_objext \
8014 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008015 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008016 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008018done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008019if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008020
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021else
8022 ac_cv_search_sem_init=no
8023fi
8024rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008025LIBS=$ac_func_search_save_LIBS
8026fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8028$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008029ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008030if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008031 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008032
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008033fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008034 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008035 # posix4 on Solaris 2.6
8036 # pthread (first!) on Linux
8037fi
8038
Martin v. Löwis19d17342003-06-14 21:03:05 +00008039# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8041$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008042if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008043 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008044else
8045 ac_check_lib_save_LIBS=$LIBS
8046LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008048/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008049
Martin v. Löwiseba40652007-08-30 20:10:57 +00008050/* Override any GCC internal prototype to avoid an error.
8051 Use char because int might match the return type of a GCC
8052 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008053#ifdef __cplusplus
8054extern "C"
8055#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008056char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008057int
8058main ()
8059{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008061 ;
8062 return 0;
8063}
8064_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008065if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008066 ac_cv_lib_intl_textdomain=yes
8067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008068 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008069fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008070rm -f core conftest.err conftest.$ac_objext \
8071 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008072LIBS=$ac_check_lib_save_LIBS
8073fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8075$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008076if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008077
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008078$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008079
8080fi
8081
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008082
8083# checks for system dependent C++ extensions support
8084case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008085 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8086$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008088/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008089
Georg Brandl94800df2011-02-25 11:09:02 +00008090 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008091int
8092main ()
8093{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008094loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 ;
8096 return 0;
8097}
Matthias Klosec511b472010-05-08 11:01:39 +00008098
Martin v. Löwis11437992002-04-12 09:54:03 +00008099_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008100if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008101
Matthias Klosec511b472010-05-08 11:01:39 +00008102
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008103$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008104
Matthias Klosec511b472010-05-08 11:01:39 +00008105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008106$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008107
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008108else
Matthias Klosec511b472010-05-08 11:01:39 +00008109
8110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008111$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008112
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008113fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008114rm -f core conftest.err conftest.$ac_objext \
8115 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008116 *) ;;
8117esac
8118
Guido van Rossum70c7f481998-03-26 18:44:10 +00008119# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008120# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8122$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008123if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008124 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008125else
Martin v. Löwis11437992002-04-12 09:54:03 +00008126 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008127LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008130
Martin v. Löwiseba40652007-08-30 20:10:57 +00008131/* Override any GCC internal prototype to avoid an error.
8132 Use char because int might match the return type of a GCC
8133 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008134#ifdef __cplusplus
8135extern "C"
8136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008137char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008138int
8139main ()
8140{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008141return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008142 ;
8143 return 0;
8144}
8145_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008146if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008147 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008148else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008149 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008151rm -f core conftest.err conftest.$ac_objext \
8152 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008153LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008154fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8156$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008157if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008158 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008159fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008160 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8162$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008163if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008164 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008165else
Martin v. Löwis11437992002-04-12 09:54:03 +00008166 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008167LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008170
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171/* Override any GCC internal prototype to avoid an error.
8172 Use char because int might match the return type of a GCC
8173 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008174#ifdef __cplusplus
8175extern "C"
8176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008177char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008178int
8179main ()
8180{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008182 ;
8183 return 0;
8184}
8185_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008186if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008187 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008189 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008190fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008191rm -f core conftest.err conftest.$ac_objext \
8192 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008193LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008194fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8196$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008197if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008198 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008199fi
8200 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008201
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008202case "$ac_sys_system" in
8203BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8205$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008206if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008207 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008208else
Martin v. Löwis11437992002-04-12 09:54:03 +00008209 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008210LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008213
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214/* Override any GCC internal prototype to avoid an error.
8215 Use char because int might match the return type of a GCC
8216 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008217#ifdef __cplusplus
8218extern "C"
8219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008220char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008221int
8222main ()
8223{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008224return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 ;
8226 return 0;
8227}
8228_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008229if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008232 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008233fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008234rm -f core conftest.err conftest.$ac_objext \
8235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008236LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008237fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8239$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008240if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008241 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008242fi
8243 # BeOS
8244;;
8245esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008246
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8248$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
Martin v. Löwiseba40652007-08-30 20:10:57 +00008250# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008251if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008252 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8254$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008255LIBS="$withval $LIBS"
8256
8257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8259$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008260fi
8261
Guido van Rossum7f43da71994-08-01 12:15:30 +00008262
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008263if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008264 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8265set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8267$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008268if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008269 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008270else
8271 case $PKG_CONFIG in
8272 [\\/]* | ?:[\\/]*)
8273 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8274 ;;
8275 *)
8276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8277for as_dir in $PATH
8278do
8279 IFS=$as_save_IFS
8280 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008281 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008282 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8283 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008285 break 2
8286 fi
8287done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008288 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008289IFS=$as_save_IFS
8290
8291 ;;
8292esac
8293fi
8294PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8295if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8297$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008298else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8300$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008301fi
8302
8303
8304fi
8305if test -z "$ac_cv_path_PKG_CONFIG"; then
8306 ac_pt_PKG_CONFIG=$PKG_CONFIG
8307 # Extract the first word of "pkg-config", so it can be a program name with args.
8308set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8310$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008311if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008312 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008313else
8314 case $ac_pt_PKG_CONFIG in
8315 [\\/]* | ?:[\\/]*)
8316 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8317 ;;
8318 *)
8319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8320for as_dir in $PATH
8321do
8322 IFS=$as_save_IFS
8323 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008324 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008325 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8326 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008327 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008328 break 2
8329 fi
8330done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008331 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008332IFS=$as_save_IFS
8333
8334 ;;
8335esac
8336fi
8337ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8338if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8340$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8343$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008344fi
8345
8346 if test "x$ac_pt_PKG_CONFIG" = x; then
8347 PKG_CONFIG=""
8348 else
8349 case $cross_compiling:$ac_tool_warned in
8350yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8352$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008353ac_tool_warned=yes ;;
8354esac
8355 PKG_CONFIG=$ac_pt_PKG_CONFIG
8356 fi
8357else
8358 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8359fi
8360
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008361
8362# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8364$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008365
8366# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008367if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008368 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008369else
8370 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008371fi
8372
8373
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8375$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008376
8377# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8379$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008380
8381# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008382if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008383 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008384else
8385 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008386fi
8387
8388
8389if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008390 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8391else
8392 LIBFFI_INCLUDEDIR=""
8393fi
8394
8395
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8397$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008398
Benjamin Peterson867475c2009-04-29 20:36:25 +00008399# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8401$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008402
8403# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008404if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008405 withval=$with_dbmliborder;
8406if test x$with_dbmliborder = xyes
8407then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008408as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008409else
8410 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8411 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8412 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008413 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008414 fi
8415 done
8416fi
8417fi
8418
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8420$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008421
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008422# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008423
8424
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8426$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008427
Martin v. Löwiseba40652007-08-30 20:10:57 +00008428# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008429if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008430 withval=$with_signal_module;
8431fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008432
8433
8434if test -z "$with_signal_module"
8435then with_signal_module="yes"
8436fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8438$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008439
8440if test "${with_signal_module}" = "yes"; then
8441 USE_SIGNAL_MODULE=""
8442 SIGNAL_OBJS=""
8443else
8444 USE_SIGNAL_MODULE="#"
8445 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8446fi
8447
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008448# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008449
Barry Warsawc0d24d82000-06-29 16:12:00 +00008450USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008451
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8453$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008454
Guido van Rossumec2f0731997-01-22 20:54:01 +00008455
Martin v. Löwiseba40652007-08-30 20:10:57 +00008456# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008457if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008458 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8460$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008461LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008462if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008463 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008464fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8467$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008468fi
8469
Martin v. Löwis11437992002-04-12 09:54:03 +00008470
8471# Templates for things AC_DEFINEd more than once.
8472# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008473
8474
Martin v. Löwis11437992002-04-12 09:54:03 +00008475
8476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8478$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008479
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008481if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008482 withval=$with_threads;
8483fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008484
8485
Barry Warsawc0d24d82000-06-29 16:12:00 +00008486# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008487
Martin v. Löwiseba40652007-08-30 20:10:57 +00008488# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008489if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008490 withval=$with_thread; with_threads=$with_thread
8491fi
8492
Barry Warsawc0d24d82000-06-29 16:12:00 +00008493
8494if test -z "$with_threads"
8495then with_threads="yes"
8496fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8498$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008499
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008500
Barry Warsawc0d24d82000-06-29 16:12:00 +00008501if test "$with_threads" = "no"
8502then
8503 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008504elif test "$ac_cv_pthread_is_default" = yes
8505then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008506 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008507
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008508 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008509 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008510
8511 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008513elif test "$ac_cv_kpthread" = "yes"
8514then
8515 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008516 if test "$ac_cv_cxx_thread" = "yes"; then
8517 CXX="$CXX -Kpthread"
8518 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008519 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008520
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008521 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008522 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008523elif test "$ac_cv_kthread" = "yes"
8524then
8525 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008526 if test "$ac_cv_cxx_thread" = "yes"; then
8527 CXX="$CXX -Kthread"
8528 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008529 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008530
8531 posix_threads=yes
8532 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008533elif test "$ac_cv_pthread" = "yes"
8534then
8535 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008536 if test "$ac_cv_cxx_thread" = "yes"; then
8537 CXX="$CXX -pthread"
8538 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008540
8541 posix_threads=yes
8542 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008543else
8544 if test ! -z "$with_threads" -a -d "$with_threads"
8545 then LDFLAGS="$LDFLAGS -L$with_threads"
8546 fi
8547 if test ! -z "$withval" -a -d "$withval"
8548 then LDFLAGS="$LDFLAGS -L$withval"
8549 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008550
8551 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008552 # define _POSIX_THREADS in unistd.h. Some apparently don't
8553 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8555$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008557/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008558
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008559#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008560#ifdef _POSIX_THREADS
8561yes
8562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008563
8564_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008566 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008567 unistd_defines_pthreads=yes
8568else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008569 unistd_defines_pthreads=no
8570fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008571rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008572
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8574$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008575
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008576 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008577
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008578 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008579if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008580 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008582 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008583
Martin v. Löwis11437992002-04-12 09:54:03 +00008584
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008585$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008586
8587 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008588 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008589else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008590
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008591 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008592if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008593 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008595 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008596
Martin v. Löwis11437992002-04-12 09:54:03 +00008597
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008598$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008599
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008600 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008601else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008602
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8604$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008605
Martin v. Löwiseba40652007-08-30 20:10:57 +00008606# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008607if test "${with_pth+set}" = set; then :
8608 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8609$as_echo "$withval" >&6; }
8610 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008611
8612
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008613$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008614
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008615 LIBS="-lpth $LIBS"
8616 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008617else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8619$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008620
8621 # Just looking for pthread_create in libpthread is not enough:
8622 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8623 # So we really have to include pthread.h, and then link.
8624 _libs=$LIBS
8625 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8627$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008629/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008630#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008631
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008632void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008633int
8634main ()
8635{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008636
8637pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ;
8639 return 0;
8640}
8641_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008642if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008643
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8645$as_echo "yes" >&6; }
8646 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008647
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008648 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008649 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008650else
Martin v. Löwis11437992002-04-12 09:54:03 +00008651
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008652 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008653 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008654if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008655 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008656
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008657 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008658 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008659else
Guido van Rossumad678af1998-10-02 14:42:15 +00008660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008661 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008662if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008663 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008664
8665
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008666$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008667
8668 THREADOBJ="Python/thread.o"
8669else
8670
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008671 ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008672if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008673 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008674
8675
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008676$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008677
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008678 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008679else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008680
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8682$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008683if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008684 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008685else
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008687LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008690
Martin v. Löwiseba40652007-08-30 20:10:57 +00008691/* Override any GCC internal prototype to avoid an error.
8692 Use char because int might match the return type of a GCC
8693 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008694#ifdef __cplusplus
8695extern "C"
8696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008697char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008698int
8699main ()
8700{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008701return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008702 ;
8703 return 0;
8704}
8705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008706if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008709 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008710fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008711rm -f core conftest.err conftest.$ac_objext \
8712 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008713LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008714fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8716$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008717if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008718 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008719
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008720 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008721 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008722 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008723else
Greg Steinadf63d62000-07-05 10:38:09 +00008724
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8726$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008727if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008728 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008729else
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008731LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008734
Martin v. Löwiseba40652007-08-30 20:10:57 +00008735/* Override any GCC internal prototype to avoid an error.
8736 Use char because int might match the return type of a GCC
8737 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008738#ifdef __cplusplus
8739extern "C"
8740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008741char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008742int
8743main ()
8744{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008745return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008746 ;
8747 return 0;
8748}
8749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008750if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008751 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008753 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008755rm -f core conftest.err conftest.$ac_objext \
8756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008757LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8760$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008761if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008762 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008763
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008764 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008765 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008766 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008767else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008768
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8770$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008771if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008772 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008773else
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008775LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008778
Martin v. Löwiseba40652007-08-30 20:10:57 +00008779/* Override any GCC internal prototype to avoid an error.
8780 Use char because int might match the return type of a GCC
8781 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008782#ifdef __cplusplus
8783extern "C"
8784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008785char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008786int
8787main ()
8788{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008789return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 ;
8791 return 0;
8792}
8793_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008794if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008795 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008797 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008799rm -f core conftest.err conftest.$ac_objext \
8800 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008801LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8804$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008805if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008806 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008807
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008808 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008809 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008810 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008811else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008812
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8814$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008815if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008817else
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008819LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008822
Martin v. Löwiseba40652007-08-30 20:10:57 +00008823/* Override any GCC internal prototype to avoid an error.
8824 Use char because int might match the return type of a GCC
8825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008826#ifdef __cplusplus
8827extern "C"
8828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008829char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008830int
8831main ()
8832{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 ;
8835 return 0;
8836}
8837_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008838if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008841 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008843rm -f core conftest.err conftest.$ac_objext \
8844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008845LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8848$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008849if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008850 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008851
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008852 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008853 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008854 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008855else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008856
Martin v. Löwis130fb172001-07-19 11:00:41 +00008857 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008858fi
8859
Guido van Rossum627b2d71993-12-24 10:39:16 +00008860
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008861fi
8862
Guido van Rossum0be3e491997-05-22 20:33:33 +00008863fi
8864
Guido van Rossum49545951997-12-02 19:28:29 +00008865fi
8866
Guido van Rossumb93a8621998-05-07 13:27:32 +00008867fi
8868
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008869
Michael W. Hudson54241132001-12-07 15:38:26 +00008870fi
8871
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008872
8873fi
8874
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008875fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008876rm -f core conftest.err conftest.$ac_objext \
8877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008878fi
8879
Martin v. Löwis11437992002-04-12 09:54:03 +00008880fi
8881
8882
8883fi
8884
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008885
Michael W. Hudson54241132001-12-07 15:38:26 +00008886
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8888$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008889if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008890 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008891else
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008893LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008896
Martin v. Löwiseba40652007-08-30 20:10:57 +00008897/* Override any GCC internal prototype to avoid an error.
8898 Use char because int might match the return type of a GCC
8899 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008900#ifdef __cplusplus
8901extern "C"
8902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008903char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008904int
8905main ()
8906{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008907return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ;
8909 return 0;
8910}
8911_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008912if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008914else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008915 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008916fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008917rm -f core conftest.err conftest.$ac_objext \
8918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008919LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008920fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8922$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008923if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008924 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008925
Martin v. Löwis130fb172001-07-19 11:00:41 +00008926 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008927 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008928 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008929fi
8930
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008931
Neal Norwitza978ab02002-11-02 16:58:05 +00008932 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8934$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008935if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008936 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008937else
Martin v. Löwis11437992002-04-12 09:54:03 +00008938 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008939LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008942
Martin v. Löwiseba40652007-08-30 20:10:57 +00008943/* Override any GCC internal prototype to avoid an error.
8944 Use char because int might match the return type of a GCC
8945 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008946#ifdef __cplusplus
8947extern "C"
8948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008949char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008950int
8951main ()
8952{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008954 ;
8955 return 0;
8956}
8957_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008958if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008961 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008963rm -f core conftest.err conftest.$ac_objext \
8964 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008965LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008966fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8968$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008969if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008970 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008971
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008972 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008973 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008974 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008975fi
8976
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008977 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008978
Martin v. Löwis130fb172001-07-19 11:00:41 +00008979 if test "$USE_THREAD_MODULE" != "#"
8980 then
8981 # If the above checks didn't disable threads, (at least) OSF1
8982 # needs this '-threads' argument during linking.
8983 case $ac_sys_system in
8984 OSF1) LDLAST=-threads;;
8985 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008986 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008987fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008988
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008989if test "$posix_threads" = "yes"; then
8990 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008991
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008992$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008993
8994 fi
8995
8996 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8997 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02008998 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008999$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009000
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009001 ;;
9002 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009003$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009004
9005 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009006 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009007$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009008
9009 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009010 esac
9011
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9013$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009014 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009015 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009017 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009018 ac_cv_pthread_system_supported=no
9019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009021/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009022#include <pthread.h>
9023 void *foo(void *parm) {
9024 return NULL;
9025 }
9026 main() {
9027 pthread_attr_t attr;
9028 pthread_t id;
9029 if (pthread_attr_init(&attr)) exit(-1);
9030 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9031 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9032 exit(0);
9033 }
9034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009035if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009036 ac_cv_pthread_system_supported=yes
9037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009038 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9041 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009042fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009043
Martin v. Löwiseba40652007-08-30 20:10:57 +00009044
Guido van Rossum627b2d71993-12-24 10:39:16 +00009045fi
9046
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9048$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009049 if test "$ac_cv_pthread_system_supported" = "yes"; then
9050
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009051$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009052
9053 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009054 for ac_func in pthread_sigmask
9055do :
9056 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009057if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009058 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009059#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009060_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009061 case $ac_sys_system in
9062 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009063
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009064$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009065
9066 ;;
9067 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009068fi
9069done
9070
9071fi
9072
9073
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009075
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9077$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009078# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009079if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9083$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009084 ipv6=no
9085 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9087$as_echo "yes" >&6; }
9088 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009089
9090 ipv6=yes
9091 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009092 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009093else
Martin v. Löwis11437992002-04-12 09:54:03 +00009094
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009095 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009096
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9098$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099 ipv6=no
9100
9101else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009103/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104 /* AF_INET6 available check */
9105#include <sys/types.h>
9106#include <sys/socket.h>
9107main()
9108{
9109 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9110 exit(1);
9111 else
9112 exit(0);
9113}
9114
Martin v. Löwis11437992002-04-12 09:54:03 +00009115_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009116if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009117
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9119$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009120 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009121
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009122else
Matthias Klosec511b472010-05-08 11:01:39 +00009123
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9125$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009126 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009127
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9130 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009131fi
9132
Martin v. Löwiseba40652007-08-30 20:10:57 +00009133
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009134if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9136$as_echo_n "checking if RFC2553 API is available... " >&6; }
9137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009138/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009139
9140 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009141#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009142int
9143main ()
9144{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009145struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009146 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 ;
9148 return 0;
9149}
Matthias Klosec511b472010-05-08 11:01:39 +00009150
Martin v. Löwis11437992002-04-12 09:54:03 +00009151_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009152if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009153
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009155$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009156 ipv6=yes
9157
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009158else
Matthias Klosec511b472010-05-08 11:01:39 +00009159
9160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009162 ipv6=no
9163
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009166fi
9167
9168if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009169 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009170
9171fi
9172
Martin v. Löwiseba40652007-08-30 20:10:57 +00009173fi
9174
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009175
9176ipv6type=unknown
9177ipv6lib=none
9178ipv6trylibc=no
9179
9180if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9182$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009183 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9184 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009185 case $i in
9186 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009188/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009189
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009190#include <netinet/in.h>
9191#ifdef IPV6_INRIA_VERSION
9192yes
9193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009194_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009195if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009196 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009197 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009198fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009199rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009200
9201 ;;
9202 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009204/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009205
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009206#include <netinet/in.h>
9207#ifdef __KAME__
9208yes
9209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009210_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009212 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009213 ipv6type=$i;
9214 ipv6lib=inet6
9215 ipv6libdir=/usr/local/v6/lib
9216 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009217fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009218rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009219
9220 ;;
9221 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009223/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009224
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009225#include <features.h>
9226#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9227yes
9228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009229_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009231 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009232 ipv6type=$i;
9233 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009234fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009235rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009236
9237 ;;
9238 linux-inet6)
9239 if test -d /usr/inet6; then
9240 ipv6type=$i
9241 ipv6lib=inet6
9242 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009243 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009244 fi
9245 ;;
9246 solaris)
9247 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009248 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009249 ipv6type=$i
9250 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009251 fi
9252 fi
9253 ;;
9254 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009256/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009257
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009258#include <sys/param.h>
9259#ifdef _TOSHIBA_INET6
9260yes
9261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009262_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009263if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009264 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009265 ipv6type=$i;
9266 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009267 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009268fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009269rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009270
9271 ;;
9272 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009274/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009275
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009276#include </usr/local/v6/include/sys/v6config.h>
9277#ifdef __V6D__
9278yes
9279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009280_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009282 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009283 ipv6type=$i;
9284 ipv6lib=v6;
9285 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009286 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009287fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009288rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009289
9290 ;;
9291 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009293/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009294
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009295#include <sys/param.h>
9296#ifdef _ZETA_MINAMI_INET6
9297yes
9298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009299_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009300if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009301 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009302 ipv6type=$i;
9303 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009304 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009305fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009306rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009307
9308 ;;
9309 esac
9310 if test "$ipv6type" != "unknown"; then
9311 break
9312 fi
9313 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9315$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009316fi
9317
9318if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9319 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9320 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9321 echo "using lib$ipv6lib"
9322 else
9323 if test $ipv6trylibc = "yes"; then
9324 echo "using libc"
9325 else
9326 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9327 echo "You need to fetch lib$ipv6lib.a from appropriate"
9328 echo 'ipv6 kit and compile beforehand.'
9329 exit 1
9330 fi
9331 fi
9332fi
9333
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9335$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009337/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009338
9339 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009340int
9341main ()
9342{
9343FSIORefNum fRef = 0
9344 ;
9345 return 0;
9346}
Mark Dickinson0712b562010-05-08 19:13:21 +00009347
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009348_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009349if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009350
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009352$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009353
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9355$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009356
Mark Dickinson0712b562010-05-08 19:13:21 +00009357else
9358
9359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9360$as_echo "no" >&6; }
9361
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009362fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9364
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009365# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9367$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009368
Martin v. Löwiseba40652007-08-30 20:10:57 +00009369# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009370if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009371 withval=$with_doc_strings;
9372fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009373
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009374
9375if test -z "$with_doc_strings"
9376then with_doc_strings="yes"
9377fi
9378if test "$with_doc_strings" != "no"
9379then
9380
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009381$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009382
9383fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9385$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009386
Neil Schemenauera35c6882001-02-27 04:45:05 +00009387# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9389$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009390
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009392if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009394if test "$withval" != no
9395then
9396
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009397$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009398
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9400$as_echo "yes" >&6; }
9401else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9402$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009403fi
9404else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009407fi
9408
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009409
9410# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9412$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009413
Martin v. Löwiseba40652007-08-30 20:10:57 +00009414# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009415if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009416 withval=$with_pymalloc;
9417fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009418
Neil Schemenauera35c6882001-02-27 04:45:05 +00009419
Neil Schemenauer16c22972002-03-22 15:34:49 +00009420if test -z "$with_pymalloc"
9421then with_pymalloc="yes"
9422fi
9423if test "$with_pymalloc" != "no"
9424then
Martin v. Löwis11437992002-04-12 09:54:03 +00009425
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009426$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009427
9428fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9430$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009431
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009432# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9434$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009435
9436# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009437if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009438 withval=$with_valgrind;
9439else
9440 with_valgrind=no
9441fi
9442
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9444$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009445if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009446 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009447if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009448
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009449$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009450
9451else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009452 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009453
9454fi
9455
9456
9457fi
9458
Barry Warsawef82cd72000-06-30 16:21:01 +00009459# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9461$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009462
Martin v. Löwiseba40652007-08-30 20:10:57 +00009463# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009464if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009465 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009466if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009467then
9468
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009469$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009470
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9472$as_echo "yes" >&6; }
9473else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9474$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009475fi
9476else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009479fi
9480
Barry Warsawef82cd72000-06-30 16:21:01 +00009481
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009482# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009483
Guido van Rossum98935bf2001-09-05 19:13:16 +00009484DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009485
Guido van Rossume97ee181999-12-20 21:27:22 +00009486# the dlopen() function means we might want to use dynload_shlib.o. some
9487# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009488for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489do :
9490 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009491if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009493#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009494_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009495
Guido van Rossume97ee181999-12-20 21:27:22 +00009496fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009497done
Guido van Rossume97ee181999-12-20 21:27:22 +00009498
Michael W. Hudson54241132001-12-07 15:38:26 +00009499
Guido van Rossume97ee181999-12-20 21:27:22 +00009500# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9501# loading of modules.
9502
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9504$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009505if test -z "$DYNLOADFILE"
9506then
9507 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009508 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9509 if test "$ac_cv_func_dlopen" = yes
9510 then DYNLOADFILE="dynload_shlib.o"
9511 else DYNLOADFILE="dynload_aix.o"
9512 fi
9513 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009514 BeOS*) DYNLOADFILE="dynload_beos.o";;
9515 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009516 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9517 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009518 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009519 *)
9520 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9521 # out any dynamic loading
9522 if test "$ac_cv_func_dlopen" = yes
9523 then DYNLOADFILE="dynload_shlib.o"
9524 else DYNLOADFILE="dynload_stub.o"
9525 fi
9526 ;;
9527 esac
9528fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9530$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009531if test "$DYNLOADFILE" != "dynload_stub.o"
9532then
Martin v. Löwis11437992002-04-12 09:54:03 +00009533
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009534$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009535
9536fi
9537
Neil Schemenauer4e425612001-06-19 15:44:15 +00009538# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9539
Michael W. Hudson54241132001-12-07 15:38:26 +00009540
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9542$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009543if test -z "$MACHDEP_OBJS"
9544then
Jack Jansene578a632001-08-15 01:27:14 +00009545 MACHDEP_OBJS=$extra_machdep_objs
9546else
9547 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009548fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9550$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009551
Guido van Rossum627b2d71993-12-24 10:39:16 +00009552# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009553for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9554 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009555 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009556 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009557 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009558 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009559 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009560 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9561 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009562 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009563 setlocale setregid setreuid setresuid setresgid \
9564 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009565 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009566 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009567 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009568do :
9569 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9570ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009571if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009573#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009574_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009575
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009576fi
9577done
9578
Michael W. Hudson54241132001-12-07 15:38:26 +00009579
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009580# For some functions, having a definition is not sufficient, since
9581# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9583$as_echo_n "checking for chroot... " >&6; }
9584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009585/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009586#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009587int
9588main ()
9589{
9590void *x=chroot
9591 ;
9592 return 0;
9593}
9594_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009595if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009596
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009597$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009598
Matthias Klosec511b472010-05-08 11:01:39 +00009599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009600$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009601else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9603$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009604
9605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9608$as_echo_n "checking for link... " >&6; }
9609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009610/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009611#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009612int
9613main ()
9614{
9615void *x=link
9616 ;
9617 return 0;
9618}
9619_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009621
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009622$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009623
Matthias Klosec511b472010-05-08 11:01:39 +00009624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9628$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009629
9630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9633$as_echo_n "checking for symlink... " >&6; }
9634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009635/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009636#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009637int
9638main ()
9639{
9640void *x=symlink
9641 ;
9642 return 0;
9643}
9644_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009645if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009646
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009647$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009648
Matthias Klosec511b472010-05-08 11:01:39 +00009649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009650$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9653$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009654
9655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9658$as_echo_n "checking for fchdir... " >&6; }
9659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009660/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009661#include <unistd.h>
9662int
9663main ()
9664{
9665void *x=fchdir
9666 ;
9667 return 0;
9668}
9669_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009670if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009671
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009672$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009673
Matthias Klosec511b472010-05-08 11:01:39 +00009674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009675$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009676else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9678$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009679
9680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9683$as_echo_n "checking for fsync... " >&6; }
9684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009685/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009686#include <unistd.h>
9687int
9688main ()
9689{
9690void *x=fsync
9691 ;
9692 return 0;
9693}
9694_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009696
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009697$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009698
Matthias Klosec511b472010-05-08 11:01:39 +00009699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009700$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9703$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009704
9705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9708$as_echo_n "checking for fdatasync... " >&6; }
9709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009710/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009711#include <unistd.h>
9712int
9713main ()
9714{
9715void *x=fdatasync
9716 ;
9717 return 0;
9718}
9719_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009720if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009721
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009722$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009723
Matthias Klosec511b472010-05-08 11:01:39 +00009724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009725$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9728$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009729
9730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9733$as_echo_n "checking for epoll... " >&6; }
9734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009735/* end confdefs.h. */
9736#include <sys/epoll.h>
9737int
9738main ()
9739{
9740void *x=epoll_create
9741 ;
9742 return 0;
9743}
9744_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009745if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009746
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009747$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009748
Matthias Klosec511b472010-05-08 11:01:39 +00009749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009750$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9753$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009754
9755fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9758$as_echo_n "checking for kqueue... " >&6; }
9759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009760/* end confdefs.h. */
9761
9762#include <sys/types.h>
9763#include <sys/event.h>
9764
9765int
9766main ()
9767{
9768int x=kqueue()
9769 ;
9770 return 0;
9771}
9772_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009773if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009774
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009775$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009776
Matthias Klosec511b472010-05-08 11:01:39 +00009777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009778$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9781$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009782
9783fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009785# On some systems (eg. FreeBSD 5), we would find a definition of the
9786# functions ctermid_r, setgroups in the library, but no prototype
9787# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9788# address to avoid compiler warnings and potential miscompilations
9789# because of the missing prototypes.
9790
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9792$as_echo_n "checking for ctermid_r... " >&6; }
9793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009794/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009795
Martin v. Löwisd5843682002-11-21 20:41:28 +00009796#include <stdio.h>
9797
Martin v. Löwisd5843682002-11-21 20:41:28 +00009798int
9799main ()
9800{
9801void* p = ctermid_r
9802 ;
9803 return 0;
9804}
9805_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009806if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009807
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009808$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009809
Matthias Klosec511b472010-05-08 11:01:39 +00009810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009811$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009815
9816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9818
Antoine Pitroub170f172010-09-10 18:47:36 +00009819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9820$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009821if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009822 $as_echo_n "(cached) " >&6
9823else
9824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009825/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009826#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009827int
9828main ()
9829{
9830void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009831
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009832 ;
9833 return 0;
9834}
9835_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009836if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009837 ac_cv_flock_decl=yes
9838else
9839 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009840
9841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009843
Antoine Pitroub170f172010-09-10 18:47:36 +00009844fi
9845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9846$as_echo "$ac_cv_flock_decl" >&6; }
9847if test "x${ac_cv_flock_decl}" = xyes; then
9848 for ac_func in flock
9849do :
9850 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009851if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009852 cat >>confdefs.h <<_ACEOF
9853#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009854_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009855
Antoine Pitrou85729812010-09-07 14:55:24 +00009856else
Antoine Pitroub170f172010-09-10 18:47:36 +00009857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009858$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009859if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009860 $as_echo_n "(cached) " >&6
9861else
9862 ac_check_lib_save_LIBS=$LIBS
9863LIBS="-lbsd $LIBS"
9864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9865/* end confdefs.h. */
9866
9867/* Override any GCC internal prototype to avoid an error.
9868 Use char because int might match the return type of a GCC
9869 builtin and then its argument prototype would still apply. */
9870#ifdef __cplusplus
9871extern "C"
9872#endif
9873char flock ();
9874int
9875main ()
9876{
9877return flock ();
9878 ;
9879 return 0;
9880}
9881_ACEOF
9882if ac_fn_c_try_link "$LINENO"; then :
9883 ac_cv_lib_bsd_flock=yes
9884else
9885 ac_cv_lib_bsd_flock=no
9886fi
9887rm -f core conftest.err conftest.$ac_objext \
9888 conftest$ac_exeext conftest.$ac_ext
9889LIBS=$ac_check_lib_save_LIBS
9890fi
9891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9892$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009893if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009894 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009895
9896
9897$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9898
9899
9900fi
9901
9902
9903fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009904done
9905
Antoine Pitrou85729812010-09-07 14:55:24 +00009906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9909$as_echo_n "checking for getpagesize... " >&6; }
9910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009911/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009912
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009913#include <unistd.h>
9914
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009915int
9916main ()
9917{
9918void* p = getpagesize
9919 ;
9920 return 0;
9921}
9922_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009923if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009924
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009925$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009926
Matthias Klosec511b472010-05-08 11:01:39 +00009927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009928$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009929else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9931$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009932
9933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009935
Charles-François Natali93a11752011-11-27 13:01:35 +01009936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9937$as_echo_n "checking for broken unsetenv... " >&6; }
9938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9939/* end confdefs.h. */
9940
9941#include <stdlib.h>
9942
9943int
9944main ()
9945{
9946int res = unsetenv("DUMMY")
9947 ;
9948 return 0;
9949}
9950_ACEOF
9951if ac_fn_c_try_compile "$LINENO"; then :
9952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9953$as_echo "no" >&6; }
9954else
9955
9956$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9957
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9959$as_echo "yes" >&6; }
9960
9961fi
9962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9963
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009964for ac_prog in true
9965do
9966 # Extract the first word of "$ac_prog", so it can be a program name with args.
9967set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9969$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009970if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009971 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009972else
9973 if test -n "$TRUE"; then
9974 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9975else
9976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9977for as_dir in $PATH
9978do
9979 IFS=$as_save_IFS
9980 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009981 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00009982 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 +00009983 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009984 $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 +00009985 break 2
9986 fi
9987done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009988 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00009989IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009990
9991fi
9992fi
9993TRUE=$ac_cv_prog_TRUE
9994if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9996$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009997else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9999$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010000fi
10001
Martin v. Löwiseba40652007-08-30 20:10:57 +000010002
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010003 test -n "$TRUE" && break
10004done
10005test -n "$TRUE" || TRUE="/bin/true"
10006
10007
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10009$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010010if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010011 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010012else
10013 ac_check_lib_save_LIBS=$LIBS
10014LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010016/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010017
Martin v. Löwiseba40652007-08-30 20:10:57 +000010018/* Override any GCC internal prototype to avoid an error.
10019 Use char because int might match the return type of a GCC
10020 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010021#ifdef __cplusplus
10022extern "C"
10023#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010024char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010025int
10026main ()
10027{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010028return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010029 ;
10030 return 0;
10031}
10032_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010033if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010034 ac_cv_lib_c_inet_aton=yes
10035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010036 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010037fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010038rm -f core conftest.err conftest.$ac_objext \
10039 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010040LIBS=$ac_check_lib_save_LIBS
10041fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10043$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010044if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010045 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10048$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010049if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010050 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010051else
10052 ac_check_lib_save_LIBS=$LIBS
10053LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010055/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010056
Martin v. Löwiseba40652007-08-30 20:10:57 +000010057/* Override any GCC internal prototype to avoid an error.
10058 Use char because int might match the return type of a GCC
10059 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010060#ifdef __cplusplus
10061extern "C"
10062#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010063char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010064int
10065main ()
10066{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010067return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010068 ;
10069 return 0;
10070}
10071_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010072if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010073 ac_cv_lib_resolv_inet_aton=yes
10074else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010075 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010076fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010077rm -f core conftest.err conftest.$ac_objext \
10078 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010079LIBS=$ac_check_lib_save_LIBS
10080fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10082$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010083if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010084 cat >>confdefs.h <<_ACEOF
10085#define HAVE_LIBRESOLV 1
10086_ACEOF
10087
10088 LIBS="-lresolv $LIBS"
10089
10090fi
10091
10092
10093fi
10094
10095
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010096# On Tru64, chflags seems to be present, but calling it will
10097# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10099$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010100if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010101 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010102else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010103 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010104 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010107/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010108
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010109#include <sys/stat.h>
10110#include <unistd.h>
10111int main(int argc, char*argv[])
10112{
10113 if(chflags(argv[0], 0) != 0)
10114 return 1;
10115 return 0;
10116}
Ned Deily43e10542011-06-27 23:41:53 -070010117
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010118_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010119if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010120 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010121else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010122 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010123fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10125 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010126fi
10127
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010128
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010129fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10131$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010132if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010133 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010134if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010135 ac_cv_have_chflags="yes"
10136else
10137 ac_cv_have_chflags="no"
10138fi
10139
10140fi
10141if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010143$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010144
10145fi
10146
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10148$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010149if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010150 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010151else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010152 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010153 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010156/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010157
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010158#include <sys/stat.h>
10159#include <unistd.h>
10160int main(int argc, char*argv[])
10161{
10162 if(lchflags(argv[0], 0) != 0)
10163 return 1;
10164 return 0;
10165}
Ned Deily43e10542011-06-27 23:41:53 -070010166
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010167_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010168if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010169 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010170else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010171 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010172fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10174 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010175fi
10176
10177
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010178fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10180$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010181if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010182 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010183if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010184 ac_cv_have_lchflags="yes"
10185else
10186 ac_cv_have_lchflags="no"
10187fi
10188
10189fi
10190if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010191
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010192$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010193
10194fi
10195
Ronald Oussorenf8752642006-07-06 10:13:35 +000010196case $ac_sys_system/$ac_sys_release in
10197Darwin/*)
10198 _CUR_CFLAGS="${CFLAGS}"
10199 _CUR_LDFLAGS="${LDFLAGS}"
10200 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10201 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10202 ;;
10203esac
10204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10206$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010207if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010208 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010209else
10210 ac_check_lib_save_LIBS=$LIBS
10211LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010213/* end confdefs.h. */
10214
Martin v. Löwiseba40652007-08-30 20:10:57 +000010215/* Override any GCC internal prototype to avoid an error.
10216 Use char because int might match the return type of a GCC
10217 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010218#ifdef __cplusplus
10219extern "C"
10220#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010221char inflateCopy ();
10222int
10223main ()
10224{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010225return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010226 ;
10227 return 0;
10228}
10229_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010230if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010231 ac_cv_lib_z_inflateCopy=yes
10232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010233 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010234fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010235rm -f core conftest.err conftest.$ac_objext \
10236 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010237LIBS=$ac_check_lib_save_LIBS
10238fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10240$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010241if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010242
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010243$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010244
10245fi
10246
10247
Ronald Oussorenf8752642006-07-06 10:13:35 +000010248case $ac_sys_system/$ac_sys_release in
10249Darwin/*)
10250 CFLAGS="${_CUR_CFLAGS}"
10251 LDFLAGS="${_CUR_LDFLAGS}"
10252 ;;
10253esac
10254
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10256$as_echo_n "checking for hstrerror... " >&6; }
10257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010258/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010259
Martin v. Löwise9416172003-05-03 10:12:45 +000010260#include <netdb.h>
10261
Martin v. Löwise9416172003-05-03 10:12:45 +000010262int
10263main ()
10264{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010265void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010266 ;
10267 return 0;
10268}
10269_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010270if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010271
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010272$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010273
Matthias Klosec511b472010-05-08 11:01:39 +000010274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010275$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010276else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10278$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010279
10280fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010281rm -f core conftest.err conftest.$ac_objext \
10282 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010283
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10285$as_echo_n "checking for inet_aton... " >&6; }
10286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010287/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010288
Martin v. Löwis86d66262006-02-17 08:40:11 +000010289#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010290#include <sys/socket.h>
10291#include <netinet/in.h>
10292#include <arpa/inet.h>
10293
Martin v. Löwise9416172003-05-03 10:12:45 +000010294int
10295main ()
10296{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010297void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010298 ;
10299 return 0;
10300}
10301_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010302if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010303
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010304$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010305
Matthias Klosec511b472010-05-08 11:01:39 +000010306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010307$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10310$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010311
10312fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010313rm -f core conftest.err conftest.$ac_objext \
10314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10317$as_echo_n "checking for inet_pton... " >&6; }
10318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010319/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010320
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010321#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010322#include <sys/socket.h>
10323#include <netinet/in.h>
10324#include <arpa/inet.h>
10325
Martin v. Löwise9416172003-05-03 10:12:45 +000010326int
10327main ()
10328{
10329void* p = inet_pton
10330 ;
10331 return 0;
10332}
10333_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010335
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010336$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010337
Matthias Klosec511b472010-05-08 11:01:39 +000010338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010339$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010340else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10342$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010343
10344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010346
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010347# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10349$as_echo_n "checking for setgroups... " >&6; }
10350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010351/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010352
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010353#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010354#ifdef HAVE_GRP_H
10355#include <grp.h>
10356#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010357
Martin v. Löwisd5843682002-11-21 20:41:28 +000010358int
10359main ()
10360{
10361void* p = setgroups
10362 ;
10363 return 0;
10364}
10365_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010366if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010367
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010368$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010369
Matthias Klosec511b472010-05-08 11:01:39 +000010370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010371$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010372else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10374$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010375
10376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010378
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010379# check for openpty and forkpty
10380
10381for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010382do :
10383 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010384if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010385 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010386#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010387_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010388
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10391$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010392if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010393 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010394else
Martin v. Löwis11437992002-04-12 09:54:03 +000010395 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010396LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010399
Martin v. Löwiseba40652007-08-30 20:10:57 +000010400/* Override any GCC internal prototype to avoid an error.
10401 Use char because int might match the return type of a GCC
10402 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010403#ifdef __cplusplus
10404extern "C"
10405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010406char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010407int
10408main ()
10409{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010410return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010411 ;
10412 return 0;
10413}
10414_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010415if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010416 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010417else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010418 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010419fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010420rm -f core conftest.err conftest.$ac_objext \
10421 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010422LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10425$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010426if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010427 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010428 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010429else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10431$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010432if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010433 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010434else
10435 ac_check_lib_save_LIBS=$LIBS
10436LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010438/* end confdefs.h. */
10439
Martin v. Löwiseba40652007-08-30 20:10:57 +000010440/* Override any GCC internal prototype to avoid an error.
10441 Use char because int might match the return type of a GCC
10442 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010443#ifdef __cplusplus
10444extern "C"
10445#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010446char openpty ();
10447int
10448main ()
10449{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010450return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010451 ;
10452 return 0;
10453}
10454_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010455if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010456 ac_cv_lib_bsd_openpty=yes
10457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010458 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010459fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010460rm -f core conftest.err conftest.$ac_objext \
10461 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010462LIBS=$ac_check_lib_save_LIBS
10463fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10465$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010466if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010467 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010468 LIBS="$LIBS -lbsd"
10469fi
10470
10471
10472fi
10473
Fred Drake8cef4cf2000-06-28 16:40:38 +000010474
10475fi
10476done
10477
10478for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010479do :
10480 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010481if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010483#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010484_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010485
Fred Drake8cef4cf2000-06-28 16:40:38 +000010486else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10488$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010489if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010490 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010491else
Martin v. Löwis11437992002-04-12 09:54:03 +000010492 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010493LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010496
Martin v. Löwiseba40652007-08-30 20:10:57 +000010497/* Override any GCC internal prototype to avoid an error.
10498 Use char because int might match the return type of a GCC
10499 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010500#ifdef __cplusplus
10501extern "C"
10502#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010503char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010504int
10505main ()
10506{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010507return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010508 ;
10509 return 0;
10510}
10511_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010512if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010514else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010515 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010516fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010517rm -f core conftest.err conftest.$ac_objext \
10518 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010519LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010520fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10522$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010523if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010524 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010525 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10528$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010529if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010530 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010531else
10532 ac_check_lib_save_LIBS=$LIBS
10533LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010535/* end confdefs.h. */
10536
Martin v. Löwiseba40652007-08-30 20:10:57 +000010537/* Override any GCC internal prototype to avoid an error.
10538 Use char because int might match the return type of a GCC
10539 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010540#ifdef __cplusplus
10541extern "C"
10542#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010543char forkpty ();
10544int
10545main ()
10546{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010547return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010548 ;
10549 return 0;
10550}
10551_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010552if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010553 ac_cv_lib_bsd_forkpty=yes
10554else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010555 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010556fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010557rm -f core conftest.err conftest.$ac_objext \
10558 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010559LIBS=$ac_check_lib_save_LIBS
10560fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10562$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010563if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010564 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010565 LIBS="$LIBS -lbsd"
10566fi
10567
10568
10569fi
10570
Fred Drake8cef4cf2000-06-28 16:40:38 +000010571
10572fi
10573done
10574
Jack Jansendd19cf82001-12-06 22:36:17 +000010575
Brett Cannonaa5778d2008-03-18 04:09:00 +000010576# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010577for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010578do :
10579 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010580if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010581 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010582#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010583_ACEOF
10584
10585fi
10586done
10587
10588
Michael W. Hudson54241132001-12-07 15:38:26 +000010589# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010590for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010591do :
10592 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10593ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010594if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010595 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010596#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010597_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010598
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010599fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010600done
10601
Michael W. Hudson54241132001-12-07 15:38:26 +000010602
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010603ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010604if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010605 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010606
Martin v. Löwis1142de32002-03-29 16:28:31 +000010607else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010608 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010609 *" dup2.$ac_objext "* ) ;;
10610 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010611 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010612esac
10613
Martin v. Löwis1142de32002-03-29 16:28:31 +000010614fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010615
10616ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010617if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010618 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10619
10620else
10621 case " $LIBOBJS " in
10622 *" getcwd.$ac_objext "* ) ;;
10623 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10624 ;;
10625esac
10626
10627fi
10628
10629ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010630if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010631 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10632
10633else
10634 case " $LIBOBJS " in
10635 *" strdup.$ac_objext "* ) ;;
10636 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10637 ;;
10638esac
10639
10640fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010641
10642
10643for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010644do :
10645 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010646if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010647 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010648#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010649_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010651/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010652#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010653int
10654main ()
10655{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010656getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 ;
10658 return 0;
10659}
10660_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010661if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010662
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010663$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010664
Guido van Rossum627b2d71993-12-24 10:39:16 +000010665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010667
Guido van Rossum627b2d71993-12-24 10:39:16 +000010668fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010669done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010670
Jack Jansen150753c2003-03-29 22:07:47 +000010671for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010672do :
10673 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010674if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010675 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010676#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010677_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010679/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010680#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010681int
10682main ()
10683{
10684setpgrp(0,0);
10685 ;
10686 return 0;
10687}
10688_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010689if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010690
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010691$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010692
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010695
10696fi
10697done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010698
Thomas Wouters3a584202000-08-05 23:28:51 +000010699for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010700do :
10701 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010702if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010703 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010704#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010707/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010708#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010709int
10710main ()
10711{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010712gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 ;
10714 return 0;
10715}
10716_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010717if ac_fn_c_try_compile "$LINENO"; then :
10718
Guido van Rossum627b2d71993-12-24 10:39:16 +000010719else
Skip Montanaro6dead952003-09-25 14:50:04 +000010720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010721$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010722
Martin v. Löwis11437992002-04-12 09:54:03 +000010723
Guido van Rossum627b2d71993-12-24 10:39:16 +000010724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010726
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010727fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010728done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010729
Michael W. Hudson54241132001-12-07 15:38:26 +000010730
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10732$as_echo_n "checking for major... " >&6; }
10733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010734/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010735
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010736#if defined(MAJOR_IN_MKDEV)
10737#include <sys/mkdev.h>
10738#elif defined(MAJOR_IN_SYSMACROS)
10739#include <sys/sysmacros.h>
10740#else
10741#include <sys/types.h>
10742#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010743
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010744int
10745main ()
10746{
10747
10748 makedev(major(0),minor(0));
10749
10750 ;
10751 return 0;
10752}
10753_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010754if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010755
10756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010757$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10760$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010761
10762else
Skip Montanaro6dead952003-09-25 14:50:04 +000010763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10765$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010766
10767fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010768rm -f core conftest.err conftest.$ac_objext \
10769 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010770
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010771# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010772# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10774$as_echo_n "checking for getaddrinfo... " >&6; }
10775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010776/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010777
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010778#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010779#include <sys/socket.h>
10780#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010781#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010782
Martin v. Löwis11437992002-04-12 09:54:03 +000010783int
10784main ()
10785{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010786getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010787 ;
10788 return 0;
10789}
10790_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010791if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010792 have_getaddrinfo=yes
10793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010794 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010796rm -f core conftest.err conftest.$ac_objext \
10797 conftest$ac_exeext conftest.$ac_ext
10798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10799$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010800if test $have_getaddrinfo = yes
10801then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10803$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010804 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010805 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010806else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010807 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010808 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010809else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010811/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010812
10813#include <sys/types.h>
10814#include <netdb.h>
10815#include <string.h>
10816#include <sys/socket.h>
10817#include <netinet/in.h>
10818
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010819int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010820{
10821 int passive, gaierr, inet4 = 0, inet6 = 0;
10822 struct addrinfo hints, *ai, *aitop;
10823 char straddr[INET6_ADDRSTRLEN], strport[16];
10824
10825 for (passive = 0; passive <= 1; passive++) {
10826 memset(&hints, 0, sizeof(hints));
10827 hints.ai_family = AF_UNSPEC;
10828 hints.ai_flags = passive ? AI_PASSIVE : 0;
10829 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010830 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010831 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10832 (void)gai_strerror(gaierr);
10833 goto bad;
10834 }
10835 for (ai = aitop; ai; ai = ai->ai_next) {
10836 if (ai->ai_addr == NULL ||
10837 ai->ai_addrlen == 0 ||
10838 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10839 straddr, sizeof(straddr), strport, sizeof(strport),
10840 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10841 goto bad;
10842 }
10843 switch (ai->ai_family) {
10844 case AF_INET:
10845 if (strcmp(strport, "54321") != 0) {
10846 goto bad;
10847 }
10848 if (passive) {
10849 if (strcmp(straddr, "0.0.0.0") != 0) {
10850 goto bad;
10851 }
10852 } else {
10853 if (strcmp(straddr, "127.0.0.1") != 0) {
10854 goto bad;
10855 }
10856 }
10857 inet4++;
10858 break;
10859 case AF_INET6:
10860 if (strcmp(strport, "54321") != 0) {
10861 goto bad;
10862 }
10863 if (passive) {
10864 if (strcmp(straddr, "::") != 0) {
10865 goto bad;
10866 }
10867 } else {
10868 if (strcmp(straddr, "::1") != 0) {
10869 goto bad;
10870 }
10871 }
10872 inet6++;
10873 break;
10874 case AF_UNSPEC:
10875 goto bad;
10876 break;
10877 default:
10878 /* another family support? */
10879 break;
10880 }
10881 }
10882 }
10883
10884 if (!(inet4 == 0 || inet4 == 2))
10885 goto bad;
10886 if (!(inet6 == 0 || inet6 == 2))
10887 goto bad;
10888
10889 if (aitop)
10890 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010891 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010892
10893 bad:
10894 if (aitop)
10895 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010896 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010897}
10898
Martin v. Löwis11437992002-04-12 09:54:03 +000010899_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010900if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010901 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010902else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010903 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010904fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010908
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010909fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010910
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010912
Benjamin Peterson75fed812010-11-01 01:47:19 +000010913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10914$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10915
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010916if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010917then
10918 if test $ipv6 = yes
10919 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010920 echo 'Fatal: You must get working getaddrinfo() function.'
10921 echo ' or you can specify "--disable-ipv6"'.
10922 exit 1
10923 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010924else
Martin v. Löwis11437992002-04-12 09:54:03 +000010925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010926$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010927
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010928fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000010929
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010930for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010931do :
10932 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010933if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010934 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010935#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010936_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010937
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010938fi
10939done
10940
Michael W. Hudson54241132001-12-07 15:38:26 +000010941
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010942# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10944$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010945if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010949/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010950#include <sys/types.h>
10951#include <sys/time.h>
10952#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010953
Martin v. Löwis11437992002-04-12 09:54:03 +000010954int
10955main ()
10956{
10957if ((struct tm *) 0)
10958return 0;
10959 ;
10960 return 0;
10961}
10962_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010963if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010964 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010965else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010966 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010969fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10971$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010972if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010973
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010974$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010975
10976fi
10977
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10979$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010980if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010981 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010982else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010984/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010985#include <sys/types.h>
10986#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010987
Martin v. Löwis11437992002-04-12 09:54:03 +000010988int
10989main ()
10990{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010991struct tm tm;
10992 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010993 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010994 ;
10995 return 0;
10996}
10997_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010998if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010999 ac_cv_struct_tm=time.h
11000else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011001 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011004fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11006$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011007if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011009$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011010
11011fi
11012
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011013ac_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 +000011014#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011015
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011016"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011017if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011018
11019cat >>confdefs.h <<_ACEOF
11020#define HAVE_STRUCT_TM_TM_ZONE 1
11021_ACEOF
11022
11023
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011024fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011025
Martin v. Löwis11437992002-04-12 09:54:03 +000011026if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11027
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011028$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011029
11030else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011031 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11032"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011033if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011034 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011036 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011037fi
11038
Martin v. Löwiseba40652007-08-30 20:10:57 +000011039cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011040#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011041_ACEOF
11042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11044$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011045if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011046 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011049/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011050#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011051#if !HAVE_DECL_TZNAME
11052extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011054
Martin v. Löwis11437992002-04-12 09:54:03 +000011055int
11056main ()
11057{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011058return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011059 ;
11060 return 0;
11061}
11062_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011063if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011064 ac_cv_var_tzname=yes
11065else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011066 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011067fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011068rm -f core conftest.err conftest.$ac_objext \
11069 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011070fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11072$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011073 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011074
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011075$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011076
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011077 fi
11078fi
11079
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011080ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011081if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011082
11083cat >>confdefs.h <<_ACEOF
11084#define HAVE_STRUCT_STAT_ST_RDEV 1
11085_ACEOF
11086
11087
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011088fi
11089
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011090ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011091if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011092
Martin v. Löwis11437992002-04-12 09:54:03 +000011093cat >>confdefs.h <<_ACEOF
11094#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11095_ACEOF
11096
11097
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011098fi
11099
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011100ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011101if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011102
11103cat >>confdefs.h <<_ACEOF
11104#define HAVE_STRUCT_STAT_ST_FLAGS 1
11105_ACEOF
11106
11107
11108fi
11109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011110ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011111if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011112
11113cat >>confdefs.h <<_ACEOF
11114#define HAVE_STRUCT_STAT_ST_GEN 1
11115_ACEOF
11116
11117
11118fi
11119
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011120ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011121if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011122
11123cat >>confdefs.h <<_ACEOF
11124#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11125_ACEOF
11126
11127
11128fi
11129
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011130ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011131if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011132
Martin v. Löwis11437992002-04-12 09:54:03 +000011133cat >>confdefs.h <<_ACEOF
11134#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11135_ACEOF
11136
11137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011138$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011139
11140else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011141 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011142 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011143 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11144 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011145esac
11146
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011147fi
11148
Michael W. Hudson54241132001-12-07 15:38:26 +000011149
Martin v. Löwis11437992002-04-12 09:54:03 +000011150
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11152$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011153if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011154 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011155else
Matthias Klosec511b472010-05-08 11:01:39 +000011156
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. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011159#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011160int
11161main ()
11162{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011163return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 ;
11165 return 0;
11166}
11167_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011168if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011169 ac_cv_header_time_altzone=yes
11170else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011171 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011174
Martin v. Löwiseba40652007-08-30 20:10:57 +000011175fi
11176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11178$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011179if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011180
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011181$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011182
11183fi
11184
Guido van Rossumda88dad1995-01-26 00:46:29 +000011185was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11187$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011189/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011190
11191#include <sys/types.h>
11192#include <sys/select.h>
11193#include <sys/time.h>
11194
Martin v. Löwis11437992002-04-12 09:54:03 +000011195int
11196main ()
11197{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011198;
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 ;
11200 return 0;
11201}
11202_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011204
11205
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011207
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011208 was_it_defined=yes
11209
Martin v. Löwiseba40652007-08-30 20:10:57 +000011210fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11213$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011214
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11216$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011217if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011218 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011219else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011221/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011222#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011223int
11224main ()
11225{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011226struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011227 ;
11228 return 0;
11229}
11230_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011231if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011232 ac_cv_struct_addrinfo=yes
11233else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011234 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11237fi
11238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11240$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011241if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011242
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011243$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011244
11245fi
11246
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11248$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011249if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011250 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011251else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011253/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011254
11255# include <sys/types.h>
11256# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011257int
11258main ()
11259{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011260struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 ;
11262 return 0;
11263}
11264_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011266 ac_cv_struct_sockaddr_storage=yes
11267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11271fi
11272
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11274$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011275if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011276
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011277$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011278
11279fi
11280
Guido van Rossum627b2d71993-12-24 10:39:16 +000011281# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11284$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011285if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011286 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011287else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011290$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011291int
11292main ()
11293{
11294static int test_array [1 - 2 * !(((char) -1) < 0)];
11295test_array [0] = 0
11296
11297 ;
11298 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011299}
Martin v. Löwis11437992002-04-12 09:54:03 +000011300_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011301if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011302 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011304 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011307fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11309$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011310if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011311 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011312
11313fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011314
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11316$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011317if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011318 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011319else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011321/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011322
Martin v. Löwis11437992002-04-12 09:54:03 +000011323int
11324main ()
11325{
11326/* FIXME: Include the comments suggested by Paul. */
11327#ifndef __cplusplus
11328 /* Ultrix mips cc rejects this. */
11329 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011330 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011331 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011332 char const *const *pcpcc;
11333 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 /* NEC SVR4.0.2 mips cc rejects this. */
11335 struct point {int x, y;};
11336 static struct point const zero = {0,0};
11337 /* AIX XL C 1.02.0.0 rejects this.
11338 It does not let you subtract one const X* pointer from another in
11339 an arm of an if-expression whose if-part is not a constant
11340 expression */
11341 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011342 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011344 ++pcpcc;
11345 ppc = (char**) pcpcc;
11346 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011347 { /* SCO 3.2v4 cc rejects this. */
11348 char *t;
11349 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011350
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011352 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011353 }
11354 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11355 int x[] = {25, 17};
11356 const int *foo = &x[0];
11357 ++foo;
11358 }
11359 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11360 typedef const int *iptr;
11361 iptr p = 0;
11362 ++p;
11363 }
11364 { /* AIX XL C 1.02.0.0 rejects this saying
11365 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11366 struct s { int j; const int *ap[3]; };
11367 struct s *b; b->j = 5;
11368 }
11369 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11370 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011371 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011373 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011374#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011375
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 ;
11377 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011378}
Martin v. Löwis11437992002-04-12 09:54:03 +000011379_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011380if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011381 ac_cv_c_const=yes
11382else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011383 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011386fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11388$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011389if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011390
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011391$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011392
11393fi
11394
Michael W. Hudson54241132001-12-07 15:38:26 +000011395
Guido van Rossumda88dad1995-01-26 00:46:29 +000011396works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11398$as_echo_n "checking for working volatile... " >&6; }
11399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011400/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011401
Martin v. Löwis11437992002-04-12 09:54:03 +000011402int
11403main ()
11404{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011405volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 ;
11407 return 0;
11408}
11409_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011410if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011411 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011412else
Skip Montanaro6dead952003-09-25 14:50:04 +000011413
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011414$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011415
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011416
Guido van Rossum627b2d71993-12-24 10:39:16 +000011417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11420$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011421
Guido van Rossumda88dad1995-01-26 00:46:29 +000011422works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11424$as_echo_n "checking for working signed char... " >&6; }
11425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011426/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011427
Martin v. Löwis11437992002-04-12 09:54:03 +000011428int
11429main ()
11430{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011431signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 ;
11433 return 0;
11434}
11435_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011436if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011437 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011438else
Skip Montanaro6dead952003-09-25 14:50:04 +000011439
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011440$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011441
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011442
Guido van Rossum7f43da71994-08-01 12:15:30 +000011443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11446$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011447
Guido van Rossumda88dad1995-01-26 00:46:29 +000011448have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11450$as_echo_n "checking for prototypes... " >&6; }
11451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011452/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011453int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011454int
11455main ()
11456{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011457return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011458 ;
11459 return 0;
11460}
11461_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011464$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011465
Matthias Klosec511b472010-05-08 11:01:39 +000011466 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11470$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011471
Guido van Rossumda88dad1995-01-26 00:46:29 +000011472works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11474$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011476/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011477
11478#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011479int foo(int x, ...) {
11480 va_list va;
11481 va_start(va, x);
11482 va_arg(va, int);
11483 va_arg(va, char *);
11484 va_arg(va, double);
11485 return 0;
11486}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011487
Martin v. Löwis11437992002-04-12 09:54:03 +000011488int
11489main ()
11490{
Guido van Rossum90eea071996-08-30 20:58:57 +000011491return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011492 ;
11493 return 0;
11494}
11495_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011496if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011497
11498
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011499$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011501 works=yes
11502
Guido van Rossum627b2d71993-12-24 10:39:16 +000011503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11506$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011507
Martin v. Löwisd6320502004-08-12 13:45:08 +000011508# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11510$as_echo_n "checking for socketpair... " >&6; }
11511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011512/* end confdefs.h. */
11513
11514#include <sys/types.h>
11515#include <sys/socket.h>
11516
11517int
11518main ()
11519{
11520void *x=socketpair
11521 ;
11522 return 0;
11523}
11524_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011525if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011526
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011527$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011528
Matthias Klosec511b472010-05-08 11:01:39 +000011529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011530$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11533$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011534
11535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011537
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011538# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11540$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011542/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011543#include <sys/types.h>
11544#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011545int
11546main ()
11547{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011548struct sockaddr x;
11549x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 ;
11551 return 0;
11552}
11553_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011554if ac_fn_c_try_compile "$LINENO"; then :
11555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11556$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011558$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011559
11560else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11562$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011563
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011566
Guido van Rossumda88dad1995-01-26 00:46:29 +000011567va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11569$as_echo_n "checking whether va_list is an array... " >&6; }
11570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011572
11573#ifdef HAVE_STDARG_PROTOTYPES
11574#include <stdarg.h>
11575#else
11576#include <varargs.h>
11577#endif
11578
Martin v. Löwis11437992002-04-12 09:54:03 +000011579int
11580main ()
11581{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011582va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 ;
11584 return 0;
11585}
11586_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011587if ac_fn_c_try_compile "$LINENO"; then :
11588
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011589else
Skip Montanaro6dead952003-09-25 14:50:04 +000011590
Martin v. Löwis11437992002-04-12 09:54:03 +000011591
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011592$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011593
Guido van Rossumda88dad1995-01-26 00:46:29 +000011594 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011595
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11599$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011600
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011601# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011602
11603
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011604ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011605if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011606
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011607 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011608
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11610$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011611 OLD_CFLAGS=$CFLAGS
11612 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011614/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011615
11616# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011617
Martin v. Löwis11437992002-04-12 09:54:03 +000011618int
11619main ()
11620{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011621
11622 char *name;
11623 struct hostent *he, *res;
11624 char buffer[2048];
11625 int buflen = 2048;
11626 int h_errnop;
11627
11628 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011629
11630 ;
11631 return 0;
11632}
11633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011636 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011637
Martin v. Löwis11437992002-04-12 09:54:03 +000011638
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011639$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011640
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11642$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011643
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011644else
Skip Montanaro6dead952003-09-25 14:50:04 +000011645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11647$as_echo "no" >&6; }
11648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11649$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011651/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011652
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011653# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011654
Martin v. Löwis11437992002-04-12 09:54:03 +000011655int
11656main ()
11657{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011658
11659 char *name;
11660 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011661 char buffer[2048];
11662 int buflen = 2048;
11663 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011664
Matthias Klosec511b472010-05-08 11:01:39 +000011665 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011666
11667 ;
11668 return 0;
11669}
11670_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011671if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011672
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011673 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011674
Martin v. Löwis11437992002-04-12 09:54:03 +000011675
Matthias Klosec511b472010-05-08 11:01:39 +000011676$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11679$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011680
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011681else
Skip Montanaro6dead952003-09-25 14:50:04 +000011682
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11684$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11686$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11688/* end confdefs.h. */
11689
11690# include <netdb.h>
11691
11692int
11693main ()
11694{
11695
11696 char *name;
11697 struct hostent *he;
11698 struct hostent_data data;
11699
11700 (void) gethostbyname_r(name, he, &data);
11701
11702 ;
11703 return 0;
11704}
11705_ACEOF
11706if ac_fn_c_try_compile "$LINENO"; then :
11707
11708 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11709
11710
11711$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11712
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11714$as_echo "yes" >&6; }
11715
11716else
11717
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11719$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011720
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011723
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011726
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011729 CFLAGS=$OLD_CFLAGS
11730
11731else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011733 for ac_func in gethostbyname
11734do :
11735 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011736if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011737 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011738#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011739_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011740
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011741fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011742done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011743
Michael W. Hudson54241132001-12-07 15:38:26 +000011744
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011745fi
11746
Michael W. Hudson54241132001-12-07 15:38:26 +000011747
11748
11749
11750
11751
11752
Guido van Rossum627b2d71993-12-24 10:39:16 +000011753# checks for system services
11754# (none yet)
11755
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011756# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011757ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011758if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011759
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011760else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11762$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011763if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011764 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011765else
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011767LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
Martin v. Löwiseba40652007-08-30 20:10:57 +000011771/* Override any GCC internal prototype to avoid an error.
11772 Use char because int might match the return type of a GCC
11773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011774#ifdef __cplusplus
11775extern "C"
11776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011777char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011778int
11779main ()
11780{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011781return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011789 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011790fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011791rm -f core conftest.err conftest.$ac_objext \
11792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011793LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011794fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11796$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011797if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011798 cat >>confdefs.h <<_ACEOF
11799#define HAVE_LIBIEEE 1
11800_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011801
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011802 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011803
Guido van Rossum627b2d71993-12-24 10:39:16 +000011804fi
11805
Michael W. Hudson54241132001-12-07 15:38:26 +000011806
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011807fi
11808
Michael W. Hudson54241132001-12-07 15:38:26 +000011809
Guido van Rossum7f253911997-05-09 02:42:48 +000011810# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11812$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011813
Martin v. Löwiseba40652007-08-30 20:10:57 +000011814# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011815if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011816 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011817if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011818then
11819
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011821
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11823$as_echo "yes" >&6; }
11824else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11825$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011826fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11829$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011830fi
11831
Guido van Rossum7f253911997-05-09 02:42:48 +000011832
Guido van Rossum7f43da71994-08-01 12:15:30 +000011833# check for --with-libm=...
11834
Guido van Rossum563e7081996-09-10 18:20:48 +000011835case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011836Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011837BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011838*) LIBM=-lm
11839esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11841$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011842
Martin v. Löwiseba40652007-08-30 20:10:57 +000011843# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011845 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011846if test "$withval" = no
11847then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11849$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011850elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011851then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11853$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011854else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011855fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11858$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011859fi
11860
Guido van Rossum7f43da71994-08-01 12:15:30 +000011861
11862# check for --with-libc=...
11863
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11865$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011866
Martin v. Löwiseba40652007-08-30 20:10:57 +000011867# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011868if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011869 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011870if test "$withval" = no
11871then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11873$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011874elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011875then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11877$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011878else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011879fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11882$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011883fi
11884
Guido van Rossum7f43da71994-08-01 12:15:30 +000011885
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011886# **************************************************
11887# * Check for various properties of floating point *
11888# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011889
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11891$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011892if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011893 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011894else
11895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011896if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011897 ac_cv_little_endian_double=no
11898else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011900/* end confdefs.h. */
11901
11902#include <string.h>
11903int main() {
11904 double x = 9006104071832581.0;
11905 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11906 return 0;
11907 else
11908 return 1;
11909}
11910
11911_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011912if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011913 ac_cv_little_endian_double=yes
11914else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011916fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011919fi
11920
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011921fi
11922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11924$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011925if test "$ac_cv_little_endian_double" = yes
11926then
11927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011928$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011929
11930fi
11931
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11933$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011934if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011935 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011936else
11937
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011938if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011939 ac_cv_big_endian_double=no
11940else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011942/* end confdefs.h. */
11943
11944#include <string.h>
11945int main() {
11946 double x = 9006104071832581.0;
11947 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11948 return 0;
11949 else
11950 return 1;
11951}
11952
11953_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011954if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011955 ac_cv_big_endian_double=yes
11956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011957 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11960 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011961fi
11962
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011963fi
11964
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11966$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011967if test "$ac_cv_big_endian_double" = yes
11968then
11969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011970$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011971
11972fi
11973
11974# Some ARM platforms use a mixed-endian representation for doubles.
11975# While Python doesn't currently have full support for these platforms
11976# (see e.g., issue 1762561), we can at least make sure that float <-> string
11977# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11979$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011980if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011981 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011982else
11983
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011984if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011985 ac_cv_mixed_endian_double=no
11986else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011988/* end confdefs.h. */
11989
11990#include <string.h>
11991int main() {
11992 double x = 9006104071832581.0;
11993 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11994 return 0;
11995 else
11996 return 1;
11997}
11998
11999_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012000if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012001 ac_cv_mixed_endian_double=yes
12002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012003 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012004fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12006 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012007fi
12008
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012009fi
12010
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12012$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012013if test "$ac_cv_mixed_endian_double" = yes
12014then
12015
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012016$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012017
12018fi
12019
12020# The short float repr introduced in Python 3.1 requires the
12021# correctly-rounded string <-> double conversion functions from
12022# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12023# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012024# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012025# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012026
12027# This inline assembler syntax may also work for suncc and icc,
12028# so we try it on all platforms.
12029
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12031$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012033/* end confdefs.h. */
12034
12035int
12036main ()
12037{
12038
Mark Dickinsona548dee2009-11-15 13:12:43 +000012039 unsigned short cw;
12040 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12041 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012042
12043 ;
12044 return 0;
12045}
12046_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012047if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012048 have_gcc_asm_for_x87=yes
12049else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012050 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012051fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12054$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012055if test "$have_gcc_asm_for_x87" = yes
12056then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012057
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012058$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012059
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012060fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012061
Mark Dickinson04b27232009-01-04 12:29:36 +000012062# Detect whether system arithmetic is subject to x87-style double
12063# rounding issues. The result of this test has little meaning on non
12064# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12065# mode is round-to-nearest and double rounding issues are present, and
12066# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12068$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012069# $BASECFLAGS may affect the result
12070ac_save_cc="$CC"
12071CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012072if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012073 ac_cv_x87_double_rounding=no
12074else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012076/* end confdefs.h. */
12077
12078#include <stdlib.h>
12079#include <math.h>
12080int main() {
12081 volatile double x, y, z;
12082 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12083 x = 0.99999999999999989; /* 1-2**-53 */
12084 y = 1./x;
12085 if (y != 1.)
12086 exit(0);
12087 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12088 x = 1e16;
12089 y = 2.99999;
12090 z = x + y;
12091 if (z != 1e16+4.)
12092 exit(0);
12093 /* both tests show evidence of double rounding */
12094 exit(1);
12095}
12096
12097_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012098if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012099 ac_cv_x87_double_rounding=no
12100else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012101 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012102fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12104 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012105fi
12106
Mark Dickinson99abd142009-10-24 13:44:16 +000012107CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12109$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012110if test "$ac_cv_x87_double_rounding" = yes
12111then
12112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012114
12115fi
12116
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012117# ************************************
12118# * Check for mathematical functions *
12119# ************************************
12120
12121LIBS_SAVE=$LIBS
12122LIBS="$LIBS $LIBM"
12123
Mark Dickinson265d7382008-04-21 22:32:24 +000012124# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12125# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12127$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012128if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012129 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012130else
12131
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012132if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012133 ac_cv_tanh_preserves_zero_sign=no
12134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012136/* end confdefs.h. */
12137
12138#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012139#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012140int main() {
12141 /* return 0 if either negative zeros don't exist
12142 on this platform or if negative zeros exist
12143 and tanh(-0.) == -0. */
12144 if (atan2(0., -1.) == atan2(-0., -1.) ||
12145 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12146 else exit(1);
12147}
12148
12149_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012150if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012151 ac_cv_tanh_preserves_zero_sign=yes
12152else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012153 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012154fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12156 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012157fi
12158
Mark Dickinson265d7382008-04-21 22:32:24 +000012159fi
12160
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12162$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012163if test "$ac_cv_tanh_preserves_zero_sign" = yes
12164then
12165
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012166$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012167
12168fi
12169
Mark Dickinson65898e02009-09-05 10:27:00 +000012170for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012171do :
12172 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12173ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012174if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012175 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012176#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012177_ACEOF
12178
12179fi
12180done
12181
Mark Dickinson65898e02009-09-05 10:27:00 +000012182for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012183do :
12184 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12185ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012186if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012187 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012188#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012189_ACEOF
12190
12191fi
12192done
12193
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012194ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12195"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012196if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012197 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012198else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012199 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012200fi
12201
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012202cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012203#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012204_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012205ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12206"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012207if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012208 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012209else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012210 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012211fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012212
12213cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012214#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012215_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012216ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12217"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012218if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012219 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012221 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012222fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012223
12224cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012225#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012226_ACEOF
12227
12228
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012229LIBS=$LIBS_SAVE
12230
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012231# For multiprocessing module, check that sem_open
12232# actually works. For FreeBSD versions <= 7.2,
12233# the kernel module that provides POSIX semaphores
12234# isn't loaded by default, so an attempt to call
12235# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12237$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012238if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012239 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012240else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012241 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012242 ac_cv_posix_semaphores_enabled=yes
12243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012245/* end confdefs.h. */
12246
12247#include <unistd.h>
12248#include <fcntl.h>
12249#include <stdio.h>
12250#include <semaphore.h>
12251#include <sys/stat.h>
12252
12253int main(void) {
12254 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12255 if (a == SEM_FAILED) {
12256 perror("sem_open");
12257 return 1;
12258 }
12259 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012260 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012261 return 0;
12262}
12263
12264_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012265if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012266 ac_cv_posix_semaphores_enabled=yes
12267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012268 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012270rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12271 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012272fi
12273
12274
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012275fi
12276
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12278$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012279if test $ac_cv_posix_semaphores_enabled = no
12280then
12281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012282$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012283
12284fi
12285
12286# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12288$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012289if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012290 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012292 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012293 ac_cv_broken_sem_getvalue=yes
12294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012296/* end confdefs.h. */
12297
12298#include <unistd.h>
12299#include <fcntl.h>
12300#include <stdio.h>
12301#include <semaphore.h>
12302#include <sys/stat.h>
12303
12304int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012305 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012306 int count;
12307 int res;
12308 if(a==SEM_FAILED){
12309 perror("sem_open");
12310 return 1;
12311
12312 }
12313 res = sem_getvalue(a, &count);
12314 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012315 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012316 return res==-1 ? 1 : 0;
12317}
12318
12319_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012320if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012321 ac_cv_broken_sem_getvalue=no
12322else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012323 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012324fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12326 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012327fi
12328
12329
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012330fi
12331
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12333$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012334if test $ac_cv_broken_sem_getvalue = yes
12335then
12336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012337$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012338
12339fi
12340
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012341# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12343$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012344# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012345if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012346 enableval=$enable_big_digits; case $enable_big_digits in
12347yes)
12348 enable_big_digits=30 ;;
12349no)
12350 enable_big_digits=15 ;;
1235115|30)
12352 ;;
12353*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012354 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 +000012355esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12357$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012358
12359cat >>confdefs.h <<_ACEOF
12360#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12361_ACEOF
12362
12363
12364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12366$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012367fi
12368
12369
Guido van Rossumef2255b2000-03-10 22:30:29 +000012370# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012371ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012372if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012373
12374
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012375$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012376
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012377 wchar_h="yes"
12378
Guido van Rossumef2255b2000-03-10 22:30:29 +000012379else
Martin v. Löwis11437992002-04-12 09:54:03 +000012380 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012381
12382fi
12383
Michael W. Hudson54241132001-12-07 15:38:26 +000012384
Martin v. Löwis11437992002-04-12 09:54:03 +000012385
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012386# determine wchar_t size
12387if test "$wchar_h" = yes
12388then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012389 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012390# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12391# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12392# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12394$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012395if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012396 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012398 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12399"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012400
Martin v. Löwis11437992002-04-12 09:54:03 +000012401else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012402 if test "$ac_cv_type_wchar_t" = yes; then
12403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012405as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012406See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012407 else
12408 ac_cv_sizeof_wchar_t=0
12409 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012410fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012411
Martin v. Löwis11437992002-04-12 09:54:03 +000012412fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12414$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012415
12416
12417
Martin v. Löwis11437992002-04-12 09:54:03 +000012418cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012419#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012420_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012421
Michael W. Hudson54241132001-12-07 15:38:26 +000012422
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012423fi
12424
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12426$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012427have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012429/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012430
12431#include <tcl.h>
12432#if TCL_UTF_MAX != 6
12433# error "NOT UCS4_TCL"
12434#endif
12435int
12436main ()
12437{
12438
12439 ;
12440 return 0;
12441}
12442_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012444
12445
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012446$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012447
12448 have_ucs4_tcl=yes
12449
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12453$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012454
Skip Montanaro6dead952003-09-25 14:50:04 +000012455# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012456if test "$wchar_h" = yes
12457then
12458 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12460$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012461 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012462 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012463else
12464
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012465 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012466 ac_cv_wchar_t_signed=yes
12467else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012469/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012470
12471 #include <wchar.h>
12472 int main()
12473 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012474 /* Success: exit code 0 */
12475 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012476 }
12477
12478_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012479if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012480 ac_cv_wchar_t_signed=yes
12481else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012482 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012483fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12485 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012486fi
12487
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012488fi
12489
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12491$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492fi
12493
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12495$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012496# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012497if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012498 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012499else
12500 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012501fi
12502
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012503
12504if test $enable_unicode = yes
12505then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012506 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012507 case "$have_ucs4_tcl" in
12508 yes) enable_unicode="ucs4"
12509 ;;
12510 *) enable_unicode="ucs2"
12511 ;;
12512 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012513fi
12514
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012515
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012516case "$enable_unicode" in
12517ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012518 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012519
12520 ;;
12521ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012522 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012523
12524 ;;
Matthias Klose3cef2a92012-03-14 23:39:33 +010012525*) 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 +000012526esac
12527
Michael W. Hudson54241132001-12-07 15:38:26 +000012528
Martin v. Löwis11437992002-04-12 09:54:03 +000012529
12530
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012531if test "$enable_unicode" = "no"
12532then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012533 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12535$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012536else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012537 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012538
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012539$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012540
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012541
12542 # wchar_t is only usable if it maps to an unsigned type
12543 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012544 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012545 then
12546 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012547
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012548$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012549
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012550 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012551
12552 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12553 then
12554 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012555 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012556
12557 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12558 then
12559 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012560 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012561
12562 else
12563 PY_UNICODE_TYPE="no type found"
12564 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12566$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012567fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012568
12569# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12571$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012572if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012573 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012575 ac_cv_c_bigendian=unknown
12576 # See if we're dealing with a universal compiler.
12577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12578/* end confdefs.h. */
12579#ifndef __APPLE_CC__
12580 not a universal capable compiler
12581 #endif
12582 typedef int dummy;
12583
Skip Montanaro6dead952003-09-25 14:50:04 +000012584_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012585if ac_fn_c_try_compile "$LINENO"; then :
12586
12587 # Check for potential -arch flags. It is not universal unless
12588 # there are at least two -arch flags with different values.
12589 ac_arch=
12590 ac_prev=
12591 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12592 if test -n "$ac_prev"; then
12593 case $ac_word in
12594 i?86 | x86_64 | ppc | ppc64)
12595 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12596 ac_arch=$ac_word
12597 else
12598 ac_cv_c_bigendian=universal
12599 break
12600 fi
12601 ;;
12602 esac
12603 ac_prev=
12604 elif test "x$ac_word" = "x-arch"; then
12605 ac_prev=arch
12606 fi
12607 done
12608fi
12609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12610 if test $ac_cv_c_bigendian = unknown; then
12611 # See if sys/param.h defines the BYTE_ORDER macro.
12612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012613/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012614#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012615 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012616
Martin v. Löwis11437992002-04-12 09:54:03 +000012617int
12618main ()
12619{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012620#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12621 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12622 && LITTLE_ENDIAN)
12623 bogus endian macros
12624 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012625
12626 ;
12627 return 0;
12628}
12629_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012630if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012631 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012633/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012634#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012635 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012636
Martin v. Löwis11437992002-04-12 09:54:03 +000012637int
12638main ()
12639{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012640#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012641 not big endian
12642 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012643
12644 ;
12645 return 0;
12646}
12647_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012648if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012649 ac_cv_c_bigendian=yes
12650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012651 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012654fi
12655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12656 fi
12657 if test $ac_cv_c_bigendian = unknown; then
12658 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012660/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012661#include <limits.h>
12662
Martin v. Löwis11437992002-04-12 09:54:03 +000012663int
12664main ()
12665{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012666#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12667 bogus endian macros
12668 #endif
12669
Martin v. Löwis11437992002-04-12 09:54:03 +000012670 ;
12671 return 0;
12672}
12673_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012674if ac_fn_c_try_compile "$LINENO"; then :
12675 # It does; now see whether it defined to _BIG_ENDIAN or not.
12676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12677/* end confdefs.h. */
12678#include <limits.h>
12679
12680int
12681main ()
12682{
12683#ifndef _BIG_ENDIAN
12684 not big endian
12685 #endif
12686
12687 ;
12688 return 0;
12689}
12690_ACEOF
12691if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012694 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012695fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12697fi
12698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12699 fi
12700 if test $ac_cv_c_bigendian = unknown; then
12701 # Compile a test program.
12702 if test "$cross_compiling" = yes; then :
12703 # Try to guess by grepping values from an object file.
12704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12705/* end confdefs.h. */
12706short int ascii_mm[] =
12707 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12708 short int ascii_ii[] =
12709 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12710 int use_ascii (int i) {
12711 return ascii_mm[i] + ascii_ii[i];
12712 }
12713 short int ebcdic_ii[] =
12714 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12715 short int ebcdic_mm[] =
12716 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12717 int use_ebcdic (int i) {
12718 return ebcdic_mm[i] + ebcdic_ii[i];
12719 }
12720 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012721
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012722int
12723main ()
12724{
12725return use_ascii (foo) == use_ebcdic (foo);
12726 ;
12727 return 0;
12728}
12729_ACEOF
12730if ac_fn_c_try_compile "$LINENO"; then :
12731 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12732 ac_cv_c_bigendian=yes
12733 fi
12734 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12735 if test "$ac_cv_c_bigendian" = unknown; then
12736 ac_cv_c_bigendian=no
12737 else
12738 # finding both strings is unlikely to happen, but who knows?
12739 ac_cv_c_bigendian=unknown
12740 fi
12741 fi
12742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012746/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012747$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012748int
12749main ()
12750{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012752 /* Are we little or big endian? From Harbison&Steele. */
12753 union
12754 {
12755 long int l;
12756 char c[sizeof (long int)];
12757 } u;
12758 u.l = 1;
12759 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012760
12761 ;
12762 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012763}
Martin v. Löwis11437992002-04-12 09:54:03 +000012764_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012765if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012766 ac_cv_c_bigendian=no
12767else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012768 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012769fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12771 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012773
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012774 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12777$as_echo "$ac_cv_c_bigendian" >&6; }
12778 case $ac_cv_c_bigendian in #(
12779 yes)
12780 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12781;; #(
12782 no)
12783 ;; #(
12784 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012785
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012786$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012787
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012788 ;; #(
12789 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012790 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010012791 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012792 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012793
Michael W. Hudson54241132001-12-07 15:38:26 +000012794
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012795# Check whether right shifting a negative integer extends the sign bit
12796# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12798$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012799if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012800 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012801else
Martin v. Löwis11437992002-04-12 09:54:03 +000012802
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012803if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012804 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012805else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012807/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012808
12809int main()
12810{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012811 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012812}
12813
Martin v. Löwis11437992002-04-12 09:54:03 +000012814_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012815if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012816 ac_cv_rshift_extends_sign=yes
12817else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012818 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012819fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12821 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012822fi
12823
Martin v. Löwiseba40652007-08-30 20:10:57 +000012824fi
12825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12827$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012828if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012829then
Martin v. Löwis11437992002-04-12 09:54:03 +000012830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012831$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012832
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012833fi
12834
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012835# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12837$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012838if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012839 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012840else
Martin v. Löwis11437992002-04-12 09:54:03 +000012841
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012843/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012844#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012845int
12846main ()
12847{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012848
12849 FILE *f = fopen("/dev/null", "r");
12850 flockfile(f);
12851 getc_unlocked(f);
12852 funlockfile(f);
12853
Martin v. Löwis11437992002-04-12 09:54:03 +000012854 ;
12855 return 0;
12856}
12857_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012858if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012859 ac_cv_have_getc_unlocked=yes
12860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012861 ac_cv_have_getc_unlocked=no
12862fi
12863rm -f core conftest.err conftest.$ac_objext \
12864 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12868$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012869if test "$ac_cv_have_getc_unlocked" = yes
12870then
Martin v. Löwis11437992002-04-12 09:54:03 +000012871
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012872$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012873
12874fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012875
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012876# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012877# save the value of LIBS so we don't actually link Python with readline
12878LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012879
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012880# On some systems we need to link readline to a termcap compatible
12881# library. NOTE: Keep the precedence of listed libraries synchronised
12882# with setup.py.
12883py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12885$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012886for py_libtermcap in "" ncursesw ncurses curses termcap; do
12887 if test -z "$py_libtermcap"; then
12888 READLINE_LIBS="-lreadline"
12889 else
12890 READLINE_LIBS="-lreadline -l$py_libtermcap"
12891 fi
12892 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012894/* end confdefs.h. */
12895
Martin v. Löwiseba40652007-08-30 20:10:57 +000012896/* Override any GCC internal prototype to avoid an error.
12897 Use char because int might match the return type of a GCC
12898 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012899#ifdef __cplusplus
12900extern "C"
12901#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012902char readline ();
12903int
12904main ()
12905{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012906return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012907 ;
12908 return 0;
12909}
12910_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012911if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012912 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012913fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012914rm -f core conftest.err conftest.$ac_objext \
12915 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012916 if test $py_cv_lib_readline = yes; then
12917 break
12918 fi
12919done
12920# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12921#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012922if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12924$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12927$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012929$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012930
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012931fi
12932
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012933# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12935$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012936if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012937 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012938else
12939 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012940LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012942/* end confdefs.h. */
12943
Martin v. Löwiseba40652007-08-30 20:10:57 +000012944/* Override any GCC internal prototype to avoid an error.
12945 Use char because int might match the return type of a GCC
12946 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012947#ifdef __cplusplus
12948extern "C"
12949#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012950char rl_callback_handler_install ();
12951int
12952main ()
12953{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012954return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012955 ;
12956 return 0;
12957}
12958_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012960 ac_cv_lib_readline_rl_callback_handler_install=yes
12961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012962 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012964rm -f core conftest.err conftest.$ac_objext \
12965 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012966LIBS=$ac_check_lib_save_LIBS
12967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12969$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012970if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012972$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012973
12974fi
12975
12976
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012977# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012979/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012980#include <readline/readline.h>
12981_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012982if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012983 have_readline=yes
12984else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012985 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000012986
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012987fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012988rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012989if test $have_readline = yes
12990then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012992/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012993#include <readline/readline.h>
12994
12995_ACEOF
12996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012997 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012998
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012999$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013000
13001fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013002rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013005/* end confdefs.h. */
13006#include <readline/readline.h>
13007
13008_ACEOF
13009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013010 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013011
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013012$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013013
13014fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013015rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013016
13017fi
13018
Martin v. Löwis0daad592001-09-30 21:09:59 +000013019# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13021$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013022if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013023 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013024else
Martin v. Löwis11437992002-04-12 09:54:03 +000013025 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013026LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013029
Martin v. Löwiseba40652007-08-30 20:10:57 +000013030/* Override any GCC internal prototype to avoid an error.
13031 Use char because int might match the return type of a GCC
13032 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013033#ifdef __cplusplus
13034extern "C"
13035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013036char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013037int
13038main ()
13039{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013040return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013041 ;
13042 return 0;
13043}
13044_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013045if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013046 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013048 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013049fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013050rm -f core conftest.err conftest.$ac_objext \
13051 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013052LIBS=$ac_check_lib_save_LIBS
13053fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13055$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013056if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013057
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013058$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013059
Martin v. Löwis0daad592001-09-30 21:09:59 +000013060fi
13061
Michael W. Hudson54241132001-12-07 15:38:26 +000013062
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013063# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13065$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013066if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013067 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013068else
13069 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013070LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013072/* end confdefs.h. */
13073
13074/* Override any GCC internal prototype to avoid an error.
13075 Use char because int might match the return type of a GCC
13076 builtin and then its argument prototype would still apply. */
13077#ifdef __cplusplus
13078extern "C"
13079#endif
13080char rl_completion_display_matches_hook ();
13081int
13082main ()
13083{
13084return rl_completion_display_matches_hook ();
13085 ;
13086 return 0;
13087}
13088_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013089if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013090 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13091else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013092 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013093fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013094rm -f core conftest.err conftest.$ac_objext \
13095 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013096LIBS=$ac_check_lib_save_LIBS
13097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13099$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013100if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013102$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013103
13104fi
13105
13106
Martin v. Löwis0daad592001-09-30 21:09:59 +000013107# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13109$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013110if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013111 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013112else
Martin v. Löwis11437992002-04-12 09:54:03 +000013113 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013114LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013117
Martin v. Löwiseba40652007-08-30 20:10:57 +000013118/* Override any GCC internal prototype to avoid an error.
13119 Use char because int might match the return type of a GCC
13120 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013121#ifdef __cplusplus
13122extern "C"
13123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013124char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013125int
13126main ()
13127{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013128return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013129 ;
13130 return 0;
13131}
13132_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013134 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013136 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013137fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013138rm -f core conftest.err conftest.$ac_objext \
13139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013140LIBS=$ac_check_lib_save_LIBS
13141fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13143$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013144if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013145
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013146$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013147
Guido van Rossum353ae582001-07-10 16:45:32 +000013148fi
13149
Jack Jansendd19cf82001-12-06 22:36:17 +000013150
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013151# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013153/* end confdefs.h. */
13154#include <readline/readline.h>
13155_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013156if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013157 have_readline=yes
13158else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013159 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013160
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013161fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013162rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013163if test $have_readline = yes
13164then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013166/* end confdefs.h. */
13167#include <readline/readline.h>
13168
13169_ACEOF
13170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013171 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013173$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013174
13175fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013176rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013177
13178fi
13179
Martin v. Löwis82bca632006-02-10 20:49:30 +000013180# End of readline checks: restore LIBS
13181LIBS=$LIBS_no_readline
13182
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13184$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013185if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013187else
Martin v. Löwis11437992002-04-12 09:54:03 +000013188
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013190 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013191else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013193/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013194
13195int main()
13196{
13197 int val1 = nice(1);
13198 if (val1 != -1 && val1 == nice(2))
13199 exit(0);
13200 exit(1);
13201}
13202
Martin v. Löwis11437992002-04-12 09:54:03 +000013203_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013204if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013205 ac_cv_broken_nice=yes
13206else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013207 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013208fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13210 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013211fi
13212
Martin v. Löwiseba40652007-08-30 20:10:57 +000013213fi
13214
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13216$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013217if test "$ac_cv_broken_nice" = yes
13218then
Martin v. Löwis11437992002-04-12 09:54:03 +000013219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013220$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013221
13222fi
13223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13225$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013226if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013228else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013229 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013230 ac_cv_broken_poll=no
13231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013233/* end confdefs.h. */
13234
13235#include <poll.h>
13236
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013237int main()
13238{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013239 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013240 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013241
13242 close (42);
13243
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013244 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013245 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013246 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013247 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013248 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013249 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013250 return 1;
13251}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013252
13253_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013255 ac_cv_broken_poll=yes
13256else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013257 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013258fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013259rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13260 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013262
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013263fi
13264
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13266$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013267if test "$ac_cv_broken_poll" = yes
13268then
13269
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013270$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013271
13272fi
13273
Brett Cannon43802422005-02-10 20:48:03 +000013274# 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 +000013275# (which is not required by ISO C or UNIX spec) and/or if we support
13276# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013277ac_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 +000013278#include <$ac_cv_struct_tm>
13279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013280"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013281if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013282
13283cat >>confdefs.h <<_ACEOF
13284#define HAVE_STRUCT_TM_TM_ZONE 1
13285_ACEOF
13286
13287
13288fi
13289
13290if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13291
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013292$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013293
13294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013295 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13296"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013297if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013298 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013299else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013300 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013301fi
13302
Martin v. Löwiseba40652007-08-30 20:10:57 +000013303cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013304#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013305_ACEOF
13306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13308$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013309if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013310 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013313/* end confdefs.h. */
13314#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013315#if !HAVE_DECL_TZNAME
13316extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013317#endif
13318
13319int
13320main ()
13321{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013322return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013323 ;
13324 return 0;
13325}
13326_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013327if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013328 ac_cv_var_tzname=yes
13329else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013330 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013331fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013332rm -f core conftest.err conftest.$ac_objext \
13333 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013334fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13336$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013337 if test $ac_cv_var_tzname = yes; then
13338
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013339$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013340
13341 fi
13342fi
13343
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013344
Martin v. Löwis1d459062005-03-14 21:23:33 +000013345# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13347$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013348if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013349 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013350else
13351
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013352if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013353 ac_cv_working_tzset=no
13354else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013356/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013357
13358#include <stdlib.h>
13359#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013360#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013361
13362#if HAVE_TZNAME
13363extern char *tzname[];
13364#endif
13365
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013366int main()
13367{
Brett Cannon18367812003-09-19 00:59:16 +000013368 /* Note that we need to ensure that not only does tzset(3)
13369 do 'something' with localtime, but it works as documented
13370 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013371 This includes making sure that tzname is set properly if
13372 tm->tm_zone does not exist since it is the alternative way
13373 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013374
13375 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013376 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013377 */
13378
Martin v. Löwis1d459062005-03-14 21:23:33 +000013379 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013380 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13381
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013382 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013383 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013384 if (localtime(&groundhogday)->tm_hour != 0)
13385 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013386#if HAVE_TZNAME
13387 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13388 if (strcmp(tzname[0], "UTC") ||
13389 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13390 exit(1);
13391#endif
Brett Cannon18367812003-09-19 00:59:16 +000013392
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013393 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013394 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013395 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013396 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013397#if HAVE_TZNAME
13398 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13399 exit(1);
13400#endif
Brett Cannon18367812003-09-19 00:59:16 +000013401
13402 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13403 tzset();
13404 if (localtime(&groundhogday)->tm_hour != 11)
13405 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013406#if HAVE_TZNAME
13407 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13408 exit(1);
13409#endif
13410
13411#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013412 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13413 exit(1);
13414 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13415 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013416#endif
Brett Cannon18367812003-09-19 00:59:16 +000013417
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013418 exit(0);
13419}
13420
13421_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013422if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013423 ac_cv_working_tzset=yes
13424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013425 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013426fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013427rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13428 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013429fi
13430
Martin v. Löwiseba40652007-08-30 20:10:57 +000013431fi
13432
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13434$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013435if test "$ac_cv_working_tzset" = yes
13436then
13437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013438$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013439
13440fi
13441
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013442# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13444$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013445if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013446 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013449/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013450#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013451int
13452main ()
13453{
13454
13455struct stat st;
13456st.st_mtim.tv_nsec = 1;
13457
13458 ;
13459 return 0;
13460}
13461_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013463 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013465 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13468fi
13469
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13471$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013472if test "$ac_cv_stat_tv_nsec" = yes
13473then
13474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013475$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013476
13477fi
13478
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013479# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13481$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013482if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013483 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013484else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013486/* end confdefs.h. */
13487#include <sys/stat.h>
13488int
13489main ()
13490{
13491
13492struct stat st;
13493st.st_mtimespec.tv_nsec = 1;
13494
13495 ;
13496 return 0;
13497}
13498_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013499if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013500 ac_cv_stat_tv_nsec2=yes
13501else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013502 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13505fi
13506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13508$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013509if test "$ac_cv_stat_tv_nsec2" = yes
13510then
13511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013512$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013513
13514fi
13515
Jack Jansen666b1e72001-10-31 12:11:48 +000013516# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13518$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013519if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013520 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013521else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013523/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013524#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013525int
13526main ()
13527{
Jack Jansen666b1e72001-10-31 12:11:48 +000013528
13529 int rtn;
13530 rtn = mvwdelch(0,0,0);
13531
Martin v. Löwis11437992002-04-12 09:54:03 +000013532 ;
13533 return 0;
13534}
13535_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013536if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013537 ac_cv_mvwdelch_is_expression=yes
13538else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013539 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13542fi
13543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13545$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013546
13547if test "$ac_cv_mvwdelch_is_expression" = yes
13548then
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013550$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013551
13552fi
13553
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13555$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013556if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013557 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013558else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013560/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013561#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013562int
13563main ()
13564{
Jack Jansen666b1e72001-10-31 12:11:48 +000013565
13566 WINDOW *w;
13567 w->_flags = 0;
13568
Martin v. Löwis11437992002-04-12 09:54:03 +000013569 ;
13570 return 0;
13571}
13572_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013573if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013574 ac_cv_window_has_flags=yes
13575else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013576 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13579fi
13580
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13582$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013583
Jack Jansen666b1e72001-10-31 12:11:48 +000013584
13585if test "$ac_cv_window_has_flags" = yes
13586then
Martin v. Löwis11437992002-04-12 09:54:03 +000013587
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013588$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013589
13590fi
13591
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13593$as_echo_n "checking for is_term_resized... " >&6; }
13594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013595/* end confdefs.h. */
13596#include <curses.h>
13597int
13598main ()
13599{
13600void *x=is_term_resized
13601 ;
13602 return 0;
13603}
13604_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013605if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013606
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013607$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013608
Matthias Klosec511b472010-05-08 11:01:39 +000013609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013611else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13613$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013614
13615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13619$as_echo_n "checking for resize_term... " >&6; }
13620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013621/* end confdefs.h. */
13622#include <curses.h>
13623int
13624main ()
13625{
13626void *x=resize_term
13627 ;
13628 return 0;
13629}
13630_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013631if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013632
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013633$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013634
Matthias Klosec511b472010-05-08 11:01:39 +000013635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013636$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13639$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013640
13641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13643
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13645$as_echo_n "checking for resizeterm... " >&6; }
13646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013647/* end confdefs.h. */
13648#include <curses.h>
13649int
13650main ()
13651{
13652void *x=resizeterm
13653 ;
13654 return 0;
13655}
13656_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013657if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013659$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013660
Matthias Klosec511b472010-05-08 11:01:39 +000013661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013662$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13665$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013666
13667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13669
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13671$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013672
13673if test -r /dev/ptmx
13674then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13676$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013678$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013679
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013680else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13682$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013683fi
13684
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13686$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013687
13688if test -r /dev/ptc
13689then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13691$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013692
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013693$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013694
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13697$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013698fi
13699
Mark Dickinson82864d12009-11-15 16:18:58 +000013700if test "$have_long_long" = yes
13701then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13703$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013704 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013705 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013707 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013708 ac_cv_have_long_long_format=no
13709else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013711/* end confdefs.h. */
13712
13713 #include <stdio.h>
13714 #include <stddef.h>
13715 #include <string.h>
13716
13717 #ifdef HAVE_SYS_TYPES_H
13718 #include <sys/types.h>
13719 #endif
13720
13721 int main()
13722 {
13723 char buffer[256];
13724
13725 if (sprintf(buffer, "%lld", (long long)123) < 0)
13726 return 1;
13727 if (strcmp(buffer, "123"))
13728 return 1;
13729
13730 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13731 return 1;
13732 if (strcmp(buffer, "-123"))
13733 return 1;
13734
13735 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13736 return 1;
13737 if (strcmp(buffer, "123"))
13738 return 1;
13739
13740 return 0;
13741 }
13742
13743_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013744if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013745 ac_cv_have_long_long_format=yes
13746else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013747 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013748fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013749rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13750 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013751fi
13752
13753
Mark Dickinson82864d12009-11-15 16:18:58 +000013754fi
13755
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13757$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013758fi
13759
Mark Dickinson5ce84742009-12-31 20:48:04 +000013760if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013761then
13762
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013763$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013764
13765fi
13766
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013767if test $ac_sys_system = Darwin
13768then
13769 LIBS="$LIBS -framework CoreFoundation"
13770fi
13771
Mark Dickinson82864d12009-11-15 16:18:58 +000013772
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13774$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013775if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013776 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013778 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013779 ac_cv_have_size_t_format="cross -- assuming yes"
13780
Brett Cannon09d12362006-05-11 05:11:33 +000013781else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013783/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013784
Brett Cannon09d12362006-05-11 05:11:33 +000013785#include <stdio.h>
13786#include <stddef.h>
13787#include <string.h>
13788
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013789#ifdef HAVE_SYS_TYPES_H
13790#include <sys/types.h>
13791#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013792
13793#ifdef HAVE_SSIZE_T
13794typedef ssize_t Py_ssize_t;
13795#elif SIZEOF_VOID_P == SIZEOF_LONG
13796typedef long Py_ssize_t;
13797#else
13798typedef int Py_ssize_t;
13799#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013800
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013801int main()
13802{
13803 char buffer[256];
13804
Brett Cannon09d12362006-05-11 05:11:33 +000013805 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13806 return 1;
13807
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013808 if (strcmp(buffer, "123"))
13809 return 1;
13810
13811 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13812 return 1;
13813
13814 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013815 return 1;
13816
13817 return 0;
13818}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013819
Brett Cannon09d12362006-05-11 05:11:33 +000013820_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013821if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013822 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013824 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013825fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013828fi
13829
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013830fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13832$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013833if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013834
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013835$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013836
13837fi
13838
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013839ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013840#ifdef HAVE_SYS_TYPES_H
13841#include <sys/types.h>
13842#endif
13843#ifdef HAVE_SYS_SOCKET_H
13844#include <sys/socket.h>
13845#endif
13846
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013847"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013848if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013849
Martin v. Löwis11437992002-04-12 09:54:03 +000013850else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013851
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013852$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013853
13854fi
13855
Michael W. Hudson54241132001-12-07 15:38:26 +000013856
Benjamin Peterson7497e912010-10-16 00:53:39 +000013857case $ac_sys_system in
13858AIX*)
13859
13860$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13861 ;;
13862esac
13863
13864
Michael W. Hudson54241132001-12-07 15:38:26 +000013865
13866
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013867for h in `(cd $srcdir;echo Python/thread_*.h)`
13868do
13869 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13870done
13871
Michael W. Hudson54241132001-12-07 15:38:26 +000013872
Neal Norwitzd24499d2005-12-18 21:36:39 +000013873SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13875$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013876for dir in $SRCDIRS; do
13877 if test ! -d $dir; then
13878 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013879 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013880done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13882$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013883
Guido van Rossum627b2d71993-12-24 10:39:16 +000013884# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013885ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013886
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013887ac_config_files="$ac_config_files Modules/ld_so_aix"
13888
Martin v. Löwis11437992002-04-12 09:54:03 +000013889cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013890# This file is a shell script that caches the results of configure
13891# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013892# scripts and configure runs, see configure's option --config-cache.
13893# It is not useful on other systems. If it contains results you don't
13894# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013895#
Martin v. Löwis11437992002-04-12 09:54:03 +000013896# config.status only pays attention to the cache file if you give it
13897# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013898#
Skip Montanaro6dead952003-09-25 14:50:04 +000013899# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013900# loading this file, other *unset* `ac_cv_foo' will be assigned the
13901# following values.
13902
13903_ACEOF
13904
Guido van Rossumf78abae1997-01-21 22:02:36 +000013905# The following way of writing the cache mishandles newlines in values,
13906# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013907# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013908# Ultrix sh set writes to stderr and can't be redirected directly,
13909# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910(
13911 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13912 eval ac_val=\$$ac_var
13913 case $ac_val in #(
13914 *${as_nl}*)
13915 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013916 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13917$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013918 esac
13919 case $ac_var in #(
13920 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013921 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13922 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013923 esac ;;
13924 esac
13925 done
13926
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013928 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13929 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013930 # `set' does not quote correctly, so add quotes: double-quote
13931 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013932 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013933 "s/'/'\\\\''/g;
13934 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013935 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 *)
13937 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013938 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013939 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013940 esac |
13941 sort
13942) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013944 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013945 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013946 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13948 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013949 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13950 :end' >>confcache
13951if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13952 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010013953 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013954 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13955$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010013956 if test ! -f "$cache_file" || test -h "$cache_file"; then
13957 cat confcache >"$cache_file"
13958 else
13959 case $cache_file in #(
13960 */* | ?:*)
13961 mv -f confcache "$cache_file"$$ &&
13962 mv -f "$cache_file"$$ "$cache_file" ;; #(
13963 *)
13964 mv -f confcache "$cache_file" ;;
13965 esac
13966 fi
13967 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013968 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013969 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13970$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013971 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013972fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013973rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013974
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013975test "x$prefix" = xNONE && prefix=$ac_default_prefix
13976# Let make expand exec_prefix.
13977test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013978
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013979DEFS=-DHAVE_CONFIG_H
13980
Skip Montanaro6dead952003-09-25 14:50:04 +000013981ac_libobjs=
13982ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013983U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013984for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13985 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013986 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013987 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000013988 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13989 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013990 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13991 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013992done
13993LIBOBJS=$ac_libobjs
13994
13995LTLIBOBJS=$ac_ltlibobjs
13996
13997
Martin v. Löwis11437992002-04-12 09:54:03 +000013998
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013999
Matthias Klose3cef2a92012-03-14 23:39:33 +010014000: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014001ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014002ac_clean_files_save=$ac_clean_files
14003ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14005$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14006as_write_fail=0
14007cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014008#! $SHELL
14009# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014010# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014011# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014012# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014013
Martin v. Löwis11437992002-04-12 09:54:03 +000014014debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014015ac_cs_recheck=false
14016ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014017
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014018SHELL=\${CONFIG_SHELL-$SHELL}
14019export SHELL
14020_ASEOF
14021cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14022## -------------------- ##
14023## M4sh Initialization. ##
14024## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014025
Martin v. Löwiseba40652007-08-30 20:10:57 +000014026# Be more Bourne compatible
14027DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014028if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014029 emulate sh
14030 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014031 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014032 # is contrary to our usage. Disable this feature.
14033 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014034 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014036 case `(set -o) 2>/dev/null` in #(
14037 *posix*) :
14038 set -o posix ;; #(
14039 *) :
14040 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014041esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014042fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014043
Skip Montanaro6dead952003-09-25 14:50:04 +000014044
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014045as_nl='
14046'
14047export as_nl
14048# Printing a long string crashes Solaris 7 /usr/bin/printf.
14049as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14050as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14051as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14052# Prefer a ksh shell builtin over an external printf program on Solaris,
14053# but without wasting forks for bash or zsh.
14054if test -z "$BASH_VERSION$ZSH_VERSION" \
14055 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14056 as_echo='print -r --'
14057 as_echo_n='print -rn --'
14058elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14059 as_echo='printf %s\n'
14060 as_echo_n='printf %s'
14061else
14062 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14063 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14064 as_echo_n='/usr/ucb/echo -n'
14065 else
14066 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14067 as_echo_n_body='eval
14068 arg=$1;
14069 case $arg in #(
14070 *"$as_nl"*)
14071 expr "X$arg" : "X\\(.*\\)$as_nl";
14072 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14073 esac;
14074 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14075 '
14076 export as_echo_n_body
14077 as_echo_n='sh -c $as_echo_n_body as_echo'
14078 fi
14079 export as_echo_body
14080 as_echo='sh -c $as_echo_body as_echo'
14081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014082
14083# The user is always right.
14084if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014085 PATH_SEPARATOR=:
14086 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14087 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14088 PATH_SEPARATOR=';'
14089 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014091
Martin v. Löwiseba40652007-08-30 20:10:57 +000014092
14093# IFS
14094# We need space, tab and new line, in precisely that order. Quoting is
14095# there to prevent editors from complaining about space-tab.
14096# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14097# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014098IFS=" "" $as_nl"
14099
14100# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014101as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014102case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014103 *[\\/]* ) as_myself=$0 ;;
14104 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014105for as_dir in $PATH
14106do
14107 IFS=$as_save_IFS
14108 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014109 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14110 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014111IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
Martin v. Löwiseba40652007-08-30 20:10:57 +000014113 ;;
14114esac
14115# We did not find ourselves, most probably we were run as `sh COMMAND'
14116# in which case we are not to be found in the path.
14117if test "x$as_myself" = x; then
14118 as_myself=$0
14119fi
14120if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014121 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14122 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014123fi
14124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014125# Unset variables that we do not need and which cause bugs (e.g. in
14126# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14127# suppresses any "Segmentation fault" message there. '((' could
14128# trigger a bug in pdksh 5.2.14.
14129for as_var in BASH_ENV ENV MAIL MAILPATH
14130do eval test x\${$as_var+set} = xset \
14131 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014132done
14133PS1='$ '
14134PS2='> '
14135PS4='+ '
14136
14137# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014138LC_ALL=C
14139export LC_ALL
14140LANGUAGE=C
14141export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014143# CDPATH.
14144(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14145
14146
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014147# as_fn_error STATUS ERROR [LINENO LOG_FD]
14148# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014149# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14150# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014151# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014152as_fn_error ()
14153{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014154 as_status=$1; test $as_status -eq 0 && as_status=1
14155 if test "$4"; then
14156 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14157 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014158 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014159 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014160 as_fn_exit $as_status
14161} # as_fn_error
14162
14163
14164# as_fn_set_status STATUS
14165# -----------------------
14166# Set $? to STATUS, without forking.
14167as_fn_set_status ()
14168{
14169 return $1
14170} # as_fn_set_status
14171
14172# as_fn_exit STATUS
14173# -----------------
14174# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14175as_fn_exit ()
14176{
14177 set +e
14178 as_fn_set_status $1
14179 exit $1
14180} # as_fn_exit
14181
14182# as_fn_unset VAR
14183# ---------------
14184# Portably unset VAR.
14185as_fn_unset ()
14186{
14187 { eval $1=; unset $1;}
14188}
14189as_unset=as_fn_unset
14190# as_fn_append VAR VALUE
14191# ----------------------
14192# Append the text in VALUE to the end of the definition contained in VAR. Take
14193# advantage of any shell optimizations that allow amortized linear growth over
14194# repeated appends, instead of the typical quadratic growth present in naive
14195# implementations.
14196if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14197 eval 'as_fn_append ()
14198 {
14199 eval $1+=\$2
14200 }'
14201else
14202 as_fn_append ()
14203 {
14204 eval $1=\$$1\$2
14205 }
14206fi # as_fn_append
14207
14208# as_fn_arith ARG...
14209# ------------------
14210# Perform arithmetic evaluation on the ARGs, and store the result in the
14211# global $as_val. Take advantage of shells that can avoid forks. The arguments
14212# must be portable across $(()) and expr.
14213if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14214 eval 'as_fn_arith ()
14215 {
14216 as_val=$(( $* ))
14217 }'
14218else
14219 as_fn_arith ()
14220 {
14221 as_val=`expr "$@" || test $? -eq 1`
14222 }
14223fi # as_fn_arith
14224
14225
Martin v. Löwiseba40652007-08-30 20:10:57 +000014226if expr a : '\(a\)' >/dev/null 2>&1 &&
14227 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14228 as_expr=expr
14229else
14230 as_expr=false
14231fi
14232
14233if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14234 as_basename=basename
14235else
14236 as_basename=false
14237fi
14238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014239if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14240 as_dirname=dirname
14241else
14242 as_dirname=false
14243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014244
Martin v. Löwiseba40652007-08-30 20:10:57 +000014245as_me=`$as_basename -- "$0" ||
14246$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14247 X"$0" : 'X\(//\)$' \| \
14248 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014249$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014250 sed '/^.*\/\([^/][^/]*\)\/*$/{
14251 s//\1/
14252 q
14253 }
14254 /^X\/\(\/\/\)$/{
14255 s//\1/
14256 q
14257 }
14258 /^X\/\(\/\).*/{
14259 s//\1/
14260 q
14261 }
14262 s/.*/./; q'`
14263
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014264# Avoid depending upon Character Ranges.
14265as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14266as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14267as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14268as_cr_digits='0123456789'
14269as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014270
14271ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014272case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014273-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014274 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014275 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014276 xy) ECHO_C='\c';;
14277 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14278 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014279 esac;;
14280*)
14281 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014282esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014283
Martin v. Löwis11437992002-04-12 09:54:03 +000014284rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014285if test -d conf$$.dir; then
14286 rm -f conf$$.dir/conf$$.file
14287else
14288 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014289 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014290fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014291if (echo >conf$$.file) 2>/dev/null; then
14292 if ln -s conf$$.file conf$$ 2>/dev/null; then
14293 as_ln_s='ln -s'
14294 # ... but there are two gotchas:
14295 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14296 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14297 # In both cases, we have to default to `cp -p'.
14298 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14299 as_ln_s='cp -p'
14300 elif ln conf$$.file conf$$ 2>/dev/null; then
14301 as_ln_s=ln
14302 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014303 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014304 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014305else
14306 as_ln_s='cp -p'
14307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014308rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14309rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014310
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014311
14312# as_fn_mkdir_p
14313# -------------
14314# Create "$as_dir" as a directory, including parents if necessary.
14315as_fn_mkdir_p ()
14316{
14317
14318 case $as_dir in #(
14319 -*) as_dir=./$as_dir;;
14320 esac
14321 test -d "$as_dir" || eval $as_mkdir_p || {
14322 as_dirs=
14323 while :; do
14324 case $as_dir in #(
14325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14326 *) as_qdir=$as_dir;;
14327 esac
14328 as_dirs="'$as_qdir' $as_dirs"
14329 as_dir=`$as_dirname -- "$as_dir" ||
14330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14331 X"$as_dir" : 'X\(//\)[^/]' \| \
14332 X"$as_dir" : 'X\(//\)$' \| \
14333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14334$as_echo X"$as_dir" |
14335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14336 s//\1/
14337 q
14338 }
14339 /^X\(\/\/\)[^/].*/{
14340 s//\1/
14341 q
14342 }
14343 /^X\(\/\/\)$/{
14344 s//\1/
14345 q
14346 }
14347 /^X\(\/\).*/{
14348 s//\1/
14349 q
14350 }
14351 s/.*/./; q'`
14352 test -d "$as_dir" && break
14353 done
14354 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014356
14357
14358} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014359if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014360 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014361else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014362 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014363 as_mkdir_p=false
14364fi
14365
Martin v. Löwiseba40652007-08-30 20:10:57 +000014366if test -x / >/dev/null 2>&1; then
14367 as_test_x='test -x'
14368else
14369 if ls -dL / >/dev/null 2>&1; then
14370 as_ls_L_option=L
14371 else
14372 as_ls_L_option=
14373 fi
14374 as_test_x='
14375 eval sh -c '\''
14376 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014377 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014378 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014379 case $1 in #(
14380 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014381 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014382 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014383 ???[sx]*):;;*)false;;esac;fi
14384 '\'' sh
14385 '
14386fi
14387as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014388
14389# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014390as_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 +000014391
14392# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014393as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014394
14395
Martin v. Löwis11437992002-04-12 09:54:03 +000014396exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014397## ----------------------------------- ##
14398## Main body of $CONFIG_STATUS script. ##
14399## ----------------------------------- ##
14400_ASEOF
14401test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14404# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014405# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014406# values after options handling.
14407ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014408This file was extended by python $as_me 2.7, which was
Matthias Klose3cef2a92012-03-14 23:39:33 +010014409generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014410
14411 CONFIG_FILES = $CONFIG_FILES
14412 CONFIG_HEADERS = $CONFIG_HEADERS
14413 CONFIG_LINKS = $CONFIG_LINKS
14414 CONFIG_COMMANDS = $CONFIG_COMMANDS
14415 $ $0 $@
14416
Martin v. Löwiseba40652007-08-30 20:10:57 +000014417on `(hostname || uname -n) 2>/dev/null | sed 1q`
14418"
14419
Martin v. Löwis11437992002-04-12 09:54:03 +000014420_ACEOF
14421
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014422case $ac_config_files in *"
14423"*) set x $ac_config_files; shift; ac_config_files=$*;;
14424esac
14425
14426case $ac_config_headers in *"
14427"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14428esac
14429
14430
14431cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014432# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014433config_files="$ac_config_files"
14434config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
Martin v. Löwiseba40652007-08-30 20:10:57 +000014436_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014438cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014439ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014440\`$as_me' instantiates files and other configuration actions
14441from templates according to the current configuration. Unless the files
14442and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014444Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
14446 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014447 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014448 --config print configuration, then exit
14449 -q, --quiet, --silent
14450 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014451 -d, --debug don't remove temporary files
14452 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014453 --file=FILE[:TEMPLATE]
14454 instantiate the configuration file FILE
14455 --header=FILE[:TEMPLATE]
14456 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014457
14458Configuration files:
14459$config_files
14460
14461Configuration headers:
14462$config_headers
14463
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014464Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014465
Martin v. Löwiseba40652007-08-30 20:10:57 +000014466_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014467cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14468ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014469ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014470python config.status 2.7
Matthias Klose3cef2a92012-03-14 23:39:33 +010014471configured by $0, generated by GNU Autoconf 2.68,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014472 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014473
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014474Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014475This config.status script is free software; the Free Software Foundation
14476gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014477
14478ac_pwd='$ac_pwd'
14479srcdir='$srcdir'
14480INSTALL='$INSTALL'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014481test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014482_ACEOF
14483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014484cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14485# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014486ac_need_defaults=:
14487while test $# != 0
14488do
14489 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014490 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014491 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14492 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014493 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014495 --*=)
14496 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14497 ac_optarg=
14498 ac_shift=:
14499 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014500 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014501 ac_option=$1
14502 ac_optarg=$2
14503 ac_shift=shift
14504 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014505 esac
14506
Skip Montanaro6dead952003-09-25 14:50:04 +000014507 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014508 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014509 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14510 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014511 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014512 $as_echo "$ac_cs_version"; exit ;;
14513 --config | --confi | --conf | --con | --co | --c )
14514 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014515 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 debug=: ;;
14517 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014518 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014519 case $ac_optarg in
14520 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014521 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014522 esac
14523 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014524 ac_need_defaults=false;;
14525 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014526 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014527 case $ac_optarg in
14528 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14529 esac
14530 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014532 --he | --h)
14533 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014534 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014535Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014536 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014537 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014538 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14539 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14540 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014541
14542 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014543 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014544Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014545
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014546 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014547 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
14549 esac
14550 shift
14551done
14552
Skip Montanaro6dead952003-09-25 14:50:04 +000014553ac_configure_extra_args=
14554
14555if $ac_cs_silent; then
14556 exec 6>/dev/null
14557 ac_configure_extra_args="$ac_configure_extra_args --silent"
14558fi
14559
14560_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014561cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014562if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014563 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14564 shift
14565 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14566 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014567 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014568 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014569fi
14570
Martin v. Löwis11437992002-04-12 09:54:03 +000014571_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014572cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014573exec 5>>config.log
14574{
14575 echo
14576 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14577## Running $as_me. ##
14578_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014579 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014580} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014581
Martin v. Löwiseba40652007-08-30 20:10:57 +000014582_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014583cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014584_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014585
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014586cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014587
14588# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014589for ac_config_target in $ac_config_targets
14590do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014591 case $ac_config_target in
14592 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14593 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14594 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14595 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014596 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14597 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014598 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14599 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014600 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014601 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014602
Matthias Klose3cef2a92012-03-14 23:39:33 +010014603 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 esac
14605done
14606
Martin v. Löwiseba40652007-08-30 20:10:57 +000014607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608# If the user did not use the arguments to specify the items to instantiate,
14609# then the envvar interface is used. Set only those that are not.
14610# We use the long form for the default assignment because of an extremely
14611# bizarre bug on SunOS 4.1.3.
14612if $ac_need_defaults; then
14613 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14614 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14615fi
14616
Skip Montanaro6dead952003-09-25 14:50:04 +000014617# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014618# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014619# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014620# Hook for its removal unless debugging.
14621# Note that there is a small window in which the directory will not be cleaned:
14622# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014623$debug ||
14624{
Matthias Klose3cef2a92012-03-14 23:39:33 +010014625 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014626 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010014627 : "${ac_tmp:=$tmp}"
14628 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014629' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014630 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014631}
Martin v. Löwis11437992002-04-12 09:54:03 +000014632# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014633
Martin v. Löwis11437992002-04-12 09:54:03 +000014634{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014635 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010014636 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014637} ||
14638{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014639 tmp=./conf$$-$RANDOM
14640 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014641} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010014642ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014643
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014644# Set up the scripts for CONFIG_FILES section.
14645# No need to generate them if there are no CONFIG_FILES.
14646# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014647if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014648
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014649
14650ac_cr=`echo X | tr X '\015'`
14651# On cygwin, bash can eat \r inside `` if the user requested igncr.
14652# But we know of no other shell where ac_cr would be empty at this
14653# point, so we can use a bashism as a fallback.
14654if test "x$ac_cr" = x; then
14655 eval ac_cr=\$\'\\r\'
14656fi
14657ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14658if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014659 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014660else
14661 ac_cs_awk_cr=$ac_cr
14662fi
14663
Matthias Klose3cef2a92012-03-14 23:39:33 +010014664echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014665_ACEOF
14666
Martin v. Löwiseba40652007-08-30 20:10:57 +000014667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014668{
14669 echo "cat >conf$$subs.awk <<_ACEOF" &&
14670 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14671 echo "_ACEOF"
14672} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014673 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14674ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014675ac_delim='%!_!# '
14676for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014677 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014678 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014679
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014680 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14681 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014682 break
14683 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014684 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014685 else
14686 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014687 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014688done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014689rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014690
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014691cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010014692cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014693_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014694sed -n '
14695h
14696s/^/S["/; s/!.*/"]=/
14697p
14698g
14699s/^[^!]*!//
14700:repl
14701t repl
14702s/'"$ac_delim"'$//
14703t delim
14704:nl
14705h
14706s/\(.\{148\}\)..*/\1/
14707t more1
14708s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14709p
14710n
14711b repl
14712:more1
14713s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14714p
14715g
14716s/.\{148\}//
14717t nl
14718:delim
14719h
14720s/\(.\{148\}\)..*/\1/
14721t more2
14722s/["\\]/\\&/g; s/^/"/; s/$/"/
14723p
14724b
14725:more2
14726s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14727p
14728g
14729s/.\{148\}//
14730t delim
14731' <conf$$subs.awk | sed '
14732/^[^""]/{
14733 N
14734 s/\n//
14735}
14736' >>$CONFIG_STATUS || ac_write_fail=1
14737rm -f conf$$subs.awk
14738cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14739_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010014740cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014741 for (key in S) S_is_set[key] = 1
14742 FS = ""
14743
14744}
14745{
14746 line = $ 0
14747 nfields = split(line, field, "@")
14748 substed = 0
14749 len = length(field[1])
14750 for (i = 2; i < nfields; i++) {
14751 key = field[i]
14752 keylen = length(key)
14753 if (S_is_set[key]) {
14754 value = S[key]
14755 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14756 len += length(value) + length(field[++i])
14757 substed = 1
14758 } else
14759 len += 1 + keylen
14760 }
14761
14762 print line
14763}
14764
14765_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014766_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014767cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14768if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14769 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14770else
14771 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010014772fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014773 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014774_ACEOF
14775
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014776# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14777# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014778# trailing colons and then remove the whole line if VPATH becomes empty
14779# (actually we leave an empty line to preserve line numbers).
14780if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014781 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14782h
14783s///
14784s/^/:/
14785s/[ ]*$/:/
14786s/:\$(srcdir):/:/g
14787s/:\${srcdir}:/:/g
14788s/:@srcdir@:/:/g
14789s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014790s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014791x
14792s/\(=[ ]*\).*/\1/
14793G
14794s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014795s/^[^=]*=[ ]*$//
14796}'
14797fi
14798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014799cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014800fi # test -n "$CONFIG_FILES"
14801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014802# Set up the scripts for CONFIG_HEADERS section.
14803# No need to generate them if there are no CONFIG_HEADERS.
14804# This happens for instance with `./config.status Makefile'.
14805if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014806cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014807BEGIN {
14808_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014809
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014810# Transform confdefs.h into an awk script `defines.awk', embedded as
14811# here-document in config.status, that substitutes the proper values into
14812# config.h.in to produce config.h.
14813
14814# Create a delimiter string that does not exist in confdefs.h, to ease
14815# handling of long lines.
14816ac_delim='%!_!# '
14817for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010014818 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14819 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014820 break
14821 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014822 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014823 else
14824 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14825 fi
14826done
14827
14828# For the awk script, D is an array of macro values keyed by name,
14829# likewise P contains macro parameters if any. Preserve backslash
14830# newline sequences.
14831
14832ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14833sed -n '
14834s/.\{148\}/&'"$ac_delim"'/g
14835t rset
14836:rset
14837s/^[ ]*#[ ]*define[ ][ ]*/ /
14838t def
14839d
14840:def
14841s/\\$//
14842t bsnl
14843s/["\\]/\\&/g
14844s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14845D["\1"]=" \3"/p
14846s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14847d
14848:bsnl
14849s/["\\]/\\&/g
14850s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14851D["\1"]=" \3\\\\\\n"\\/p
14852t cont
14853s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14854t cont
14855d
14856:cont
14857n
14858s/.\{148\}/&'"$ac_delim"'/g
14859t clear
14860:clear
14861s/\\$//
14862t bsnlc
14863s/["\\]/\\&/g; s/^/"/; s/$/"/p
14864d
14865:bsnlc
14866s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14867b cont
14868' <confdefs.h | sed '
14869s/'"$ac_delim"'/"\\\
14870"/g' >>$CONFIG_STATUS || ac_write_fail=1
14871
14872cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14873 for (key in D) D_is_set[key] = 1
14874 FS = ""
14875}
14876/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14877 line = \$ 0
14878 split(line, arg, " ")
14879 if (arg[1] == "#") {
14880 defundef = arg[2]
14881 mac1 = arg[3]
14882 } else {
14883 defundef = substr(arg[1], 2)
14884 mac1 = arg[2]
14885 }
14886 split(mac1, mac2, "(") #)
14887 macro = mac2[1]
14888 prefix = substr(line, 1, index(line, defundef) - 1)
14889 if (D_is_set[macro]) {
14890 # Preserve the white space surrounding the "#".
14891 print prefix "define", macro P[macro] D[macro]
14892 next
14893 } else {
14894 # Replace #undef with comments. This is necessary, for example,
14895 # in the case of _POSIX_SOURCE, which is predefined and required
14896 # on some systems where configure will not decide to define it.
14897 if (defundef == "undef") {
14898 print "/*", prefix defundef, macro, "*/"
14899 next
14900 }
14901 }
14902}
14903{ print }
14904_ACAWK
14905_ACEOF
14906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014907 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014908fi # test -n "$CONFIG_HEADERS"
14909
14910
14911eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14912shift
14913for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014914do
14915 case $ac_tag in
14916 :[FHLC]) ac_mode=$ac_tag; continue;;
14917 esac
14918 case $ac_mode$ac_tag in
14919 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010014920 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014921 :[FH]-) ac_tag=-:-;;
14922 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14923 esac
14924 ac_save_IFS=$IFS
14925 IFS=:
14926 set x $ac_tag
14927 IFS=$ac_save_IFS
14928 shift
14929 ac_file=$1
14930 shift
14931
14932 case $ac_mode in
14933 :L) ac_source=$1;;
14934 :[FH])
14935 ac_file_inputs=
14936 for ac_f
14937 do
14938 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010014939 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014940 *) # Look for the file first in the build tree, then in the source tree
14941 # (if the path is not absolute). The absolute path cannot be DOS-style,
14942 # because $ac_f cannot contain `:'.
14943 test -f "$ac_f" ||
14944 case $ac_f in
14945 [\\/$]*) false;;
14946 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14947 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010014948 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014949 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014950 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14951 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952 done
14953
14954 # Let's still pretend it is `configure' which instantiates (i.e., don't
14955 # use $as_me), people would be surprised to read:
14956 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014957 configure_input='Generated from '`
14958 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14959 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014960 if test x"$ac_file" != x-; then
14961 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014962 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14963$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014964 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014965 # Neutralize special characters interpreted by sed in replacement strings.
14966 case $configure_input in #(
14967 *\&* | *\|* | *\\* )
14968 ac_sed_conf_input=`$as_echo "$configure_input" |
14969 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14970 *) ac_sed_conf_input=$configure_input;;
14971 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014972
14973 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010014974 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14975 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014976 esac
14977 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 esac
14979
Martin v. Löwiseba40652007-08-30 20:10:57 +000014980 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014981$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014982 X"$ac_file" : 'X\(//\)[^/]' \| \
14983 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000014984 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014985$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014986 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14987 s//\1/
14988 q
14989 }
14990 /^X\(\/\/\)[^/].*/{
14991 s//\1/
14992 q
14993 }
14994 /^X\(\/\/\)$/{
14995 s//\1/
14996 q
14997 }
14998 /^X\(\/\).*/{
14999 s//\1/
15000 q
15001 }
15002 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015003 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015004 ac_builddir=.
15005
Martin v. Löwiseba40652007-08-30 20:10:57 +000015006case "$ac_dir" in
15007.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15008*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015009 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015010 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015011 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015012 case $ac_top_builddir_sub in
15013 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15014 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15015 esac ;;
15016esac
15017ac_abs_top_builddir=$ac_pwd
15018ac_abs_builddir=$ac_pwd$ac_dir_suffix
15019# for backward compatibility:
15020ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015021
15022case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015023 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015025 ac_top_srcdir=$ac_top_builddir_sub
15026 ac_abs_top_srcdir=$ac_pwd ;;
15027 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015029 ac_top_srcdir=$srcdir
15030 ac_abs_top_srcdir=$srcdir ;;
15031 *) # Relative name.
15032 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15033 ac_top_srcdir=$ac_top_build_prefix$srcdir
15034 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015035esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015036ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015037
Martin v. Löwis11437992002-04-12 09:54:03 +000015038
Martin v. Löwiseba40652007-08-30 20:10:57 +000015039 case $ac_mode in
15040 :F)
15041 #
15042 # CONFIG_FILE
15043 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015044
15045 case $INSTALL in
15046 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015047 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015048 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015049_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015050
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015051cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015052# If the template does not know about datarootdir, expand it.
15053# FIXME: This hack should be removed a few years after 2.60.
15054ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015055ac_sed_dataroot='
15056/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015057 p
15058 q
15059}
15060/@datadir@/p
15061/@docdir@/p
15062/@infodir@/p
15063/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015064/@mandir@/p'
15065case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015066*datarootdir*) ac_datarootdir_seen=yes;;
15067*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15069$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015070_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015071cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015072 ac_datarootdir_hack='
15073 s&@datadir@&$datadir&g
15074 s&@docdir@&$docdir&g
15075 s&@infodir@&$infodir&g
15076 s&@localedir@&$localedir&g
15077 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015078 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015079esac
15080_ACEOF
15081
15082# Neutralize VPATH when `$srcdir' = `.'.
15083# Shell code in configure.ac might set extrasub.
15084# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015085cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15086ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015087$extrasub
15088_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015089cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015090:t
15091/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015092s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015093s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015094s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015095s&@srcdir@&$ac_srcdir&;t t
15096s&@abs_srcdir@&$ac_abs_srcdir&;t t
15097s&@top_srcdir@&$ac_top_srcdir&;t t
15098s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15099s&@builddir@&$ac_builddir&;t t
15100s&@abs_builddir@&$ac_abs_builddir&;t t
15101s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15102s&@INSTALL@&$ac_INSTALL&;t t
15103$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015104"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015105eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15106 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015107
Martin v. Löwiseba40652007-08-30 20:10:57 +000015108test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015109 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15110 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15111 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015113which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015114$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015115which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015116
Matthias Klose3cef2a92012-03-14 23:39:33 +010015117 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015118 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015119 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15120 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015121 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015122 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015123 ;;
15124 :H)
15125 #
15126 # CONFIG_HEADER
15127 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015129 {
15130 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015131 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15132 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015133 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015134 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015135 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15136$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015138 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015139 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015140 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 fi
15142 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015143 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015144 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015145 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015147 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015148
Martin v. Löwiseba40652007-08-30 20:10:57 +000015149
15150 esac
15151
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015152
15153 case $ac_file$ac_mode in
15154 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15155
15156 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015157done # for ac_tag
15158
Guido van Rossum627b2d71993-12-24 10:39:16 +000015159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015160as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015161_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015162ac_clean_files=$ac_clean_files_save
15163
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015164test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015165 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015166
Martin v. Löwis11437992002-04-12 09:54:03 +000015167
15168# configure is writing to config.log, and then calls config.status.
15169# config.status does its own redirection, appending to config.log.
15170# Unfortunately, on DOS this fails, as config.log is still kept open
15171# by configure, so config.status won't be able to write to it; its
15172# output is simply discarded. So we exec the FD to /dev/null,
15173# effectively closing config.log, so it can be properly (re)opened and
15174# appended to by config.status. When coming back to configure, we
15175# need to make the FD available again.
15176if test "$no_create" != yes; then
15177 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015178 ac_config_status_args=
15179 test "$silent" = yes &&
15180 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015182 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 exec 5>>config.log
15184 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15185 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015186 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015187fi
15188if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15189 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15190$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015191fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015192
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015193
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015194echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015195if test ! -f Modules/Setup
15196then
15197 cp $srcdir/Modules/Setup.dist Modules/Setup
15198fi
15199
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015200echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015201if test ! -f Modules/Setup.local
15202then
15203 echo "# Edit this file for local setup changes" >Modules/Setup.local
15204fi
15205
15206echo "creating Makefile"
15207$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15208 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015209 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015210
15211case $ac_sys_system in
15212BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015213 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015214
15215 Support for BeOS is deprecated as of Python 2.6.
15216 See PEP 11 for the gory details.
15217 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015218$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015219
15220 Support for BeOS is deprecated as of Python 2.6.
15221 See PEP 11 for the gory details.
15222 " >&2;}
15223 ;;
15224*) ;;
15225esac
15226
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015227mv config.c Modules