blob: d09d740206d94029eac6f2ab370415583892bb45 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Victor Stinnere0be4232011-10-25 13:06:09 +02003# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020094as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
Victor Stinnere0be4232011-10-25 13:06:09 +0200220 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
Victor Stinnere0be4232011-10-25 13:06:09 +0200225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000232fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: http://bugs.python.org/ about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246 fi
247 exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265 { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274 return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282 set +e
283 as_fn_set_status $1
284 exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367fi # as_fn_arith
368
369
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000375as_fn_error ()
376{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000381 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200382 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000383 as_fn_exit $as_status
384} # as_fn_error
385
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000386if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389else
390 as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395else
396 as_basename=false
397fi
398
Matthias Kloseb9621712010-04-24 17:59:49 +0000399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401else
402 as_dirname=false
403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000404
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000409$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430
431
Matthias Kloseb9621712010-04-24 17:59:49 +0000432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000446 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000452 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000453 { $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 +0000454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 # Exit status is that of the last command.
460 exit
461}
462
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000464case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000465-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000466 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 esac;;
472*)
473 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000475
Martin v. Löwis11437992002-04-12 09:54:03 +0000476rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000477if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479else
480 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000481 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000483if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489 # In both cases, we have to default to `cp -p'.
490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491 as_ln_s='cp -p'
492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
498 as_ln_s='cp -p'
499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000502
Skip Montanaro6dead952003-09-25 14:50:04 +0000503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000505else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000507 as_mkdir_p=false
508fi
509
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000510if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000523 case $1 in #(
524 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000525 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530fi
531as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000532
533# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000534as_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 +0000535
536# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
539
Matthias Kloseb9621712010-04-24 17:59:49 +0000540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
543# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
Martin v. Löwis11437992002-04-12 09:54:03 +0000548#
549# Initializations.
550#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000552ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000553ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000554LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000563PACKAGE_VERSION='3.3'
564PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000565PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000566PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000567
568ac_unique_file="Include/object.h"
569# Factoring default headers for most tests.
570ac_includes_default="\
571#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000573# include <sys/types.h>
574#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <sys/stat.h>
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000579# include <stdlib.h>
580# include <stddef.h>
581#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000582# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000583# include <stdlib.h>
584# endif
585#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_STRING_H
587# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <memory.h>
589# endif
590# include <string.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <strings.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef HAVE_STDINT_H
599# include <stdint.h>
600#endif
601#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <unistd.h>
603#endif"
604
Matthias Kloseb9621712010-04-24 17:59:49 +0000605ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000606SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000607THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000608SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000609LIBC
610LIBM
611HAVE_GETHOSTBYNAME
612HAVE_GETHOSTBYNAME_R
613HAVE_GETHOSTBYNAME_R_3_ARG
614HAVE_GETHOSTBYNAME_R_5_ARG
615HAVE_GETHOSTBYNAME_R_6_ARG
616LIBOBJS
617TRUE
618MACHDEP_OBJS
619DYNLOADFILE
620DLINCLDIR
621THREADOBJ
622LDLAST
623USE_THREAD_MODULE
624SIGNAL_OBJS
625USE_SIGNAL_MODULE
626LIBFFI_INCLUDEDIR
627PKG_CONFIG
628SHLIBS
629CFLAGSFORSHARED
630LINKFORSHARED
631CCSHARED
632BLDSHARED
633LDCXXSHARED
634LDSHARED
635SO
636LIBTOOL_CRUFT
637OTHER_LIBTOOL_OPT
638UNIVERSAL_ARCH_FLAGS
639BASECFLAGS
640OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000641ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100643MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500647HAS_PYTHON
648DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000649ARFLAGS
650AR
651RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000652USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000653GNULD
654LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000655LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000656RUNSHARED
657INSTSONAME
658LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000659PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000660BLDLIBRARY
661DLLLIBRARY
662LDLIBRARY
663LIBRARY
664BUILDEXEEXT
665EGREP
666GREP
667CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200668NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000669MAINCC
670CXX
671OBJEXT
672EXEEXT
673ac_ct_CC
674CPPFLAGS
675LDFLAGS
676CFLAGS
677CC
678EXPORT_MACOSX_DEPLOYMENT_TARGET
679CONFIGURE_MACOSX_DEPLOYMENT_TARGET
680SGI_ABI
681MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000682FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000683FRAMEWORKUNIXTOOLSPREFIX
684FRAMEWORKALTINSTALLLAST
685FRAMEWORKALTINSTALLFIRST
686FRAMEWORKINSTALLLAST
687FRAMEWORKINSTALLFIRST
688PYTHONFRAMEWORKINSTALLDIR
689PYTHONFRAMEWORKPREFIX
690PYTHONFRAMEWORKDIR
691PYTHONFRAMEWORKIDENTIFIER
692PYTHONFRAMEWORK
693LIPO_32BIT_FLAGS
694ARCH_RUN_32BIT
695UNIVERSALSDK
696CONFIG_ARGS
697SOVERSION
698VERSION
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100699host_os
700host_vendor
701host_cpu
702host
703build_os
704build_vendor
705build_cpu
706build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500707HAS_HG
708HGBRANCH
709HGTAG
710HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000711target_alias
712host_alias
713build_alias
714LIBS
715ECHO_T
716ECHO_N
717ECHO_C
718DEFS
719mandir
720localedir
721libdir
722psdir
723pdfdir
724dvidir
725htmldir
726infodir
727docdir
728oldincludedir
729includedir
730localstatedir
731sharedstatedir
732sysconfdir
733datadir
734datarootdir
735libexecdir
736sbindir
737bindir
738program_transform_name
739prefix
740exec_prefix
741PACKAGE_URL
742PACKAGE_BUGREPORT
743PACKAGE_STRING
744PACKAGE_VERSION
745PACKAGE_TARNAME
746PACKAGE_NAME
747PATH_SEPARATOR
748SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000749ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000750ac_user_opts='
751enable_option_checking
752enable_universalsdk
753with_universal_archs
754with_framework_name
755enable_framework
756with_gcc
757with_cxx_main
758with_suffix
759enable_shared
760enable_profiling
761with_pydebug
762with_libs
763with_system_expat
764with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100765with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000766enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000767with_dbmliborder
768with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000769with_threads
770with_thread
771enable_ipv6
772with_doc_strings
773with_tsc
774with_pymalloc
775with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000776with_fpectl
777with_libm
778with_libc
779enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000780with_computed_gotos
781'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000782 ac_precious_vars='build_alias
783host_alias
784target_alias
785CC
786CFLAGS
787LDFLAGS
788LIBS
789CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200790CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000791
Guido van Rossum627b2d71993-12-24 10:39:16 +0000792
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000794ac_init_help=
795ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000796ac_unrecognized_opts=
797ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798# The variables have the same names as the options, with
799# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000800cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803no_recursion=
804prefix=NONE
805program_prefix=NONE
806program_suffix=NONE
807program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812x_includes=NONE
813x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000814
815# Installation directory options.
816# These are left unexpanded so users can "make install exec_prefix=/foo"
817# and all the variables that are supposed to be based on exec_prefix
818# by default will actually change.
819# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000820# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821bindir='${exec_prefix}/bin'
822sbindir='${exec_prefix}/sbin'
823libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824datarootdir='${prefix}/share'
825datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000826sysconfdir='${prefix}/etc'
827sharedstatedir='${prefix}/com'
828localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000829includedir='${prefix}/include'
830oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
832infodir='${datarootdir}/info'
833htmldir='${docdir}'
834dvidir='${docdir}'
835pdfdir='${docdir}'
836psdir='${docdir}'
837libdir='${exec_prefix}/lib'
838localedir='${datarootdir}/locale'
839mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000844do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845 # If the previous option needs an argument, assign it.
846 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848 ac_prev=
849 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000850 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200853 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
854 *=) ac_optarg= ;;
855 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858 # Accept the important Cygnus configure options, so we can diagnose typos.
859
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860 case $ac_dashdash$ac_option in
861 --)
862 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000864 -bindir | --bindir | --bindi | --bind | --bin | --bi)
865 ac_prev=bindir ;;
866 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000867 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868
869 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000872 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874 -cache-file | --cache-file | --cache-fil | --cache-fi \
875 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
876 ac_prev=cache_file ;;
877 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
878 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000879 cache_file=$ac_optarg ;;
880
881 --config-cache | -C)
882 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
890 | --dataroo | --dataro | --datar)
891 ac_prev=datarootdir ;;
892 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
893 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
894 datarootdir=$ac_optarg ;;
895
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000897 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000899 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200900 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 ac_useropt_orig=$ac_useropt
902 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
903 case $ac_user_opts in
904 *"
905"enable_$ac_useropt"
906"*) ;;
907 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
908 ac_unrecognized_sep=', ';;
909 esac
910 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911
912 -docdir | --docdir | --docdi | --doc | --do)
913 ac_prev=docdir ;;
914 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
915 docdir=$ac_optarg ;;
916
917 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
918 ac_prev=dvidir ;;
919 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
920 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
922 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000923 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000925 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200926 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000927 ac_useropt_orig=$ac_useropt
928 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
929 case $ac_user_opts in
930 *"
931"enable_$ac_useropt"
932"*) ;;
933 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
934 ac_unrecognized_sep=', ';;
935 esac
936 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
939 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
940 | --exec | --exe | --ex)
941 ac_prev=exec_prefix ;;
942 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
943 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
944 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946
947 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Obsolete; use --with-gas.
949 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 -help | --help | --hel | --he | -h)
952 ac_init_help=long ;;
953 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
954 ac_init_help=recursive ;;
955 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
956 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
958 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000963 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
964 ac_prev=htmldir ;;
965 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
966 | --ht=*)
967 htmldir=$ac_optarg ;;
968
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969 -includedir | --includedir | --includedi | --included | --include \
970 | --includ | --inclu | --incl | --inc)
971 ac_prev=includedir ;;
972 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
973 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
976 -infodir | --infodir | --infodi | --infod | --info | --inf)
977 ac_prev=infodir ;;
978 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980
981 -libdir | --libdir | --libdi | --libd)
982 ac_prev=libdir ;;
983 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985
986 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
987 | --libexe | --libex | --libe)
988 ac_prev=libexecdir ;;
989 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
990 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 -localedir | --localedir | --localedi | --localed | --locale)
994 ac_prev=localedir ;;
995 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
996 localedir=$ac_optarg ;;
997
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000999 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000 ac_prev=localstatedir ;;
1001 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001002 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
1005 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1006 ac_prev=mandir ;;
1007 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001011 # Obsolete; use --without-fp.
1012 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
1014 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 no_create=yes ;;
1017
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1019 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1020 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1023 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1024 | --oldin | --oldi | --old | --ol | --o)
1025 ac_prev=oldincludedir ;;
1026 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1027 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1028 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1032 ac_prev=prefix ;;
1033 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
1036 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1037 | --program-pre | --program-pr | --program-p)
1038 ac_prev=program_prefix ;;
1039 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1040 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042
1043 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1044 | --program-suf | --program-su | --program-s)
1045 ac_prev=program_suffix ;;
1046 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1047 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
1050 -program-transform-name | --program-transform-name \
1051 | --program-transform-nam | --program-transform-na \
1052 | --program-transform-n | --program-transform- \
1053 | --program-transform | --program-transfor \
1054 | --program-transfo | --program-transf \
1055 | --program-trans | --program-tran \
1056 | --progr-tra | --program-tr | --program-t)
1057 ac_prev=program_transform_name ;;
1058 -program-transform-name=* | --program-transform-name=* \
1059 | --program-transform-nam=* | --program-transform-na=* \
1060 | --program-transform-n=* | --program-transform-=* \
1061 | --program-transform=* | --program-transfor=* \
1062 | --program-transfo=* | --program-transf=* \
1063 | --program-trans=* | --program-tran=* \
1064 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1068 ac_prev=pdfdir ;;
1069 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1070 pdfdir=$ac_optarg ;;
1071
1072 -psdir | --psdir | --psdi | --psd | --ps)
1073 ac_prev=psdir ;;
1074 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1075 psdir=$ac_optarg ;;
1076
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1078 | -silent | --silent | --silen | --sile | --sil)
1079 silent=yes ;;
1080
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1082 ac_prev=sbindir ;;
1083 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1084 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086
1087 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1088 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1089 | --sharedst | --shareds | --shared | --share | --shar \
1090 | --sha | --sh)
1091 ac_prev=sharedstatedir ;;
1092 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1093 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1094 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1095 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001098 -site | --site | --sit)
1099 ac_prev=site ;;
1100 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001102
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1104 ac_prev=srcdir ;;
1105 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1109 | --syscon | --sysco | --sysc | --sys | --sy)
1110 ac_prev=sysconfdir ;;
1111 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1112 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1121 verbose=yes ;;
1122
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 -version | --version | --versio | --versi | --vers | -V)
1124 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
1126 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001127 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001128 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001129 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001130 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001131 ac_useropt_orig=$ac_useropt
1132 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1133 case $ac_user_opts in
1134 *"
1135"with_$ac_useropt"
1136"*) ;;
1137 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1138 ac_unrecognized_sep=', ';;
1139 esac
1140 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141
1142 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001143 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001145 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001146 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001147 ac_useropt_orig=$ac_useropt
1148 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1149 case $ac_user_opts in
1150 *"
1151"with_$ac_useropt"
1152"*) ;;
1153 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1154 ac_unrecognized_sep=', ';;
1155 esac
1156 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158 --x)
1159 # Obsolete; use --with-x.
1160 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1163 | --x-incl | --x-inc | --x-in | --x-i)
1164 ac_prev=x_includes ;;
1165 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1166 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
1169 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1170 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1171 ac_prev=x_libraries ;;
1172 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1173 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001176 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1177Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 ;;
1179
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 *=*)
1181 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1182 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 case $ac_envvar in #(
1184 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001185 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001187 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 export $ac_envvar ;;
1189
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001190 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001195 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 ;;
1197
1198 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199done
1200
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001203 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204fi
1205
Matthias Kloseb9621712010-04-24 17:59:49 +00001206if test -n "$ac_unrecognized_opts"; then
1207 case $enable_option_checking in
1208 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001209 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1211 esac
1212fi
1213
1214# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1216 datadir sysconfdir sharedstatedir localstatedir includedir \
1217 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1218 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 # Remove trailing slashes.
1222 case $ac_val in
1223 */ )
1224 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1225 eval $ac_var=\$ac_val;;
1226 esac
1227 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001229 [\\/$]* | ?:[\\/]* ) continue;;
1230 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001232 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001233done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001234
Martin v. Löwis11437992002-04-12 09:54:03 +00001235# There might be people who depend on the old broken behavior: `$host'
1236# used to hold the argument of --host etc.
1237# FIXME: To remove some day.
1238build=$build_alias
1239host=$host_alias
1240target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242# FIXME: To remove some day.
1243if test "x$host_alias" != x; then
1244 if test "x$build_alias" = x; then
1245 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1247 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 elif test "x$build_alias" != "x$host_alias"; then
1249 cross_compiling=yes
1250 fi
1251fi
1252
1253ac_tool_prefix=
1254test -n "$host_alias" && ac_tool_prefix=$host_alias-
1255
1256test "$silent" = yes && exec 6>/dev/null
1257
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259ac_pwd=`pwd` && test -n "$ac_pwd" &&
1260ac_ls_di=`ls -di .` &&
1261ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001262 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001263test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265
1266
Guido van Rossum627b2d71993-12-24 10:39:16 +00001267# Find the source files, if location was not specified.
1268if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 ac_confdir=`$as_dirname -- "$as_myself" ||
1272$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1273 X"$as_myself" : 'X\(//\)[^/]' \| \
1274 X"$as_myself" : 'X\(//\)$' \| \
1275 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1276$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1278 s//\1/
1279 q
1280 }
1281 /^X\(\/\/\)[^/].*/{
1282 s//\1/
1283 q
1284 }
1285 /^X\(\/\/\)$/{
1286 s//\1/
1287 q
1288 }
1289 /^X\(\/\).*/{
1290 s//\1/
1291 q
1292 }
1293 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001294 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001296 srcdir=..
1297 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298else
1299 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301if test ! -r "$srcdir/$ac_unique_file"; then
1302 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1306ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001307 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308 pwd)`
1309# When building in place, set srcdir=.
1310if test "$ac_abs_confdir" = "$ac_pwd"; then
1311 srcdir=.
1312fi
1313# Remove unnecessary trailing slashes from srcdir.
1314# Double slashes in file names in object file debugging info
1315# mess up M-x gdb in Emacs.
1316case $srcdir in
1317*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1318esac
1319for ac_var in $ac_precious_vars; do
1320 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1321 eval ac_env_${ac_var}_value=\$${ac_var}
1322 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1323 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1324done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001325
Martin v. Löwis11437992002-04-12 09:54:03 +00001326#
1327# Report the --help message.
1328#
1329if test "$ac_init_help" = "long"; then
1330 # Omit some internal or obsolete options to make the list less imposing.
1331 # This message is too long to be a string in the A/UX 3.1 sh.
1332 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001333\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001334
1335Usage: $0 [OPTION]... [VAR=VALUE]...
1336
1337To assign environment variables (e.g., CC, CFLAGS...), specify them as
1338VAR=VALUE. See below for descriptions of some of the useful variables.
1339
1340Defaults for the options are specified in brackets.
1341
1342Configuration:
1343 -h, --help display this help and exit
1344 --help=short display options specific to this package
1345 --help=recursive display the short help of all the included packages
1346 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001347 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001348 --cache-file=FILE cache test results in FILE [disabled]
1349 -C, --config-cache alias for \`--cache-file=config.cache'
1350 -n, --no-create do not create output files
1351 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1352
Martin v. Löwis11437992002-04-12 09:54:03 +00001353Installation directories:
1354 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001355 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001356 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001357 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001358
1359By default, \`make install' will install all the files in
1360\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1361an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1362for instance \`--prefix=\$HOME'.
1363
1364For better control, use the options below.
1365
1366Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001367 --bindir=DIR user executables [EPREFIX/bin]
1368 --sbindir=DIR system admin executables [EPREFIX/sbin]
1369 --libexecdir=DIR program executables [EPREFIX/libexec]
1370 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1371 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1372 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1373 --libdir=DIR object code libraries [EPREFIX/lib]
1374 --includedir=DIR C header files [PREFIX/include]
1375 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1376 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1377 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1378 --infodir=DIR info documentation [DATAROOTDIR/info]
1379 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1380 --mandir=DIR man documentation [DATAROOTDIR/man]
1381 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1382 --htmldir=DIR html documentation [DOCDIR]
1383 --dvidir=DIR dvi documentation [DOCDIR]
1384 --pdfdir=DIR pdf documentation [DOCDIR]
1385 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001386_ACEOF
1387
1388 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001389
1390System types:
1391 --build=BUILD configure for building on BUILD [guessed]
1392 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001393_ACEOF
1394fi
1395
1396if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001397 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001398 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001399 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 cat <<\_ACEOF
1401
1402Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001403 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1405 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001406 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001407 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001408 --enable-framework[=INSTALLDIR]
1409 Build (MacOSX|Darwin) framework
1410 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001411 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001412 --enable-loadable-sqlite-extensions
1413 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001414 --enable-ipv6 Enable ipv6 (with ipv4) support
1415 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001416 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001417 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001418
1419Optional Packages:
1420 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1421 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001422 --with-universal-archs=ARCH
1423 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001424 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001425 --with-framework-name=FRAMEWORK
1426 specify an alternate name of the framework built
1427 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001429 --with-cxx-main=<compiler>
1430 compile main() and link python executable with C++
1431 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --with-suffix=.exe set executable suffix
1433 --with-pydebug build with Py_DEBUG defined
1434 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001435 --with-system-expat build pyexpat module using an installed expat
1436 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001437 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001438 --with-system-libmpdec build _decimal module using an installed libmpdec
1439 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001440 --with-dbmliborder=db1:db2:...
1441 order to check db backends for dbm. Valid value is a
1442 colon separated string with the backend names
1443 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001444 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001445 --with(out)-threads[=DIRECTORY]
1446 disable/enable thread support
1447 --with(out)-thread[=DIRECTORY]
1448 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001449 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001450 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001451 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001452 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --with-fpectl enable SIGFPE catching
1454 --with-libm=STRING math library
1455 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001456 --with(out)-computed-gotos
1457 Use computed gotos in evaluation loop (enabled by
1458 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001459
1460Some influential environment variables:
1461 CC C compiler command
1462 CFLAGS C compiler flags
1463 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1464 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001465 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001466 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001467 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001468 CPP C preprocessor
1469
1470Use these variables to override the choices made by `configure' or to help
1471it to find libraries and programs with nonstandard names/locations.
1472
Georg Brandle2e15612009-05-20 18:25:10 +00001473Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001474_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001476fi
1477
1478if test "$ac_init_help" = "recursive"; then
1479 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001481 test -d "$ac_dir" ||
1482 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1483 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 ac_builddir=.
1485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486case "$ac_dir" in
1487.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1488*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001489 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 case $ac_top_builddir_sub in
1493 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1494 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1495 esac ;;
1496esac
1497ac_abs_top_builddir=$ac_pwd
1498ac_abs_builddir=$ac_pwd$ac_dir_suffix
1499# for backward compatibility:
1500ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001501
1502case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001504 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001505 ac_top_srcdir=$ac_top_builddir_sub
1506 ac_abs_top_srcdir=$ac_pwd ;;
1507 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001509 ac_top_srcdir=$srcdir
1510 ac_abs_top_srcdir=$srcdir ;;
1511 *) # Relative name.
1512 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1513 ac_top_srcdir=$ac_top_build_prefix$srcdir
1514 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001515esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 cd "$ac_dir" || { ac_status=$?; continue; }
1519 # Check for guested configure.
1520 if test -f "$ac_srcdir/configure.gnu"; then
1521 echo &&
1522 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1523 elif test -f "$ac_srcdir/configure"; then
1524 echo &&
1525 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001527 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 fi || ac_status=$?
1529 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001530 done
1531fi
1532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001533test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001534if $ac_init_version; then
1535 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001536python configure 3.3
Victor Stinnere0be4232011-10-25 13:06:09 +02001537generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001538
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001539Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001540This configure script is free software; the Free Software Foundation
1541gives unlimited permission to copy, distribute and modify it.
1542_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001543 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001545
1546## ------------------------ ##
1547## Autoconf initialization. ##
1548## ------------------------ ##
1549
1550# ac_fn_c_try_compile LINENO
1551# --------------------------
1552# Try to compile conftest.$ac_ext, and return whether this succeeded.
1553ac_fn_c_try_compile ()
1554{
1555 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1556 rm -f conftest.$ac_objext
1557 if { { ac_try="$ac_compile"
1558case "(($ac_try" in
1559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1560 *) ac_try_echo=$ac_try;;
1561esac
1562eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1563$as_echo "$ac_try_echo"; } >&5
1564 (eval "$ac_compile") 2>conftest.err
1565 ac_status=$?
1566 if test -s conftest.err; then
1567 grep -v '^ *+' conftest.err >conftest.er1
1568 cat conftest.er1 >&5
1569 mv -f conftest.er1 conftest.err
1570 fi
1571 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1572 test $ac_status = 0; } && {
1573 test -z "$ac_c_werror_flag" ||
1574 test ! -s conftest.err
1575 } && test -s conftest.$ac_objext; then :
1576 ac_retval=0
1577else
1578 $as_echo "$as_me: failed program was:" >&5
1579sed 's/^/| /' conftest.$ac_ext >&5
1580
1581 ac_retval=1
1582fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001583 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 as_fn_set_status $ac_retval
1585
1586} # ac_fn_c_try_compile
1587
Matthias Kloseb9621712010-04-24 17:59:49 +00001588# ac_fn_c_try_link LINENO
1589# -----------------------
1590# Try to link conftest.$ac_ext, and return whether this succeeded.
1591ac_fn_c_try_link ()
1592{
1593 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1594 rm -f conftest.$ac_objext conftest$ac_exeext
1595 if { { ac_try="$ac_link"
1596case "(($ac_try" in
1597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1598 *) ac_try_echo=$ac_try;;
1599esac
1600eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1601$as_echo "$ac_try_echo"; } >&5
1602 (eval "$ac_link") 2>conftest.err
1603 ac_status=$?
1604 if test -s conftest.err; then
1605 grep -v '^ *+' conftest.err >conftest.er1
1606 cat conftest.er1 >&5
1607 mv -f conftest.er1 conftest.err
1608 fi
1609 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1610 test $ac_status = 0; } && {
1611 test -z "$ac_c_werror_flag" ||
1612 test ! -s conftest.err
1613 } && test -s conftest$ac_exeext && {
1614 test "$cross_compiling" = yes ||
1615 $as_test_x conftest$ac_exeext
1616 }; then :
1617 ac_retval=0
1618else
1619 $as_echo "$as_me: failed program was:" >&5
1620sed 's/^/| /' conftest.$ac_ext >&5
1621
1622 ac_retval=1
1623fi
1624 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1625 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1626 # interfere with the next link command; also delete a directory that is
1627 # left behind by Apple's compiler. We do this before executing the actions.
1628 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001629 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001630 as_fn_set_status $ac_retval
1631
1632} # ac_fn_c_try_link
1633
Matthias Kloseb9621712010-04-24 17:59:49 +00001634# ac_fn_c_try_cpp LINENO
1635# ----------------------
1636# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1637ac_fn_c_try_cpp ()
1638{
1639 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1640 if { { ac_try="$ac_cpp conftest.$ac_ext"
1641case "(($ac_try" in
1642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1643 *) ac_try_echo=$ac_try;;
1644esac
1645eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1646$as_echo "$ac_try_echo"; } >&5
1647 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1648 ac_status=$?
1649 if test -s conftest.err; then
1650 grep -v '^ *+' conftest.err >conftest.er1
1651 cat conftest.er1 >&5
1652 mv -f conftest.er1 conftest.err
1653 fi
1654 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001655 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001656 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1657 test ! -s conftest.err
1658 }; then :
1659 ac_retval=0
1660else
1661 $as_echo "$as_me: failed program was:" >&5
1662sed 's/^/| /' conftest.$ac_ext >&5
1663
1664 ac_retval=1
1665fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001666 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001667 as_fn_set_status $ac_retval
1668
1669} # ac_fn_c_try_cpp
1670
1671# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1672# -------------------------------------------------------
1673# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1674# the include files in INCLUDES and setting the cache variable VAR
1675# accordingly.
1676ac_fn_c_check_header_mongrel ()
1677{
1678 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001679 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1681$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001682if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001683 $as_echo_n "(cached) " >&6
1684fi
1685eval ac_res=\$$3
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1687$as_echo "$ac_res" >&6; }
1688else
1689 # Is the header compilable?
1690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1691$as_echo_n "checking $2 usability... " >&6; }
1692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1693/* end confdefs.h. */
1694$4
1695#include <$2>
1696_ACEOF
1697if ac_fn_c_try_compile "$LINENO"; then :
1698 ac_header_compiler=yes
1699else
1700 ac_header_compiler=no
1701fi
1702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1704$as_echo "$ac_header_compiler" >&6; }
1705
1706# Is the header present?
1707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1708$as_echo_n "checking $2 presence... " >&6; }
1709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1710/* end confdefs.h. */
1711#include <$2>
1712_ACEOF
1713if ac_fn_c_try_cpp "$LINENO"; then :
1714 ac_header_preproc=yes
1715else
1716 ac_header_preproc=no
1717fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001718rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1720$as_echo "$ac_header_preproc" >&6; }
1721
1722# So? What about this header?
1723case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1724 yes:no: )
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1726$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1728$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1729 ;;
1730 no:yes:* )
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1732$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1734$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1736$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1738$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1740$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001741( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001742## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001743## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 ) | sed "s/^/$as_me: WARNING: /" >&2
1745 ;;
1746esac
1747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1748$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001749if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001750 $as_echo_n "(cached) " >&6
1751else
1752 eval "$3=\$ac_header_compiler"
1753fi
1754eval ac_res=\$$3
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1756$as_echo "$ac_res" >&6; }
1757fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001758 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001759
1760} # ac_fn_c_check_header_mongrel
1761
1762# ac_fn_c_try_run LINENO
1763# ----------------------
1764# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1765# that executables *can* be run.
1766ac_fn_c_try_run ()
1767{
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1769 if { { ac_try="$ac_link"
1770case "(($ac_try" in
1771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772 *) ac_try_echo=$ac_try;;
1773esac
1774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775$as_echo "$ac_try_echo"; } >&5
1776 (eval "$ac_link") 2>&5
1777 ac_status=$?
1778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1779 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1780 { { case "(($ac_try" in
1781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782 *) ac_try_echo=$ac_try;;
1783esac
1784eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785$as_echo "$ac_try_echo"; } >&5
1786 (eval "$ac_try") 2>&5
1787 ac_status=$?
1788 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1789 test $ac_status = 0; }; }; then :
1790 ac_retval=0
1791else
1792 $as_echo "$as_me: program exited with status $ac_status" >&5
1793 $as_echo "$as_me: failed program was:" >&5
1794sed 's/^/| /' conftest.$ac_ext >&5
1795
1796 ac_retval=$ac_status
1797fi
1798 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001799 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001800 as_fn_set_status $ac_retval
1801
1802} # ac_fn_c_try_run
1803
1804# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1805# -------------------------------------------------------
1806# Tests whether HEADER exists and can be compiled using the include files in
1807# INCLUDES, setting the cache variable VAR accordingly.
1808ac_fn_c_check_header_compile ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001813if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 $as_echo_n "(cached) " >&6
1815else
1816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1817/* end confdefs.h. */
1818$4
1819#include <$2>
1820_ACEOF
1821if ac_fn_c_try_compile "$LINENO"; then :
1822 eval "$3=yes"
1823else
1824 eval "$3=no"
1825fi
1826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1827fi
1828eval ac_res=\$$3
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1830$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001831 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001832
1833} # ac_fn_c_check_header_compile
1834
Matthias Kloseb9621712010-04-24 17:59:49 +00001835# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1836# -------------------------------------------
1837# Tests whether TYPE exists after having included INCLUDES, setting cache
1838# variable VAR accordingly.
1839ac_fn_c_check_type ()
1840{
1841 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1843$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001844if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001845 $as_echo_n "(cached) " >&6
1846else
1847 eval "$3=no"
1848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1849/* end confdefs.h. */
1850$4
1851int
1852main ()
1853{
1854if (sizeof ($2))
1855 return 0;
1856 ;
1857 return 0;
1858}
1859_ACEOF
1860if ac_fn_c_try_compile "$LINENO"; then :
1861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1862/* end confdefs.h. */
1863$4
1864int
1865main ()
1866{
1867if (sizeof (($2)))
1868 return 0;
1869 ;
1870 return 0;
1871}
1872_ACEOF
1873if ac_fn_c_try_compile "$LINENO"; then :
1874
1875else
1876 eval "$3=yes"
1877fi
1878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1879fi
1880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1881fi
1882eval ac_res=\$$3
1883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1884$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001885 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001886
1887} # ac_fn_c_check_type
1888
1889# ac_fn_c_find_uintX_t LINENO BITS VAR
1890# ------------------------------------
1891# Finds an unsigned integer type with width BITS, setting cache variable VAR
1892# accordingly.
1893ac_fn_c_find_uintX_t ()
1894{
1895 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1897$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001898if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001899 $as_echo_n "(cached) " >&6
1900else
1901 eval "$3=no"
1902 # Order is important - never check a type that is potentially smaller
1903 # than half of the expected target width.
1904 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1905 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907/* end confdefs.h. */
1908$ac_includes_default
1909int
1910main ()
1911{
1912static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1913test_array [0] = 0
1914
1915 ;
1916 return 0;
1917}
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 case $ac_type in #(
1921 uint$2_t) :
1922 eval "$3=yes" ;; #(
1923 *) :
1924 eval "$3=\$ac_type" ;;
1925esac
1926fi
1927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001928 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001929
1930else
1931 break
1932fi
1933 done
1934fi
1935eval ac_res=\$$3
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1937$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001938 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001939
1940} # ac_fn_c_find_uintX_t
1941
1942# ac_fn_c_find_intX_t LINENO BITS VAR
1943# -----------------------------------
1944# Finds a signed integer type with width BITS, setting cache variable VAR
1945# accordingly.
1946ac_fn_c_find_intX_t ()
1947{
1948 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1950$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001951if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001952 $as_echo_n "(cached) " >&6
1953else
1954 eval "$3=no"
1955 # Order is important - never check a type that is potentially smaller
1956 # than half of the expected target width.
1957 for ac_type in int$2_t 'int' 'long int' \
1958 'long long int' 'short int' 'signed char'; do
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001962 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001963int
1964main ()
1965{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001966static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001967test_array [0] = 0
1968
1969 ;
1970 return 0;
1971}
1972_ACEOF
1973if ac_fn_c_try_compile "$LINENO"; then :
1974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1975/* end confdefs.h. */
1976$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001977 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001978int
1979main ()
1980{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001981static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001982 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1983test_array [0] = 0
1984
1985 ;
1986 return 0;
1987}
1988_ACEOF
1989if ac_fn_c_try_compile "$LINENO"; then :
1990
1991else
1992 case $ac_type in #(
1993 int$2_t) :
1994 eval "$3=yes" ;; #(
1995 *) :
1996 eval "$3=\$ac_type" ;;
1997esac
1998fi
1999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2000fi
2001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002002 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004else
2005 break
2006fi
2007 done
2008fi
2009eval ac_res=\$$3
2010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2011$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002012 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014} # ac_fn_c_find_intX_t
2015
2016# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2017# --------------------------------------------
2018# Tries to find the compile-time value of EXPR in a program that includes
2019# INCLUDES, setting VAR accordingly. Returns whether the value could be
2020# computed
2021ac_fn_c_compute_int ()
2022{
2023 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2024 if test "$cross_compiling" = yes; then
2025 # Depending upon the size, compute the lo and hi bounds.
2026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2027/* end confdefs.h. */
2028$4
2029int
2030main ()
2031{
2032static int test_array [1 - 2 * !(($2) >= 0)];
2033test_array [0] = 0
2034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040 ac_lo=0 ac_mid=0
2041 while :; do
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2049test_array [0] = 0
2050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=$ac_mid; break
2057else
2058 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2059 if test $ac_lo -le $ac_mid; then
2060 ac_lo= ac_hi=
2061 break
2062 fi
2063 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2064fi
2065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2066 done
2067else
2068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
2072main ()
2073{
2074static int test_array [1 - 2 * !(($2) < 0)];
2075test_array [0] = 0
2076
2077 ;
2078 return 0;
2079}
2080_ACEOF
2081if ac_fn_c_try_compile "$LINENO"; then :
2082 ac_hi=-1 ac_mid=-1
2083 while :; do
2084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2085/* end confdefs.h. */
2086$4
2087int
2088main ()
2089{
2090static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2091test_array [0] = 0
2092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_lo=$ac_mid; break
2099else
2100 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2101 if test $ac_mid -le $ac_hi; then
2102 ac_lo= ac_hi=
2103 break
2104 fi
2105 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108 done
2109else
2110 ac_lo= ac_hi=
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115# Binary search between lo and hi bounds.
2116while test "x$ac_lo" != "x$ac_hi"; do
2117 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2125test_array [0] = 0
2126
2127 ;
2128 return 0;
2129}
2130_ACEOF
2131if ac_fn_c_try_compile "$LINENO"; then :
2132 ac_hi=$ac_mid
2133else
2134 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2135fi
2136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2137done
2138case $ac_lo in #((
2139?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2140'') ac_retval=1 ;;
2141esac
2142 else
2143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2144/* end confdefs.h. */
2145$4
2146static long int longval () { return $2; }
2147static unsigned long int ulongval () { return $2; }
2148#include <stdio.h>
2149#include <stdlib.h>
2150int
2151main ()
2152{
2153
2154 FILE *f = fopen ("conftest.val", "w");
2155 if (! f)
2156 return 1;
2157 if (($2) < 0)
2158 {
2159 long int i = longval ();
2160 if (i != ($2))
2161 return 1;
2162 fprintf (f, "%ld", i);
2163 }
2164 else
2165 {
2166 unsigned long int i = ulongval ();
2167 if (i != ($2))
2168 return 1;
2169 fprintf (f, "%lu", i);
2170 }
2171 /* Do not output a trailing newline, as this causes \r\n confusion
2172 on some platforms. */
2173 return ferror (f) || fclose (f) != 0;
2174
2175 ;
2176 return 0;
2177}
2178_ACEOF
2179if ac_fn_c_try_run "$LINENO"; then :
2180 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2181else
2182 ac_retval=1
2183fi
2184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2185 conftest.$ac_objext conftest.beam conftest.$ac_ext
2186rm -f conftest.val
2187
2188 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002189 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002190 as_fn_set_status $ac_retval
2191
2192} # ac_fn_c_compute_int
2193
2194# ac_fn_c_check_func LINENO FUNC VAR
2195# ----------------------------------
2196# Tests whether FUNC exists, setting the cache variable VAR accordingly
2197ac_fn_c_check_func ()
2198{
2199 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2201$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002202if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002203 $as_echo_n "(cached) " >&6
2204else
2205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2206/* end confdefs.h. */
2207/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2208 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2209#define $2 innocuous_$2
2210
2211/* System header to define __stub macros and hopefully few prototypes,
2212 which can conflict with char $2 (); below.
2213 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2214 <limits.h> exists even on freestanding compilers. */
2215
2216#ifdef __STDC__
2217# include <limits.h>
2218#else
2219# include <assert.h>
2220#endif
2221
2222#undef $2
2223
2224/* Override any GCC internal prototype to avoid an error.
2225 Use char because int might match the return type of a GCC
2226 builtin and then its argument prototype would still apply. */
2227#ifdef __cplusplus
2228extern "C"
2229#endif
2230char $2 ();
2231/* The GNU C library defines this for functions which it implements
2232 to always fail with ENOSYS. Some functions are actually named
2233 something starting with __ and the normal name is an alias. */
2234#if defined __stub_$2 || defined __stub___$2
2235choke me
2236#endif
2237
2238int
2239main ()
2240{
2241return $2 ();
2242 ;
2243 return 0;
2244}
2245_ACEOF
2246if ac_fn_c_try_link "$LINENO"; then :
2247 eval "$3=yes"
2248else
2249 eval "$3=no"
2250fi
2251rm -f core conftest.err conftest.$ac_objext \
2252 conftest$ac_exeext conftest.$ac_ext
2253fi
2254eval ac_res=\$$3
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2256$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002257 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002258
2259} # ac_fn_c_check_func
2260
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002261# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2262# ---------------------------------------------
2263# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2264# accordingly.
2265ac_fn_c_check_decl ()
2266{
2267 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2268 as_decl_name=`echo $2|sed 's/ *(.*//'`
2269 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2271$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2272if eval \${$3+:} false; then :
2273 $as_echo_n "(cached) " >&6
2274else
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277$4
2278int
2279main ()
2280{
2281#ifndef $as_decl_name
2282#ifdef __cplusplus
2283 (void) $as_decl_use;
2284#else
2285 (void) $as_decl_name;
2286#endif
2287#endif
2288
2289 ;
2290 return 0;
2291}
2292_ACEOF
2293if ac_fn_c_try_compile "$LINENO"; then :
2294 eval "$3=yes"
2295else
2296 eval "$3=no"
2297fi
2298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2299fi
2300eval ac_res=\$$3
2301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2302$as_echo "$ac_res" >&6; }
2303 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2304
2305} # ac_fn_c_check_decl
2306
Matthias Kloseb9621712010-04-24 17:59:49 +00002307# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2308# ----------------------------------------------------
2309# Tries to find if the field MEMBER exists in type AGGR, after including
2310# INCLUDES, setting cache variable VAR accordingly.
2311ac_fn_c_check_member ()
2312{
2313 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2315$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002316if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002317 $as_echo_n "(cached) " >&6
2318else
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h. */
2321$5
2322int
2323main ()
2324{
2325static $2 ac_aggr;
2326if (ac_aggr.$3)
2327return 0;
2328 ;
2329 return 0;
2330}
2331_ACEOF
2332if ac_fn_c_try_compile "$LINENO"; then :
2333 eval "$4=yes"
2334else
2335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2336/* end confdefs.h. */
2337$5
2338int
2339main ()
2340{
2341static $2 ac_aggr;
2342if (sizeof ac_aggr.$3)
2343return 0;
2344 ;
2345 return 0;
2346}
2347_ACEOF
2348if ac_fn_c_try_compile "$LINENO"; then :
2349 eval "$4=yes"
2350else
2351 eval "$4=no"
2352fi
2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354fi
2355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356fi
2357eval ac_res=\$$4
2358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2359$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002360 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002361
2362} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002364This file contains any messages produced by compilers while
2365running configure, to aid debugging if configure makes a mistake.
2366
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002367It was created by python $as_me 3.3, which was
Victor Stinnere0be4232011-10-25 13:06:09 +02002368generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002369
2370 $ $0 $@
2371
2372_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002373exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002374{
2375cat <<_ASUNAME
2376## --------- ##
2377## Platform. ##
2378## --------- ##
2379
2380hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2381uname -m = `(uname -m) 2>/dev/null || echo unknown`
2382uname -r = `(uname -r) 2>/dev/null || echo unknown`
2383uname -s = `(uname -s) 2>/dev/null || echo unknown`
2384uname -v = `(uname -v) 2>/dev/null || echo unknown`
2385
2386/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2387/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2388
2389/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2390/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2391/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002393/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2394/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2395/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2396
2397_ASUNAME
2398
2399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2400for as_dir in $PATH
2401do
2402 IFS=$as_save_IFS
2403 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002404 $as_echo "PATH: $as_dir"
2405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002406IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002407
2408} >&5
2409
2410cat >&5 <<_ACEOF
2411
2412
2413## ----------- ##
2414## Core tests. ##
2415## ----------- ##
2416
2417_ACEOF
2418
2419
2420# Keep a trace of the command line.
2421# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002422# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002423# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002425ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002426ac_configure_args0=
2427ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002428ac_must_keep_next=false
2429for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002430do
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 for ac_arg
2432 do
2433 case $ac_arg in
2434 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2435 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2436 | -silent | --silent | --silen | --sile | --sil)
2437 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002438 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002439 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002440 esac
2441 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002442 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002443 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002444 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002446 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002448 case $ac_arg in
2449 *=* | --config-cache | -C | -disable-* | --disable-* \
2450 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2451 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2452 | -with-* | --with-* | -without-* | --without-* | --x)
2453 case "$ac_configure_args0 " in
2454 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2455 esac
2456 ;;
2457 -* ) ac_must_keep_next=true ;;
2458 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002459 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 ;;
2462 esac
2463 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002464done
Matthias Kloseb9621712010-04-24 17:59:49 +00002465{ ac_configure_args0=; unset ac_configure_args0;}
2466{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002467
2468# When interrupted or exit'd, cleanup temporary files, and complete
2469# config.log. We remove comments because anyway the quotes in there
2470# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471# WARNING: Use '\'' to represent an apostrophe within the trap.
2472# 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 +00002473trap 'exit_status=$?
2474 # Save into config.log some information that might help in debugging.
2475 {
2476 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002477
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002478 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002479## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002480## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 echo
2482 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483(
2484 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2485 eval ac_val=\$$ac_var
2486 case $ac_val in #(
2487 *${as_nl}*)
2488 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2490$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 esac
2492 case $ac_var in #(
2493 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2495 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac ;;
2497 esac
2498 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2501 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002502 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 "s/'\''/'\''\\\\'\'''\''/g;
2504 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2505 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002506 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002508 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac |
2510 sort
2511)
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002513
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002515## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 echo
2518 for ac_var in $ac_subst_vars
2519 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 eval ac_val=\$$ac_var
2521 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 done | sort
2526 echo
2527
2528 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002529 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002532 echo
2533 for ac_var in $ac_subst_files
2534 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 eval ac_val=\$$ac_var
2536 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002540 done | sort
2541 echo
2542 fi
2543
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002545 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002546## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002547## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 echo
2551 fi
2552 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002553 $as_echo "$as_me: caught signal $ac_signal"
2554 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 rm -f core *.core core.conftest.* &&
2557 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002560for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002561 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002562done
2563ac_signal=0
2564
2565# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
Matthias Kloseb9621712010-04-24 17:59:49 +00002568$as_echo "/* confdefs.h */" > confdefs.h
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570# Predefined preprocessor variables.
2571
2572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_NAME "$PACKAGE_NAME"
2574_ACEOF
2575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2578_ACEOF
2579
Martin v. Löwis11437992002-04-12 09:54:03 +00002580cat >>confdefs.h <<_ACEOF
2581#define PACKAGE_VERSION "$PACKAGE_VERSION"
2582_ACEOF
2583
Martin v. Löwis11437992002-04-12 09:54:03 +00002584cat >>confdefs.h <<_ACEOF
2585#define PACKAGE_STRING "$PACKAGE_STRING"
2586_ACEOF
2587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588cat >>confdefs.h <<_ACEOF
2589#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2590_ACEOF
2591
Matthias Kloseb9621712010-04-24 17:59:49 +00002592cat >>confdefs.h <<_ACEOF
2593#define PACKAGE_URL "$PACKAGE_URL"
2594_ACEOF
2595
Martin v. Löwis11437992002-04-12 09:54:03 +00002596
2597# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002598# Prefer an explicitly selected file to automatically selected ones.
2599ac_site_file1=NONE
2600ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002602 # We do not want a PATH search for config.site.
2603 case $CONFIG_SITE in #((
2604 -*) ac_site_file1=./$CONFIG_SITE;;
2605 */*) ac_site_file1=$CONFIG_SITE;;
2606 *) ac_site_file1=./$CONFIG_SITE;;
2607 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 ac_site_file1=$prefix/share/config.site
2610 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611else
Matthias Kloseb9621712010-04-24 17:59:49 +00002612 ac_site_file1=$ac_default_prefix/share/config.site
2613 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002615for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616do
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 test "x$ac_site_file" = xNONE && continue
2618 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2620$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002622 . "$ac_site_file" \
2623 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2624$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2625as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002626See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627 fi
2628done
2629
2630if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 # Some versions of bash will fail to source /dev/null (special files
2632 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2633 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2635$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2638 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 esac
2640 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002641else
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2643$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 >$cache_file
2645fi
2646
2647# Check that the precious variables saved in the cache have kept the same
2648# value.
2649ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2652 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002653 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2654 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 case $ac_old_set,$ac_new_set in
2656 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2658$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 +00002659 ac_cache_corrupted=: ;;
2660 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2662$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 ac_cache_corrupted=: ;;
2664 ,);;
2665 *)
2666 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 # differences in whitespace do not lead to failure.
2668 ac_old_val_w=`echo x $ac_old_val`
2669 ac_new_val_w=`echo x $ac_new_val`
2670 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2672$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2673 ac_cache_corrupted=:
2674 else
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2676$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2677 eval $ac_var=\$ac_old_val
2678 fi
2679 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2680$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2682$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 fi;;
2684 esac
2685 # Pass precious variables to config.status.
2686 if test "$ac_new_set" = set; then
2687 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002688 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 *) ac_arg=$ac_var=$ac_new_val ;;
2690 esac
2691 case " $ac_configure_args " in
2692 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002693 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 esac
2695 fi
2696done
2697if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002698 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2699$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2701$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002702 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002704## -------------------- ##
2705## Main body of script. ##
2706## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707
Guido van Rossum7f43da71994-08-01 12:15:30 +00002708ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002709ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002710ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2711ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2712ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002713
Guido van Rossum627b2d71993-12-24 10:39:16 +00002714
Michael W. Hudson54241132001-12-07 15:38:26 +00002715
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716
2717
2718
2719
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002720if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721then
2722# Extract the first word of "hg", so it can be a program name with args.
2723set dummy hg; ac_word=$2
2724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2725$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002726if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002727 $as_echo_n "(cached) " >&6
2728else
2729 if test -n "$HAS_HG"; then
2730 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2731else
2732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2733for as_dir in $PATH
2734do
2735 IFS=$as_save_IFS
2736 test -z "$as_dir" && as_dir=.
2737 for ac_exec_ext in '' $ac_executable_extensions; do
2738 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2739 ac_cv_prog_HAS_HG="found"
2740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2741 break 2
2742 fi
2743done
2744 done
2745IFS=$as_save_IFS
2746
2747 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2748fi
2749fi
2750HAS_HG=$ac_cv_prog_HAS_HG
2751if test -n "$HAS_HG"; then
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2753$as_echo "$HAS_HG" >&6; }
2754else
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2756$as_echo "no" >&6; }
2757fi
2758
2759
2760else
2761HAS_HG=no-repository
2762fi
2763if test $HAS_HG = found
2764then
2765 HGVERSION="hg id -i \$(srcdir)"
2766 HGTAG="hg id -t \$(srcdir)"
2767 HGBRANCH="hg id -b \$(srcdir)"
2768else
2769 HGVERSION=""
2770 HGTAG=""
2771 HGBRANCH=""
2772fi
2773
2774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002775ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002776
2777
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002778ac_aux_dir=
2779for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2780 if test -f "$ac_dir/install-sh"; then
2781 ac_aux_dir=$ac_dir
2782 ac_install_sh="$ac_aux_dir/install-sh -c"
2783 break
2784 elif test -f "$ac_dir/install.sh"; then
2785 ac_aux_dir=$ac_dir
2786 ac_install_sh="$ac_aux_dir/install.sh -c"
2787 break
2788 elif test -f "$ac_dir/shtool"; then
2789 ac_aux_dir=$ac_dir
2790 ac_install_sh="$ac_aux_dir/shtool install -c"
2791 break
2792 fi
2793done
2794if test -z "$ac_aux_dir"; then
2795 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2796fi
2797
2798# These three variables are undocumented and unsupported,
2799# and are intended to be withdrawn in a future Autoconf release.
2800# They can cause serious problems if a builder's source tree is in a directory
2801# whose full name contains unusual characters.
2802ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2803ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2804ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2805
2806
2807# Make sure we can run config.sub.
2808$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2809 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2810
2811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2812$as_echo_n "checking build system type... " >&6; }
2813if ${ac_cv_build+:} false; then :
2814 $as_echo_n "(cached) " >&6
2815else
2816 ac_build_alias=$build_alias
2817test "x$ac_build_alias" = x &&
2818 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2819test "x$ac_build_alias" = x &&
2820 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2821ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2822 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2823
2824fi
2825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2826$as_echo "$ac_cv_build" >&6; }
2827case $ac_cv_build in
2828*-*-*) ;;
2829*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2830esac
2831build=$ac_cv_build
2832ac_save_IFS=$IFS; IFS='-'
2833set x $ac_cv_build
2834shift
2835build_cpu=$1
2836build_vendor=$2
2837shift; shift
2838# Remember, the first character of IFS is used to create $*,
2839# except with old shells:
2840build_os=$*
2841IFS=$ac_save_IFS
2842case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2843
2844
2845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2846$as_echo_n "checking host system type... " >&6; }
2847if ${ac_cv_host+:} false; then :
2848 $as_echo_n "(cached) " >&6
2849else
2850 if test "x$host_alias" = x; then
2851 ac_cv_host=$ac_cv_build
2852else
2853 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2854 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2855fi
2856
2857fi
2858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2859$as_echo "$ac_cv_host" >&6; }
2860case $ac_cv_host in
2861*-*-*) ;;
2862*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2863esac
2864host=$ac_cv_host
2865ac_save_IFS=$IFS; IFS='-'
2866set x $ac_cv_host
2867shift
2868host_cpu=$1
2869host_vendor=$2
2870shift; shift
2871# Remember, the first character of IFS is used to create $*,
2872# except with old shells:
2873host_os=$*
2874IFS=$ac_save_IFS
2875case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2876
2877
2878
Martin v. Löwis11437992002-04-12 09:54:03 +00002879
Benjamin Petersond23f8222009-04-05 19:13:16 +00002880if test "$prefix" != "/"; then
2881 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2882fi
2883
2884
Martin v. Löwis11437992002-04-12 09:54:03 +00002885
2886
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002887# We don't use PACKAGE_ variables, and they cause conflicts
2888# with other autoconf-based packages that include Python.h
2889grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2890rm confdefs.h
2891mv confdefs.h.new confdefs.h
2892
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002893
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002894VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002895
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002896# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002897
2898SOVERSION=1.0
2899
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002900# The later defininition of _XOPEN_SOURCE disables certain features
2901# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2902
Matthias Kloseb9621712010-04-24 17:59:49 +00002903$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002904
2905
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002906# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2907# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2908# them.
2909
Matthias Kloseb9621712010-04-24 17:59:49 +00002910$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002911
2912
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002913# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2914# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2915# them.
2916
Matthias Kloseb9621712010-04-24 17:59:49 +00002917$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002918
2919
Martin v. Löwisd6320502004-08-12 13:45:08 +00002920# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2921# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2922
Matthias Kloseb9621712010-04-24 17:59:49 +00002923$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002924
2925
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002926# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2927# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2928# them.
2929
Matthias Kloseb9621712010-04-24 17:59:49 +00002930$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002931
2932
2933
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002934define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002935
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002936# Arguments passed to configure.
2937
2938CONFIG_ARGS="$ac_configure_args"
2939
Matthias Kloseb9621712010-04-24 17:59:49 +00002940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2941$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002942# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002943if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002944 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002945 case $enableval in
2946 yes)
2947 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002948 if test ! -d "${enableval}"
2949 then
2950 enableval=/
2951 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002952 ;;
2953 esac
2954 case $enableval in
2955 no)
2956 UNIVERSALSDK=
2957 enable_universalsdk=
2958 ;;
2959 *)
2960 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002961 if test ! -d "${UNIVERSALSDK}"
2962 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002963 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002964 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002965 ;;
2966 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002967
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002968
Thomas Wouters477c8d52006-05-27 19:21:47 +00002969else
2970
2971 UNIVERSALSDK=
2972 enable_universalsdk=
2973
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002974fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002975
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002976if test -n "${UNIVERSALSDK}"
2977then
Matthias Kloseb9621712010-04-24 17:59:49 +00002978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2979$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002980else
Matthias Kloseb9621712010-04-24 17:59:49 +00002981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2982$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002983fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002985
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002986
2987
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002988UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2991$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002992
2993# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002994if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002995 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2997$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002998 UNIVERSAL_ARCHS="$withval"
2999
3000else
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3003$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003004
3005fi
3006
3007
3008
3009
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003010
3011# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003012if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003013 withval=$with_framework_name;
3014 PYTHONFRAMEWORK=${withval}
3015 PYTHONFRAMEWORKDIR=${withval}.framework
3016 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3017
3018else
3019
3020 PYTHONFRAMEWORK=Python
3021 PYTHONFRAMEWORKDIR=Python.framework
3022 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3023
3024fi
3025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003026# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003027if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003028 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003029 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003030 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003031 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003032 esac
3033 case $enableval in
3034 no)
3035 PYTHONFRAMEWORK=
3036 PYTHONFRAMEWORKDIR=no-framework
3037 PYTHONFRAMEWORKPREFIX=
3038 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039 FRAMEWORKINSTALLFIRST=
3040 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003041 FRAMEWORKALTINSTALLFIRST=
3042 FRAMEWORKALTINSTALLLAST=
3043 if test "x${prefix}" = "xNONE"; then
3044 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3045 else
3046 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3047 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003048 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003049 ;;
3050 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003051 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003052 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003053 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003054 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003055 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3056 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003057 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003058
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003059 if test "x${prefix}" = "xNONE" ; then
3060 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003061
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003062 else
3063 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3064 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003065
3066 case "${enableval}" in
3067 /System*)
3068 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3069 if test "${prefix}" = "NONE" ; then
3070 # See below
3071 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3072 fi
3073 ;;
3074
3075 /Library*)
3076 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3077 ;;
3078
3079 */Library/Frameworks)
3080 MDIR="`dirname "${enableval}"`"
3081 MDIR="`dirname "${MDIR}"`"
3082 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3083
3084 if test "${prefix}" = "NONE"; then
3085 # User hasn't specified the
3086 # --prefix option, but wants to install
3087 # the framework in a non-default location,
3088 # ensure that the compatibility links get
3089 # installed relative to that prefix as well
3090 # instead of in /usr/local.
3091 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3092 fi
3093 ;;
3094
3095 *)
3096 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3097 ;;
3098 esac
3099
Jack Jansen127e56e2001-09-11 14:41:54 +00003100 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003101
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003102 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003103 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003104 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003107
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003108 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3109
3110 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3111
Jack Jansene578a632001-08-15 01:27:14 +00003112 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003113
Guido van Rossum563e7081996-09-10 18:20:48 +00003114else
Martin v. Löwis11437992002-04-12 09:54:03 +00003115
Jack Jansene578a632001-08-15 01:27:14 +00003116 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003117 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003118 PYTHONFRAMEWORKPREFIX=
3119 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003120 FRAMEWORKINSTALLFIRST=
3121 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003122 FRAMEWORKALTINSTALLFIRST=
3123 FRAMEWORKALTINSTALLLAST=
3124 if test "x${prefix}" = "xNONE" ; then
3125 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3126 else
3127 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3128 fi
Jack Jansene578a632001-08-15 01:27:14 +00003129 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003130
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003132fi
3133
Thomas Wouters477c8d52006-05-27 19:21:47 +00003134
3135
Michael W. Hudson54241132001-12-07 15:38:26 +00003136
3137
3138
3139
Jack Jansene578a632001-08-15 01:27:14 +00003140
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003141
3142
3143
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003144
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145
Jack Jansene578a632001-08-15 01:27:14 +00003146##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003147## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003148## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003149##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003150# Set name for machine-dependent library files
3151
Matthias Kloseb9621712010-04-24 17:59:49 +00003152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3153$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003154if test -z "$MACHDEP"
3155then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003156 # avoid using uname for cross builds
3157 if test "$cross_compiling" = yes; then
3158 # ac_sys_system and ac_sys_release are only used for setting
3159 # `define_xopen_source' in the case statement below. For the
3160 # current supported cross builds, this macro is not adjusted.
3161 case "$host" in
3162 *-*-linux*)
3163 ac_sys_system=Linux
3164 ;;
3165 *-*-cygwin*)
3166 ac_sys_system=Cygwin
3167 ;;
3168 *)
3169 # for now, limit cross builds to known configurations
3170 MACHDEP="unknown"
3171 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3172 esac
3173 ac_sys_release=
3174 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003175 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003176 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003177 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003178 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003179 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003180 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003181 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003182 fi
3183 ac_md_system=`echo $ac_sys_system |
3184 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3185 ac_md_release=`echo $ac_sys_release |
3186 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3187 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003188
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003189 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003190 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003191 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003192 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003193 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003194 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003195 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003196fi
Guido van Rossum91922671997-10-09 20:24:13 +00003197
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003198# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3199# disable features if it is defined, without any means to access these
3200# features as extensions. For these systems, we skip the definition of
3201# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3202# some feature, make sure there is no alternative way to access this
3203# feature. Also, when using wildcards, make sure you have verified the
3204# need for not defining _XOPEN_SOURCE on all systems matching the
3205# wildcard, and that the wildcard does not include future systems
3206# (which may remove their limitations).
3207case $ac_sys_system/$ac_sys_release in
3208 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3209 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003210 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003211 # In addition, Stefan Krah confirms that issue #1244610 exists through
3212 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003213 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003214 define_xopen_source=no
3215 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3216 # also defined. This can be overridden by defining _BSD_SOURCE
3217 # As this has a different meaning on Linux, only define it on OpenBSD
3218
Matthias Kloseb9621712010-04-24 17:59:49 +00003219$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003220
3221 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003222 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003223 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3224 # also defined. This can be overridden by defining _BSD_SOURCE
3225 # As this has a different meaning on Linux, only define it on OpenBSD
3226
Matthias Kloseb9621712010-04-24 17:59:49 +00003227$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003228
3229 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003230 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3231 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3232 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003233 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003234 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003235 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3236 # request to enable features supported by the standard as a request
3237 # to disable features not supported by the standard. The best way
3238 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3239 # entirely and define __EXTENSIONS__ instead.
3240 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003241 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003242 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3243 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003244 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003245 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003246 define_xopen_source=no;;
3247 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003248 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003249 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003250 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003251 # On FreeBSD 4, the math functions C89 does not cover are never defined
3252 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3253 FreeBSD/4.*)
3254 define_xopen_source=no;;
3255 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3256 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3257 # identifies itself as Darwin/7.*
3258 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3259 # disables platform specific features beyond repair.
3260 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3261 # has no effect, don't bother defining them
3262 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003263 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003264 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003265 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003266 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3267 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3268 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003269 AIX/4)
3270 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003271 AIX/5)
3272 if test `uname -r` -eq 1; then
3273 define_xopen_source=no
3274 fi
3275 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003276 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3277 # defining NI_NUMERICHOST.
3278 QNX/6.3.2)
3279 define_xopen_source=no
3280 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003281
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003282esac
3283
3284if test $define_xopen_source = yes
3285then
Victor Stinner14d098d2011-09-07 22:29:43 +02003286 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003287
Victor Stinner14d098d2011-09-07 22:29:43 +02003288$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003289
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003290
3291 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3292 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3293 # several APIs are not declared. Since this is also needed in some
3294 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003295
Matthias Kloseb9621712010-04-24 17:59:49 +00003296$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003297
3298
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003299
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003300$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003301
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003302fi
3303
Guido van Rossum91922671997-10-09 20:24:13 +00003304#
3305# SGI compilers allow the specification of the both the ABI and the
3306# ISA on the command line. Depending on the values of these switches,
3307# different and often incompatable code will be generated.
3308#
3309# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3310# thus supply support for various ABI/ISA combinations. The MACHDEP
3311# variable is also adjusted.
3312#
3313
3314if test ! -z "$SGI_ABI"
3315then
3316 CC="cc $SGI_ABI"
3317 LDFLAGS="$SGI_ABI $LDFLAGS"
3318 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3321$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003322
Jack Jansen6b08a402004-06-03 12:41:45 +00003323# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3324# it may influence the way we can build extensions, so distutils
3325# needs to check it
3326
Thomas Wouters477c8d52006-05-27 19:21:47 +00003327
Jack Jansen6b08a402004-06-03 12:41:45 +00003328CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003329EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003330
Guido van Rossum627b2d71993-12-24 10:39:16 +00003331# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003332
3333# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3334# for debug/optimization stuff. BASECFLAGS is for flags that are required
3335# just to get things to compile and link. Users are free to override OPT
3336# when running configure or make. The build should not break if they do.
3337# BASECFLAGS should generally not be messed with, however.
3338
3339# XXX shouldn't some/most/all of this code be merged with the stuff later
3340# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3342$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003343
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003344# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003345if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003346 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003347 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003348 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003349 without_gcc=yes;;
3350 yes) CC=gcc
3351 without_gcc=no;;
3352 *) CC=$withval
3353 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003354 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003355else
Martin v. Löwis11437992002-04-12 09:54:03 +00003356
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003357 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003358 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003359 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003360 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003361 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003362fi
3363
Matthias Kloseb9621712010-04-24 17:59:49 +00003364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3365$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003366
Guido van Rossum8b131c51995-03-09 14:10:13 +00003367# If the user switches compilers, we can't believe the cache
3368if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3369then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003370 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003371(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003372fi
3373
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003374# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3375# when the compiler supports them, but we don't always want -O2, and
3376# we set -g later.
3377if test -z "$CFLAGS"; then
3378 CFLAGS=
3379fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003380ac_ext=c
3381ac_cpp='$CPP $CPPFLAGS'
3382ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3383ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3384ac_compiler_gnu=$ac_cv_c_compiler_gnu
3385if test -n "$ac_tool_prefix"; then
3386 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3387set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3389$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003390if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003391 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003392else
3393 if test -n "$CC"; then
3394 ac_cv_prog_CC="$CC" # Let the user override the test.
3395else
Martin v. Löwis11437992002-04-12 09:54:03 +00003396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3397for as_dir in $PATH
3398do
3399 IFS=$as_save_IFS
3400 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003402 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003403 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003405 break 2
3406 fi
3407done
Matthias Kloseb9621712010-04-24 17:59:49 +00003408 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003410
Jack Jansendd19cf82001-12-06 22:36:17 +00003411fi
3412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003413CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003414if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3416$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003417else
Matthias Kloseb9621712010-04-24 17:59:49 +00003418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3419$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003420fi
3421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003422
Martin v. Löwis11437992002-04-12 09:54:03 +00003423fi
3424if test -z "$ac_cv_prog_CC"; then
3425 ac_ct_CC=$CC
3426 # Extract the first word of "gcc", so it can be a program name with args.
3427set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3429$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003430if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003431 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003432else
3433 if test -n "$ac_ct_CC"; then
3434 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3435else
3436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3437for as_dir in $PATH
3438do
3439 IFS=$as_save_IFS
3440 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003441 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003442 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 +00003443 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003444 $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 +00003445 break 2
3446 fi
3447done
Matthias Kloseb9621712010-04-24 17:59:49 +00003448 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003449IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003450
3451fi
3452fi
3453ac_ct_CC=$ac_cv_prog_ac_ct_CC
3454if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3456$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003457else
Matthias Kloseb9621712010-04-24 17:59:49 +00003458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3459$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003460fi
3461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003462 if test "x$ac_ct_CC" = x; then
3463 CC=""
3464 else
3465 case $cross_compiling:$ac_tool_warned in
3466yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003467{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3468$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469ac_tool_warned=yes ;;
3470esac
3471 CC=$ac_ct_CC
3472 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003473else
3474 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003475fi
3476
Jack Jansendd19cf82001-12-06 22:36:17 +00003477if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 if test -n "$ac_tool_prefix"; then
3479 # 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 +00003480set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3482$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003483if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003484 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003485else
3486 if test -n "$CC"; then
3487 ac_cv_prog_CC="$CC" # Let the user override the test.
3488else
Martin v. Löwis11437992002-04-12 09:54:03 +00003489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3490for as_dir in $PATH
3491do
3492 IFS=$as_save_IFS
3493 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003494 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003495 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003497 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 break 2
3499 fi
3500done
Matthias Kloseb9621712010-04-24 17:59:49 +00003501 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003502IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003503
3504fi
3505fi
3506CC=$ac_cv_prog_CC
3507if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3509$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003510else
Matthias Kloseb9621712010-04-24 17:59:49 +00003511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3512$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003513fi
3514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003515
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003517fi
3518if test -z "$CC"; then
3519 # Extract the first word of "cc", so it can be a program name with args.
3520set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3522$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003523if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003524 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003525else
3526 if test -n "$CC"; then
3527 ac_cv_prog_CC="$CC" # Let the user override the test.
3528else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003529 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3531for as_dir in $PATH
3532do
3533 IFS=$as_save_IFS
3534 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003535 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003536 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 +00003537 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3538 ac_prog_rejected=yes
3539 continue
3540 fi
3541 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003542 $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 +00003543 break 2
3544 fi
3545done
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003548
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003549if test $ac_prog_rejected = yes; then
3550 # We found a bogon in the path, so make sure we never use it.
3551 set dummy $ac_cv_prog_CC
3552 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003554 # We chose a different compiler from the bogus one.
3555 # However, it has the same basename, so the bogon will be chosen
3556 # first if we set CC to just the basename; use the full file name.
3557 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003558 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003559 fi
3560fi
3561fi
3562fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003563CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003564if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3566$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003567else
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3569$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003570fi
3571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572
Martin v. Löwis11437992002-04-12 09:54:03 +00003573fi
3574if test -z "$CC"; then
3575 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003576 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 do
3578 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3579set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3581$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003582if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003584else
3585 if test -n "$CC"; then
3586 ac_cv_prog_CC="$CC" # Let the user override the test.
3587else
Martin v. Löwis11437992002-04-12 09:54:03 +00003588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3589for as_dir in $PATH
3590do
3591 IFS=$as_save_IFS
3592 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594 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 +00003595 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 $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 +00003597 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003599done
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003602
3603fi
3604fi
3605CC=$ac_cv_prog_CC
3606if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3608$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003609else
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3611$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003612fi
3613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 test -n "$CC" && break
3616 done
3617fi
3618if test -z "$CC"; then
3619 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003621do
3622 # Extract the first word of "$ac_prog", so it can be a program name with args.
3623set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3625$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003626if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003628else
3629 if test -n "$ac_ct_CC"; then
3630 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3631else
3632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3633for as_dir in $PATH
3634do
3635 IFS=$as_save_IFS
3636 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638 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 +00003639 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 $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 +00003641 break 2
3642 fi
3643done
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647fi
3648fi
3649ac_ct_CC=$ac_cv_prog_ac_ct_CC
3650if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3652$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003653else
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3655$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003656fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003658
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 test -n "$ac_ct_CC" && break
3660done
Michael W. Hudson54241132001-12-07 15:38:26 +00003661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662 if test "x$ac_ct_CC" = x; then
3663 CC=""
3664 else
3665 case $cross_compiling:$ac_tool_warned in
3666yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003667{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3668$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669ac_tool_warned=yes ;;
3670esac
3671 CC=$ac_ct_CC
3672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003673fi
3674
3675fi
3676
3677
Matthias Kloseb9621712010-04-24 17:59:49 +00003678test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003680as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003681See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003682
3683# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003684$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3685set X $ac_compile
3686ac_compiler=$2
3687for ac_option in --version -v -V -qversion; do
3688 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689case "(($ac_try" in
3690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3691 *) ac_try_echo=$ac_try;;
3692esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3694$as_echo "$ac_try_echo"; } >&5
3695 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003696 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 if test -s conftest.err; then
3698 sed '10a\
3699... rest of stderr output deleted ...
3700 10q' conftest.err >conftest.er1
3701 cat conftest.er1 >&5
3702 fi
3703 rm -f conftest.er1 conftest.err
3704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3705 test $ac_status = 0; }
3706done
Martin v. Löwis11437992002-04-12 09:54:03 +00003707
Matthias Kloseb9621712010-04-24 17:59:49 +00003708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003709/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003710
Martin v. Löwis11437992002-04-12 09:54:03 +00003711int
3712main ()
3713{
3714
3715 ;
3716 return 0;
3717}
3718_ACEOF
3719ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003720ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003721# Try to create an executable without -o first, disregard a.out.
3722# It will help us diagnose broken compilers, and finding out an intuition
3723# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3725$as_echo_n "checking whether the C compiler works... " >&6; }
3726ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3727
3728# The possible output files:
3729ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731ac_rmfiles=
3732for ac_file in $ac_files
3733do
3734 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003736 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3737 esac
3738done
3739rm -f $ac_rmfiles
3740
Matthias Kloseb9621712010-04-24 17:59:49 +00003741if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742case "(($ac_try" in
3743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3744 *) ac_try_echo=$ac_try;;
3745esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3747$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3751 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3753# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3754# in a Makefile. We should not override ac_cv_exeext if it was cached,
3755# so that the user can short-circuit this test for compilers unknown to
3756# Autoconf.
3757for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003758do
3759 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003762 ;;
3763 [ab].out )
3764 # We found the default executable, but exeext='' is most
3765 # certainly right.
3766 break;;
3767 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769 then :; else
3770 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3771 fi
3772 # We set ac_cv_exeext here because the later test for it is not
3773 # safe: cross compilers may not add the suffix if given an `-o'
3774 # argument, so we may need to know it at that point already.
3775 # Even if this section looks crufty: it has the advantage of
3776 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003777 break;;
3778 * )
3779 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 esac
3781done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782test "$ac_cv_exeext" = no && ac_cv_exeext=
3783
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003784else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785 ac_file=''
3786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003787if test -z "$ac_file"; then :
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3789$as_echo "no" >&6; }
3790$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003791sed 's/^/| /' conftest.$ac_ext >&5
3792
Matthias Kloseb9621712010-04-24 17:59:49 +00003793{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3794$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003795as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003796See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003797else
3798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3799$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3802$as_echo_n "checking for C compiler default output file name... " >&6; }
3803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3804$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003805ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003806
Matthias Kloseb9621712010-04-24 17:59:49 +00003807rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003808ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3810$as_echo_n "checking for suffix of executables... " >&6; }
3811if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812case "(($ac_try" in
3813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3814 *) ac_try_echo=$ac_try;;
3815esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3817$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003819 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3821 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003822 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3823# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3824# work properly (i.e., refer to `conftest.exe'), while it won't with
3825# `rm'.
3826for ac_file in conftest.exe conftest conftest.*; do
3827 test -f "$ac_file" || continue
3828 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003830 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3831 break;;
3832 * ) break;;
3833 esac
3834done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003835else
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003838as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003839See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003841rm -f conftest conftest$ac_cv_exeext
3842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3843$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003844
3845rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003846EXEEXT=$ac_cv_exeext
3847ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3849/* end confdefs.h. */
3850#include <stdio.h>
3851int
3852main ()
3853{
3854FILE *f = fopen ("conftest.out", "w");
3855 return ferror (f) || fclose (f) != 0;
3856
3857 ;
3858 return 0;
3859}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003861ac_clean_files="$ac_clean_files conftest.out"
3862# Check that the compiler produces executables we can run. If not, either
3863# the compiler is broken, or we cross compile.
3864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3865$as_echo_n "checking whether we are cross compiling... " >&6; }
3866if test "$cross_compiling" != yes; then
3867 { { ac_try="$ac_link"
3868case "(($ac_try" in
3869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3870 *) ac_try_echo=$ac_try;;
3871esac
3872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3873$as_echo "$ac_try_echo"; } >&5
3874 (eval "$ac_link") 2>&5
3875 ac_status=$?
3876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3877 test $ac_status = 0; }
3878 if { ac_try='./conftest$ac_cv_exeext'
3879 { { case "(($ac_try" in
3880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3881 *) ac_try_echo=$ac_try;;
3882esac
3883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3884$as_echo "$ac_try_echo"; } >&5
3885 (eval "$ac_try") 2>&5
3886 ac_status=$?
3887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3888 test $ac_status = 0; }; }; then
3889 cross_compiling=no
3890 else
3891 if test "$cross_compiling" = maybe; then
3892 cross_compiling=yes
3893 else
3894 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003896as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003897If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02003898See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 fi
3900 fi
3901fi
3902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3903$as_echo "$cross_compiling" >&6; }
3904
3905rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3906ac_clean_files=$ac_clean_files_save
3907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3908$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003909if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 $as_echo_n "(cached) " >&6
3911else
3912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003913/* end confdefs.h. */
3914
3915int
3916main ()
3917{
3918
3919 ;
3920 return 0;
3921}
3922_ACEOF
3923rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003924if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925case "(($ac_try" in
3926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3927 *) ac_try_echo=$ac_try;;
3928esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003929eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3930$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003932 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3934 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935 for ac_file in conftest.o conftest.obj conftest.*; do
3936 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003937 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003939 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3940 break;;
3941 esac
3942done
3943else
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003945sed 's/^/| /' conftest.$ac_ext >&5
3946
Matthias Kloseb9621712010-04-24 17:59:49 +00003947{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003949as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02003950See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003951fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003952rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3955$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003956OBJEXT=$ac_cv_objext
3957ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3959$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003960if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003962else
Matthias Kloseb9621712010-04-24 17:59:49 +00003963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003965
Martin v. Löwis11437992002-04-12 09:54:03 +00003966int
3967main ()
3968{
3969#ifndef __GNUC__
3970 choke me
3971#endif
3972
3973 ;
3974 return 0;
3975}
3976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003977if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003978 ac_compiler_gnu=yes
3979else
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003983ac_cv_c_compiler_gnu=$ac_compiler_gnu
3984
3985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3987$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3988if test $ac_compiler_gnu = yes; then
3989 GCC=yes
3990else
3991 GCC=
3992fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003993ac_test_CFLAGS=${CFLAGS+set}
3994ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3996$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003997if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003998 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003999else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000 ac_save_c_werror_flag=$ac_c_werror_flag
4001 ac_c_werror_flag=yes
4002 ac_cv_prog_cc_g=no
4003 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004006
Martin v. Löwis11437992002-04-12 09:54:03 +00004007int
4008main ()
4009{
4010
4011 ;
4012 return 0;
4013}
4014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004015if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004016 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004017else
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 CFLAGS=""
4019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020/* end confdefs.h. */
4021
4022int
4023main ()
4024{
4025
4026 ;
4027 return 0;
4028}
4029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004030if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004031
Matthias Kloseb9621712010-04-24 17:59:49 +00004032else
4033 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004034 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036/* end confdefs.h. */
4037
4038int
4039main ()
4040{
4041
4042 ;
4043 return 0;
4044}
4045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004046if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004047 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4054 ac_c_werror_flag=$ac_save_c_werror_flag
4055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4057$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004058if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004059 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004060elif test $ac_cv_prog_cc_g = yes; then
4061 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004062 CFLAGS="-g -O2"
4063 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004064 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065 fi
4066else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004067 if test "$GCC" = yes; then
4068 CFLAGS="-O2"
4069 else
4070 CFLAGS=
4071 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4074$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004075if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004077else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004078 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004079ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004081/* end confdefs.h. */
4082#include <stdarg.h>
4083#include <stdio.h>
4084#include <sys/types.h>
4085#include <sys/stat.h>
4086/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4087struct buf { int x; };
4088FILE * (*rcsopen) (struct buf *, struct stat *, int);
4089static char *e (p, i)
4090 char **p;
4091 int i;
4092{
4093 return p[i];
4094}
4095static char *f (char * (*g) (char **, int), char **p, ...)
4096{
4097 char *s;
4098 va_list v;
4099 va_start (v,p);
4100 s = g (p, va_arg (v,int));
4101 va_end (v);
4102 return s;
4103}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004104
4105/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4106 function prototypes and stuff, but not '\xHH' hex character constants.
4107 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004108 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004109 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4110 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004112int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4113
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004114/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4115 inside strings and character constants. */
4116#define FOO(x) 'x'
4117int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4118
Skip Montanaro6dead952003-09-25 14:50:04 +00004119int test (int i, double x);
4120struct s1 {int (*f) (int a);};
4121struct s2 {int (*f) (double a);};
4122int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4123int argc;
4124char **argv;
4125int
4126main ()
4127{
4128return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4129 ;
4130 return 0;
4131}
4132_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4134 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004135do
4136 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004138 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004140rm -f core conftest.err conftest.$ac_objext
4141 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004142done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004143rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004144CC=$ac_save_CC
4145
4146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004147# AC_CACHE_VAL
4148case "x$ac_cv_prog_cc_c89" in
4149 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4151$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4154$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004155 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4158$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004159esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004160if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004161
Matthias Kloseb9621712010-04-24 17:59:49 +00004162fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004163
Martin v. Löwis11437992002-04-12 09:54:03 +00004164ac_ext=c
4165ac_cpp='$CPP $CPPFLAGS'
4166ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4167ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4168ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004170
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004171
4172
Matthias Kloseb9621712010-04-24 17:59:49 +00004173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4174$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004177if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004178 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004179
4180 case $withval in
4181 no) with_cxx_main=no
4182 MAINCC='$(CC)';;
4183 yes) with_cxx_main=yes
4184 MAINCC='$(CXX)';;
4185 *) with_cxx_main=yes
4186 MAINCC=$withval
4187 if test -z "$CXX"
4188 then
4189 CXX=$withval
4190 fi;;
4191 esac
4192else
4193
4194 with_cxx_main=no
4195 MAINCC='$(CC)'
4196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197fi
4198
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4200$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004201
4202preset_cxx="$CXX"
4203if test -z "$CXX"
4204then
4205 case "$CC" in
4206 gcc) # Extract the first word of "g++", so it can be a program name with args.
4207set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4209$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004210if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004211 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004212else
4213 case $CXX in
4214 [\\/]* | ?:[\\/]*)
4215 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4216 ;;
4217 *)
4218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4219for as_dir in notfound
4220do
4221 IFS=$as_save_IFS
4222 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004223 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004225 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004226 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004227 break 2
4228 fi
4229done
Matthias Kloseb9621712010-04-24 17:59:49 +00004230 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004232
4233 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4234 ;;
4235esac
4236fi
4237CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004238if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4240$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004241else
Matthias Kloseb9621712010-04-24 17:59:49 +00004242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4243$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004246 ;;
4247 cc) # Extract the first word of "c++", so it can be a program name with args.
4248set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4250$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004251if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004252 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004253else
4254 case $CXX in
4255 [\\/]* | ?:[\\/]*)
4256 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4257 ;;
4258 *)
4259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4260for as_dir in notfound
4261do
4262 IFS=$as_save_IFS
4263 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004264 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004266 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004267 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004268 break 2
4269 fi
4270done
Matthias Kloseb9621712010-04-24 17:59:49 +00004271 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004273
4274 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4275 ;;
4276esac
4277fi
4278CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004279if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4281$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004282else
Matthias Kloseb9621712010-04-24 17:59:49 +00004283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4284$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004287 ;;
4288 esac
4289 if test "$CXX" = "notfound"
4290 then
4291 CXX=""
4292 fi
4293fi
4294if test -z "$CXX"
4295then
4296 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4297do
4298 # Extract the first word of "$ac_prog", so it can be a program name with args.
4299set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4301$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004302if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004304else
4305 if test -n "$CXX"; then
4306 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4307else
4308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4309for as_dir in $PATH
4310do
4311 IFS=$as_save_IFS
4312 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004315 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004316 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004317 break 2
4318 fi
4319done
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004322
4323fi
4324fi
4325CXX=$ac_cv_prog_CXX
4326if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4328$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004329else
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4331$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004332fi
4333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004335 test -n "$CXX" && break
4336done
4337test -n "$CXX" || CXX="notfound"
4338
4339 if test "$CXX" = "notfound"
4340 then
4341 CXX=""
4342 fi
4343fi
4344if test "$preset_cxx" != "$CXX"
4345then
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004347
4348 By default, distutils will build C++ extension modules with \"$CXX\".
4349 If this is not intended, then set CXX on the configure command line.
4350 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004351$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004352
4353 By default, distutils will build C++ extension modules with \"$CXX\".
4354 If this is not intended, then set CXX on the configure command line.
4355 " >&2;}
4356fi
4357
4358
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4360$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4361save_LDFLAGS="$LDFLAGS"
4362LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004363
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4365/* end confdefs.h. */
4366
4367int
4368main ()
4369{
4370
4371 ;
4372 return 0;
4373}
4374_ACEOF
4375if ac_fn_c_try_link "$LINENO"; then :
4376 NO_AS_NEEDED="-Wl,--no-as-needed"
4377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4378$as_echo "yes" >&6; }
4379else
4380 NO_AS_NEEDED=""
4381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4382$as_echo "no" >&6; }
4383fi
4384rm -f core conftest.err conftest.$ac_objext \
4385 conftest$ac_exeext conftest.$ac_ext
4386LDFLAGS="$save_LDFLAGS"
4387
4388
4389
4390# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004391ac_ext=c
4392ac_cpp='$CPP $CPPFLAGS'
4393ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4394ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4395ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4397$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004398# On Suns, sometimes $CPP names a directory.
4399if test -n "$CPP" && test -d "$CPP"; then
4400 CPP=
4401fi
4402if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004403 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004405else
Martin v. Löwis11437992002-04-12 09:54:03 +00004406 # Double quotes because CPP needs to be expanded
4407 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4408 do
4409 ac_preproc_ok=false
4410for ac_c_preproc_warn_flag in '' yes
4411do
4412 # Use a header file that comes with gcc, so configuring glibc
4413 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004414 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4415 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004416 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004417 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004419/* end confdefs.h. */
4420#ifdef __STDC__
4421# include <limits.h>
4422#else
4423# include <assert.h>
4424#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004425 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004427if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004428
Matthias Kloseb9621712010-04-24 17:59:49 +00004429else
Martin v. Löwis11437992002-04-12 09:54:03 +00004430 # Broken: fails on valid input.
4431continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004432fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004433rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004434
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004435 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004436 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004439#include <ac_nonexistent.h>
4440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004441if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004442 # Broken: success on invalid input.
4443continue
4444else
Martin v. Löwis11437992002-04-12 09:54:03 +00004445 # Passes both tests.
4446ac_preproc_ok=:
4447break
4448fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004449rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004450
4451done
4452# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004453rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004454if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004455 break
4456fi
4457
4458 done
4459 ac_cv_prog_CPP=$CPP
4460
4461fi
4462 CPP=$ac_cv_prog_CPP
4463else
4464 ac_cv_prog_CPP=$CPP
4465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4467$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004468ac_preproc_ok=false
4469for ac_c_preproc_warn_flag in '' yes
4470do
4471 # Use a header file that comes with gcc, so configuring glibc
4472 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004473 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4474 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004475 # On the NeXT, cc -E runs the code through the compiler's parser,
4476 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004478/* end confdefs.h. */
4479#ifdef __STDC__
4480# include <limits.h>
4481#else
4482# include <assert.h>
4483#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004484 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004486if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004487
Matthias Kloseb9621712010-04-24 17:59:49 +00004488else
Martin v. Löwis11437992002-04-12 09:54:03 +00004489 # Broken: fails on valid input.
4490continue
4491fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004492rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004494 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004495 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004498#include <ac_nonexistent.h>
4499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004500if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004501 # Broken: success on invalid input.
4502continue
4503else
Martin v. Löwis11437992002-04-12 09:54:03 +00004504 # Passes both tests.
4505ac_preproc_ok=:
4506break
4507fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004508rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004509
4510done
4511# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004512rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004513if $ac_preproc_ok; then :
4514
Martin v. Löwis11437992002-04-12 09:54:03 +00004515else
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4517$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004518as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004519See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004520fi
4521
4522ac_ext=c
4523ac_cpp='$CPP $CPPFLAGS'
4524ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4525ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4526ac_compiler_gnu=$ac_cv_c_compiler_gnu
4527
4528
Matthias Kloseb9621712010-04-24 17:59:49 +00004529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4530$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004531if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004532 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004533else
Matthias Kloseb9621712010-04-24 17:59:49 +00004534 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004535 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004536 # Loop through the user's path and test for each of PROGNAME-LIST
4537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004538for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4539do
4540 IFS=$as_save_IFS
4541 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004542 for ac_prog in grep ggrep; do
4543 for ac_exec_ext in '' $ac_executable_extensions; do
4544 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4545 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4546# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004547 # Check for GNU $ac_path_GREP
4548case `"$ac_path_GREP" --version 2>&1` in
4549*GNU*)
4550 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4551*)
4552 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004553 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004554 while :
4555 do
4556 cat "conftest.in" "conftest.in" >"conftest.tmp"
4557 mv "conftest.tmp" "conftest.in"
4558 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004560 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4561 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004562 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004563 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4564 # Best one so far, save it but keep looking for a better one
4565 ac_cv_path_GREP="$ac_path_GREP"
4566 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004567 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004568 # 10*(2^10) chars as input seems more than enough
4569 test $ac_count -gt 10 && break
4570 done
4571 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4572esac
4573
Matthias Kloseb9621712010-04-24 17:59:49 +00004574 $ac_path_GREP_found && break 3
4575 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004576 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004577 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004578IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004579 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004580 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004581 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004582else
4583 ac_cv_path_GREP=$GREP
4584fi
4585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4588$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004589 GREP="$ac_cv_path_GREP"
4590
4591
Matthias Kloseb9621712010-04-24 17:59:49 +00004592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4593$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004594if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004595 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004596else
4597 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4598 then ac_cv_path_EGREP="$GREP -E"
4599 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004600 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004601 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004602 # Loop through the user's path and test for each of PROGNAME-LIST
4603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004604for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4605do
4606 IFS=$as_save_IFS
4607 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004608 for ac_prog in egrep; do
4609 for ac_exec_ext in '' $ac_executable_extensions; do
4610 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4611 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4612# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004613 # Check for GNU $ac_path_EGREP
4614case `"$ac_path_EGREP" --version 2>&1` in
4615*GNU*)
4616 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4617*)
4618 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004619 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004620 while :
4621 do
4622 cat "conftest.in" "conftest.in" >"conftest.tmp"
4623 mv "conftest.tmp" "conftest.in"
4624 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004625 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004626 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4627 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004628 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004629 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4630 # Best one so far, save it but keep looking for a better one
4631 ac_cv_path_EGREP="$ac_path_EGREP"
4632 ac_path_EGREP_max=$ac_count
4633 fi
4634 # 10*(2^10) chars as input seems more than enough
4635 test $ac_count -gt 10 && break
4636 done
4637 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4638esac
4639
Matthias Kloseb9621712010-04-24 17:59:49 +00004640 $ac_path_EGREP_found && break 3
4641 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004642 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004643 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004644IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004645 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004646 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004647 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004648else
4649 ac_cv_path_EGREP=$EGREP
4650fi
4651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004652 fi
4653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4655$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004656 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004657
4658
Matthias Kloseb9621712010-04-24 17:59:49 +00004659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4660$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004661if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004662 $as_echo_n "(cached) " >&6
4663else
4664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004665/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004666#include <stdlib.h>
4667#include <stdarg.h>
4668#include <string.h>
4669#include <float.h>
4670
4671int
4672main ()
4673{
4674
4675 ;
4676 return 0;
4677}
4678_ACEOF
4679if ac_fn_c_try_compile "$LINENO"; then :
4680 ac_cv_header_stdc=yes
4681else
4682 ac_cv_header_stdc=no
4683fi
4684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4685
4686if test $ac_cv_header_stdc = yes; then
4687 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4689/* end confdefs.h. */
4690#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004691
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004692_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004693if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004694 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004695
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004696else
Matthias Kloseb9621712010-04-24 17:59:49 +00004697 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004698fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004699rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004700
Matthias Kloseb9621712010-04-24 17:59:49 +00004701fi
4702
4703if test $ac_cv_header_stdc = yes; then
4704 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4706/* end confdefs.h. */
4707#include <stdlib.h>
4708
4709_ACEOF
4710if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4711 $EGREP "free" >/dev/null 2>&1; then :
4712
4713else
4714 ac_cv_header_stdc=no
4715fi
4716rm -f conftest*
4717
4718fi
4719
4720if test $ac_cv_header_stdc = yes; then
4721 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4722 if test "$cross_compiling" = yes; then :
4723 :
4724else
4725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4726/* end confdefs.h. */
4727#include <ctype.h>
4728#include <stdlib.h>
4729#if ((' ' & 0x0FF) == 0x020)
4730# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4731# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4732#else
4733# define ISLOWER(c) \
4734 (('a' <= (c) && (c) <= 'i') \
4735 || ('j' <= (c) && (c) <= 'r') \
4736 || ('s' <= (c) && (c) <= 'z'))
4737# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4738#endif
4739
4740#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4741int
4742main ()
4743{
4744 int i;
4745 for (i = 0; i < 256; i++)
4746 if (XOR (islower (i), ISLOWER (i))
4747 || toupper (i) != TOUPPER (i))
4748 return 2;
4749 return 0;
4750}
4751_ACEOF
4752if ac_fn_c_try_run "$LINENO"; then :
4753
4754else
4755 ac_cv_header_stdc=no
4756fi
4757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4758 conftest.$ac_objext conftest.beam conftest.$ac_ext
4759fi
4760
4761fi
4762fi
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4764$as_echo "$ac_cv_header_stdc" >&6; }
4765if test $ac_cv_header_stdc = yes; then
4766
4767$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4768
4769fi
4770
4771# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4772for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4773 inttypes.h stdint.h unistd.h
4774do :
4775 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4776ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4777"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004778if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 cat >>confdefs.h <<_ACEOF
4780#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4781_ACEOF
4782
4783fi
4784
4785done
4786
4787
4788
4789 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02004790if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 MINIX=yes
4792else
4793 MINIX=
4794fi
4795
4796
4797 if test "$MINIX" = yes; then
4798
4799$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4800
4801
4802$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4803
4804
4805$as_echo "#define _MINIX 1" >>confdefs.h
4806
4807 fi
4808
4809
4810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4811$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004812if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004813 $as_echo_n "(cached) " >&6
4814else
4815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4816/* end confdefs.h. */
4817
4818# define __EXTENSIONS__ 1
4819 $ac_includes_default
4820int
4821main ()
4822{
4823
4824 ;
4825 return 0;
4826}
4827_ACEOF
4828if ac_fn_c_try_compile "$LINENO"; then :
4829 ac_cv_safe_to_define___extensions__=yes
4830else
4831 ac_cv_safe_to_define___extensions__=no
4832fi
4833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4834fi
4835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4836$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4837 test $ac_cv_safe_to_define___extensions__ = yes &&
4838 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4839
4840 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4841
4842 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4843
4844 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4845
4846 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4847
4848
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850# Check for unsupported systems
4851case $ac_sys_system/$ac_sys_release in
4852atheos*|Linux*/1*)
4853 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4854 echo See README for details.
4855 exit 1;;
4856esac
4857
4858
Matthias Kloseb9621712010-04-24 17:59:49 +00004859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4860$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861
4862# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004863if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864 withval=$with_suffix;
4865 case $withval in
4866 no) EXEEXT=;;
4867 yes) EXEEXT=.exe;;
4868 *) EXEEXT=$withval;;
4869 esac
4870fi
4871
Matthias Kloseb9621712010-04-24 17:59:49 +00004872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4873$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874
4875# Test whether we're running on a non-case-sensitive system, in which
4876# case we give a warning if no ext is given
4877
Matthias Kloseb9621712010-04-24 17:59:49 +00004878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4879$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004880if test ! -d CaseSensitiveTestDir; then
4881mkdir CaseSensitiveTestDir
4882fi
4883
4884if test -d casesensitivetestdir
4885then
Matthias Kloseb9621712010-04-24 17:59:49 +00004886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4887$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888 BUILDEXEEXT=.exe
4889else
Matthias Kloseb9621712010-04-24 17:59:49 +00004890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4891$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892 BUILDEXEEXT=$EXEEXT
4893fi
4894rmdir CaseSensitiveTestDir
4895
4896case $MACHDEP in
4897bsdos*)
4898 case $CC in
4899 gcc) CC="$CC -D_HAVE_BSDI";;
4900 esac;;
4901esac
4902
4903case $ac_sys_system in
4904hp*|HP*)
4905 case $CC in
4906 cc|*/cc) CC="$CC -Ae";;
4907 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908esac
4909
4910
4911
Matthias Kloseb9621712010-04-24 17:59:49 +00004912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4913$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914if test -z "$LIBRARY"
4915then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004916 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4919$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004920
4921# LDLIBRARY is the name of the library to link against (as opposed to the
4922# name of the library into which to insert object files). BLDLIBRARY is also
4923# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4924# is blank as the main program is not linked directly against LDLIBRARY.
4925# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4926# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4927# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4928# DLLLIBRARY is the shared (i.e., DLL) library.
4929#
4930# RUNSHARED is used to run shared python without installed libraries
4931#
4932# INSTSONAME is the name of the shared library that will be use to install
4933# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004934#
4935# LDVERSION is the shared library version number, normally the Python version
4936# with the ABI build flags appended.
4937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938
4939
4940
4941
4942
4943
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004944
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945LDLIBRARY="$LIBRARY"
4946BLDLIBRARY='$(LDLIBRARY)'
4947INSTSONAME='$(LDLIBRARY)'
4948DLLLIBRARY=''
4949LDLIBRARYDIR=''
4950RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004951LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952
4953# LINKCC is the command that links the python executable -- default is $(CC).
4954# If CXX is set, and if it is needed to link a main function that was
4955# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4956# python might then depend on the C++ runtime
4957# This is altered for AIX in order to build the export list before
4958# linking.
4959
Matthias Kloseb9621712010-04-24 17:59:49 +00004960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4961$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962if test -z "$LINKCC"
4963then
4964 LINKCC='$(PURIFY) $(MAINCC)'
4965 case $ac_sys_system in
4966 AIX*)
4967 exp_extra="\"\""
4968 if test $ac_sys_release -ge 5 -o \
4969 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4970 exp_extra="."
4971 fi
4972 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973 QNX*)
4974 # qcc must be used because the other compilers do not
4975 # support -N.
4976 LINKCC=qcc;;
4977 esac
4978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4980$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981
4982# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4983# make sure we default having it set to "no": this is used by
4984# distutils.unixccompiler to know if it should add --enable-new-dtags
4985# to linker command lines, and failing to detect GNU ld simply results
4986# in the same bahaviour as before.
4987
Matthias Kloseb9621712010-04-24 17:59:49 +00004988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4989$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990ac_prog=ld
4991if test "$GCC" = yes; then
4992 ac_prog=`$CC -print-prog-name=ld`
4993fi
4994case `"$ac_prog" -V 2>&1 < /dev/null` in
4995 *GNU*)
4996 GNULD=yes;;
4997 *)
4998 GNULD=no;;
4999esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5001$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005002
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5004$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005005if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005006 $as_echo_n "(cached) " >&6
5007else
5008 ac_cv_c_inline=no
5009for ac_kw in inline __inline__ __inline; do
5010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5011/* end confdefs.h. */
5012#ifndef __cplusplus
5013typedef int foo_t;
5014static $ac_kw foo_t static_foo () {return 0; }
5015$ac_kw foo_t foo () {return 0; }
5016#endif
5017
5018_ACEOF
5019if ac_fn_c_try_compile "$LINENO"; then :
5020 ac_cv_c_inline=$ac_kw
5021fi
5022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5023 test "$ac_cv_c_inline" != no && break
5024done
5025
5026fi
5027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5028$as_echo "$ac_cv_c_inline" >&6; }
5029
5030case $ac_cv_c_inline in
5031 inline | yes) ;;
5032 *)
5033 case $ac_cv_c_inline in
5034 no) ac_val=;;
5035 *) ac_val=$ac_cv_c_inline;;
5036 esac
5037 cat >>confdefs.h <<_ACEOF
5038#ifndef __cplusplus
5039#define inline $ac_val
5040#endif
5041_ACEOF
5042 ;;
5043esac
5044
5045if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005046
5047$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005048
5049
5050fi
5051
5052
Matthias Kloseb9621712010-04-24 17:59:49 +00005053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5054$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005056if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005057 enableval=$enable_shared;
5058fi
5059
5060
5061if test -z "$enable_shared"
5062then
5063 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005064 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065 enable_shared="yes";;
5066 *)
5067 enable_shared="no";;
5068 esac
5069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5071$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072
Matthias Kloseb9621712010-04-24 17:59:49 +00005073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5074$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005076if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077 enableval=$enable_profiling; ac_save_cc="$CC"
5078 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005080 ac_enable_profiling="no"
5081else
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083/* end confdefs.h. */
5084int main() { return 0; }
5085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005086if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087 ac_enable_profiling="yes"
5088else
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093fi
5094
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005095 CC="$ac_save_cc"
5096fi
5097
Matthias Kloseb9621712010-04-24 17:59:49 +00005098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
5099$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005100
5101case "$ac_enable_profiling" in
5102 "yes")
5103 BASECFLAGS="-pg $BASECFLAGS"
5104 LDFLAGS="-pg $LDFLAGS"
5105 ;;
5106esac
5107
Matthias Kloseb9621712010-04-24 17:59:49 +00005108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5109$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005110
5111# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5112# library that we build, but we do not want to link against it (we
5113# will find it with a -framework option). For this reason there is an
5114# extra variable BLDLIBRARY against which Python and the extension
5115# modules are linked, BLDLIBRARY. This is normally the same as
5116# LDLIBRARY, but empty for MacOSX framework builds.
5117if test "$enable_framework"
5118then
5119 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5120 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5121 BLDLIBRARY=''
5122else
5123 BLDLIBRARY='$(LDLIBRARY)'
5124fi
5125
5126# Other platforms follow
5127if test $enable_shared = "yes"; then
5128
Matthias Kloseb9621712010-04-24 17:59:49 +00005129$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130
5131 case $ac_sys_system in
5132 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005133 LDLIBRARY='libpython$(LDVERSION).dll.a'
5134 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135 ;;
5136 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005137 LDLIBRARY='libpython$(LDVERSION).so'
5138 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005139 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5140 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005141 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005142 then
5143 PY3LIBRARY=libpython3.so
5144 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005146 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005147 LDLIBRARY='libpython$(LDVERSION).so'
5148 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005149 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5150 case $ac_sys_system in
5151 FreeBSD*)
5152 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5153 ;;
5154 esac
5155 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005156 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005157 then
5158 PY3LIBRARY=libpython3.so
5159 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160 ;;
5161 hp*|HP*)
5162 case `uname -m` in
5163 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005164 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005165 ;;
5166 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005167 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168 ;;
5169 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005170 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005171 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5172 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005173 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005174 LDLIBRARY='libpython$(LDVERSION).dylib'
5175 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005176 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5177 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005178 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005179 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005180 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5181 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005182
5183 esac
5184else # shared is disabled
5185 case $ac_sys_system in
5186 CYGWIN*)
5187 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005188 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005189 ;;
5190 esac
5191fi
5192
Matthias Kloseb9621712010-04-24 17:59:49 +00005193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5194$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195
5196if test -n "$ac_tool_prefix"; then
5197 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5198set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5200$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005201if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005202 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005203else
5204 if test -n "$RANLIB"; then
5205 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5206else
5207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5208for as_dir in $PATH
5209do
5210 IFS=$as_save_IFS
5211 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005212 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005213 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5214 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005216 break 2
5217 fi
5218done
Matthias Kloseb9621712010-04-24 17:59:49 +00005219 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005220IFS=$as_save_IFS
5221
5222fi
5223fi
5224RANLIB=$ac_cv_prog_RANLIB
5225if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5227$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228else
Matthias Kloseb9621712010-04-24 17:59:49 +00005229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5230$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005231fi
5232
5233
5234fi
5235if test -z "$ac_cv_prog_RANLIB"; then
5236 ac_ct_RANLIB=$RANLIB
5237 # Extract the first word of "ranlib", so it can be a program name with args.
5238set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5240$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005241if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005242 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005243else
5244 if test -n "$ac_ct_RANLIB"; then
5245 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5246else
5247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5248for as_dir in $PATH
5249do
5250 IFS=$as_save_IFS
5251 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005252 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005253 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5254 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005255 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005256 break 2
5257 fi
5258done
Matthias Kloseb9621712010-04-24 17:59:49 +00005259 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005260IFS=$as_save_IFS
5261
5262fi
5263fi
5264ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5265if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5267$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005268else
Matthias Kloseb9621712010-04-24 17:59:49 +00005269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5270$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005271fi
5272
5273 if test "x$ac_ct_RANLIB" = x; then
5274 RANLIB=":"
5275 else
5276 case $cross_compiling:$ac_tool_warned in
5277yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005278{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5279$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005280ac_tool_warned=yes ;;
5281esac
5282 RANLIB=$ac_ct_RANLIB
5283 fi
5284else
5285 RANLIB="$ac_cv_prog_RANLIB"
5286fi
5287
5288
5289for ac_prog in ar aal
5290do
5291 # Extract the first word of "$ac_prog", so it can be a program name with args.
5292set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5294$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005295if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005296 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297else
5298 if test -n "$AR"; then
5299 ac_cv_prog_AR="$AR" # Let the user override the test.
5300else
5301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5302for as_dir in $PATH
5303do
5304 IFS=$as_save_IFS
5305 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005306 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005307 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5308 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005309 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310 break 2
5311 fi
5312done
Matthias Kloseb9621712010-04-24 17:59:49 +00005313 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314IFS=$as_save_IFS
5315
5316fi
5317fi
5318AR=$ac_cv_prog_AR
5319if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5321$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322else
Matthias Kloseb9621712010-04-24 17:59:49 +00005323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5324$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005325fi
5326
5327
5328 test -n "$AR" && break
5329done
5330test -n "$AR" || AR="ar"
5331
5332
5333# tweak ARFLAGS only if the user didn't set it on the command line
5334
5335if test -z "$ARFLAGS"
5336then
5337 ARFLAGS="rc"
5338fi
5339
5340
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005341DISABLE_ASDLGEN=""
5342# Extract the first word of "python", so it can be a program name with args.
5343set dummy python; ac_word=$2
5344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5345$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005346if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005347 $as_echo_n "(cached) " >&6
5348else
5349 if test -n "$HAS_PYTHON"; then
5350 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5351else
5352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5353for as_dir in $PATH
5354do
5355 IFS=$as_save_IFS
5356 test -z "$as_dir" && as_dir=.
5357 for ac_exec_ext in '' $ac_executable_extensions; do
5358 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5359 ac_cv_prog_HAS_PYTHON="found"
5360 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5361 break 2
5362 fi
5363done
5364 done
5365IFS=$as_save_IFS
5366
5367 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5368fi
5369fi
5370HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5371if test -n "$HAS_PYTHON"; then
5372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5373$as_echo "$HAS_PYTHON" >&6; }
5374else
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5376$as_echo "no" >&6; }
5377fi
5378
5379
5380if test $HAS_HG != found -o $HAS_PYTHON != found
5381then
5382 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5383fi
5384
5385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386case $MACHDEP in
5387bsdos*|hp*|HP*)
5388 # install -d does not work on BSDI or HP-UX
5389 if test -z "$INSTALL"
5390 then
5391 INSTALL="${srcdir}/install-sh -c"
5392 fi
5393esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005394# Find a good install program. We prefer a C program (faster),
5395# so one script is as good as another. But avoid the broken or
5396# incompatible versions:
5397# SysV /etc/install, /usr/sbin/install
5398# SunOS /usr/etc/install
5399# IRIX /sbin/install
5400# AIX /bin/install
5401# AmigaOS /C/install, which installs bootblocks on floppy discs
5402# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5403# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5404# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5405# OS/2's system install, which has a completely different semantic
5406# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005407# Reject install programs that cannot install multiple files.
5408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5409$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005411if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413else
5414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5415for as_dir in $PATH
5416do
5417 IFS=$as_save_IFS
5418 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 # Account for people who put trailing slashes in PATH elements.
5420case $as_dir/ in #((
5421 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424 /usr/ucb/* ) ;;
5425 *)
5426 # OSF1 and SCO ODT 3.0 have their own names for install.
5427 # Don't use installbsd from OSF since it installs stuff as root
5428 # by default.
5429 for ac_prog in ginstall scoinst install; do
5430 for ac_exec_ext in '' $ac_executable_extensions; do
5431 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5432 if test $ac_prog = install &&
5433 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5434 # AIX install. It has an incompatible calling convention.
5435 :
5436 elif test $ac_prog = install &&
5437 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5438 # program-specific install script used by HP pwplus--don't use.
5439 :
5440 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 rm -rf conftest.one conftest.two conftest.dir
5442 echo one > conftest.one
5443 echo two > conftest.two
5444 mkdir conftest.dir
5445 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5446 test -s conftest.one && test -s conftest.two &&
5447 test -s conftest.dir/conftest.one &&
5448 test -s conftest.dir/conftest.two
5449 then
5450 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5451 break 3
5452 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453 fi
5454 fi
5455 done
5456 done
5457 ;;
5458esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005459
5460 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005461IFS=$as_save_IFS
5462
Matthias Kloseb9621712010-04-24 17:59:49 +00005463rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464
5465fi
5466 if test "${ac_cv_path_install+set}" = set; then
5467 INSTALL=$ac_cv_path_install
5468 else
5469 # As a last resort, use the slow shell script. Don't cache a
5470 # value for INSTALL within a source directory, because that will
5471 # break other packages using the cache if that directory is
5472 # removed, or if the value is a relative name.
5473 INSTALL=$ac_install_sh
5474 fi
5475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5477$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005478
5479# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5480# It thinks the first close brace ends the variable substitution.
5481test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5482
5483test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5484
5485test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5486
Matthias Klose93a0ef12012-03-15 18:08:34 +01005487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5488$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5489if test -z "$MKDIR_P"; then
5490 if ${ac_cv_path_mkdir+:} false; then :
5491 $as_echo_n "(cached) " >&6
5492else
5493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5494for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5495do
5496 IFS=$as_save_IFS
5497 test -z "$as_dir" && as_dir=.
5498 for ac_prog in mkdir gmkdir; do
5499 for ac_exec_ext in '' $ac_executable_extensions; do
5500 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
5501 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5502 'mkdir (GNU coreutils) '* | \
5503 'mkdir (coreutils) '* | \
5504 'mkdir (fileutils) '4.1*)
5505 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5506 break 3;;
5507 esac
5508 done
5509 done
5510 done
5511IFS=$as_save_IFS
5512
5513fi
5514
5515 test -d ./--version && rmdir ./--version
5516 if test "${ac_cv_path_mkdir+set}" = set; then
5517 MKDIR_P="$ac_cv_path_mkdir -p"
5518 else
5519 # As a last resort, use the slow shell script. Don't cache a
5520 # value for MKDIR_P within a source directory, because that will
5521 # break other packages using the cache if that directory is
5522 # removed, or if the value is a relative name.
5523 MKDIR_P="$ac_install_sh -d"
5524 fi
5525fi
5526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5527$as_echo "$MKDIR_P" >&6; }
5528
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005529
5530# Not every filesystem supports hard links
5531
5532if test -z "$LN" ; then
5533 case $ac_sys_system in
5534 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005535 *) LN=ln;;
5536 esac
5537fi
5538
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005539# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005540
5541ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005542
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5545$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546
5547# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005548if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549 withval=$with_pydebug;
5550if test "$withval" != no
5551then
5552
Matthias Kloseb9621712010-04-24 17:59:49 +00005553$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554
Matthias Kloseb9621712010-04-24 17:59:49 +00005555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5556$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005557 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005558 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005559else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5560$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005561fi
5562else
Matthias Kloseb9621712010-04-24 17:59:49 +00005563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5564$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005565fi
5566
5567
5568# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5569# merged with this chunk of code?
5570
5571# Optimizer/debugger flags
5572# ------------------------
5573# (The following bit of code is complicated enough - please keep things
5574# indented properly. Just pretend you're editing Python code. ;-)
5575
5576# There are two parallel sets of case statements below, one that checks to
5577# see if OPT was set and one that does BASECFLAGS setting based upon
5578# compiler and platform. BASECFLAGS tweaks need to be made even if the
5579# user set OPT.
5580
5581# tweak OPT based on compiler and platform, only if the user didn't set
5582# it on the command line
5583
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005584if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585then
5586 case $GCC in
5587 yes)
5588 if test "$CC" != 'g++' ; then
5589 STRICT_PROTO="-Wstrict-prototypes"
5590 fi
5591 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5592 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5593 WRAP="-fwrapv"
5594 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005595
5596 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005597 case $CC in
5598 *clang*) WRAP="-fwrapv"
5599 ;;
5600 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005601
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602 case $ac_cv_prog_cc_g in
5603 yes)
5604 if test "$Py_DEBUG" = 'true' ; then
5605 # Optimization messes up debuggers, so turn it off for
5606 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005607 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608 else
5609 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5610 fi
5611 ;;
5612 *)
5613 OPT="-O3 -Wall $STRICT_PROTO"
5614 ;;
5615 esac
5616 case $ac_sys_system in
5617 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5618 ;;
5619 esac
5620 ;;
5621
5622 *)
5623 OPT="-O"
5624 ;;
5625 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005626fi
5627
5628
5629
5630# The -arch flags for universal builds on OSX
5631UNIVERSAL_ARCH_FLAGS=
5632
5633
5634# tweak BASECFLAGS based on compiler and platform
5635case $GCC in
5636yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005637 # Python doesn't violate C99 aliasing rules, but older versions of
5638 # GCC produce warnings for legal Python code. Enable
5639 # -fno-strict-aliasing on versions of GCC that support but produce
5640 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5642$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 ac_save_cc="$CC"
5644 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005645 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005646 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005647 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005648else
Matthias Kloseb9621712010-04-24 17:59:49 +00005649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005651
Matthias Kloseb159a552010-04-25 21:00:44 +00005652
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005653int
5654main ()
5655{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005656
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005657 ;
5658 return 0;
5659}
Matthias Kloseb159a552010-04-25 21:00:44 +00005660
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005662if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005663
5664 CC="$ac_save_cc -fstrict-aliasing"
5665 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005667/* end confdefs.h. */
5668
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005669 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005670int
5671main ()
5672{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005673double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005674 ;
5675 return 0;
5676}
Matthias Kloseb159a552010-04-25 21:00:44 +00005677
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005679if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005680
5681 ac_cv_no_strict_aliasing=no
5682
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683else
Matthias Kloseb159a552010-04-25 21:00:44 +00005684
5685 ac_cv_no_strict_aliasing=yes
5686
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005687fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005689
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005690else
Matthias Kloseb159a552010-04-25 21:00:44 +00005691
5692 ac_cv_no_strict_aliasing=no
5693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005696fi
5697
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005698 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5701$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005702 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 then
5704 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5705 fi
5706
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
5708$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
5709 ac_save_cc="$CC"
5710 CC="$CC -Wunused-result -Werror"
5711 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005712 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005713 $as_echo_n "(cached) " >&6
5714else
5715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5716/* end confdefs.h. */
5717
5718
5719int
5720main ()
5721{
5722
5723 ;
5724 return 0;
5725}
5726
5727_ACEOF
5728if ac_fn_c_try_compile "$LINENO"; then :
5729
5730 ac_cv_disable_unused_result_warning=yes
5731
5732else
5733
5734 ac_cv_disable_unused_result_warning=no
5735
5736fi
5737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5738fi
5739
5740 CFLAGS="$save_CFLAGS"
5741 CC="$ac_save_cc"
5742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
5743$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
5744
5745 if test $ac_cv_disable_unused_result_warning = yes
5746 then
5747 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
5748 fi
5749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5751 # support. Without this, treatment of subnormals doesn't follow
5752 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01005753 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754 alpha*)
5755 BASECFLAGS="$BASECFLAGS -mieee"
5756 ;;
5757 esac
5758
5759 case $ac_sys_system in
5760 SCO_SV*)
5761 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5762 ;;
5763 # is there any other compiler on Darwin besides gcc?
5764 Darwin*)
5765 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5766 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005767 if test "${CC}" = gcc
5768 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5770$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005771 case "${UNIVERSALSDK}" in
5772 */MacOSX10.4u.sdk)
5773 # Build using 10.4 SDK, force usage of gcc when the
5774 # compiler is gcc, otherwise the user will get very
5775 # confusing error messages when building on OSX 10.6
5776 CC=gcc-4.0
5777 CPP=cpp-4.0
5778 ;;
5779 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5781$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005782 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
5784
5785 if test "${enable_universalsdk}"; then
5786 UNIVERSAL_ARCH_FLAGS=""
5787 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5788 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5789 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005790 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5792 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005793 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005794 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795
5796 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5797 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005798 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005799 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005801 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5802 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005803 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005804 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005805
5806 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5807 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005808 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005809 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005810
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005812 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813
5814 fi
5815
5816
Ronald Oussoren666028b2010-04-18 19:07:43 +00005817 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5818 if test "${UNIVERSALSDK}" != "/"
5819 then
5820 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5821 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005822 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823 fi
5824 fi
5825
5826 # Calculate the right deployment target for this build.
5827 #
5828 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5829 if test ${cur_target} '>' 10.2; then
5830 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005831 if test ${enable_universalsdk}; then
5832 if test "${UNIVERSAL_ARCHS}" = "all"; then
5833 # Ensure that the default platform for a
5834 # 4-way universal build is OSX 10.5,
5835 # that's the first OS release where
5836 # 4-way builds make sense.
5837 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005838
5839 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5840 cur_target='10.5'
5841
5842 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5843 cur_target='10.5'
5844
5845 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5846 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005847 fi
5848 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005849 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005850 # On Intel macs default to a deployment
5851 # target of 10.4, that's the first OSX
5852 # release with Intel support.
5853 cur_target="10.4"
5854 fi
5855 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856 fi
5857 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5858
5859 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5860 # environment with a value that is the same as what we'll use
5861 # in the Makefile to ensure that we'll get the same compiler
5862 # environment during configure and build time.
5863 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5864 export MACOSX_DEPLOYMENT_TARGET
5865 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5866
5867 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868 esac
5869 ;;
5870
5871*)
5872 case $ac_sys_system in
5873 OpenUNIX*|UnixWare*)
5874 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5875 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 SCO_SV*)
5877 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5878 ;;
5879 esac
5880 ;;
5881esac
5882
5883if test "$Py_DEBUG" = 'true'; then
5884 :
5885else
5886 OPT="-DNDEBUG $OPT"
5887fi
5888
5889if test "$ac_arch_flags"
5890then
5891 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5892fi
5893
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894# Check whether GCC supports PyArg_ParseTuple format
5895if test "$GCC" = "yes"
5896then
Matthias Kloseb9621712010-04-24 17:59:49 +00005897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5898$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 save_CFLAGS=$CFLAGS
5900 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902/* end confdefs.h. */
5903
5904 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905int
5906main ()
5907{
5908
5909 ;
5910 return 0;
5911}
Matthias Kloseb159a552010-04-25 21:00:44 +00005912
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005914if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915
Matthias Kloseb159a552010-04-25 21:00:44 +00005916
Matthias Kloseb9621712010-04-24 17:59:49 +00005917$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918
Matthias Kloseb159a552010-04-25 21:00:44 +00005919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005920$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005921
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922else
Matthias Kloseb159a552010-04-25 21:00:44 +00005923
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005925$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926
5927fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929 CFLAGS=$save_CFLAGS
5930fi
5931
5932# On some compilers, pthreads are available without further options
5933# (e.g. MacOS X). On some of these systems, the compiler will not
5934# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5935# So we have to see first whether pthreads are available without
5936# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5938$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005939if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005940 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941else
Matthias Kloseb9621712010-04-24 17:59:49 +00005942 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 ac_cv_pthread_is_default=no
5944else
Matthias Kloseb9621712010-04-24 17:59:49 +00005945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946/* end confdefs.h. */
5947
5948#include <pthread.h>
5949
5950void* routine(void* p){return NULL;}
5951
5952int main(){
5953 pthread_t p;
5954 if(pthread_create(&p,NULL,routine,NULL)!=0)
5955 return 1;
5956 (void)pthread_detach(p);
5957 return 0;
5958}
5959
5960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005961if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962
5963 ac_cv_pthread_is_default=yes
5964 ac_cv_kthread=no
5965 ac_cv_pthread=no
5966
5967else
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5971 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972fi
5973
5974
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975fi
5976
Matthias Kloseb9621712010-04-24 17:59:49 +00005977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5978$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979
5980
5981if test $ac_cv_pthread_is_default = yes
5982then
5983 ac_cv_kpthread=no
5984else
5985# -Kpthread, if available, provides the right #defines
5986# and linker options to make pthread_create available
5987# Some compilers won't report that they do not support -Kpthread,
5988# so we need to run a program to see whether it really made the
5989# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5991$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005992if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005993 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994else
5995 ac_save_cc="$CC"
5996CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005997if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998 ac_cv_kpthread=no
5999else
Matthias Kloseb9621712010-04-24 17:59:49 +00006000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001/* end confdefs.h. */
6002
6003#include <pthread.h>
6004
6005void* routine(void* p){return NULL;}
6006
6007int main(){
6008 pthread_t p;
6009 if(pthread_create(&p,NULL,routine,NULL)!=0)
6010 return 1;
6011 (void)pthread_detach(p);
6012 return 0;
6013}
6014
6015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006016if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017 ac_cv_kpthread=yes
6018else
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6022 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023fi
6024
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025CC="$ac_save_cc"
6026fi
6027
Matthias Kloseb9621712010-04-24 17:59:49 +00006028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6029$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030fi
6031
6032if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6033then
6034# -Kthread, if available, provides the right #defines
6035# and linker options to make pthread_create available
6036# Some compilers won't report that they do not support -Kthread,
6037# so we need to run a program to see whether it really made the
6038# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6040$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006041if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043else
6044 ac_save_cc="$CC"
6045CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006046if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047 ac_cv_kthread=no
6048else
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050/* end confdefs.h. */
6051
6052#include <pthread.h>
6053
6054void* routine(void* p){return NULL;}
6055
6056int main(){
6057 pthread_t p;
6058 if(pthread_create(&p,NULL,routine,NULL)!=0)
6059 return 1;
6060 (void)pthread_detach(p);
6061 return 0;
6062}
6063
6064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006065if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066 ac_cv_kthread=yes
6067else
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6071 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072fi
6073
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074CC="$ac_save_cc"
6075fi
6076
Matthias Kloseb9621712010-04-24 17:59:49 +00006077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6078$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079fi
6080
6081if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6082then
6083# -pthread, if available, provides the right #defines
6084# and linker options to make pthread_create available
6085# Some compilers won't report that they do not support -pthread,
6086# so we need to run a program to see whether it really made the
6087# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6089$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006090if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092else
6093 ac_save_cc="$CC"
6094CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006095if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096 ac_cv_pthread=no
6097else
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099/* end confdefs.h. */
6100
6101#include <pthread.h>
6102
6103void* routine(void* p){return NULL;}
6104
6105int main(){
6106 pthread_t p;
6107 if(pthread_create(&p,NULL,routine,NULL)!=0)
6108 return 1;
6109 (void)pthread_detach(p);
6110 return 0;
6111}
6112
6113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006114if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006115 ac_cv_pthread=yes
6116else
Matthias Kloseb9621712010-04-24 17:59:49 +00006117 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6120 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006121fi
6122
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006123CC="$ac_save_cc"
6124fi
6125
Matthias Kloseb9621712010-04-24 17:59:49 +00006126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6127$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006128fi
6129
6130# If we have set a CC compiler flag for thread support then
6131# check if it works for CXX, too.
6132ac_cv_cxx_thread=no
6133if test ! -z "$CXX"
6134then
Matthias Kloseb9621712010-04-24 17:59:49 +00006135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6136$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137ac_save_cxx="$CXX"
6138
6139if test "$ac_cv_kpthread" = "yes"
6140then
6141 CXX="$CXX -Kpthread"
6142 ac_cv_cxx_thread=yes
6143elif test "$ac_cv_kthread" = "yes"
6144then
6145 CXX="$CXX -Kthread"
6146 ac_cv_cxx_thread=yes
6147elif test "$ac_cv_pthread" = "yes"
6148then
6149 CXX="$CXX -pthread"
6150 ac_cv_cxx_thread=yes
6151fi
6152
6153if test $ac_cv_cxx_thread = yes
6154then
6155 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6156 $CXX -c conftest.$ac_ext 2>&5
6157 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6158 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6159 then
6160 ac_cv_cxx_thread=yes
6161 else
6162 ac_cv_cxx_thread=no
6163 fi
6164 rm -fr conftest*
6165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6167$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168fi
6169CXX="$ac_save_cxx"
6170
6171
6172# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6174$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006175if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006176 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177else
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179/* end confdefs.h. */
6180#include <stdlib.h>
6181#include <stdarg.h>
6182#include <string.h>
6183#include <float.h>
6184
6185int
6186main ()
6187{
6188
6189 ;
6190 return 0;
6191}
6192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006193if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194 ac_cv_header_stdc=yes
6195else
Matthias Kloseb9621712010-04-24 17:59:49 +00006196 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006197fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6199
6200if test $ac_cv_header_stdc = yes; then
6201 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203/* end confdefs.h. */
6204#include <string.h>
6205
6206_ACEOF
6207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 $EGREP "memchr" >/dev/null 2>&1; then :
6209
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006210else
6211 ac_cv_header_stdc=no
6212fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006213rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214
6215fi
6216
6217if test $ac_cv_header_stdc = yes; then
6218 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220/* end confdefs.h. */
6221#include <stdlib.h>
6222
6223_ACEOF
6224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006225 $EGREP "free" >/dev/null 2>&1; then :
6226
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006227else
6228 ac_cv_header_stdc=no
6229fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006230rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231
6232fi
6233
6234if test $ac_cv_header_stdc = yes; then
6235 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006236 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237 :
6238else
Matthias Kloseb9621712010-04-24 17:59:49 +00006239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240/* end confdefs.h. */
6241#include <ctype.h>
6242#include <stdlib.h>
6243#if ((' ' & 0x0FF) == 0x020)
6244# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6245# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6246#else
6247# define ISLOWER(c) \
6248 (('a' <= (c) && (c) <= 'i') \
6249 || ('j' <= (c) && (c) <= 'r') \
6250 || ('s' <= (c) && (c) <= 'z'))
6251# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6252#endif
6253
6254#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6255int
6256main ()
6257{
6258 int i;
6259 for (i = 0; i < 256; i++)
6260 if (XOR (islower (i), ISLOWER (i))
6261 || toupper (i) != TOUPPER (i))
6262 return 2;
6263 return 0;
6264}
6265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006266if ac_fn_c_try_run "$LINENO"; then :
6267
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268else
Matthias Kloseb9621712010-04-24 17:59:49 +00006269 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006271rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6272 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273fi
6274
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006275fi
6276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6278$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279if test $ac_cv_header_stdc = yes; then
6280
Matthias Kloseb9621712010-04-24 17:59:49 +00006281$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282
6283fi
6284
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006285for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006286fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006287ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006288sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006289unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006290poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006291sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006292sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006293sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006294sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006295sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006296libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006297bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006298do :
6299 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6300ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006301if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006302 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006303#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006304_ACEOF
6305
6306fi
6307
Guido van Rossum627b2d71993-12-24 10:39:16 +00006308done
6309
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006310ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006311for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006312 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6314$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006315if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006316 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006317else
Matthias Kloseb9621712010-04-24 17:59:49 +00006318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006319/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006320#include <sys/types.h>
6321#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006322
Martin v. Löwis11437992002-04-12 09:54:03 +00006323int
6324main ()
6325{
6326if ((DIR *) 0)
6327return 0;
6328 ;
6329 return 0;
6330}
6331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006333 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006334else
Matthias Kloseb9621712010-04-24 17:59:49 +00006335 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006339eval ac_res=\$$as_ac_Header
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6341$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006342if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006343 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006344#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006345_ACEOF
6346
6347ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006348fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006349
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006350done
6351# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6352if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6354$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006355if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006356 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006357else
Martin v. Löwis11437992002-04-12 09:54:03 +00006358 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006362/* Override any GCC internal prototype to avoid an error.
6363 Use char because int might match the return type of a GCC
6364 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006365#ifdef __cplusplus
6366extern "C"
6367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006368char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006369int
6370main ()
6371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006372return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006373 ;
6374 return 0;
6375}
6376_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006377for ac_lib in '' dir; do
6378 if test -z "$ac_lib"; then
6379 ac_res="none required"
6380 else
6381 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006382 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006383 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006384 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006385 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006387rm -f core conftest.err conftest.$ac_objext \
6388 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006389 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006390 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006392done
Victor Stinnere0be4232011-10-25 13:06:09 +02006393if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006394
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006395else
6396 ac_cv_search_opendir=no
6397fi
6398rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006399LIBS=$ac_func_search_save_LIBS
6400fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6402$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006403ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006404if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006405 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006406
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006407fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006408
Michael W. Hudson54241132001-12-07 15:38:26 +00006409else
Matthias Kloseb9621712010-04-24 17:59:49 +00006410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6411$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006412if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006413 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006414else
6415 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006419/* Override any GCC internal prototype to avoid an error.
6420 Use char because int might match the return type of a GCC
6421 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006422#ifdef __cplusplus
6423extern "C"
6424#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006425char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006426int
6427main ()
6428{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006429return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006430 ;
6431 return 0;
6432}
6433_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006434for ac_lib in '' x; do
6435 if test -z "$ac_lib"; then
6436 ac_res="none required"
6437 else
6438 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006439 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006440 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006441 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006442 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006444rm -f core conftest.err conftest.$ac_objext \
6445 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006446 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006447 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006449done
Victor Stinnere0be4232011-10-25 13:06:09 +02006450if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006452else
6453 ac_cv_search_opendir=no
6454fi
6455rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006456LIBS=$ac_func_search_save_LIBS
6457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6459$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006460ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006461if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006462 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006463
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006464fi
6465
6466fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006467
Matthias Kloseb9621712010-04-24 17:59:49 +00006468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6469$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006470if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006471 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006472else
Matthias Kloseb9621712010-04-24 17:59:49 +00006473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006474/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006475#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006476int
6477main ()
6478{
6479return makedev(0, 0);
6480 ;
6481 return 0;
6482}
6483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006485 ac_cv_header_sys_types_h_makedev=yes
6486else
Matthias Kloseb9621712010-04-24 17:59:49 +00006487 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006489rm -f core conftest.err conftest.$ac_objext \
6490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006491
6492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6494$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006495
6496if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006497ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006498if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006499
Matthias Kloseb9621712010-04-24 17:59:49 +00006500$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006501
6502fi
6503
6504
6505
6506 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006507 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006508if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006509
Matthias Kloseb9621712010-04-24 17:59:49 +00006510$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006511
6512fi
6513
6514
6515 fi
6516fi
6517
Michael W. Hudson54241132001-12-07 15:38:26 +00006518
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006519# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6520for ac_header in net/if.h
6521do :
6522 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6523#ifdef STDC_HEADERS
6524# include <stdlib.h>
6525# include <stddef.h>
6526#else
6527# ifdef HAVE_STDLIB_H
6528# include <stdlib.h>
6529# endif
6530#endif
6531#ifdef HAVE_SYS_SOCKET_H
6532# include <sys/socket.h>
6533#endif
6534
6535"
Victor Stinnere0be4232011-10-25 13:06:09 +02006536if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006537 cat >>confdefs.h <<_ACEOF
6538#define HAVE_NET_IF_H 1
6539_ACEOF
6540
6541fi
6542
6543done
6544
6545
6546
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006547# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006548for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006549do :
6550 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006551#ifdef HAVE_CURSES_H
6552#include <curses.h>
6553#endif
6554
Matthias Kloseb9621712010-04-24 17:59:49 +00006555"
Victor Stinnere0be4232011-10-25 13:06:09 +02006556if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006557 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006558#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006559_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006560
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006561fi
6562
6563done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006564
6565
Martin v. Löwis11017b12006-01-14 18:12:57 +00006566# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006567for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006568do :
6569 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 +00006570#ifdef HAVE_ASM_TYPES_H
6571#include <asm/types.h>
6572#endif
6573#ifdef HAVE_SYS_SOCKET_H
6574#include <sys/socket.h>
6575#endif
6576
Matthias Kloseb9621712010-04-24 17:59:49 +00006577"
Victor Stinnere0be4232011-10-25 13:06:09 +02006578if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006579 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006580#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006581_ACEOF
6582
6583fi
6584
6585done
6586
6587
Charles-François Natali47413c12011-10-06 19:47:44 +02006588# On Linux, can.h and can/raw.h require sys/socket.h
6589for ac_header in linux/can.h linux/can/raw.h
6590do :
6591 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6592ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
6593#ifdef HAVE_SYS_SOCKET_H
6594#include <sys/socket.h>
6595#endif
6596
6597"
6598if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6599 cat >>confdefs.h <<_ACEOF
6600#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6601_ACEOF
6602
6603fi
6604
6605done
6606
6607
Guido van Rossum627b2d71993-12-24 10:39:16 +00006608# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006609was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6611$as_echo_n "checking for clock_t in time.h... " >&6; }
6612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006613/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006614#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006615
6616_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006618 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006619 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006620else
Martin v. Löwis11437992002-04-12 09:54:03 +00006621
6622
Matthias Kloseb9621712010-04-24 17:59:49 +00006623$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006624
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006625
Guido van Rossum627b2d71993-12-24 10:39:16 +00006626fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006627rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006628
Matthias Kloseb9621712010-04-24 17:59:49 +00006629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6630$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006631
Matthias Kloseb9621712010-04-24 17:59:49 +00006632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6633$as_echo_n "checking for makedev... " >&6; }
6634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006635/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006636
Jesus Cea740f53a2010-04-28 11:35:30 +00006637#if defined(MAJOR_IN_MKDEV)
6638#include <sys/mkdev.h>
6639#elif defined(MAJOR_IN_SYSMACROS)
6640#include <sys/sysmacros.h>
6641#else
6642#include <sys/types.h>
6643#endif
6644
Neal Norwitz11690112002-07-30 01:08:28 +00006645int
6646main ()
6647{
Jesus Cea740f53a2010-04-28 11:35:30 +00006648
6649 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006650 ;
6651 return 0;
6652}
Matthias Kloseb159a552010-04-25 21:00:44 +00006653
Neal Norwitz11690112002-07-30 01:08:28 +00006654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006655if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006656 ac_cv_has_makedev=yes
6657else
Matthias Kloseb9621712010-04-24 17:59:49 +00006658 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006660rm -f core conftest.err conftest.$ac_objext \
6661 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6663$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006664if test "$ac_cv_has_makedev" = "yes"; then
6665
Matthias Kloseb9621712010-04-24 17:59:49 +00006666$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006667
6668fi
6669
Martin v. Löwis399a6892002-10-04 10:22:02 +00006670# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6671# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6672# defined, but the compiler does not support pragma redefine_extname,
6673# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6674# structures (such as rlimit64) without declaring them. As a
6675# work-around, disable LFS on such configurations
6676
6677use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6679$as_echo_n "checking Solaris LFS bug... " >&6; }
6680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006681/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006682
6683#define _LARGEFILE_SOURCE 1
6684#define _FILE_OFFSET_BITS 64
6685#include <sys/resource.h>
6686
Martin v. Löwis399a6892002-10-04 10:22:02 +00006687int
6688main ()
6689{
6690struct rlimit foo;
6691 ;
6692 return 0;
6693}
6694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006696 sol_lfs_bug=no
6697else
Matthias Kloseb9621712010-04-24 17:59:49 +00006698 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6702$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006703if test "$sol_lfs_bug" = "yes"; then
6704 use_lfs=no
6705fi
6706
6707if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006708# Two defines needed to enable largefile support on various platforms
6709# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006710case $ac_sys_system/$ac_sys_release in
6711AIX*)
6712
6713$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6714
6715 ;;
6716esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006717
Matthias Kloseb9621712010-04-24 17:59:49 +00006718$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006719
6720
Matthias Kloseb9621712010-04-24 17:59:49 +00006721$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006722
Martin v. Löwis399a6892002-10-04 10:22:02 +00006723fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006724
Guido van Rossum84e7b241996-08-19 21:59:00 +00006725# Add some code to confdefs.h so that the test for off_t works on SCO
6726cat >> confdefs.h <<\EOF
6727#if defined(SCO_DS)
6728#undef _OFF_T
6729#endif
6730EOF
6731
Guido van Rossumef2255b2000-03-10 22:30:29 +00006732# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006733ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006734if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006735
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006736else
Martin v. Löwis11437992002-04-12 09:54:03 +00006737
6738cat >>confdefs.h <<_ACEOF
6739#define mode_t int
6740_ACEOF
6741
6742fi
6743
Matthias Kloseb9621712010-04-24 17:59:49 +00006744ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006745if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006746
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006747else
Martin v. Löwis11437992002-04-12 09:54:03 +00006748
6749cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006750#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006751_ACEOF
6752
6753fi
6754
Matthias Kloseb9621712010-04-24 17:59:49 +00006755ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006756if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006757
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006758else
Martin v. Löwis11437992002-04-12 09:54:03 +00006759
6760cat >>confdefs.h <<_ACEOF
6761#define pid_t int
6762_ACEOF
6763
6764fi
6765
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006766
Martin v. Löwis11437992002-04-12 09:54:03 +00006767cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006768#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006769_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006770
Matthias Kloseb9621712010-04-24 17:59:49 +00006771ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006772if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006773
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006774else
Martin v. Löwis11437992002-04-12 09:54:03 +00006775
6776cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006777#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006778_ACEOF
6779
6780fi
6781
Matthias Kloseb9621712010-04-24 17:59:49 +00006782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6783$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006784if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006785 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006786else
Matthias Kloseb9621712010-04-24 17:59:49 +00006787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006788/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006789#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006790
6791_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006794 ac_cv_type_uid_t=yes
6795else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006796 ac_cv_type_uid_t=no
6797fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006798rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006799
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6802$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006803if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006804
Matthias Kloseb9621712010-04-24 17:59:49 +00006805$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006806
6807
Matthias Kloseb9621712010-04-24 17:59:49 +00006808$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006809
6810fi
6811
Matthias Kloseb9621712010-04-24 17:59:49 +00006812ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6813case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006814 no|yes) ;; #(
6815 *)
6816
Matthias Kloseb9621712010-04-24 17:59:49 +00006817$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006818
6819
6820cat >>confdefs.h <<_ACEOF
6821#define uint32_t $ac_cv_c_uint32_t
6822_ACEOF
6823;;
6824 esac
6825
Matthias Kloseb9621712010-04-24 17:59:49 +00006826ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6827case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006828 no|yes) ;; #(
6829 *)
6830
Matthias Kloseb9621712010-04-24 17:59:49 +00006831$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006832
6833
6834cat >>confdefs.h <<_ACEOF
6835#define uint64_t $ac_cv_c_uint64_t
6836_ACEOF
6837;;
6838 esac
6839
Matthias Kloseb9621712010-04-24 17:59:49 +00006840ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6841case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006842 no|yes) ;; #(
6843 *)
6844
6845cat >>confdefs.h <<_ACEOF
6846#define int32_t $ac_cv_c_int32_t
6847_ACEOF
6848;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006849esac
6850
Matthias Kloseb9621712010-04-24 17:59:49 +00006851ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6852case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006853 no|yes) ;; #(
6854 *)
6855
6856cat >>confdefs.h <<_ACEOF
6857#define int64_t $ac_cv_c_int64_t
6858_ACEOF
6859;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006860esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006861
Matthias Kloseb9621712010-04-24 17:59:49 +00006862ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006863if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006864
Matthias Kloseb9621712010-04-24 17:59:49 +00006865$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006866
6867fi
6868
Stefan Krah1919b7e2012-03-21 18:25:23 +01006869ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
6870if test "x$ac_cv_type___uint128_t" = xyes; then :
6871
6872$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
6873
6874fi
6875
Jack Jansendd19cf82001-12-06 22:36:17 +00006876
Michael W. Hudson54241132001-12-07 15:38:26 +00006877# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006878# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006879# The cast to long int works around a bug in the HP C Compiler
6880# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6881# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6882# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6884$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006885if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006886 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006887else
Matthias Kloseb9621712010-04-24 17:59:49 +00006888 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 +00006889
Martin v. Löwis11437992002-04-12 09:54:03 +00006890else
Matthias Kloseb9621712010-04-24 17:59:49 +00006891 if test "$ac_cv_type_int" = yes; then
6892 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6893$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006894as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02006895See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006896 else
6897 ac_cv_sizeof_int=0
6898 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006900
Martin v. Löwis11437992002-04-12 09:54:03 +00006901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6903$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006904
6905
6906
Martin v. Löwis11437992002-04-12 09:54:03 +00006907cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006908#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006909_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006910
6911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006912# The cast to long int works around a bug in the HP C Compiler
6913# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6914# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6915# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6917$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006918if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006919 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006920else
Matthias Kloseb9621712010-04-24 17:59:49 +00006921 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 +00006922
Martin v. Löwis11437992002-04-12 09:54:03 +00006923else
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 if test "$ac_cv_type_long" = yes; then
6925 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6926$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006927as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02006928See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006929 else
6930 ac_cv_sizeof_long=0
6931 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006933
Martin v. Löwis11437992002-04-12 09:54:03 +00006934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6936$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006937
6938
6939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006941#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006942_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006943
6944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006945# The cast to long int works around a bug in the HP C Compiler
6946# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6947# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6948# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6950$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006951if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006952 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006953else
Matthias Kloseb9621712010-04-24 17:59:49 +00006954 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 +00006955
Martin v. Löwis11437992002-04-12 09:54:03 +00006956else
Matthias Kloseb9621712010-04-24 17:59:49 +00006957 if test "$ac_cv_type_void_p" = yes; then
6958 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6959$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006960as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02006961See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006962 else
6963 ac_cv_sizeof_void_p=0
6964 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006966
Martin v. Löwis11437992002-04-12 09:54:03 +00006967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6969$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006970
6971
6972
Martin v. Löwis11437992002-04-12 09:54:03 +00006973cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006974#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006975_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006976
6977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978# The cast to long int works around a bug in the HP C Compiler
6979# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6980# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6981# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6983$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006984if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006985 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006986else
Matthias Kloseb9621712010-04-24 17:59:49 +00006987 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 +00006988
Martin v. Löwis11437992002-04-12 09:54:03 +00006989else
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 if test "$ac_cv_type_short" = yes; then
6991 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6992$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006993as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02006994See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006995 else
6996 ac_cv_sizeof_short=0
6997 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006999
Martin v. Löwis11437992002-04-12 09:54:03 +00007000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7002$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007003
7004
7005
Martin v. Löwis11437992002-04-12 09:54:03 +00007006cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007007#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007008_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007009
7010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007011# The cast to long int works around a bug in the HP C Compiler
7012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7014# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7016$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007017if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007018 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007019else
Matthias Kloseb9621712010-04-24 17:59:49 +00007020 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 +00007021
Martin v. Löwis11437992002-04-12 09:54:03 +00007022else
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 if test "$ac_cv_type_float" = yes; then
7024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007026as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007027See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007028 else
7029 ac_cv_sizeof_float=0
7030 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007032
Martin v. Löwis11437992002-04-12 09:54:03 +00007033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7035$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007036
7037
7038
Martin v. Löwis11437992002-04-12 09:54:03 +00007039cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007040#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007041_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007042
7043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044# The cast to long int works around a bug in the HP C Compiler
7045# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7046# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7047# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7049$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007050if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007051 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007052else
Matthias Kloseb9621712010-04-24 17:59:49 +00007053 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 +00007054
Martin v. Löwis11437992002-04-12 09:54:03 +00007055else
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 if test "$ac_cv_type_double" = yes; then
7057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007059as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007060See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007061 else
7062 ac_cv_sizeof_double=0
7063 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007065
Martin v. Löwis11437992002-04-12 09:54:03 +00007066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7068$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007069
7070
7071
Martin v. Löwis11437992002-04-12 09:54:03 +00007072cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007073#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007074_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007075
7076
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +00007081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7082$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007083if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007084 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007085else
Matthias Kloseb9621712010-04-24 17:59:49 +00007086 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 +00007087
Martin v. Löwis11437992002-04-12 09:54:03 +00007088else
Matthias Kloseb9621712010-04-24 17:59:49 +00007089 if test "$ac_cv_type_fpos_t" = 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;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007092as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007093See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094 else
7095 ac_cv_sizeof_fpos_t=0
7096 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007098
Martin v. Löwis11437992002-04-12 09:54:03 +00007099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7101$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007102
7103
7104
Martin v. Löwis11437992002-04-12 09:54:03 +00007105cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007106#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007107_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007108
Michael W. Hudson54241132001-12-07 15:38:26 +00007109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007110# The cast to long int works around a bug in the HP C Compiler
7111# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7112# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7113# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7115$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007116if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007117 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007118else
Matthias Kloseb9621712010-04-24 17:59:49 +00007119 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 +00007120
Martin v. Löwis18e16552006-02-15 17:27:45 +00007121else
Matthias Kloseb9621712010-04-24 17:59:49 +00007122 if test "$ac_cv_type_size_t" = yes; then
7123 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007125as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007126See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007127 else
7128 ac_cv_sizeof_size_t=0
7129 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007131
Martin v. Löwis18e16552006-02-15 17:27:45 +00007132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7134$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007135
7136
7137
Martin v. Löwis18e16552006-02-15 17:27:45 +00007138cat >>confdefs.h <<_ACEOF
7139#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7140_ACEOF
7141
7142
Christian Heimes400adb02008-02-01 08:12:03 +00007143# The cast to long int works around a bug in the HP C Compiler
7144# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7145# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7146# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7148$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007149if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007150 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007151else
Matthias Kloseb9621712010-04-24 17:59:49 +00007152 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00007153
Christian Heimes400adb02008-02-01 08:12:03 +00007154else
Matthias Kloseb9621712010-04-24 17:59:49 +00007155 if test "$ac_cv_type_pid_t" = yes; then
7156 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007158as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007159See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007160 else
7161 ac_cv_sizeof_pid_t=0
7162 fi
7163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007164
Christian Heimes400adb02008-02-01 08:12:03 +00007165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7167$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007168
7169
7170
7171cat >>confdefs.h <<_ACEOF
7172#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7173_ACEOF
7174
7175
Michael W. Hudson54241132001-12-07 15:38:26 +00007176
Matthias Kloseb9621712010-04-24 17:59:49 +00007177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7178$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007179have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007181/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007182
Martin v. Löwis11437992002-04-12 09:54:03 +00007183int
7184main ()
7185{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007186long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007187 ;
7188 return 0;
7189}
7190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007191if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007192
7193
Matthias Kloseb9621712010-04-24 17:59:49 +00007194$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007195
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007196 have_long_long=yes
7197
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7201$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007202if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007203# The cast to long int works around a bug in the HP C Compiler
7204# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7205# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7206# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7208$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007209if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007210 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007211else
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 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 +00007213
Martin v. Löwis11437992002-04-12 09:54:03 +00007214else
Matthias Kloseb9621712010-04-24 17:59:49 +00007215 if test "$ac_cv_type_long_long" = yes; then
7216 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7217$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007218as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007219See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007220 else
7221 ac_cv_sizeof_long_long=0
7222 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007224
Martin v. Löwis11437992002-04-12 09:54:03 +00007225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7227$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007228
7229
7230
Martin v. Löwis11437992002-04-12 09:54:03 +00007231cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007232#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007233_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007234
Michael W. Hudson54241132001-12-07 15:38:26 +00007235
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007236fi
7237
Matthias Kloseb9621712010-04-24 17:59:49 +00007238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7239$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007240have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007242/* end confdefs.h. */
7243
7244int
7245main ()
7246{
7247long double x; x = (long double)0;
7248 ;
7249 return 0;
7250}
7251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007252if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007253
7254
Matthias Kloseb9621712010-04-24 17:59:49 +00007255$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007256
7257 have_long_double=yes
7258
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007259fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7262$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007263if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007264# The cast to long int works around a bug in the HP C Compiler
7265# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7266# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7267# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7269$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007270if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007271 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007272else
Matthias Kloseb9621712010-04-24 17:59:49 +00007273 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007274
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007275else
Matthias Kloseb9621712010-04-24 17:59:49 +00007276 if test "$ac_cv_type_long_double" = yes; then
7277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007279as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007280See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007281 else
7282 ac_cv_sizeof_long_double=0
7283 fi
7284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007285
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7288$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007289
7290
7291
7292cat >>confdefs.h <<_ACEOF
7293#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7294_ACEOF
7295
7296
7297fi
7298
7299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7301$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007302have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007304/* end confdefs.h. */
7305
7306int
7307main ()
7308{
7309_Bool x; x = (_Bool)0;
7310 ;
7311 return 0;
7312}
7313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007314if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007315
7316
Matthias Kloseb9621712010-04-24 17:59:49 +00007317$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007318
7319 have_c99_bool=yes
7320
Thomas Woutersb2137042007-02-01 18:02:27 +00007321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7324$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007325if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007326# The cast to long int works around a bug in the HP C Compiler
7327# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7328# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7329# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7331$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007332if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007333 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007334else
Matthias Kloseb9621712010-04-24 17:59:49 +00007335 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007336
Thomas Woutersb2137042007-02-01 18:02:27 +00007337else
Matthias Kloseb9621712010-04-24 17:59:49 +00007338 if test "$ac_cv_type__Bool" = yes; then
7339 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007341as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007342See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007343 else
7344 ac_cv_sizeof__Bool=0
7345 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007347
Thomas Woutersb2137042007-02-01 18:02:27 +00007348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7350$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007351
7352
7353
Thomas Woutersb2137042007-02-01 18:02:27 +00007354cat >>confdefs.h <<_ACEOF
7355#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7356_ACEOF
7357
7358
7359fi
7360
Matthias Kloseb9621712010-04-24 17:59:49 +00007361ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007362 #include <stdint.h>
7363 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007364 #ifdef HAVE_INTTYPES_H
7365 #include <inttypes.h>
7366 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007367"
Victor Stinnere0be4232011-10-25 13:06:09 +02007368if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007369
7370cat >>confdefs.h <<_ACEOF
7371#define HAVE_UINTPTR_T 1
7372_ACEOF
7373
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007374# The cast to long int works around a bug in the HP C Compiler
7375# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7376# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7377# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7379$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007380if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007381 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007382else
Matthias Kloseb9621712010-04-24 17:59:49 +00007383 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 +00007384
Martin v. Löwis11437992002-04-12 09:54:03 +00007385else
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 if test "$ac_cv_type_uintptr_t" = yes; then
7387 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7388$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007389as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007390See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007391 else
7392 ac_cv_sizeof_uintptr_t=0
7393 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007395
Martin v. Löwis11437992002-04-12 09:54:03 +00007396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7398$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007399
7400
7401
Martin v. Löwis11437992002-04-12 09:54:03 +00007402cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007403#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007404_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007405
Michael W. Hudson54241132001-12-07 15:38:26 +00007406
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007407fi
7408
Thomas Wouters89f507f2006-12-13 04:49:30 +00007409
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007410# The cast to long int works around a bug in the HP C Compiler
7411# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7412# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7413# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7415$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007416if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007417 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007418else
Matthias Kloseb9621712010-04-24 17:59:49 +00007419 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007420#ifdef HAVE_SYS_TYPES_H
7421#include <sys/types.h>
7422#endif
7423
Matthias Kloseb9621712010-04-24 17:59:49 +00007424"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007425
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007426else
Matthias Kloseb9621712010-04-24 17:59:49 +00007427 if test "$ac_cv_type_off_t" = yes; then
7428 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7429$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007430as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007431See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007432 else
7433 ac_cv_sizeof_off_t=0
7434 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007436
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7439$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007440
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007441
7442
Martin v. Löwis11437992002-04-12 09:54:03 +00007443cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007444#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007445_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007446
Michael W. Hudson54241132001-12-07 15:38:26 +00007447
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007448
Matthias Kloseb9621712010-04-24 17:59:49 +00007449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7450$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007451if test "$have_long_long" = yes
7452then
7453if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007454 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007455
Matthias Kloseb9621712010-04-24 17:59:49 +00007456$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007457
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7459$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007460else
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007463fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007464else
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7466$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007467fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007468
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007469# The cast to long int works around a bug in the HP C Compiler
7470# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7471# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7472# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7474$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007475if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007476 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007477else
Matthias Kloseb9621712010-04-24 17:59:49 +00007478 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007479#ifdef HAVE_SYS_TYPES_H
7480#include <sys/types.h>
7481#endif
7482#ifdef HAVE_TIME_H
7483#include <time.h>
7484#endif
7485
Matthias Kloseb9621712010-04-24 17:59:49 +00007486"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007487
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007488else
Matthias Kloseb9621712010-04-24 17:59:49 +00007489 if test "$ac_cv_type_time_t" = yes; then
7490 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007492as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007493See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007494 else
7495 ac_cv_sizeof_time_t=0
7496 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007498
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7501$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007502
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007503
7504
Martin v. Löwis11437992002-04-12 09:54:03 +00007505cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007506#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007507_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007508
Michael W. Hudson54241132001-12-07 15:38:26 +00007509
7510
Trent Mick635f6fb2000-08-23 21:33:05 +00007511# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007512ac_save_cc="$CC"
7513if test "$ac_cv_kpthread" = "yes"
7514then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007515elif test "$ac_cv_kthread" = "yes"
7516then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007517elif test "$ac_cv_pthread" = "yes"
7518then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007519fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007520
Matthias Kloseb9621712010-04-24 17:59:49 +00007521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7522$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007523have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007525/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007526
7527 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007528int
7529main ()
7530{
Guido van Rossum12580492000-09-24 16:47:19 +00007531pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007532 ;
7533 return 0;
7534}
Matthias Kloseb159a552010-04-25 21:00:44 +00007535
Martin v. Löwis11437992002-04-12 09:54:03 +00007536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007537if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007538 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7542$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007543if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007545# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7546# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7547# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7549$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007550if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007551 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007552else
Matthias Kloseb9621712010-04-24 17:59:49 +00007553 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007554#ifdef HAVE_PTHREAD_H
7555#include <pthread.h>
7556#endif
7557
Matthias Kloseb9621712010-04-24 17:59:49 +00007558"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007559
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007560else
Matthias Kloseb9621712010-04-24 17:59:49 +00007561 if test "$ac_cv_type_pthread_t" = yes; then
7562 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007564as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007565See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007566 else
7567 ac_cv_sizeof_pthread_t=0
7568 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007570
Trent Mick635f6fb2000-08-23 21:33:05 +00007571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7573$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007574
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007575
7576
Martin v. Löwis11437992002-04-12 09:54:03 +00007577cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007578#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007579_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007580
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007581
Trent Mick635f6fb2000-08-23 21:33:05 +00007582fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007583CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007584
Michael W. Hudson54241132001-12-07 15:38:26 +00007585
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007586case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007587 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007588 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7589 ;;
7590 Darwin/*)
7591 OTHER_LIBTOOL_OPT=""
7592 ;;
7593esac
7594
7595
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007596ARCH_RUN_32BIT=""
7597
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007598case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007599 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007600 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7601 if test "${enable_universalsdk}"; then
7602 :
7603 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007604 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007605 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007606 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007607 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007608 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007609 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007610 if test ${gcc_version} '<' 4.0
7611 then
7612 LIBTOOL_CRUFT="-lcc_dynamic"
7613 else
7614 LIBTOOL_CRUFT=""
7615 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007617 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007618else
Matthias Kloseb9621712010-04-24 17:59:49 +00007619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007620/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007621
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007622 #include <unistd.h>
7623 int main(int argc, char*argv[])
7624 {
7625 if (sizeof(long) == 4) {
7626 return 0;
7627 } else {
7628 return 1;
7629 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007630 }
7631
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007633if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007634 ac_osx_32bit=yes
7635else
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7639 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007640fi
7641
7642
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007643 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007644 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007645 i386)
7646 MACOSX_DEFAULT_ARCH="i386"
7647 ;;
7648 ppc)
7649 MACOSX_DEFAULT_ARCH="ppc"
7650 ;;
7651 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007652 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007653 ;;
7654 esac
7655 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007656 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007657 i386)
7658 MACOSX_DEFAULT_ARCH="x86_64"
7659 ;;
7660 ppc)
7661 MACOSX_DEFAULT_ARCH="ppc64"
7662 ;;
7663 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007664 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007665 ;;
7666 esac
7667
7668 #ARCH_RUN_32BIT="true"
7669 fi
7670
7671 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007672 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007673 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007674esac
7675
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7677$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007678if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007679then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007680 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007682 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007683
Matthias Kloseb9621712010-04-24 17:59:49 +00007684$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007685
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7687$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007688 if test $enable_shared = "yes"
7689 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007690 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00007691 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007692else
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7694$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007695fi
7696
Matthias Kloseb9621712010-04-24 17:59:49 +00007697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7698$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007699case $ac_sys_system/$ac_sys_release in
7700 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007701
Matthias Kloseb9621712010-04-24 17:59:49 +00007702$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007703
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7705$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007706 ;;
7707 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7709$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007710 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007711esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007712
Guido van Rossum0a516c91994-09-12 10:58:40 +00007713# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007714
Michael W. Hudson54241132001-12-07 15:38:26 +00007715
7716
7717
7718
Benjamin Peterson99f03762010-04-11 22:15:28 +00007719
Thomas Wouters477c8d52006-05-27 19:21:47 +00007720
Georg Brandlb1441c72009-01-03 22:33:39 +00007721
Thomas Wouters477c8d52006-05-27 19:21:47 +00007722cat >>confdefs.h <<_ACEOF
7723#define SHLIB_EXT "$SO"
7724_ACEOF
7725
Guido van Rossum0a516c91994-09-12 10:58:40 +00007726# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007727# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007728# (Shared libraries in this instance are shared modules to be loaded into
7729# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7731$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007732if test -z "$LDSHARED"
7733then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007734 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007735 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007736 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007737 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007738 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007739 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007740 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007742 if test "$GCC" = "yes" ; then
7743 LDSHARED='$(CC) -shared'
7744 LDCXXSHARED='$(CXX) -shared'
7745 else
7746 LDSHARED='$(CC) -G'
7747 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007748 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007749 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007750 if test "$GCC" = "yes" ; then
7751 LDSHARED='$(CC) -shared'
7752 LDCXXSHARED='$(CXX) -shared'
7753 else
7754 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007755 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007756 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007757 LDSHARED='$(CC) -bundle'
7758 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007759 if test "$enable_framework" ; then
7760 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007761 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7762 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007763 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007764 else
7765 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007766 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007767 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007768 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007769 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007770 LDSHARED='$(CC) -bundle'
7771 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007772 if test "$enable_framework" ; then
7773 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007774 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7775 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007776 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007777 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007778 # No framework, use the Python app as bundle-loader
7779 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007780 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007781 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007782 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007783 Darwin/*)
7784 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7785 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007786
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007787 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007788 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007789 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007790 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007791 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007792 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7793 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007794 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007795 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007796 LDSHARED='$(CC) -bundle'
7797 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007798 if test "$enable_framework" ; then
7799 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007800 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7801 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007802 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007803 else
7804 # No framework, use the Python app as bundle-loader
7805 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7806 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007807 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007808 fi
7809 fi
7810 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007811 Linux*|GNU*|QNX*)
7812 LDSHARED='$(CC) -shared'
7813 LDCXXSHARED='$(CXX) -shared';;
7814 BSD/OS*/4*)
7815 LDSHARED="gcc -shared"
7816 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007817 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007818 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007819 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007820 LDSHARED='$(CC) -shared'
7821 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007822 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007823 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007824 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007825 OpenBSD*)
7826 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7827 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007828 LDSHARED='$(CC) -shared $(CCSHARED)'
7829 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007830 else
7831 case `uname -r` in
7832 [01].* | 2.[0-7] | 2.[0-7].*)
7833 LDSHARED="ld -Bshareable ${LDFLAGS}"
7834 ;;
7835 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007836 LDSHARED='$(CC) -shared $(CCSHARED)'
7837 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007838 ;;
7839 esac
7840 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007841 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007842 LDSHARED='$(CC) -shared'
7843 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007844 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007845 if test "$GCC" = "yes" ; then
7846 LDSHARED='$(CC) -shared'
7847 LDCXXSHARED='$(CXX) -shared'
7848 else
7849 LDSHARED='$(CC) -G'
7850 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007851 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007852 SCO_SV*)
7853 LDSHARED='$(CC) -Wl,-G,-Bexport'
7854 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7855 CYGWIN*)
7856 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7857 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007858 *) LDSHARED="ld";;
7859 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7862$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007863LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007864BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007865# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007866# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7868$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007869if test -z "$CCSHARED"
7870then
Guido van Rossum07397971997-04-29 21:49:50 +00007871 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007872 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007873 then CCSHARED="-fPIC";
7874 elif test `uname -p` = sparc;
7875 then CCSHARED="-xcode=pic32";
7876 else CCSHARED="-Kpic";
7877 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007878 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007879 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007880 else CCSHARED="+z";
7881 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007882 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007883 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007884 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007885 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007886 if test "$GCC" = "yes"
7887 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007888 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007889 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007890 SCO_SV*)
7891 if test "$GCC" = "yes"
7892 then CCSHARED="-fPIC"
7893 else CCSHARED="-Kpic -belf"
7894 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007895 IRIX*/6*) case $CC in
7896 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007897 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007898 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007899 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7902$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007903# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007904# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7906$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007907if test -z "$LINKFORSHARED"
7908then
Guido van Rossum07397971997-04-29 21:49:50 +00007909 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007910 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007911 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007912 LINKFORSHARED="-Wl,-E -Wl,+s";;
7913# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007914 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007915 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007916 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007917 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007918 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007919 if test "$enable_framework"
7920 then
Jack Jansenda49e192005-01-07 13:08:22 +00007921 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007922 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007923 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007924 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007925 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007926 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007927 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007928 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7929 then
7930 LINKFORSHARED="-Wl,--export-dynamic"
7931 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007932 SunOS/5*) case $CC in
7933 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007934 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007935 then
7936 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007937 fi;;
7938 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007939 CYGWIN*)
7940 if test $enable_shared = "no"
7941 then
7942 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7943 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007944 QNX*)
7945 # -Wl,-E causes the symbols to be added to the dynamic
7946 # symbol table so that they can be found when a module
7947 # is loaded. -N 2048K causes the stack size to be set
7948 # to 2048 kilobytes so that the stack doesn't overflow
7949 # when running test_compile.py.
7950 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007951 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7954$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007955
Michael W. Hudson54241132001-12-07 15:38:26 +00007956
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007957
Matthias Kloseb9621712010-04-24 17:59:49 +00007958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7959$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007960if test ! "$LIBRARY" = "$LDLIBRARY"
7961then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007962 case $ac_sys_system in
7963 CYGWIN*)
7964 # Cygwin needs CCSHARED when building extension DLLs
7965 # but not when building the interpreter DLL.
7966 CFLAGSFORSHARED='';;
7967 *)
7968 CFLAGSFORSHARED='$(CCSHARED)'
7969 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7972$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007973
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007974# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7975# library (with --enable-shared).
7976# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007977# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7978# if it is not required, since it creates a dependency of the shared library
7979# to LIBS. This, in turn, means that applications linking the shared libpython
7980# don't need to link LIBS explicitly. The default should be only changed
7981# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007982
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7984$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007985case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007986 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007987 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007988esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7990$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007991
7992
Guido van Rossum627b2d71993-12-24 10:39:16 +00007993# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7995$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007996if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007997 $as_echo_n "(cached) " >&6
7998else
7999 ac_check_lib_save_LIBS=$LIBS
8000LIBS="-lsendfile $LIBS"
8001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8002/* end confdefs.h. */
8003
8004/* Override any GCC internal prototype to avoid an error.
8005 Use char because int might match the return type of a GCC
8006 builtin and then its argument prototype would still apply. */
8007#ifdef __cplusplus
8008extern "C"
8009#endif
8010char sendfile ();
8011int
8012main ()
8013{
8014return sendfile ();
8015 ;
8016 return 0;
8017}
8018_ACEOF
8019if ac_fn_c_try_link "$LINENO"; then :
8020 ac_cv_lib_sendfile_sendfile=yes
8021else
8022 ac_cv_lib_sendfile_sendfile=no
8023fi
8024rm -f core conftest.err conftest.$ac_objext \
8025 conftest$ac_exeext conftest.$ac_ext
8026LIBS=$ac_check_lib_save_LIBS
8027fi
8028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8029$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008030if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008031 cat >>confdefs.h <<_ACEOF
8032#define HAVE_LIBSENDFILE 1
8033_ACEOF
8034
8035 LIBS="-lsendfile $LIBS"
8036
8037fi
8038
Matthias Kloseb9621712010-04-24 17:59:49 +00008039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8040$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008041if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008042 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008043else
Martin v. Löwis11437992002-04-12 09:54:03 +00008044 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008045LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049/* Override any GCC internal prototype to avoid an error.
8050 Use char because int might match the return type of a GCC
8051 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008052#ifdef __cplusplus
8053extern "C"
8054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008055char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008056int
8057main ()
8058{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008059return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ;
8061 return 0;
8062}
8063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008064if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008066else
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008069rm -f core conftest.err conftest.$ac_objext \
8070 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008071LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8074$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008075if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008076 cat >>confdefs.h <<_ACEOF
8077#define HAVE_LIBDL 1
8078_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008079
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008080 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008082fi
8083 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8085$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008086if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008088else
Martin v. Löwis11437992002-04-12 09:54:03 +00008089 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008090LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008094/* Override any GCC internal prototype to avoid an error.
8095 Use char because int might match the return type of a GCC
8096 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008097#ifdef __cplusplus
8098extern "C"
8099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008100char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008101int
8102main ()
8103{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008105 ;
8106 return 0;
8107}
8108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008109if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008110 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008111else
Matthias Kloseb9621712010-04-24 17:59:49 +00008112 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008114rm -f core conftest.err conftest.$ac_objext \
8115 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008116LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8119$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008120if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 cat >>confdefs.h <<_ACEOF
8122#define HAVE_LIBDLD 1
8123_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008124
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008125 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008127fi
8128 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008129
Georg Brandlb1441c72009-01-03 22:33:39 +00008130# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008131if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8133$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008134if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008135 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008136else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008137 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008140
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008141/* Override any GCC internal prototype to avoid an error.
8142 Use char because int might match the return type of a GCC
8143 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008144#ifdef __cplusplus
8145extern "C"
8146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008147char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008148int
8149main ()
8150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 ;
8153 return 0;
8154}
8155_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008156for ac_lib in '' pthread rt posix4; do
8157 if test -z "$ac_lib"; then
8158 ac_res="none required"
8159 else
8160 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008161 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008166rm -f core conftest.err conftest.$ac_objext \
8167 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008168 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008169 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008171done
Victor Stinnere0be4232011-10-25 13:06:09 +02008172if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008174else
8175 ac_cv_search_sem_init=no
8176fi
8177rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008178LIBS=$ac_func_search_save_LIBS
8179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8181$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008182ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008183if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008184 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008185
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008186fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008187 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008188 # posix4 on Solaris 2.6
8189 # pthread (first!) on Linux
8190fi
8191
Martin v. Löwis19d17342003-06-14 21:03:05 +00008192# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8194$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008195if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008196 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008197else
8198 ac_check_lib_save_LIBS=$LIBS
8199LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008201/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203/* Override any GCC internal prototype to avoid an error.
8204 Use char because int might match the return type of a GCC
8205 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008206#ifdef __cplusplus
8207extern "C"
8208#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008209char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008210int
8211main ()
8212{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008214 ;
8215 return 0;
8216}
8217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008218if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008219 ac_cv_lib_intl_textdomain=yes
8220else
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008223rm -f core conftest.err conftest.$ac_objext \
8224 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008225LIBS=$ac_check_lib_save_LIBS
8226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8228$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008229if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008230
Matthias Kloseb9621712010-04-24 17:59:49 +00008231$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008232
Brett Cannonc6d936e2009-06-07 20:09:53 +00008233 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008234fi
8235
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008236
8237# checks for system dependent C++ extensions support
8238case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8240$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008242/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008243
Georg Brandl59e87bd2011-02-15 19:48:59 +00008244 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008245int
8246main ()
8247{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008248loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008249 ;
8250 return 0;
8251}
Matthias Kloseb159a552010-04-25 21:00:44 +00008252
Martin v. Löwis11437992002-04-12 09:54:03 +00008253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008254if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008255
Matthias Kloseb159a552010-04-25 21:00:44 +00008256
Matthias Kloseb9621712010-04-24 17:59:49 +00008257$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008258
Matthias Kloseb159a552010-04-25 21:00:44 +00008259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008260$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008261
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008262else
Matthias Kloseb159a552010-04-25 21:00:44 +00008263
8264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008265$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008266
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008268rm -f core conftest.err conftest.$ac_objext \
8269 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008270 *) ;;
8271esac
8272
Guido van Rossum70c7f481998-03-26 18:44:10 +00008273# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8275$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008276if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008278else
Martin v. Löwis11437992002-04-12 09:54:03 +00008279 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008280LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284/* Override any GCC internal prototype to avoid an error.
8285 Use char because int might match the return type of a GCC
8286 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008287#ifdef __cplusplus
8288extern "C"
8289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008290char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008291int
8292main ()
8293{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008294return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 ;
8296 return 0;
8297}
8298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008299if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008301else
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008304rm -f core conftest.err conftest.$ac_objext \
8305 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008306LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8309$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008310if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008311 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008312fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008313 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8315$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008316if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008318else
Martin v. Löwis11437992002-04-12 09:54:03 +00008319 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008320LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324/* Override any GCC internal prototype to avoid an error.
8325 Use char because int might match the return type of a GCC
8326 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008327#ifdef __cplusplus
8328extern "C"
8329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008330char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008331int
8332main ()
8333{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008334return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008335 ;
8336 return 0;
8337}
8338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008339if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008340 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008341else
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008344rm -f core conftest.err conftest.$ac_objext \
8345 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008346LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8349$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008350if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008351 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008352fi
8353 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8356$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008359if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008360 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8362$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008363LIBS="$withval $LIBS"
8364
8365else
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8367$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008368fi
8369
Guido van Rossum7f43da71994-08-01 12:15:30 +00008370
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008371if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008372 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8373set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8375$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008376if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008378else
8379 case $PKG_CONFIG in
8380 [\\/]* | ?:[\\/]*)
8381 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8382 ;;
8383 *)
8384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8385for as_dir in $PATH
8386do
8387 IFS=$as_save_IFS
8388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8391 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008393 break 2
8394 fi
8395done
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008397IFS=$as_save_IFS
8398
8399 ;;
8400esac
8401fi
8402PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8403if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8405$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008406else
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8408$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008409fi
8410
8411
8412fi
8413if test -z "$ac_cv_path_PKG_CONFIG"; then
8414 ac_pt_PKG_CONFIG=$PKG_CONFIG
8415 # Extract the first word of "pkg-config", so it can be a program name with args.
8416set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8418$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008419if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008420 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008421else
8422 case $ac_pt_PKG_CONFIG in
8423 [\\/]* | ?:[\\/]*)
8424 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8425 ;;
8426 *)
8427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8428for as_dir in $PATH
8429do
8430 IFS=$as_save_IFS
8431 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008432 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008433 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8434 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008436 break 2
8437 fi
8438done
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008440IFS=$as_save_IFS
8441
8442 ;;
8443esac
8444fi
8445ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8446if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8448$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008449else
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8451$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008452fi
8453
8454 if test "x$ac_pt_PKG_CONFIG" = x; then
8455 PKG_CONFIG=""
8456 else
8457 case $cross_compiling:$ac_tool_warned in
8458yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008459{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8460$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008461ac_tool_warned=yes ;;
8462esac
8463 PKG_CONFIG=$ac_pt_PKG_CONFIG
8464 fi
8465else
8466 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8467fi
8468
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008469
8470# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8472$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008473
8474# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008475if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008476 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008477else
8478 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008479fi
8480
8481
Matthias Kloseb9621712010-04-24 17:59:49 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8483$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008484
8485# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8487$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008488
8489# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008490if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008491 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008492else
8493 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008494fi
8495
8496
8497if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008498 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8499else
8500 LIBFFI_INCLUDEDIR=""
8501fi
8502
8503
Matthias Kloseb9621712010-04-24 17:59:49 +00008504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8505$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008506
Stefan Krah60187b52012-03-23 19:06:27 +01008507# Check for use of the system libmpdec library
8508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
8509$as_echo_n "checking for --with-system-libmpdec... " >&6; }
8510
8511# Check whether --with-system_libmpdec was given.
8512if test "${with_system_libmpdec+set}" = set; then :
8513 withval=$with_system_libmpdec;
8514else
8515 with_system_libmpdec="no"
8516fi
8517
8518
8519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
8520$as_echo "$with_system_libmpdec" >&6; }
8521
Benjamin Peterson076ed002010-10-31 17:11:02 +00008522# Check for support for loadable sqlite extensions
8523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8524$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8525# Check whether --enable-loadable-sqlite-extensions was given.
8526if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8527 enableval=$enable_loadable_sqlite_extensions;
8528else
8529 enable_loadable_sqlite_extensions="no"
8530fi
8531
8532
8533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8534$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8535
Matthias Klose55708cc2009-04-30 08:06:49 +00008536# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8538$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008539
8540# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008541if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008542 withval=$with_dbmliborder;
8543if test x$with_dbmliborder = xyes
8544then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008545as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008546else
8547 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8548 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8549 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008550 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008551 fi
8552 done
8553fi
8554fi
8555
Matthias Kloseb9621712010-04-24 17:59:49 +00008556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8557$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008558
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008559# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008560
8561
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8563$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008566if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567 withval=$with_signal_module;
8568fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008569
8570
8571if test -z "$with_signal_module"
8572then with_signal_module="yes"
8573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8575$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008576
8577if test "${with_signal_module}" = "yes"; then
8578 USE_SIGNAL_MODULE=""
8579 SIGNAL_OBJS=""
8580else
8581 USE_SIGNAL_MODULE="#"
8582 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8583fi
8584
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008585# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008586
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008587USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589
Martin v. Löwis11437992002-04-12 09:54:03 +00008590
8591# Templates for things AC_DEFINEd more than once.
8592# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008593
8594
Martin v. Löwis11437992002-04-12 09:54:03 +00008595
Matthias Kloseb9621712010-04-24 17:59:49 +00008596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8597$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008600if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601 withval=$with_threads;
8602fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008603
8604
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008605# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008608if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609 withval=$with_thread; with_threads=$with_thread
8610fi
8611
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008612
8613if test -z "$with_threads"
8614then with_threads="yes"
8615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8617$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008618
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008619
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008620if test "$with_threads" = "no"
8621then
8622 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008623elif test "$ac_cv_pthread_is_default" = yes
8624then
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008626
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008627 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008628 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008629
8630 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008632elif test "$ac_cv_kpthread" = "yes"
8633then
8634 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008635 if test "$ac_cv_cxx_thread" = "yes"; then
8636 CXX="$CXX -Kpthread"
8637 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008639
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008640 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008641 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008642elif test "$ac_cv_kthread" = "yes"
8643then
8644 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008645 if test "$ac_cv_cxx_thread" = "yes"; then
8646 CXX="$CXX -Kthread"
8647 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008649
8650 posix_threads=yes
8651 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008652elif test "$ac_cv_pthread" = "yes"
8653then
8654 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008655 if test "$ac_cv_cxx_thread" = "yes"; then
8656 CXX="$CXX -pthread"
8657 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008659
8660 posix_threads=yes
8661 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008662else
8663 if test ! -z "$with_threads" -a -d "$with_threads"
8664 then LDFLAGS="$LDFLAGS -L$with_threads"
8665 fi
8666 if test ! -z "$withval" -a -d "$withval"
8667 then LDFLAGS="$LDFLAGS -L$withval"
8668 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008669
8670 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008671 # define _POSIX_THREADS in unistd.h. Some apparently don't
8672 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8674$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008676/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008677
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008678#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008679#ifdef _POSIX_THREADS
8680yes
8681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008682
8683_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008686 unistd_defines_pthreads=yes
8687else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008688 unistd_defines_pthreads=no
8689fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008690rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008691
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8693$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008694
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008696
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008697 # Just looking for pthread_create in libpthread is not enough:
8698 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8699 # So we really have to include pthread.h, and then link.
8700 _libs=$LIBS
8701 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8703$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008705/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008706#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008707
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008708void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008709int
8710main ()
8711{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008712
8713pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 ;
8715 return 0;
8716}
8717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008718if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008719
Matthias Kloseb9621712010-04-24 17:59:49 +00008720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8721$as_echo "yes" >&6; }
8722 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008723
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008724 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008725 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008726else
Martin v. Löwis11437992002-04-12 09:54:03 +00008727
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008728 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02008730if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008732
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008733 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008734 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008735else
Guido van Rossumad678af1998-10-02 14:42:15 +00008736
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8738$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008739if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008741else
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008743LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008746
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008747/* Override any GCC internal prototype to avoid an error.
8748 Use char because int might match the return type of a GCC
8749 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008750#ifdef __cplusplus
8751extern "C"
8752#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008753char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008754int
8755main ()
8756{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 ;
8759 return 0;
8760}
8761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008762if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008763 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008764else
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008767rm -f core conftest.err conftest.$ac_objext \
8768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008769LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8772$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008773if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008775
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008776 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008777 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008778 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008779else
Greg Steinadf63d62000-07-05 10:38:09 +00008780
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8782$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008783if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008785else
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008787LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008791/* Override any GCC internal prototype to avoid an error.
8792 Use char because int might match the return type of a GCC
8793 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008794#ifdef __cplusplus
8795extern "C"
8796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008797char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008798int
8799main ()
8800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008801return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008802 ;
8803 return 0;
8804}
8805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008806if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008808else
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008811rm -f core conftest.err conftest.$ac_objext \
8812 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008813LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8816$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008817if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008819
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008820 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008821 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008822 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008823else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008824
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8826$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008827if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008829else
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008831LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835/* Override any GCC internal prototype to avoid an error.
8836 Use char because int might match the return type of a GCC
8837 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008838#ifdef __cplusplus
8839extern "C"
8840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008841char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008842int
8843main ()
8844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008846 ;
8847 return 0;
8848}
8849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008850if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008852else
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008855rm -f core conftest.err conftest.$ac_objext \
8856 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008857LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8860$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008861if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008863
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008864 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008865 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008866 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008867else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008868
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8870$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008871if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008873else
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008875LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879/* Override any GCC internal prototype to avoid an error.
8880 Use char because int might match the return type of a GCC
8881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008882#ifdef __cplusplus
8883extern "C"
8884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008885char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008886int
8887main ()
8888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008889return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 ;
8891 return 0;
8892}
8893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008896else
Matthias Kloseb9621712010-04-24 17:59:49 +00008897 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008899rm -f core conftest.err conftest.$ac_objext \
8900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008901LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8904$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008905if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008907
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008908 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008909 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008910 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008911else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008912
Martin v. Löwis130fb172001-07-19 11:00:41 +00008913 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008914fi
8915
Guido van Rossum627b2d71993-12-24 10:39:16 +00008916
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008917fi
8918
Guido van Rossum0be3e491997-05-22 20:33:33 +00008919fi
8920
Guido van Rossum49545951997-12-02 19:28:29 +00008921fi
8922
Guido van Rossumb93a8621998-05-07 13:27:32 +00008923fi
8924
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008926rm -f core conftest.err conftest.$ac_objext \
8927 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008928
Matthias Kloseb9621712010-04-24 17:59:49 +00008929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8930$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008931if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008933else
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008935LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008939/* Override any GCC internal prototype to avoid an error.
8940 Use char because int might match the return type of a GCC
8941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008942#ifdef __cplusplus
8943extern "C"
8944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008945char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008946int
8947main ()
8948{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008950 ;
8951 return 0;
8952}
8953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008954if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008955 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008956else
Matthias Kloseb9621712010-04-24 17:59:49 +00008957 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008959rm -f core conftest.err conftest.$ac_objext \
8960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008961LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8964$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008965if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008967
Martin v. Löwis130fb172001-07-19 11:00:41 +00008968 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008969 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008970 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008971fi
8972
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008973
Neal Norwitza978ab02002-11-02 16:58:05 +00008974 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8976$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008977if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008979else
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008981LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008985/* Override any GCC internal prototype to avoid an error.
8986 Use char because int might match the return type of a GCC
8987 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008988#ifdef __cplusplus
8989extern "C"
8990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008991char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008992int
8993main ()
8994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008995return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008996 ;
8997 return 0;
8998}
8999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009000if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009002else
Matthias Kloseb9621712010-04-24 17:59:49 +00009003 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009005rm -f core conftest.err conftest.$ac_objext \
9006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009007LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9010$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009011if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009013
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009014 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009015 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009016 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009017fi
9018
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009019 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009020fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009021
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009022if test "$posix_threads" = "yes"; then
9023 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009024
Matthias Kloseb9621712010-04-24 17:59:49 +00009025$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009026
9027 fi
9028
9029 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9030 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009031 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009032$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009033
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009034 ;;
9035 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009036$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009037
9038 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009039 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009040$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009041
9042 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009043 esac
9044
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9046$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009047 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009049else
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009051 ac_cv_pthread_system_supported=no
9052else
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009054/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009055#include <pthread.h>
9056 void *foo(void *parm) {
9057 return NULL;
9058 }
9059 main() {
9060 pthread_attr_t attr;
9061 pthread_t id;
9062 if (pthread_attr_init(&attr)) exit(-1);
9063 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9064 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9065 exit(0);
9066 }
9067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009068if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009069 ac_cv_pthread_system_supported=yes
9070else
Matthias Kloseb9621712010-04-24 17:59:49 +00009071 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9074 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009075fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009077
Guido van Rossum627b2d71993-12-24 10:39:16 +00009078fi
9079
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9081$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009082 if test "$ac_cv_pthread_system_supported" = "yes"; then
9083
Matthias Kloseb9621712010-04-24 17:59:49 +00009084$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009085
9086 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009087 for ac_func in pthread_sigmask
9088do :
9089 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009090if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009091 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009092#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009093_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009094 case $ac_sys_system in
9095 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009096
Matthias Kloseb9621712010-04-24 17:59:49 +00009097$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009098
9099 ;;
9100 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009101fi
9102done
9103
9104fi
9105
9106
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009107# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009108
Matthias Kloseb9621712010-04-24 17:59:49 +00009109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9110$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009111# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009112if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009113 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009114 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9116$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117 ipv6=no
9118 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9120$as_echo "yes" >&6; }
9121 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009122
9123 ipv6=yes
9124 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009126else
Martin v. Löwis11437992002-04-12 09:54:03 +00009127
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009129
Matthias Kloseb9621712010-04-24 17:59:49 +00009130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9131$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009132 ipv6=no
9133
9134else
Matthias Kloseb9621712010-04-24 17:59:49 +00009135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009136/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009137 /* AF_INET6 available check */
9138#include <sys/types.h>
9139#include <sys/socket.h>
9140main()
9141{
9142 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9143 exit(1);
9144 else
9145 exit(0);
9146}
9147
Martin v. Löwis11437992002-04-12 09:54:03 +00009148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009149if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9152$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009153 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009154
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009155else
Matthias Kloseb159a552010-04-25 21:00:44 +00009156
Matthias Kloseb9621712010-04-24 17:59:49 +00009157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009159 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009160
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9163 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009164fi
9165
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009166
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009167if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9169$as_echo_n "checking if RFC2553 API is available... " >&6; }
9170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009171/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009172
9173 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009174#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009175int
9176main ()
9177{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009178struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009179 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 ;
9181 return 0;
9182}
Matthias Kloseb159a552010-04-25 21:00:44 +00009183
Martin v. Löwis11437992002-04-12 09:54:03 +00009184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009185if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009186
9187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009188$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009189 ipv6=yes
9190
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009191else
Matthias Kloseb159a552010-04-25 21:00:44 +00009192
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009194$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009195 ipv6=no
9196
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009199fi
9200
9201if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009202 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009203
9204fi
9205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206fi
9207
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009208
9209ipv6type=unknown
9210ipv6lib=none
9211ipv6trylibc=no
9212
9213if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9215$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009216 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9217 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009218 case $i in
9219 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009221/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009222
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009223#include <netinet/in.h>
9224#ifdef IPV6_INRIA_VERSION
9225yes
9226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009227_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009228if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009229 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009230 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009231fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009232rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009233
9234 ;;
9235 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009237/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009238
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009239#include <netinet/in.h>
9240#ifdef __KAME__
9241yes
9242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009243_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009245 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009246 ipv6type=$i;
9247 ipv6lib=inet6
9248 ipv6libdir=/usr/local/v6/lib
9249 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009250fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009251rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009252
9253 ;;
9254 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +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 <features.h>
9259#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
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 Kloseb9621712010-04-24 17:59:49 +00009264 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009265 ipv6type=$i;
9266 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009267fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009268rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009269
9270 ;;
9271 linux-inet6)
9272 if test -d /usr/inet6; then
9273 ipv6type=$i
9274 ipv6lib=inet6
9275 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009276 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009277 fi
9278 ;;
9279 solaris)
9280 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009281 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009282 ipv6type=$i
9283 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009284 fi
9285 fi
9286 ;;
9287 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009289/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009290
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009291#include <sys/param.h>
9292#ifdef _TOSHIBA_INET6
9293yes
9294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009295_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009296if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009297 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009298 ipv6type=$i;
9299 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009300 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009301fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009302rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009303
9304 ;;
9305 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009307/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009308
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009309#include </usr/local/v6/include/sys/v6config.h>
9310#ifdef __V6D__
9311yes
9312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009313_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009316 ipv6type=$i;
9317 ipv6lib=v6;
9318 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009319 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009320fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009321rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009322
9323 ;;
9324 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009326/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009327
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009328#include <sys/param.h>
9329#ifdef _ZETA_MINAMI_INET6
9330yes
9331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009332_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009334 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009335 ipv6type=$i;
9336 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009337 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009338fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009339rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009340
9341 ;;
9342 esac
9343 if test "$ipv6type" != "unknown"; then
9344 break
9345 fi
9346 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9348$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009349fi
9350
9351if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9352 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9353 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9354 echo "using lib$ipv6lib"
9355 else
9356 if test $ipv6trylibc = "yes"; then
9357 echo "using libc"
9358 else
9359 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9360 echo "You need to fetch lib$ipv6lib.a from appropriate"
9361 echo 'ipv6 kit and compile beforehand.'
9362 exit 1
9363 fi
9364 fi
9365fi
9366
Matthias Kloseb9621712010-04-24 17:59:49 +00009367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9368$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009370/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009371
9372 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009373int
9374main ()
9375{
9376FSIORefNum fRef = 0
9377 ;
9378 return 0;
9379}
Matthias Kloseb159a552010-04-25 21:00:44 +00009380
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009382if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009383
Matthias Kloseb159a552010-04-25 21:00:44 +00009384
Matthias Kloseb9621712010-04-24 17:59:49 +00009385$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009386
Matthias Kloseb9621712010-04-24 17:59:49 +00009387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9388$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009389
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009390else
Matthias Kloseb159a552010-04-25 21:00:44 +00009391
Matthias Kloseb9621712010-04-24 17:59:49 +00009392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9393$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009394
9395fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9397
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009398# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9400$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009402# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009403if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404 withval=$with_doc_strings;
9405fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009406
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009407
9408if test -z "$with_doc_strings"
9409then with_doc_strings="yes"
9410fi
9411if test "$with_doc_strings" != "no"
9412then
9413
Matthias Kloseb9621712010-04-24 17:59:49 +00009414$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009415
9416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9418$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009419
Antoine Pitrou042b1282010-08-13 21:15:58 +00009420# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9422$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009425if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009427if test "$withval" != no
9428then
9429
Matthias Kloseb9621712010-04-24 17:59:49 +00009430$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009431
Matthias Kloseb9621712010-04-24 17:59:49 +00009432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9433$as_echo "yes" >&6; }
9434else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9435$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009436fi
9437else
Matthias Kloseb9621712010-04-24 17:59:49 +00009438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9439$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009440fi
9441
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009442
9443# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9445$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009447# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009448if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009449 withval=$with_pymalloc;
9450fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009451
Neil Schemenauera35c6882001-02-27 04:45:05 +00009452
Neil Schemenauer16c22972002-03-22 15:34:49 +00009453if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009454then
9455 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009456 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009457fi
9458if test "$with_pymalloc" != "no"
9459then
Martin v. Löwis11437992002-04-12 09:54:03 +00009460
Matthias Kloseb9621712010-04-24 17:59:49 +00009461$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009462
9463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9465$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009466
Benjamin Peterson05159c42009-12-03 03:01:27 +00009467# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9469$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009470
9471# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009472if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009473 withval=$with_valgrind;
9474else
9475 with_valgrind=no
9476fi
9477
Matthias Kloseb9621712010-04-24 17:59:49 +00009478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9479$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009480if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009481 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02009482if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009483
Matthias Kloseb9621712010-04-24 17:59:49 +00009484$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009485
9486else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009487 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009488
9489fi
9490
9491
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009492 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009493fi
9494
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009495# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009496
Guido van Rossum98935bf2001-09-05 19:13:16 +00009497DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009498
Guido van Rossume97ee181999-12-20 21:27:22 +00009499# the dlopen() function means we might want to use dynload_shlib.o. some
9500# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009501for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009502do :
9503 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +02009504if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009506#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009507_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009508
Guido van Rossume97ee181999-12-20 21:27:22 +00009509fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009510done
Guido van Rossume97ee181999-12-20 21:27:22 +00009511
Michael W. Hudson54241132001-12-07 15:38:26 +00009512
Guido van Rossume97ee181999-12-20 21:27:22 +00009513# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9514# loading of modules.
9515
Matthias Kloseb9621712010-04-24 17:59:49 +00009516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9517$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009518if test -z "$DYNLOADFILE"
9519then
9520 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009521 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9522 if test "$ac_cv_func_dlopen" = yes
9523 then DYNLOADFILE="dynload_shlib.o"
9524 else DYNLOADFILE="dynload_aix.o"
9525 fi
9526 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009527 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009528 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9529 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009530 *)
9531 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9532 # out any dynamic loading
9533 if test "$ac_cv_func_dlopen" = yes
9534 then DYNLOADFILE="dynload_shlib.o"
9535 else DYNLOADFILE="dynload_stub.o"
9536 fi
9537 ;;
9538 esac
9539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9541$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009542if test "$DYNLOADFILE" != "dynload_stub.o"
9543then
Martin v. Löwis11437992002-04-12 09:54:03 +00009544
Matthias Kloseb9621712010-04-24 17:59:49 +00009545$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009546
9547fi
9548
Neil Schemenauer4e425612001-06-19 15:44:15 +00009549# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9550
Michael W. Hudson54241132001-12-07 15:38:26 +00009551
Matthias Kloseb9621712010-04-24 17:59:49 +00009552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9553$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009554if test -z "$MACHDEP_OBJS"
9555then
Jack Jansene578a632001-08-15 01:27:14 +00009556 MACHDEP_OBJS=$extra_machdep_objs
9557else
9558 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9561$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009562
Guido van Rossum627b2d71993-12-24 10:39:16 +00009563# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009564for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -08009565 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009566 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009567 futimens futimes gai_strerror \
9568 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009569 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009570 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +01009571 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
9572 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009573 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009574 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009575 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009576 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009577 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009578 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009579 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9580 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009581 sigaction sigaltstack siginterrupt sigpending sigrelse \
9582 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009583 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009584 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9585 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009586do :
9587 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9588ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009589if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009591#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009592_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009593
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009594fi
9595done
9596
Michael W. Hudson54241132001-12-07 15:38:26 +00009597
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009598ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9599 #include <dirent.h>
9600"
9601if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9602
9603$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9604
9605fi
9606
9607
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009608# For some functions, having a definition is not sufficient, since
9609# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9611$as_echo_n "checking for chroot... " >&6; }
9612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009613/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009614#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009615int
9616main ()
9617{
9618void *x=chroot
9619 ;
9620 return 0;
9621}
9622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009624
Matthias Kloseb9621712010-04-24 17:59:49 +00009625$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009626
Matthias Kloseb159a552010-04-25 21:00:44 +00009627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009628$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009629else
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9631$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009632
9633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9636$as_echo_n "checking for link... " >&6; }
9637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009638/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009639#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009640int
9641main ()
9642{
9643void *x=link
9644 ;
9645 return 0;
9646}
9647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009649
Matthias Kloseb9621712010-04-24 17:59:49 +00009650$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009651
Matthias Kloseb159a552010-04-25 21:00:44 +00009652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009653$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009654else
Matthias Kloseb9621712010-04-24 17:59:49 +00009655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9656$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009657
9658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9661$as_echo_n "checking for symlink... " >&6; }
9662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009664#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009665int
9666main ()
9667{
9668void *x=symlink
9669 ;
9670 return 0;
9671}
9672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009673if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009674
Matthias Kloseb9621712010-04-24 17:59:49 +00009675$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009676
Matthias Kloseb159a552010-04-25 21:00:44 +00009677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009678$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009679else
Matthias Kloseb9621712010-04-24 17:59:49 +00009680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9681$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009682
9683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9686$as_echo_n "checking for fchdir... " >&6; }
9687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009688/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009689#include <unistd.h>
9690int
9691main ()
9692{
9693void *x=fchdir
9694 ;
9695 return 0;
9696}
9697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009698if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009699
Matthias Kloseb9621712010-04-24 17:59:49 +00009700$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009701
Matthias Kloseb159a552010-04-25 21:00:44 +00009702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009703$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009704else
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9706$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009707
9708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9711$as_echo_n "checking for fsync... " >&6; }
9712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009713/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009714#include <unistd.h>
9715int
9716main ()
9717{
9718void *x=fsync
9719 ;
9720 return 0;
9721}
9722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009723if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009724
Matthias Kloseb9621712010-04-24 17:59:49 +00009725$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009726
Matthias Kloseb159a552010-04-25 21:00:44 +00009727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009728$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009729else
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009732
9733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9736$as_echo_n "checking for fdatasync... " >&6; }
9737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009738/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009739#include <unistd.h>
9740int
9741main ()
9742{
9743void *x=fdatasync
9744 ;
9745 return 0;
9746}
9747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009748if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009749
Matthias Kloseb9621712010-04-24 17:59:49 +00009750$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009751
Matthias Kloseb159a552010-04-25 21:00:44 +00009752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009753$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009754else
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009757
9758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9761$as_echo_n "checking for epoll... " >&6; }
9762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009763/* end confdefs.h. */
9764#include <sys/epoll.h>
9765int
9766main ()
9767{
9768void *x=epoll_create
9769 ;
9770 return 0;
9771}
9772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009773if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009774
Matthias Kloseb9621712010-04-24 17:59:49 +00009775$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009776
Matthias Kloseb159a552010-04-25 21:00:44 +00009777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009778$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009779else
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9781$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009782
9783fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -06009785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
9786$as_echo_n "checking for epoll_create1... " >&6; }
9787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9788/* end confdefs.h. */
9789#include <sys/epoll.h>
9790int
9791main ()
9792{
9793void *x=epoll_create1
9794 ;
9795 return 0;
9796}
9797_ACEOF
9798if ac_fn_c_try_compile "$LINENO"; then :
9799
9800$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
9801
9802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9803$as_echo "yes" >&6; }
9804else
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806$as_echo "no" >&6; }
9807
9808fi
9809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9811$as_echo_n "checking for kqueue... " >&6; }
9812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009813/* end confdefs.h. */
9814
9815#include <sys/types.h>
9816#include <sys/event.h>
9817
9818int
9819main ()
9820{
9821int x=kqueue()
9822 ;
9823 return 0;
9824}
9825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009826if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009827
Matthias Kloseb9621712010-04-24 17:59:49 +00009828$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009829
Matthias Kloseb159a552010-04-25 21:00:44 +00009830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009831$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009832else
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9834$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009835
9836fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009838# On some systems (eg. FreeBSD 5), we would find a definition of the
9839# functions ctermid_r, setgroups in the library, but no prototype
9840# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9841# address to avoid compiler warnings and potential miscompilations
9842# because of the missing prototypes.
9843
Matthias Kloseb9621712010-04-24 17:59:49 +00009844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9845$as_echo_n "checking for ctermid_r... " >&6; }
9846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009847/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009848
Martin v. Löwisd5843682002-11-21 20:41:28 +00009849#include <stdio.h>
9850
Martin v. Löwisd5843682002-11-21 20:41:28 +00009851int
9852main ()
9853{
9854void* p = ctermid_r
9855 ;
9856 return 0;
9857}
9858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009859if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009860
Matthias Kloseb9621712010-04-24 17:59:49 +00009861$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009862
Matthias Kloseb159a552010-04-25 21:00:44 +00009863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009864$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009865else
Matthias Kloseb9621712010-04-24 17:59:49 +00009866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9867$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009868
9869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9871
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9873$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009874if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009875 $as_echo_n "(cached) " >&6
9876else
9877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009878/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009879#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009880int
9881main ()
9882{
9883void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009884
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009885 ;
9886 return 0;
9887}
9888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009889if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009890 ac_cv_flock_decl=yes
9891else
9892 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009893
9894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009896
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009897fi
9898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9899$as_echo "$ac_cv_flock_decl" >&6; }
9900if test "x${ac_cv_flock_decl}" = xyes; then
9901 for ac_func in flock
9902do :
9903 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +02009904if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009905 cat >>confdefs.h <<_ACEOF
9906#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009907_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009908
Antoine Pitroua3000072010-09-07 14:52:42 +00009909else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009911$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009912if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009913 $as_echo_n "(cached) " >&6
9914else
9915 ac_check_lib_save_LIBS=$LIBS
9916LIBS="-lbsd $LIBS"
9917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9918/* end confdefs.h. */
9919
9920/* Override any GCC internal prototype to avoid an error.
9921 Use char because int might match the return type of a GCC
9922 builtin and then its argument prototype would still apply. */
9923#ifdef __cplusplus
9924extern "C"
9925#endif
9926char flock ();
9927int
9928main ()
9929{
9930return flock ();
9931 ;
9932 return 0;
9933}
9934_ACEOF
9935if ac_fn_c_try_link "$LINENO"; then :
9936 ac_cv_lib_bsd_flock=yes
9937else
9938 ac_cv_lib_bsd_flock=no
9939fi
9940rm -f core conftest.err conftest.$ac_objext \
9941 conftest$ac_exeext conftest.$ac_ext
9942LIBS=$ac_check_lib_save_LIBS
9943fi
9944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9945$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009946if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009947 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009948
9949
9950$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9951
9952
9953fi
9954
9955
9956fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009957done
9958
Antoine Pitroua3000072010-09-07 14:52:42 +00009959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009960
Matthias Kloseb9621712010-04-24 17:59:49 +00009961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9962$as_echo_n "checking for getpagesize... " >&6; }
9963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009964/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009965
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009966#include <unistd.h>
9967
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009968int
9969main ()
9970{
9971void* p = getpagesize
9972 ;
9973 return 0;
9974}
9975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009976if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009977
Matthias Kloseb9621712010-04-24 17:59:49 +00009978$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009979
Matthias Kloseb159a552010-04-25 21:00:44 +00009980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009981$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009982else
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9984$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009985
9986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009988
Victor Stinner984890f2011-11-24 13:53:38 +01009989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9990$as_echo_n "checking for broken unsetenv... " >&6; }
9991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9992/* end confdefs.h. */
9993
9994#include <stdlib.h>
9995
9996int
9997main ()
9998{
9999int res = unsetenv("DUMMY")
10000 ;
10001 return 0;
10002}
10003_ACEOF
10004if ac_fn_c_try_compile "$LINENO"; then :
10005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10006$as_echo "no" >&6; }
10007else
10008
10009$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10010
10011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10012$as_echo "yes" >&6; }
10013
10014fi
10015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10016
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010017for ac_prog in true
10018do
10019 # Extract the first word of "$ac_prog", so it can be a program name with args.
10020set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10022$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010023if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010024 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010025else
10026 if test -n "$TRUE"; then
10027 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10028else
10029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10030for as_dir in $PATH
10031do
10032 IFS=$as_save_IFS
10033 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010034 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010035 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 +000010036 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010037 $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 +000010038 break 2
10039 fi
10040done
Matthias Kloseb9621712010-04-24 17:59:49 +000010041 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010043
10044fi
10045fi
10046TRUE=$ac_cv_prog_TRUE
10047if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10049$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010050else
Matthias Kloseb9621712010-04-24 17:59:49 +000010051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10052$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010053fi
10054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010056 test -n "$TRUE" && break
10057done
10058test -n "$TRUE" || TRUE="/bin/true"
10059
10060
Matthias Kloseb9621712010-04-24 17:59:49 +000010061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10062$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010063if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010065else
10066 ac_check_lib_save_LIBS=$LIBS
10067LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010069/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010071/* Override any GCC internal prototype to avoid an error.
10072 Use char because int might match the return type of a GCC
10073 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010074#ifdef __cplusplus
10075extern "C"
10076#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010077char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010078int
10079main ()
10080{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010082 ;
10083 return 0;
10084}
10085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010086if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010087 ac_cv_lib_c_inet_aton=yes
10088else
Matthias Kloseb9621712010-04-24 17:59:49 +000010089 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010091rm -f core conftest.err conftest.$ac_objext \
10092 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010093LIBS=$ac_check_lib_save_LIBS
10094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10096$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010097if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010098 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010099else
Matthias Kloseb9621712010-04-24 17:59:49 +000010100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10101$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010102if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010103 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010104else
10105 ac_check_lib_save_LIBS=$LIBS
10106LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010108/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110/* Override any GCC internal prototype to avoid an error.
10111 Use char because int might match the return type of a GCC
10112 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010113#ifdef __cplusplus
10114extern "C"
10115#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010116char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010117int
10118main ()
10119{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010120return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010121 ;
10122 return 0;
10123}
10124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010125if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010126 ac_cv_lib_resolv_inet_aton=yes
10127else
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010130rm -f core conftest.err conftest.$ac_objext \
10131 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010132LIBS=$ac_check_lib_save_LIBS
10133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10135$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010136if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010137 cat >>confdefs.h <<_ACEOF
10138#define HAVE_LIBRESOLV 1
10139_ACEOF
10140
10141 LIBS="-lresolv $LIBS"
10142
10143fi
10144
10145
10146fi
10147
10148
Christian Heimesd0764e22007-12-04 15:00:33 +000010149# On Tru64, chflags seems to be present, but calling it will
10150# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10152$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010153if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010154 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010155else
Matthias Kloseb9621712010-04-24 17:59:49 +000010156 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010157 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010158else
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010160/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010161
Christian Heimesd0764e22007-12-04 15:00:33 +000010162#include <sys/stat.h>
10163#include <unistd.h>
10164int main(int argc, char*argv[])
10165{
10166 if(chflags(argv[0], 0) != 0)
10167 return 1;
10168 return 0;
10169}
Ned Deily3eb67d52011-06-28 00:00:28 -070010170
Christian Heimesd0764e22007-12-04 15:00:33 +000010171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010172if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010173 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010174else
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10178 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010179fi
10180
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10184$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010185if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010187if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010188 ac_cv_have_chflags="yes"
10189else
10190 ac_cv_have_chflags="no"
10191fi
10192
10193fi
10194if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010195
Matthias Kloseb9621712010-04-24 17:59:49 +000010196$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010197
10198fi
10199
Matthias Kloseb9621712010-04-24 17:59:49 +000010200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10201$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010202if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010204else
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010206 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010207else
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010209/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010210
Christian Heimesd0764e22007-12-04 15:00:33 +000010211#include <sys/stat.h>
10212#include <unistd.h>
10213int main(int argc, char*argv[])
10214{
10215 if(lchflags(argv[0], 0) != 0)
10216 return 1;
10217 return 0;
10218}
Ned Deily3eb67d52011-06-28 00:00:28 -070010219
Christian Heimesd0764e22007-12-04 15:00:33 +000010220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010221if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010222 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010223else
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10227 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010228fi
10229
10230
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10233$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010234if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010236if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010237 ac_cv_have_lchflags="yes"
10238else
10239 ac_cv_have_lchflags="no"
10240fi
10241
10242fi
10243if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010244
Matthias Kloseb9621712010-04-24 17:59:49 +000010245$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010246
10247fi
10248
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010249case $ac_sys_system/$ac_sys_release in
10250Darwin/*)
10251 _CUR_CFLAGS="${CFLAGS}"
10252 _CUR_LDFLAGS="${LDFLAGS}"
10253 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10254 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10255 ;;
10256esac
10257
Matthias Kloseb9621712010-04-24 17:59:49 +000010258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10259$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010260if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010262else
10263 ac_check_lib_save_LIBS=$LIBS
10264LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010266/* end confdefs.h. */
10267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268/* Override any GCC internal prototype to avoid an error.
10269 Use char because int might match the return type of a GCC
10270 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010271#ifdef __cplusplus
10272extern "C"
10273#endif
10274char inflateCopy ();
10275int
10276main ()
10277{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010278return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010279 ;
10280 return 0;
10281}
10282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010283if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010284 ac_cv_lib_z_inflateCopy=yes
10285else
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010288rm -f core conftest.err conftest.$ac_objext \
10289 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010290LIBS=$ac_check_lib_save_LIBS
10291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10293$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010294if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010295
Matthias Kloseb9621712010-04-24 17:59:49 +000010296$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010297
10298fi
10299
10300
10301case $ac_sys_system/$ac_sys_release in
10302Darwin/*)
10303 CFLAGS="${_CUR_CFLAGS}"
10304 LDFLAGS="${_CUR_LDFLAGS}"
10305 ;;
10306esac
10307
Matthias Kloseb9621712010-04-24 17:59:49 +000010308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10309$as_echo_n "checking for hstrerror... " >&6; }
10310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010311/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010312
Martin v. Löwise9416172003-05-03 10:12:45 +000010313#include <netdb.h>
10314
Martin v. Löwise9416172003-05-03 10:12:45 +000010315int
10316main ()
10317{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010318void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010319 ;
10320 return 0;
10321}
10322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010323if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010324
Matthias Kloseb9621712010-04-24 17:59:49 +000010325$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010326
Matthias Kloseb159a552010-04-25 21:00:44 +000010327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010328$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010329else
Matthias Kloseb9621712010-04-24 17:59:49 +000010330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10331$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010332
10333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010334rm -f core conftest.err conftest.$ac_objext \
10335 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336
Matthias Kloseb9621712010-04-24 17:59:49 +000010337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10338$as_echo_n "checking for inet_aton... " >&6; }
10339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010340/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010341
Martin v. Löwis86d66262006-02-17 08:40:11 +000010342#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010343#include <sys/socket.h>
10344#include <netinet/in.h>
10345#include <arpa/inet.h>
10346
Martin v. Löwise9416172003-05-03 10:12:45 +000010347int
10348main ()
10349{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010350void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010351 ;
10352 return 0;
10353}
10354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010355if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010356
Matthias Kloseb9621712010-04-24 17:59:49 +000010357$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010358
Matthias Kloseb159a552010-04-25 21:00:44 +000010359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010360$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010361else
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10363$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010364
10365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010366rm -f core conftest.err conftest.$ac_objext \
10367 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368
Matthias Kloseb9621712010-04-24 17:59:49 +000010369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10370$as_echo_n "checking for inet_pton... " >&6; }
10371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010372/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010373
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010374#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010375#include <sys/socket.h>
10376#include <netinet/in.h>
10377#include <arpa/inet.h>
10378
Martin v. Löwise9416172003-05-03 10:12:45 +000010379int
10380main ()
10381{
10382void* p = inet_pton
10383 ;
10384 return 0;
10385}
10386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010388
Matthias Kloseb9621712010-04-24 17:59:49 +000010389$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010390
Matthias Kloseb159a552010-04-25 21:00:44 +000010391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010392$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010393else
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10395$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010396
10397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010399
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010400# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10402$as_echo_n "checking for setgroups... " >&6; }
10403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010405
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010406#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010407#ifdef HAVE_GRP_H
10408#include <grp.h>
10409#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010410
Martin v. Löwisd5843682002-11-21 20:41:28 +000010411int
10412main ()
10413{
10414void* p = setgroups
10415 ;
10416 return 0;
10417}
10418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010420
Matthias Kloseb9621712010-04-24 17:59:49 +000010421$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010422
Matthias Kloseb159a552010-04-25 21:00:44 +000010423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010424$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010425else
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10427$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010428
10429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010431
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010432# check for openpty and forkpty
10433
10434for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010435do :
10436 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010437if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010439#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010440_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010441
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010442else
Matthias Kloseb9621712010-04-24 17:59:49 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10444$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010445if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010447else
Martin v. Löwis11437992002-04-12 09:54:03 +000010448 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010449LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010451/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453/* Override any GCC internal prototype to avoid an error.
10454 Use char because int might match the return type of a GCC
10455 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010456#ifdef __cplusplus
10457extern "C"
10458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010459char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010460int
10461main ()
10462{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010463return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 ;
10465 return 0;
10466}
10467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010468if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010469 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010470else
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010473rm -f core conftest.err conftest.$ac_objext \
10474 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010475LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10478$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010479if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010480 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010481 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010482else
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10484$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010485if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010487else
10488 ac_check_lib_save_LIBS=$LIBS
10489LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010491/* end confdefs.h. */
10492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010493/* Override any GCC internal prototype to avoid an error.
10494 Use char because int might match the return type of a GCC
10495 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010496#ifdef __cplusplus
10497extern "C"
10498#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010499char openpty ();
10500int
10501main ()
10502{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010503return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010504 ;
10505 return 0;
10506}
10507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010508if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010509 ac_cv_lib_bsd_openpty=yes
10510else
Matthias Kloseb9621712010-04-24 17:59:49 +000010511 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010513rm -f core conftest.err conftest.$ac_objext \
10514 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010515LIBS=$ac_check_lib_save_LIBS
10516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10518$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010519if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010520 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010521 LIBS="$LIBS -lbsd"
10522fi
10523
10524
10525fi
10526
Fred Drake8cef4cf2000-06-28 16:40:38 +000010527
10528fi
10529done
10530
10531for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010532do :
10533 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010534if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010535 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010536#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010537_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010538
Fred Drake8cef4cf2000-06-28 16:40:38 +000010539else
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10541$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010542if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010544else
Martin v. Löwis11437992002-04-12 09:54:03 +000010545 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010546LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010550/* Override any GCC internal prototype to avoid an error.
10551 Use char because int might match the return type of a GCC
10552 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010553#ifdef __cplusplus
10554extern "C"
10555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010556char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010557int
10558main ()
10559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010560return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010561 ;
10562 return 0;
10563}
10564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010565if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010567else
Matthias Kloseb9621712010-04-24 17:59:49 +000010568 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010570rm -f core conftest.err conftest.$ac_objext \
10571 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010572LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10575$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010576if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010577 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010578 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010579else
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10581$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010582if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010584else
10585 ac_check_lib_save_LIBS=$LIBS
10586LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010588/* end confdefs.h. */
10589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590/* Override any GCC internal prototype to avoid an error.
10591 Use char because int might match the return type of a GCC
10592 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010593#ifdef __cplusplus
10594extern "C"
10595#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010596char forkpty ();
10597int
10598main ()
10599{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010600return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010601 ;
10602 return 0;
10603}
10604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010605if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010606 ac_cv_lib_bsd_forkpty=yes
10607else
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010610rm -f core conftest.err conftest.$ac_objext \
10611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010612LIBS=$ac_check_lib_save_LIBS
10613fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10615$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010616if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010618 LIBS="$LIBS -lbsd"
10619fi
10620
10621
10622fi
10623
Fred Drake8cef4cf2000-06-28 16:40:38 +000010624
10625fi
10626done
10627
Jack Jansendd19cf82001-12-06 22:36:17 +000010628
Christian Heimesb186d002008-03-18 15:15:01 +000010629# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010630for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010631do :
10632 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020010633if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010634 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010635#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010636_ACEOF
10637
10638fi
10639done
10640
10641
Michael W. Hudson54241132001-12-07 15:38:26 +000010642# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010643for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010644do :
10645 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10646ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010647if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010649#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010650_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010651
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010652fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010653done
10654
Michael W. Hudson54241132001-12-07 15:38:26 +000010655
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010656ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020010657if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010658 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010659
Martin v. Löwis1142de32002-03-29 16:28:31 +000010660else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010662 *" dup2.$ac_objext "* ) ;;
10663 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010664 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010665esac
10666
Martin v. Löwis1142de32002-03-29 16:28:31 +000010667fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010668
10669ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020010670if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010671 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10672
10673else
10674 case " $LIBOBJS " in
10675 *" getcwd.$ac_objext "* ) ;;
10676 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10677 ;;
10678esac
10679
10680fi
10681
10682ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020010683if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010684 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10685
10686else
10687 case " $LIBOBJS " in
10688 *" strdup.$ac_objext "* ) ;;
10689 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10690 ;;
10691esac
10692
10693fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010694
10695
10696for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010697do :
10698 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010699if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010700 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010701#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010704/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010705#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010706int
10707main ()
10708{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010709getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010710 ;
10711 return 0;
10712}
10713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010714if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010717
Guido van Rossum627b2d71993-12-24 10:39:16 +000010718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010720
Guido van Rossum627b2d71993-12-24 10:39:16 +000010721fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010722done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010723
Jack Jansen150753c2003-03-29 22:07:47 +000010724for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010725do :
10726 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010727if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010728 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010729#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010733#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010734int
10735main ()
10736{
10737setpgrp(0,0);
10738 ;
10739 return 0;
10740}
10741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010742if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010745
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010748
10749fi
10750done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010751
Thomas Wouters3a584202000-08-05 23:28:51 +000010752for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010753do :
10754 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020010755if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010756 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010757#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010760/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010761#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010762int
10763main ()
10764{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010765gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010766 ;
10767 return 0;
10768}
10769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010770if ac_fn_c_try_compile "$LINENO"; then :
10771
Guido van Rossum627b2d71993-12-24 10:39:16 +000010772else
Skip Montanaro6dead952003-09-25 14:50:04 +000010773
Matthias Kloseb9621712010-04-24 17:59:49 +000010774$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010775
Martin v. Löwis11437992002-04-12 09:54:03 +000010776
Guido van Rossum627b2d71993-12-24 10:39:16 +000010777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010779
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010780fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010781done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010782
Michael W. Hudson54241132001-12-07 15:38:26 +000010783
Victor Stinnere0be4232011-10-25 13:06:09 +020010784for ac_func in clock_gettime
10785do :
10786 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
10787if test "x$ac_cv_func_clock_gettime" = xyes; then :
10788 cat >>confdefs.h <<_ACEOF
10789#define HAVE_CLOCK_GETTIME 1
10790_ACEOF
10791
10792else
10793
10794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
10795$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
10796if ${ac_cv_lib_rt_clock_gettime+:} false; then :
10797 $as_echo_n "(cached) " >&6
10798else
10799 ac_check_lib_save_LIBS=$LIBS
10800LIBS="-lrt $LIBS"
10801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10802/* end confdefs.h. */
10803
10804/* Override any GCC internal prototype to avoid an error.
10805 Use char because int might match the return type of a GCC
10806 builtin and then its argument prototype would still apply. */
10807#ifdef __cplusplus
10808extern "C"
10809#endif
10810char clock_gettime ();
10811int
10812main ()
10813{
10814return clock_gettime ();
10815 ;
10816 return 0;
10817}
10818_ACEOF
10819if ac_fn_c_try_link "$LINENO"; then :
10820 ac_cv_lib_rt_clock_gettime=yes
10821else
10822 ac_cv_lib_rt_clock_gettime=no
10823fi
10824rm -f core conftest.err conftest.$ac_objext \
10825 conftest$ac_exeext conftest.$ac_ext
10826LIBS=$ac_check_lib_save_LIBS
10827fi
10828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
10829$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
10830if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
10831
10832 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
10833
10834
10835$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
10836
10837
10838fi
10839
10840
10841fi
10842done
10843
10844
10845for ac_func in clock_getres
10846do :
10847 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
10848if test "x$ac_cv_func_clock_getres" = xyes; then :
10849 cat >>confdefs.h <<_ACEOF
10850#define HAVE_CLOCK_GETRES 1
10851_ACEOF
10852
10853else
10854
10855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
10856$as_echo_n "checking for clock_getres in -lrt... " >&6; }
10857if ${ac_cv_lib_rt_clock_getres+:} false; then :
10858 $as_echo_n "(cached) " >&6
10859else
10860 ac_check_lib_save_LIBS=$LIBS
10861LIBS="-lrt $LIBS"
10862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10863/* end confdefs.h. */
10864
10865/* Override any GCC internal prototype to avoid an error.
10866 Use char because int might match the return type of a GCC
10867 builtin and then its argument prototype would still apply. */
10868#ifdef __cplusplus
10869extern "C"
10870#endif
10871char clock_getres ();
10872int
10873main ()
10874{
10875return clock_getres ();
10876 ;
10877 return 0;
10878}
10879_ACEOF
10880if ac_fn_c_try_link "$LINENO"; then :
10881 ac_cv_lib_rt_clock_getres=yes
10882else
10883 ac_cv_lib_rt_clock_getres=no
10884fi
10885rm -f core conftest.err conftest.$ac_objext \
10886 conftest$ac_exeext conftest.$ac_ext
10887LIBS=$ac_check_lib_save_LIBS
10888fi
10889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
10890$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
10891if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
10892
10893 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
10894
10895
10896fi
10897
10898
10899fi
10900done
10901
10902
Matthias Kloseb9621712010-04-24 17:59:49 +000010903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10904$as_echo_n "checking for major... " >&6; }
10905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010906/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010907
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010908#if defined(MAJOR_IN_MKDEV)
10909#include <sys/mkdev.h>
10910#elif defined(MAJOR_IN_SYSMACROS)
10911#include <sys/sysmacros.h>
10912#else
10913#include <sys/types.h>
10914#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010915
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010916int
10917main ()
10918{
10919
10920 makedev(major(0),minor(0));
10921
10922 ;
10923 return 0;
10924}
10925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010926if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010927
10928
Matthias Kloseb9621712010-04-24 17:59:49 +000010929$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10932$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010933
10934else
Skip Montanaro6dead952003-09-25 14:50:04 +000010935
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10937$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010938
10939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010940rm -f core conftest.err conftest.$ac_objext \
10941 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010942
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010943# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010944# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10946$as_echo_n "checking for getaddrinfo... " >&6; }
10947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010948/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010949
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010950#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010951#include <sys/socket.h>
10952#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010953#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010954
Martin v. Löwis11437992002-04-12 09:54:03 +000010955int
10956main ()
10957{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010958getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010959 ;
10960 return 0;
10961}
10962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010963if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010964 have_getaddrinfo=yes
10965else
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010968rm -f core conftest.err conftest.$ac_objext \
10969 conftest$ac_exeext conftest.$ac_ext
10970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10971$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010972if test $have_getaddrinfo = yes
10973then
Matthias Kloseb9621712010-04-24 17:59:49 +000010974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10975$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010976 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010978else
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010010980
10981if test "${enable_ipv6+set}" = set; then
10982 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
10983else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010984 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010010985fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010986else
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010988/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010989
10990#include <sys/types.h>
10991#include <netdb.h>
10992#include <string.h>
10993#include <sys/socket.h>
10994#include <netinet/in.h>
10995
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010996int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010997{
10998 int passive, gaierr, inet4 = 0, inet6 = 0;
10999 struct addrinfo hints, *ai, *aitop;
11000 char straddr[INET6_ADDRSTRLEN], strport[16];
11001
11002 for (passive = 0; passive <= 1; passive++) {
11003 memset(&hints, 0, sizeof(hints));
11004 hints.ai_family = AF_UNSPEC;
11005 hints.ai_flags = passive ? AI_PASSIVE : 0;
11006 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011007 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011008 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11009 (void)gai_strerror(gaierr);
11010 goto bad;
11011 }
11012 for (ai = aitop; ai; ai = ai->ai_next) {
11013 if (ai->ai_addr == NULL ||
11014 ai->ai_addrlen == 0 ||
11015 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11016 straddr, sizeof(straddr), strport, sizeof(strport),
11017 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11018 goto bad;
11019 }
11020 switch (ai->ai_family) {
11021 case AF_INET:
11022 if (strcmp(strport, "54321") != 0) {
11023 goto bad;
11024 }
11025 if (passive) {
11026 if (strcmp(straddr, "0.0.0.0") != 0) {
11027 goto bad;
11028 }
11029 } else {
11030 if (strcmp(straddr, "127.0.0.1") != 0) {
11031 goto bad;
11032 }
11033 }
11034 inet4++;
11035 break;
11036 case AF_INET6:
11037 if (strcmp(strport, "54321") != 0) {
11038 goto bad;
11039 }
11040 if (passive) {
11041 if (strcmp(straddr, "::") != 0) {
11042 goto bad;
11043 }
11044 } else {
11045 if (strcmp(straddr, "::1") != 0) {
11046 goto bad;
11047 }
11048 }
11049 inet6++;
11050 break;
11051 case AF_UNSPEC:
11052 goto bad;
11053 break;
11054 default:
11055 /* another family support? */
11056 break;
11057 }
11058 }
11059 }
11060
11061 if (!(inet4 == 0 || inet4 == 2))
11062 goto bad;
11063 if (!(inet6 == 0 || inet6 == 2))
11064 goto bad;
11065
11066 if (aitop)
11067 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011068 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011069
11070 bad:
11071 if (aitop)
11072 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011073 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011074}
11075
Martin v. Löwis11437992002-04-12 09:54:03 +000011076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011077if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011078 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011079else
Matthias Kloseb9621712010-04-24 17:59:49 +000011080 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11083 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011085
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011086fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011087
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011089
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11091$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11092
Mark Dickinson2df5d282009-12-31 21:22:50 +000011093if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011094then
11095 if test $ipv6 = yes
11096 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011097 echo 'Fatal: You must get working getaddrinfo() function.'
11098 echo ' or you can specify "--disable-ipv6"'.
11099 exit 1
11100 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011101else
Martin v. Löwis11437992002-04-12 09:54:03 +000011102
Matthias Kloseb9621712010-04-24 17:59:49 +000011103$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011104
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011105fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011106
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011107for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011108do :
11109 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011110if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011112#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011113_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011114
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011115fi
11116done
11117
Michael W. Hudson54241132001-12-07 15:38:26 +000011118
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011119# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11121$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011122if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011124else
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011126/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011127#include <sys/types.h>
11128#include <sys/time.h>
11129#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011130
Martin v. Löwis11437992002-04-12 09:54:03 +000011131int
11132main ()
11133{
11134if ((struct tm *) 0)
11135return 0;
11136 ;
11137 return 0;
11138}
11139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011140if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011141 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011142else
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11148$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011149if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011150
Matthias Kloseb9621712010-04-24 17:59:49 +000011151$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011152
11153fi
11154
Matthias Kloseb9621712010-04-24 17:59:49 +000011155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11156$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011157if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011159else
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011161/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011162#include <sys/types.h>
11163#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011164
Martin v. Löwis11437992002-04-12 09:54:03 +000011165int
11166main ()
11167{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011168struct tm tm;
11169 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011170 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011171 ;
11172 return 0;
11173}
11174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011175if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011176 ac_cv_struct_tm=time.h
11177else
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11183$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011184if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011185
Matthias Kloseb9621712010-04-24 17:59:49 +000011186$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011187
11188fi
11189
Matthias Kloseb9621712010-04-24 17:59:49 +000011190ac_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 +000011191#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011192
Matthias Kloseb9621712010-04-24 17:59:49 +000011193"
Victor Stinnere0be4232011-10-25 13:06:09 +020011194if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011195
11196cat >>confdefs.h <<_ACEOF
11197#define HAVE_STRUCT_TM_TM_ZONE 1
11198_ACEOF
11199
11200
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011201fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011202
Martin v. Löwis11437992002-04-12 09:54:03 +000011203if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011206
11207else
Matthias Kloseb9621712010-04-24 17:59:49 +000011208 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11209"
Victor Stinnere0be4232011-10-25 13:06:09 +020011210if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011211 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011212else
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214fi
11215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011216cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011217#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011218_ACEOF
11219
Matthias Kloseb9621712010-04-24 17:59:49 +000011220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11221$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011222if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011223 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011224else
Matthias Kloseb9621712010-04-24 17:59:49 +000011225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011226/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011227#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011228#if !HAVE_DECL_TZNAME
11229extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011231
Martin v. Löwis11437992002-04-12 09:54:03 +000011232int
11233main ()
11234{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011235return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 ;
11237 return 0;
11238}
11239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011240if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011241 ac_cv_var_tzname=yes
11242else
Matthias Kloseb9621712010-04-24 17:59:49 +000011243 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011245rm -f core conftest.err conftest.$ac_objext \
11246 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11249$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011250 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011253
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011254 fi
11255fi
11256
Matthias Kloseb9621712010-04-24 17:59:49 +000011257ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011258if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011259
11260cat >>confdefs.h <<_ACEOF
11261#define HAVE_STRUCT_STAT_ST_RDEV 1
11262_ACEOF
11263
11264
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011265fi
11266
Matthias Kloseb9621712010-04-24 17:59:49 +000011267ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011268if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011269
Martin v. Löwis11437992002-04-12 09:54:03 +000011270cat >>confdefs.h <<_ACEOF
11271#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11272_ACEOF
11273
11274
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011275fi
11276
Matthias Kloseb9621712010-04-24 17:59:49 +000011277ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011278if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011279
11280cat >>confdefs.h <<_ACEOF
11281#define HAVE_STRUCT_STAT_ST_FLAGS 1
11282_ACEOF
11283
11284
11285fi
11286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011288if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011289
11290cat >>confdefs.h <<_ACEOF
11291#define HAVE_STRUCT_STAT_ST_GEN 1
11292_ACEOF
11293
11294
11295fi
11296
Matthias Kloseb9621712010-04-24 17:59:49 +000011297ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011298if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011299
11300cat >>confdefs.h <<_ACEOF
11301#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11302_ACEOF
11303
11304
11305fi
11306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011308if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011309
Martin v. Löwis11437992002-04-12 09:54:03 +000011310cat >>confdefs.h <<_ACEOF
11311#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11312_ACEOF
11313
11314
Matthias Kloseb9621712010-04-24 17:59:49 +000011315$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011316
11317else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011319 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11321 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011322esac
11323
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011324fi
11325
Michael W. Hudson54241132001-12-07 15:38:26 +000011326
Martin v. Löwis11437992002-04-12 09:54:03 +000011327
Matthias Kloseb9621712010-04-24 17:59:49 +000011328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11329$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011330if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011332else
Matthias Kloseb159a552010-04-25 21:00:44 +000011333
Matthias Kloseb9621712010-04-24 17:59:49 +000011334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011335/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011336#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011337int
11338main ()
11339{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011340return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011341 ;
11342 return 0;
11343}
11344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011345if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011346 ac_cv_header_time_altzone=yes
11347else
Matthias Kloseb9621712010-04-24 17:59:49 +000011348 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011352fi
11353
Matthias Kloseb9621712010-04-24 17:59:49 +000011354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11355$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011356if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011357
Matthias Kloseb9621712010-04-24 17:59:49 +000011358$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011359
11360fi
11361
Guido van Rossumda88dad1995-01-26 00:46:29 +000011362was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11364$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011366/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011367
11368#include <sys/types.h>
11369#include <sys/select.h>
11370#include <sys/time.h>
11371
Martin v. Löwis11437992002-04-12 09:54:03 +000011372int
11373main ()
11374{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011375;
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 ;
11377 return 0;
11378}
11379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011381
11382
Matthias Kloseb9621712010-04-24 17:59:49 +000011383$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011384
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011385 was_it_defined=yes
11386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11390$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391
Matthias Kloseb9621712010-04-24 17:59:49 +000011392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11393$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011394if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011395 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011396else
Matthias Kloseb9621712010-04-24 17:59:49 +000011397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011398/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011399#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011400int
11401main ()
11402{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011403struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ;
11405 return 0;
11406}
11407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011409 ac_cv_struct_addrinfo=yes
11410else
Matthias Kloseb9621712010-04-24 17:59:49 +000011411 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11414fi
11415
Matthias Kloseb9621712010-04-24 17:59:49 +000011416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11417$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011418if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011421
11422fi
11423
Matthias Kloseb9621712010-04-24 17:59:49 +000011424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11425$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011426if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011427 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011428else
Matthias Kloseb9621712010-04-24 17:59:49 +000011429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011430/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011431
11432# include <sys/types.h>
11433# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011434int
11435main ()
11436{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011437struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 ;
11439 return 0;
11440}
11441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011443 ac_cv_struct_sockaddr_storage=yes
11444else
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11448fi
11449
Matthias Kloseb9621712010-04-24 17:59:49 +000011450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11451$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011452if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011453
Matthias Kloseb9621712010-04-24 17:59:49 +000011454$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011455
11456fi
11457
Guido van Rossum627b2d71993-12-24 10:39:16 +000011458# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011459
Matthias Kloseb9621712010-04-24 17:59:49 +000011460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11461$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011462if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011464else
Matthias Kloseb9621712010-04-24 17:59:49 +000011465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011467$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011468int
11469main ()
11470{
11471static int test_array [1 - 2 * !(((char) -1) < 0)];
11472test_array [0] = 0
11473
11474 ;
11475 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011476}
Martin v. Löwis11437992002-04-12 09:54:03 +000011477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011478if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011479 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011480else
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11486$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011487if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011488 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011489
11490fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011491
Matthias Kloseb9621712010-04-24 17:59:49 +000011492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11493$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011494if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011495 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011496else
Matthias Kloseb9621712010-04-24 17:59:49 +000011497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011498/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011499
Martin v. Löwis11437992002-04-12 09:54:03 +000011500int
11501main ()
11502{
11503/* FIXME: Include the comments suggested by Paul. */
11504#ifndef __cplusplus
11505 /* Ultrix mips cc rejects this. */
11506 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011508 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509 char const *const *pcpcc;
11510 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 /* NEC SVR4.0.2 mips cc rejects this. */
11512 struct point {int x, y;};
11513 static struct point const zero = {0,0};
11514 /* AIX XL C 1.02.0.0 rejects this.
11515 It does not let you subtract one const X* pointer from another in
11516 an arm of an if-expression whose if-part is not a constant
11517 expression */
11518 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521 ++pcpcc;
11522 ppc = (char**) pcpcc;
11523 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 { /* SCO 3.2v4 cc rejects this. */
11525 char *t;
11526 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011527
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011530 }
11531 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11532 int x[] = {25, 17};
11533 const int *foo = &x[0];
11534 ++foo;
11535 }
11536 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11537 typedef const int *iptr;
11538 iptr p = 0;
11539 ++p;
11540 }
11541 { /* AIX XL C 1.02.0.0 rejects this saying
11542 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11543 struct s { int j; const int *ap[3]; };
11544 struct s *b; b->j = 5;
11545 }
11546 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11547 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011548 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011549 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011551#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011552
Martin v. Löwis11437992002-04-12 09:54:03 +000011553 ;
11554 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011555}
Martin v. Löwis11437992002-04-12 09:54:03 +000011556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011557if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011558 ac_cv_c_const=yes
11559else
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11565$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011566if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011567
Matthias Kloseb9621712010-04-24 17:59:49 +000011568$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011569
11570fi
11571
Michael W. Hudson54241132001-12-07 15:38:26 +000011572
Guido van Rossumda88dad1995-01-26 00:46:29 +000011573works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11575$as_echo_n "checking for working volatile... " >&6; }
11576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011577/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011578
Martin v. Löwis11437992002-04-12 09:54:03 +000011579int
11580main ()
11581{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011582volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 ;
11584 return 0;
11585}
11586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011587if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011588 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011589else
Skip Montanaro6dead952003-09-25 14:50:04 +000011590
Matthias Kloseb9621712010-04-24 17:59:49 +000011591$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011592
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011593
Guido van Rossum627b2d71993-12-24 10:39:16 +000011594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11597$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011598
Guido van Rossumda88dad1995-01-26 00:46:29 +000011599works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11601$as_echo_n "checking for working signed char... " >&6; }
11602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011603/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011604
Martin v. Löwis11437992002-04-12 09:54:03 +000011605int
11606main ()
11607{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011608signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011609 ;
11610 return 0;
11611}
11612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011613if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011614 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011615else
Skip Montanaro6dead952003-09-25 14:50:04 +000011616
Matthias Kloseb9621712010-04-24 17:59:49 +000011617$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011618
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011619
Guido van Rossum7f43da71994-08-01 12:15:30 +000011620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11623$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011624
Guido van Rossumda88dad1995-01-26 00:46:29 +000011625have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11627$as_echo_n "checking for prototypes... " >&6; }
11628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011629/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011630int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011631int
11632main ()
11633{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011634return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011635 ;
11636 return 0;
11637}
11638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011640
Matthias Kloseb9621712010-04-24 17:59:49 +000011641$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011642
Matthias Kloseb159a552010-04-25 21:00:44 +000011643 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11647$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011648
Guido van Rossumda88dad1995-01-26 00:46:29 +000011649works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11651$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011653/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011654
11655#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011656int foo(int x, ...) {
11657 va_list va;
11658 va_start(va, x);
11659 va_arg(va, int);
11660 va_arg(va, char *);
11661 va_arg(va, double);
11662 return 0;
11663}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011664
Martin v. Löwis11437992002-04-12 09:54:03 +000011665int
11666main ()
11667{
Guido van Rossum90eea071996-08-30 20:58:57 +000011668return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011669 ;
11670 return 0;
11671}
11672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011673if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011674
11675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011677
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011678 works=yes
11679
Guido van Rossum627b2d71993-12-24 10:39:16 +000011680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11683$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011684
Martin v. Löwisd6320502004-08-12 13:45:08 +000011685# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11687$as_echo_n "checking for socketpair... " >&6; }
11688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011689/* end confdefs.h. */
11690
11691#include <sys/types.h>
11692#include <sys/socket.h>
11693
11694int
11695main ()
11696{
11697void *x=socketpair
11698 ;
11699 return 0;
11700}
11701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011703
Matthias Kloseb9621712010-04-24 17:59:49 +000011704$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011705
Matthias Kloseb159a552010-04-25 21:00:44 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011707$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011708else
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11710$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011711
11712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011714
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011715# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11717$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011719/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011720#include <sys/types.h>
11721#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011722int
11723main ()
11724{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011725struct sockaddr x;
11726x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011727 ;
11728 return 0;
11729}
11730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731if ac_fn_c_try_compile "$LINENO"; then :
11732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11733$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011734
Matthias Kloseb9621712010-04-24 17:59:49 +000011735$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011736
11737else
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11739$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011740
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011743
Guido van Rossumda88dad1995-01-26 00:46:29 +000011744va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11746$as_echo_n "checking whether va_list is an array... " >&6; }
11747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011748/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011749
11750#ifdef HAVE_STDARG_PROTOTYPES
11751#include <stdarg.h>
11752#else
11753#include <varargs.h>
11754#endif
11755
Martin v. Löwis11437992002-04-12 09:54:03 +000011756int
11757main ()
11758{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011759va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011760 ;
11761 return 0;
11762}
11763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011764if ac_fn_c_try_compile "$LINENO"; then :
11765
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011766else
Skip Montanaro6dead952003-09-25 14:50:04 +000011767
Martin v. Löwis11437992002-04-12 09:54:03 +000011768
Matthias Kloseb9621712010-04-24 17:59:49 +000011769$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
Guido van Rossumda88dad1995-01-26 00:46:29 +000011771 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011772
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11776$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011777
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011778# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011779
11780
Matthias Kloseb9621712010-04-24 17:59:49 +000011781ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020011782if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011785
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11787$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011788 OLD_CFLAGS=$CFLAGS
11789 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011791/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011792
11793# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011794
Martin v. Löwis11437992002-04-12 09:54:03 +000011795int
11796main ()
11797{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011798
11799 char *name;
11800 struct hostent *he, *res;
11801 char buffer[2048];
11802 int buflen = 2048;
11803 int h_errnop;
11804
11805 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011806
11807 ;
11808 return 0;
11809}
11810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011811if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011812
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011814
Martin v. Löwis11437992002-04-12 09:54:03 +000011815
Matthias Kloseb9621712010-04-24 17:59:49 +000011816$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011817
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11819$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011820
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011821else
Skip Montanaro6dead952003-09-25 14:50:04 +000011822
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11824$as_echo "no" >&6; }
11825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11826$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011828/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011829
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011830# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011831
Martin v. Löwis11437992002-04-12 09:54:03 +000011832int
11833main ()
11834{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011835
11836 char *name;
11837 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011838 char buffer[2048];
11839 int buflen = 2048;
11840 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011841
Matthias Kloseb159a552010-04-25 21:00:44 +000011842 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011843
11844 ;
11845 return 0;
11846}
11847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011848if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011851
Martin v. Löwis11437992002-04-12 09:54:03 +000011852
Matthias Kloseb159a552010-04-25 21:00:44 +000011853$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11856$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011857
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011858else
Skip Montanaro6dead952003-09-25 14:50:04 +000011859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11861$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11863$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11865/* end confdefs.h. */
11866
11867# include <netdb.h>
11868
11869int
11870main ()
11871{
11872
11873 char *name;
11874 struct hostent *he;
11875 struct hostent_data data;
11876
11877 (void) gethostbyname_r(name, he, &data);
11878
11879 ;
11880 return 0;
11881}
11882_ACEOF
11883if ac_fn_c_try_compile "$LINENO"; then :
11884
11885 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11886
11887
11888$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11889
11890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11891$as_echo "yes" >&6; }
11892
11893else
11894
11895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11896$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011897
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011900
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011903
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011906 CFLAGS=$OLD_CFLAGS
11907
11908else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011909
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 for ac_func in gethostbyname
11911do :
11912 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020011913if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011914 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011915#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011916_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011917
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011918fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011919done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011920
Michael W. Hudson54241132001-12-07 15:38:26 +000011921
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011922fi
11923
Michael W. Hudson54241132001-12-07 15:38:26 +000011924
11925
11926
11927
11928
11929
Guido van Rossum627b2d71993-12-24 10:39:16 +000011930# checks for system services
11931# (none yet)
11932
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011933# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011934ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020011935if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011936
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011937else
Matthias Kloseb9621712010-04-24 17:59:49 +000011938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11939$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011940if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011942else
Martin v. Löwis11437992002-04-12 09:54:03 +000011943 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011944LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011948/* Override any GCC internal prototype to avoid an error.
11949 Use char because int might match the return type of a GCC
11950 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011951#ifdef __cplusplus
11952extern "C"
11953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011954char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011955int
11956main ()
11957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011958return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011959 ;
11960 return 0;
11961}
11962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011963if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011964 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011965else
Matthias Kloseb9621712010-04-24 17:59:49 +000011966 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011968rm -f core conftest.err conftest.$ac_objext \
11969 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011970LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11973$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011974if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 cat >>confdefs.h <<_ACEOF
11976#define HAVE_LIBIEEE 1
11977_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011978
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011979 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011980
Guido van Rossum627b2d71993-12-24 10:39:16 +000011981fi
11982
Michael W. Hudson54241132001-12-07 15:38:26 +000011983
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011984fi
11985
Michael W. Hudson54241132001-12-07 15:38:26 +000011986
Guido van Rossum7f253911997-05-09 02:42:48 +000011987# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11989$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011991# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011992if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011993 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011994if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011995then
11996
Matthias Kloseb9621712010-04-24 17:59:49 +000011997$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12000$as_echo "yes" >&6; }
12001else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12002$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012003fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012004else
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12006$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012007fi
12008
Guido van Rossum7f253911997-05-09 02:42:48 +000012009
Guido van Rossum7f43da71994-08-01 12:15:30 +000012010# check for --with-libm=...
12011
Guido van Rossum563e7081996-09-10 18:20:48 +000012012case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012013Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012014*) LIBM=-lm
12015esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12017$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012019# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012020if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012021 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012022if test "$withval" = no
12023then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12025$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012026elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012027then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12029$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012030else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012031fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012032else
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12034$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012035fi
12036
Guido van Rossum7f43da71994-08-01 12:15:30 +000012037
12038# check for --with-libc=...
12039
Matthias Kloseb9621712010-04-24 17:59:49 +000012040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12041$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012043# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012044if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012045 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012046if test "$withval" = no
12047then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12049$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012050elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012051then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12053$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012054else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012055fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12058$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059fi
12060
Guido van Rossum7f43da71994-08-01 12:15:30 +000012061
Stefan Krah1919b7e2012-03-21 18:25:23 +010012062# **************************************
12063# * Check for gcc x64 inline assembler *
12064# **************************************
12065
12066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12067$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12069/* end confdefs.h. */
12070
12071int
12072main ()
12073{
12074
12075 __asm__ __volatile__ ("movq %rcx, %rax");
12076
12077 ;
12078 return 0;
12079}
12080_ACEOF
12081if ac_fn_c_try_compile "$LINENO"; then :
12082 have_gcc_asm_for_x64=yes
12083else
12084 have_gcc_asm_for_x64=no
12085fi
12086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12088$as_echo "$have_gcc_asm_for_x64" >&6; }
12089if test "$have_gcc_asm_for_x64" = yes
12090then
12091
12092$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12093
12094fi
12095
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012096# **************************************************
12097# * Check for various properties of floating point *
12098# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012099
Matthias Kloseb9621712010-04-24 17:59:49 +000012100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12101$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012102if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012103 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012104else
12105
Matthias Kloseb9621712010-04-24 17:59:49 +000012106if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012107 ac_cv_little_endian_double=no
12108else
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012110/* end confdefs.h. */
12111
12112#include <string.h>
12113int main() {
12114 double x = 9006104071832581.0;
12115 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12116 return 0;
12117 else
12118 return 1;
12119}
12120
12121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012122if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012123 ac_cv_little_endian_double=yes
12124else
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012129fi
12130
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012131fi
12132
Matthias Kloseb9621712010-04-24 17:59:49 +000012133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12134$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012135if test "$ac_cv_little_endian_double" = yes
12136then
12137
Matthias Kloseb9621712010-04-24 17:59:49 +000012138$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012139
12140fi
12141
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12143$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012146else
12147
Matthias Kloseb9621712010-04-24 17:59:49 +000012148if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012149 ac_cv_big_endian_double=no
12150else
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012152/* end confdefs.h. */
12153
12154#include <string.h>
12155int main() {
12156 double x = 9006104071832581.0;
12157 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12158 return 0;
12159 else
12160 return 1;
12161}
12162
12163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012164if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012165 ac_cv_big_endian_double=yes
12166else
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12170 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012171fi
12172
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012173fi
12174
Matthias Kloseb9621712010-04-24 17:59:49 +000012175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12176$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012177if test "$ac_cv_big_endian_double" = yes
12178then
12179
Matthias Kloseb9621712010-04-24 17:59:49 +000012180$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012181
12182fi
12183
12184# Some ARM platforms use a mixed-endian representation for doubles.
12185# While Python doesn't currently have full support for these platforms
12186# (see e.g., issue 1762561), we can at least make sure that float <-> string
12187# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12189$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012190if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012192else
12193
Matthias Kloseb9621712010-04-24 17:59:49 +000012194if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012195 ac_cv_mixed_endian_double=no
12196else
Matthias Kloseb9621712010-04-24 17:59:49 +000012197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012198/* end confdefs.h. */
12199
12200#include <string.h>
12201int main() {
12202 double x = 9006104071832581.0;
12203 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12204 return 0;
12205 else
12206 return 1;
12207}
12208
12209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012210if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012211 ac_cv_mixed_endian_double=yes
12212else
Matthias Kloseb9621712010-04-24 17:59:49 +000012213 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12216 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012217fi
12218
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012219fi
12220
Matthias Kloseb9621712010-04-24 17:59:49 +000012221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12222$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012223if test "$ac_cv_mixed_endian_double" = yes
12224then
12225
Matthias Kloseb9621712010-04-24 17:59:49 +000012226$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012227
12228fi
12229
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012230# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012231# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012232# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012233# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012234# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012235# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012236
12237# This inline assembler syntax may also work for suncc and icc,
12238# so we try it on all platforms.
12239
Matthias Kloseb9621712010-04-24 17:59:49 +000012240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12241$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012243/* end confdefs.h. */
12244
12245int
12246main ()
12247{
12248
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012249 unsigned short cw;
12250 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12251 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012252
12253 ;
12254 return 0;
12255}
12256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012257if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012258 have_gcc_asm_for_x87=yes
12259else
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012261fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12264$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012265if test "$have_gcc_asm_for_x87" = yes
12266then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012267
Matthias Kloseb9621712010-04-24 17:59:49 +000012268$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012269
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012271
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012272# Detect whether system arithmetic is subject to x87-style double
12273# rounding issues. The result of this test has little meaning on non
12274# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12275# mode is round-to-nearest and double rounding issues are present, and
12276# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12278$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012279# $BASECFLAGS may affect the result
12280ac_save_cc="$CC"
12281CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012282if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012283 ac_cv_x87_double_rounding=no
12284else
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012286/* end confdefs.h. */
12287
12288#include <stdlib.h>
12289#include <math.h>
12290int main() {
12291 volatile double x, y, z;
12292 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12293 x = 0.99999999999999989; /* 1-2**-53 */
12294 y = 1./x;
12295 if (y != 1.)
12296 exit(0);
12297 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12298 x = 1e16;
12299 y = 2.99999;
12300 z = x + y;
12301 if (z != 1e16+4.)
12302 exit(0);
12303 /* both tests show evidence of double rounding */
12304 exit(1);
12305}
12306
12307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012308if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012309 ac_cv_x87_double_rounding=no
12310else
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12314 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012315fi
12316
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012317CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12319$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012320if test "$ac_cv_x87_double_rounding" = yes
12321then
12322
Matthias Kloseb9621712010-04-24 17:59:49 +000012323$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012324
12325fi
12326
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012327# ************************************
12328# * Check for mathematical functions *
12329# ************************************
12330
12331LIBS_SAVE=$LIBS
12332LIBS="$LIBS $LIBM"
12333
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012334for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12335do :
12336 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12337ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012338if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012339 cat >>confdefs.h <<_ACEOF
12340#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12341_ACEOF
12342
12343fi
12344done
12345
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012346for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012347do :
12348 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12349ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012350if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012351 cat >>confdefs.h <<_ACEOF
12352#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12353_ACEOF
12354
12355fi
12356done
12357
12358ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12359"
Victor Stinnere0be4232011-10-25 13:06:09 +020012360if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012361 ac_have_decl=1
12362else
12363 ac_have_decl=0
12364fi
12365
12366cat >>confdefs.h <<_ACEOF
12367#define HAVE_DECL_ISINF $ac_have_decl
12368_ACEOF
12369ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12370"
Victor Stinnere0be4232011-10-25 13:06:09 +020012371if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012372 ac_have_decl=1
12373else
12374 ac_have_decl=0
12375fi
12376
12377cat >>confdefs.h <<_ACEOF
12378#define HAVE_DECL_ISNAN $ac_have_decl
12379_ACEOF
12380ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12381"
Victor Stinnere0be4232011-10-25 13:06:09 +020012382if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012383 ac_have_decl=1
12384else
12385 ac_have_decl=0
12386fi
12387
12388cat >>confdefs.h <<_ACEOF
12389#define HAVE_DECL_ISFINITE $ac_have_decl
12390_ACEOF
12391
12392
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012393# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12394# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12396$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012397if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012399else
12400
Matthias Kloseb9621712010-04-24 17:59:49 +000012401if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012402 ac_cv_tanh_preserves_zero_sign=no
12403else
Matthias Kloseb9621712010-04-24 17:59:49 +000012404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012405/* end confdefs.h. */
12406
12407#include <math.h>
12408#include <stdlib.h>
12409int main() {
12410 /* return 0 if either negative zeros don't exist
12411 on this platform or if negative zeros exist
12412 and tanh(-0.) == -0. */
12413 if (atan2(0., -1.) == atan2(-0., -1.) ||
12414 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12415 else exit(1);
12416}
12417
12418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012419if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012420 ac_cv_tanh_preserves_zero_sign=yes
12421else
Matthias Kloseb9621712010-04-24 17:59:49 +000012422 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12425 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012426fi
12427
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012428fi
12429
Matthias Kloseb9621712010-04-24 17:59:49 +000012430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12431$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012432if test "$ac_cv_tanh_preserves_zero_sign" = yes
12433then
12434
Matthias Kloseb9621712010-04-24 17:59:49 +000012435$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012436
12437fi
12438
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012439if test "$ac_cv_func_log1p" = yes
12440then
12441 # On some versions of AIX, log1p(-0.) returns 0. instead of
12442 # -0. See issue #9920.
12443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12444$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012445 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012446 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012447else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012448
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012449 if test "$cross_compiling" = yes; then :
12450 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012451else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12453/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012454
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012455 #include <math.h>
12456 #include <stdlib.h>
12457 int main() {
12458 /* Fail if the signs of log1p(-0.) and -0. can be
12459 distinguished. */
12460 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12461 return 0;
12462 else
12463 return 1;
12464 }
12465
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012466_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012467if ac_fn_c_try_run "$LINENO"; then :
12468 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012469else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012470 ac_cv_log1p_drops_zero_sign=yes
12471fi
12472rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12473 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012474fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012475
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012476fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012477
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12479$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12480fi
12481if test "$ac_cv_log1p_drops_zero_sign" = yes
12482then
12483
12484$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12485
12486fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012487
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012488LIBS=$LIBS_SAVE
12489
Mark Dickinsona614f042009-11-28 12:48:43 +000012490# For multiprocessing module, check that sem_open
12491# actually works. For FreeBSD versions <= 7.2,
12492# the kernel module that provides POSIX semaphores
12493# isn't loaded by default, so an attempt to call
12494# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12496$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012497if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012498 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012499else
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012501 ac_cv_posix_semaphores_enabled=yes
12502else
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012504/* end confdefs.h. */
12505
12506#include <unistd.h>
12507#include <fcntl.h>
12508#include <stdio.h>
12509#include <semaphore.h>
12510#include <sys/stat.h>
12511
12512int main(void) {
12513 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12514 if (a == SEM_FAILED) {
12515 perror("sem_open");
12516 return 1;
12517 }
12518 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012519 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012520 return 0;
12521}
12522
12523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012524if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012525 ac_cv_posix_semaphores_enabled=yes
12526else
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12530 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012531fi
12532
12533
Mark Dickinsona614f042009-11-28 12:48:43 +000012534fi
12535
Matthias Kloseb9621712010-04-24 17:59:49 +000012536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12537$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012538if test $ac_cv_posix_semaphores_enabled = no
12539then
12540
Matthias Kloseb9621712010-04-24 17:59:49 +000012541$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012542
12543fi
12544
Mark Dickinson10683072009-04-18 21:18:19 +000012545# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12547$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012548if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012549 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012550else
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012552 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012553else
Matthias Kloseb9621712010-04-24 17:59:49 +000012554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012555/* end confdefs.h. */
12556
12557#include <unistd.h>
12558#include <fcntl.h>
12559#include <stdio.h>
12560#include <semaphore.h>
12561#include <sys/stat.h>
12562
12563int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012564 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012565 int count;
12566 int res;
12567 if(a==SEM_FAILED){
12568 perror("sem_open");
12569 return 1;
12570
12571 }
12572 res = sem_getvalue(a, &count);
12573 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012574 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012575 return res==-1 ? 1 : 0;
12576}
12577
Mark Dickinson10683072009-04-18 21:18:19 +000012578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012579if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012580 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012581else
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12585 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012586fi
12587
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012588
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012589fi
12590
Matthias Kloseb9621712010-04-24 17:59:49 +000012591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12592$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012593if test $ac_cv_broken_sem_getvalue = yes
12594then
12595
Matthias Kloseb9621712010-04-24 17:59:49 +000012596$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012597
12598fi
12599
Mark Dickinsonbd792642009-03-18 20:06:12 +000012600# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12602$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012603# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012604if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012605 enableval=$enable_big_digits; case $enable_big_digits in
12606yes)
12607 enable_big_digits=30 ;;
12608no)
12609 enable_big_digits=15 ;;
1261015|30)
12611 ;;
12612*)
Victor Stinnere0be4232011-10-25 13:06:09 +020012613 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonbd792642009-03-18 20:06:12 +000012614esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12616$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012617
12618cat >>confdefs.h <<_ACEOF
12619#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12620_ACEOF
12621
12622
12623else
Matthias Kloseb9621712010-04-24 17:59:49 +000012624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12625$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012626fi
12627
12628
Guido van Rossumef2255b2000-03-10 22:30:29 +000012629# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012630ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012631if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012632
12633
Matthias Kloseb9621712010-04-24 17:59:49 +000012634$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012635
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012636 wchar_h="yes"
12637
Guido van Rossumef2255b2000-03-10 22:30:29 +000012638else
Martin v. Löwis11437992002-04-12 09:54:03 +000012639 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012640
12641fi
12642
Michael W. Hudson54241132001-12-07 15:38:26 +000012643
Martin v. Löwis11437992002-04-12 09:54:03 +000012644
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012645# determine wchar_t size
12646if test "$wchar_h" = yes
12647then
Matthias Kloseb9621712010-04-24 17:59:49 +000012648 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012649# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12650# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12651# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12653$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012654if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012656else
Matthias Kloseb9621712010-04-24 17:59:49 +000012657 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12658"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012659
Martin v. Löwis11437992002-04-12 09:54:03 +000012660else
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 if test "$ac_cv_type_wchar_t" = yes; then
12662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012664as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020012665See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666 else
12667 ac_cv_sizeof_wchar_t=0
12668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012670
Martin v. Löwis11437992002-04-12 09:54:03 +000012671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12673$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674
12675
12676
Martin v. Löwis11437992002-04-12 09:54:03 +000012677cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012678#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012679_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012680
Michael W. Hudson54241132001-12-07 15:38:26 +000012681
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012682fi
12683
Matthias Kloseb9621712010-04-24 17:59:49 +000012684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12685$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012686have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012688/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012689
12690#include <tcl.h>
12691#if TCL_UTF_MAX != 6
12692# error "NOT UCS4_TCL"
12693#endif
12694int
12695main ()
12696{
12697
12698 ;
12699 return 0;
12700}
12701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012703
12704
Matthias Kloseb9621712010-04-24 17:59:49 +000012705$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012706
12707 have_ucs4_tcl=yes
12708
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12712$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012713
Skip Montanaro6dead952003-09-25 14:50:04 +000012714# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012715if test "$wchar_h" = yes
12716then
12717 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12719$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012720 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012721 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012722else
12723
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012725 ac_cv_wchar_t_signed=yes
12726else
Matthias Kloseb9621712010-04-24 17:59:49 +000012727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012728/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012729
12730 #include <wchar.h>
12731 int main()
12732 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012733 /* Success: exit code 0 */
12734 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012735 }
12736
12737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012738if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012739 ac_cv_wchar_t_signed=yes
12740else
Matthias Kloseb9621712010-04-24 17:59:49 +000012741 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12744 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012745fi
12746
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012747fi
12748
Matthias Kloseb9621712010-04-24 17:59:49 +000012749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12750$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012751fi
12752
Georg Brandl52d168a2008-01-07 18:10:24 +000012753# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012754if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012755 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012756then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012757 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012758
Matthias Kloseb9621712010-04-24 17:59:49 +000012759$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012760
Georg Brandl52d168a2008-01-07 18:10:24 +000012761else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012762 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012763fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
12765$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012766
12767# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12769$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012770if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012772else
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 ac_cv_c_bigendian=unknown
12774 # See if we're dealing with a universal compiler.
12775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12776/* end confdefs.h. */
12777#ifndef __APPLE_CC__
12778 not a universal capable compiler
12779 #endif
12780 typedef int dummy;
12781
Skip Montanaro6dead952003-09-25 14:50:04 +000012782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012783if ac_fn_c_try_compile "$LINENO"; then :
12784
12785 # Check for potential -arch flags. It is not universal unless
12786 # there are at least two -arch flags with different values.
12787 ac_arch=
12788 ac_prev=
12789 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12790 if test -n "$ac_prev"; then
12791 case $ac_word in
12792 i?86 | x86_64 | ppc | ppc64)
12793 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12794 ac_arch=$ac_word
12795 else
12796 ac_cv_c_bigendian=universal
12797 break
12798 fi
12799 ;;
12800 esac
12801 ac_prev=
12802 elif test "x$ac_word" = "x-arch"; then
12803 ac_prev=arch
12804 fi
12805 done
12806fi
12807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12808 if test $ac_cv_c_bigendian = unknown; then
12809 # See if sys/param.h defines the BYTE_ORDER macro.
12810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012811/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012812#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012814
Martin v. Löwis11437992002-04-12 09:54:03 +000012815int
12816main ()
12817{
Matthias Kloseb9621712010-04-24 17:59:49 +000012818#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12819 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12820 && LITTLE_ENDIAN)
12821 bogus endian macros
12822 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012823
12824 ;
12825 return 0;
12826}
12827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012828if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012829 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012831/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012832#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012834
Martin v. Löwis11437992002-04-12 09:54:03 +000012835int
12836main ()
12837{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012838#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 not big endian
12840 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012841
12842 ;
12843 return 0;
12844}
12845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012846if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012847 ac_cv_c_bigendian=yes
12848else
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012852fi
12853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12854 fi
12855 if test $ac_cv_c_bigendian = unknown; then
12856 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012858/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012859#include <limits.h>
12860
Martin v. Löwis11437992002-04-12 09:54:03 +000012861int
12862main ()
12863{
Matthias Kloseb9621712010-04-24 17:59:49 +000012864#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12865 bogus endian macros
12866 #endif
12867
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 ;
12869 return 0;
12870}
12871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012872if ac_fn_c_try_compile "$LINENO"; then :
12873 # It does; now see whether it defined to _BIG_ENDIAN or not.
12874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12875/* end confdefs.h. */
12876#include <limits.h>
12877
12878int
12879main ()
12880{
12881#ifndef _BIG_ENDIAN
12882 not big endian
12883 #endif
12884
12885 ;
12886 return 0;
12887}
12888_ACEOF
12889if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012890 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012891else
Matthias Kloseb9621712010-04-24 17:59:49 +000012892 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12895fi
12896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12897 fi
12898 if test $ac_cv_c_bigendian = unknown; then
12899 # Compile a test program.
12900 if test "$cross_compiling" = yes; then :
12901 # Try to guess by grepping values from an object file.
12902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12903/* end confdefs.h. */
12904short int ascii_mm[] =
12905 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12906 short int ascii_ii[] =
12907 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12908 int use_ascii (int i) {
12909 return ascii_mm[i] + ascii_ii[i];
12910 }
12911 short int ebcdic_ii[] =
12912 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12913 short int ebcdic_mm[] =
12914 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12915 int use_ebcdic (int i) {
12916 return ebcdic_mm[i] + ebcdic_ii[i];
12917 }
12918 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012919
Matthias Kloseb9621712010-04-24 17:59:49 +000012920int
12921main ()
12922{
12923return use_ascii (foo) == use_ebcdic (foo);
12924 ;
12925 return 0;
12926}
12927_ACEOF
12928if ac_fn_c_try_compile "$LINENO"; then :
12929 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12930 ac_cv_c_bigendian=yes
12931 fi
12932 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12933 if test "$ac_cv_c_bigendian" = unknown; then
12934 ac_cv_c_bigendian=no
12935 else
12936 # finding both strings is unlikely to happen, but who knows?
12937 ac_cv_c_bigendian=unknown
12938 fi
12939 fi
12940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012942else
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012944/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012945$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012946int
12947main ()
12948{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949
Matthias Kloseb9621712010-04-24 17:59:49 +000012950 /* Are we little or big endian? From Harbison&Steele. */
12951 union
12952 {
12953 long int l;
12954 char c[sizeof (long int)];
12955 } u;
12956 u.l = 1;
12957 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958
12959 ;
12960 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012961}
Martin v. Löwis11437992002-04-12 09:54:03 +000012962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012963if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012964 ac_cv_c_bigendian=no
12965else
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12969 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012973fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12975$as_echo "$ac_cv_c_bigendian" >&6; }
12976 case $ac_cv_c_bigendian in #(
12977 yes)
12978 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12979;; #(
12980 no)
12981 ;; #(
12982 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012983
Matthias Kloseb9621712010-04-24 17:59:49 +000012984$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986 ;; #(
12987 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012988 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020012989 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012991
Michael W. Hudson54241132001-12-07 15:38:26 +000012992
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012993# ABI version string for Python extension modules. This appears between the
12994# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12995# from the following attributes which affect the ABI of this Python build (in
12996# this order):
12997#
12998# * The Python implementation (always 'cpython-' for us)
12999# * The major and minor version numbers
13000# * --with-pydebug (adds a 'd')
13001# * --with-pymalloc (adds a 'm')
13002# * --with-wide-unicode (adds a 'u')
13003#
13004# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013005# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13006# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013007
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13009$as_echo_n "checking ABIFLAGS... " >&6; }
13010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13011$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13013$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013014SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13016$as_echo "$SOABI" >&6; }
13017
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13019$as_echo_n "checking LDVERSION... " >&6; }
13020LDVERSION='$(VERSION)$(ABIFLAGS)'
13021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13022$as_echo "$LDVERSION" >&6; }
13023
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013024# SO is the extension of shared libraries `(including the dot!)
13025# -- usually .so, .sl on HP-UX, .dll on Cygwin
13026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13027$as_echo_n "checking SO... " >&6; }
13028if test -z "$SO"
13029then
13030 case $ac_sys_system in
13031 hp*|HP*)
13032 case `uname -m` in
13033 ia64) SO=.so;;
13034 *) SO=.sl;;
13035 esac
13036 ;;
13037 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013038 Linux*|GNU*)
13039 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013040 *) SO=.so;;
13041 esac
13042else
13043 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013044 echo
13045 echo '====================================================================='
13046 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013047 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013048 echo '+ Do you really mean to change the extension for shared libraries? +'
13049 echo '+ Continuing in 10 seconds to let you to ponder. +'
13050 echo '+ +'
13051 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013052 sleep 10
13053fi
13054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13055$as_echo "$SO" >&6; }
13056
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013057# Check whether right shifting a negative integer extends the sign bit
13058# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13060$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013061if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013063else
Martin v. Löwis11437992002-04-12 09:54:03 +000013064
Matthias Kloseb9621712010-04-24 17:59:49 +000013065if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013066 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013067else
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013069/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013070
13071int main()
13072{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013073 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013074}
13075
Martin v. Löwis11437992002-04-12 09:54:03 +000013076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013077if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013078 ac_cv_rshift_extends_sign=yes
13079else
Matthias Kloseb9621712010-04-24 17:59:49 +000013080 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13083 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013084fi
13085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086fi
13087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13089$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013090if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013091then
Martin v. Löwis11437992002-04-12 09:54:03 +000013092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013094
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013095fi
13096
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013097# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13099$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013100if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013102else
Martin v. Löwis11437992002-04-12 09:54:03 +000013103
Matthias Kloseb9621712010-04-24 17:59:49 +000013104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013105/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013106#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013107int
13108main ()
13109{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013110
13111 FILE *f = fopen("/dev/null", "r");
13112 flockfile(f);
13113 getc_unlocked(f);
13114 funlockfile(f);
13115
Martin v. Löwis11437992002-04-12 09:54:03 +000013116 ;
13117 return 0;
13118}
13119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013120if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013121 ac_cv_have_getc_unlocked=yes
13122else
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 ac_cv_have_getc_unlocked=no
13124fi
13125rm -f core conftest.err conftest.$ac_objext \
13126 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13130$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013131if test "$ac_cv_have_getc_unlocked" = yes
13132then
Martin v. Löwis11437992002-04-12 09:54:03 +000013133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013135
13136fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013137
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013138# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013139# save the value of LIBS so we don't actually link Python with readline
13140LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013141
Gregory P. Smith18820942008-09-07 06:24:49 +000013142# On some systems we need to link readline to a termcap compatible
13143# library. NOTE: Keep the precedence of listed libraries synchronised
13144# with setup.py.
13145py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13147$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013148for py_libtermcap in "" ncursesw ncurses curses termcap; do
13149 if test -z "$py_libtermcap"; then
13150 READLINE_LIBS="-lreadline"
13151 else
13152 READLINE_LIBS="-lreadline -l$py_libtermcap"
13153 fi
13154 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013156/* end confdefs.h. */
13157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013158/* Override any GCC internal prototype to avoid an error.
13159 Use char because int might match the return type of a GCC
13160 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013161#ifdef __cplusplus
13162extern "C"
13163#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013164char readline ();
13165int
13166main ()
13167{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013168return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013169 ;
13170 return 0;
13171}
13172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013173if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013174 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013176rm -f core conftest.err conftest.$ac_objext \
13177 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013178 if test $py_cv_lib_readline = yes; then
13179 break
13180 fi
13181done
13182# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13183#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013184if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13186$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013187else
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13189$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013192
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013193fi
13194
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013195# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13197$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013198if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013200else
13201 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013202LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013204/* end confdefs.h. */
13205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013206/* Override any GCC internal prototype to avoid an error.
13207 Use char because int might match the return type of a GCC
13208 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013209#ifdef __cplusplus
13210extern "C"
13211#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013212char rl_callback_handler_install ();
13213int
13214main ()
13215{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013216return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013217 ;
13218 return 0;
13219}
13220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013221if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013222 ac_cv_lib_readline_rl_callback_handler_install=yes
13223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013226rm -f core conftest.err conftest.$ac_objext \
13227 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013228LIBS=$ac_check_lib_save_LIBS
13229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13231$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013232if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013233
Matthias Kloseb9621712010-04-24 17:59:49 +000013234$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013235
13236fi
13237
13238
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013239# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013241/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013242#include <readline/readline.h>
13243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013244if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013245 have_readline=yes
13246else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013247 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013248
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013249fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013250rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013251if test $have_readline = yes
13252then
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013254/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013255#include <readline/readline.h>
13256
13257_ACEOF
13258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013260
Matthias Kloseb9621712010-04-24 17:59:49 +000013261$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013262
13263fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013264rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013265
Matthias Kloseb9621712010-04-24 17:59:49 +000013266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013267/* end confdefs.h. */
13268#include <readline/readline.h>
13269
13270_ACEOF
13271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013273
Matthias Kloseb9621712010-04-24 17:59:49 +000013274$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013275
13276fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013277rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013278
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013279fi
13280
Martin v. Löwis0daad592001-09-30 21:09:59 +000013281# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13283$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013284if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013285 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013286else
Martin v. Löwis11437992002-04-12 09:54:03 +000013287 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013288LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013292/* Override any GCC internal prototype to avoid an error.
13293 Use char because int might match the return type of a GCC
13294 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013295#ifdef __cplusplus
13296extern "C"
13297#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013298char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013299int
13300main ()
13301{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013302return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013303 ;
13304 return 0;
13305}
13306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013307if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013308 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013309else
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013312rm -f core conftest.err conftest.$ac_objext \
13313 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013314LIBS=$ac_check_lib_save_LIBS
13315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13317$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013318if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013321
Martin v. Löwis0daad592001-09-30 21:09:59 +000013322fi
13323
Michael W. Hudson54241132001-12-07 15:38:26 +000013324
Thomas Wouters89d996e2007-09-08 17:39:28 +000013325# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13327$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013328if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013330else
13331 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013332LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013334/* end confdefs.h. */
13335
13336/* Override any GCC internal prototype to avoid an error.
13337 Use char because int might match the return type of a GCC
13338 builtin and then its argument prototype would still apply. */
13339#ifdef __cplusplus
13340extern "C"
13341#endif
13342char rl_completion_display_matches_hook ();
13343int
13344main ()
13345{
13346return rl_completion_display_matches_hook ();
13347 ;
13348 return 0;
13349}
13350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013351if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013352 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013356rm -f core conftest.err conftest.$ac_objext \
13357 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013358LIBS=$ac_check_lib_save_LIBS
13359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13361$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013362if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013363
Matthias Kloseb9621712010-04-24 17:59:49 +000013364$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013365
13366fi
13367
13368
Martin v. Löwis0daad592001-09-30 21:09:59 +000013369# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13371$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013372if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013374else
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013376LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380/* Override any GCC internal prototype to avoid an error.
13381 Use char because int might match the return type of a GCC
13382 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013383#ifdef __cplusplus
13384extern "C"
13385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013386char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013387int
13388main ()
13389{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013390return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 ;
13392 return 0;
13393}
13394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013395if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013396 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013397else
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013400rm -f core conftest.err conftest.$ac_objext \
13401 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013402LIBS=$ac_check_lib_save_LIBS
13403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13405$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013406if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013409
Guido van Rossum353ae582001-07-10 16:45:32 +000013410fi
13411
Jack Jansendd19cf82001-12-06 22:36:17 +000013412
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013413# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013415/* end confdefs.h. */
13416#include <readline/readline.h>
13417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013418if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013419 have_readline=yes
13420else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013421 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013422
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013423fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013424rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013425if test $have_readline = yes
13426then
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013428/* end confdefs.h. */
13429#include <readline/readline.h>
13430
13431_ACEOF
13432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013436
13437fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013438rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013439
13440fi
13441
Martin v. Löwis82bca632006-02-10 20:49:30 +000013442# End of readline checks: restore LIBS
13443LIBS=$LIBS_no_readline
13444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13446$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013447if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013449else
Martin v. Löwis11437992002-04-12 09:54:03 +000013450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013452 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013453else
Matthias Kloseb9621712010-04-24 17:59:49 +000013454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013455/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013456
13457int main()
13458{
13459 int val1 = nice(1);
13460 if (val1 != -1 && val1 == nice(2))
13461 exit(0);
13462 exit(1);
13463}
13464
Martin v. Löwis11437992002-04-12 09:54:03 +000013465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013466if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013467 ac_cv_broken_nice=yes
13468else
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13472 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013473fi
13474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013475fi
13476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13478$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013479if test "$ac_cv_broken_nice" = yes
13480then
Martin v. Löwis11437992002-04-12 09:54:03 +000013481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013483
13484fi
13485
Matthias Kloseb9621712010-04-24 17:59:49 +000013486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13487$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013488if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013490else
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013492 ac_cv_broken_poll=no
13493else
Matthias Kloseb9621712010-04-24 17:59:49 +000013494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013495/* end confdefs.h. */
13496
13497#include <poll.h>
13498
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013499int main()
13500{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013501 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013502 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013503
13504 close (42);
13505
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013506 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013507 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013508 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013509 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013510 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013511 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013512 return 1;
13513}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013514
13515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013516if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013517 ac_cv_broken_poll=yes
13518else
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13522 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013524
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013525fi
13526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13528$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013529if test "$ac_cv_broken_poll" = yes
13530then
13531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013533
13534fi
13535
Brett Cannon43802422005-02-10 20:48:03 +000013536# 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 +000013537# (which is not required by ISO C or UNIX spec) and/or if we support
13538# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013539ac_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 +000013540#include <$ac_cv_struct_tm>
13541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542"
Victor Stinnere0be4232011-10-25 13:06:09 +020013543if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013544
13545cat >>confdefs.h <<_ACEOF
13546#define HAVE_STRUCT_TM_TM_ZONE 1
13547_ACEOF
13548
13549
13550fi
13551
13552if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013555
13556else
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13558"
Victor Stinnere0be4232011-10-25 13:06:09 +020013559if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013561else
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013563fi
13564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013566#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013567_ACEOF
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13570$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013571if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013573else
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013575/* end confdefs.h. */
13576#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013577#if !HAVE_DECL_TZNAME
13578extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013579#endif
13580
13581int
13582main ()
13583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013585 ;
13586 return 0;
13587}
13588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013589if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013590 ac_cv_var_tzname=yes
13591else
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013594rm -f core conftest.err conftest.$ac_objext \
13595 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13598$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013599 if test $ac_cv_var_tzname = yes; then
13600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013602
13603 fi
13604fi
13605
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013606
Martin v. Löwis1d459062005-03-14 21:23:33 +000013607# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13609$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013610if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013612else
13613
Matthias Kloseb9621712010-04-24 17:59:49 +000013614if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013615 ac_cv_working_tzset=no
13616else
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013618/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013619
13620#include <stdlib.h>
13621#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013622#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013623
13624#if HAVE_TZNAME
13625extern char *tzname[];
13626#endif
13627
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013628int main()
13629{
Brett Cannon18367812003-09-19 00:59:16 +000013630 /* Note that we need to ensure that not only does tzset(3)
13631 do 'something' with localtime, but it works as documented
13632 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013633 This includes making sure that tzname is set properly if
13634 tm->tm_zone does not exist since it is the alternative way
13635 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013636
13637 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013638 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013639 */
13640
Martin v. Löwis1d459062005-03-14 21:23:33 +000013641 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013642 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13643
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013644 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013645 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013646 if (localtime(&groundhogday)->tm_hour != 0)
13647 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013648#if HAVE_TZNAME
13649 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13650 if (strcmp(tzname[0], "UTC") ||
13651 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13652 exit(1);
13653#endif
Brett Cannon18367812003-09-19 00:59:16 +000013654
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013655 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013656 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013657 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013658 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013659#if HAVE_TZNAME
13660 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13661 exit(1);
13662#endif
Brett Cannon18367812003-09-19 00:59:16 +000013663
13664 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13665 tzset();
13666 if (localtime(&groundhogday)->tm_hour != 11)
13667 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013668#if HAVE_TZNAME
13669 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13670 exit(1);
13671#endif
13672
13673#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013674 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13675 exit(1);
13676 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13677 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013678#endif
Brett Cannon18367812003-09-19 00:59:16 +000013679
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013680 exit(0);
13681}
13682
13683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013684if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013685 ac_cv_working_tzset=yes
13686else
Matthias Kloseb9621712010-04-24 17:59:49 +000013687 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13690 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013691fi
13692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013693fi
13694
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13696$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013697if test "$ac_cv_working_tzset" = yes
13698then
13699
Matthias Kloseb9621712010-04-24 17:59:49 +000013700$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013701
13702fi
13703
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013704# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13706$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013707if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013708 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013709else
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013711/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013712#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013713int
13714main ()
13715{
13716
13717struct stat st;
13718st.st_mtim.tv_nsec = 1;
13719
13720 ;
13721 return 0;
13722}
13723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013724if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013725 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013726else
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13730fi
13731
Matthias Kloseb9621712010-04-24 17:59:49 +000013732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13733$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013734if test "$ac_cv_stat_tv_nsec" = yes
13735then
13736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013738
13739fi
13740
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013741# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13743$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013744if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013746else
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013748/* end confdefs.h. */
13749#include <sys/stat.h>
13750int
13751main ()
13752{
13753
13754struct stat st;
13755st.st_mtimespec.tv_nsec = 1;
13756
13757 ;
13758 return 0;
13759}
13760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013762 ac_cv_stat_tv_nsec2=yes
13763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13767fi
13768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13770$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013771if test "$ac_cv_stat_tv_nsec2" = yes
13772then
13773
Matthias Kloseb9621712010-04-24 17:59:49 +000013774$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013775
13776fi
13777
Jack Jansen666b1e72001-10-31 12:11:48 +000013778# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13780$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013781if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013783else
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013785/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013786#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013787int
13788main ()
13789{
Jack Jansen666b1e72001-10-31 12:11:48 +000013790
13791 int rtn;
13792 rtn = mvwdelch(0,0,0);
13793
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 ;
13795 return 0;
13796}
13797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013798if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013799 ac_cv_mvwdelch_is_expression=yes
13800else
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13804fi
13805
Matthias Kloseb9621712010-04-24 17:59:49 +000013806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13807$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013808
13809if test "$ac_cv_mvwdelch_is_expression" = yes
13810then
Martin v. Löwis11437992002-04-12 09:54:03 +000013811
Matthias Kloseb9621712010-04-24 17:59:49 +000013812$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013813
13814fi
13815
Matthias Kloseb9621712010-04-24 17:59:49 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13817$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013818if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013819 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013820else
Matthias Kloseb9621712010-04-24 17:59:49 +000013821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013822/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013823#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013824int
13825main ()
13826{
Jack Jansen666b1e72001-10-31 12:11:48 +000013827
13828 WINDOW *w;
13829 w->_flags = 0;
13830
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 ;
13832 return 0;
13833}
13834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013835if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013836 ac_cv_window_has_flags=yes
13837else
Matthias Kloseb9621712010-04-24 17:59:49 +000013838 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13841fi
13842
Matthias Kloseb9621712010-04-24 17:59:49 +000013843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13844$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013845
Jack Jansen666b1e72001-10-31 12:11:48 +000013846
13847if test "$ac_cv_window_has_flags" = yes
13848then
Martin v. Löwis11437992002-04-12 09:54:03 +000013849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013851
13852fi
13853
Matthias Kloseb9621712010-04-24 17:59:49 +000013854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13855$as_echo_n "checking for is_term_resized... " >&6; }
13856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013857/* end confdefs.h. */
13858#include <curses.h>
13859int
13860main ()
13861{
13862void *x=is_term_resized
13863 ;
13864 return 0;
13865}
13866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013867if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013870
Matthias Kloseb159a552010-04-25 21:00:44 +000013871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013872$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013873else
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13875$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013876
13877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13879
Matthias Kloseb9621712010-04-24 17:59:49 +000013880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13881$as_echo_n "checking for resize_term... " >&6; }
13882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013883/* end confdefs.h. */
13884#include <curses.h>
13885int
13886main ()
13887{
13888void *x=resize_term
13889 ;
13890 return 0;
13891}
13892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013893if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013896
Matthias Kloseb159a552010-04-25 21:00:44 +000013897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013898$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013899else
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13901$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013902
13903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13905
Matthias Kloseb9621712010-04-24 17:59:49 +000013906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13907$as_echo_n "checking for resizeterm... " >&6; }
13908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013909/* end confdefs.h. */
13910#include <curses.h>
13911int
13912main ()
13913{
13914void *x=resizeterm
13915 ;
13916 return 0;
13917}
13918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013919if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013920
Matthias Kloseb9621712010-04-24 17:59:49 +000013921$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013922
Matthias Kloseb159a552010-04-25 21:00:44 +000013923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013924$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013925else
Matthias Kloseb9621712010-04-24 17:59:49 +000013926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13927$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013928
13929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13933$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013934
13935if test -r /dev/ptmx
13936then
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13938$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013939
Matthias Kloseb9621712010-04-24 17:59:49 +000013940$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013941
Thomas Wouters89f507f2006-12-13 04:49:30 +000013942else
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13944$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013945fi
13946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13948$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013949
13950if test -r /dev/ptc
13951then
Matthias Kloseb9621712010-04-24 17:59:49 +000013952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13953$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013954
Matthias Kloseb9621712010-04-24 17:59:49 +000013955$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013956
Thomas Wouters89f507f2006-12-13 04:49:30 +000013957else
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13959$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013960fi
13961
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013962if test "$have_long_long" = yes
13963then
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13965$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013966 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013968else
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010013970 ac_cv_have_long_long_format="cross -- assuming no"
13971 if test x$GCC = xyes; then
13972 save_CFLAGS=$CFLAGS
13973 CFLAGS="$CFLAGS -Werror -Wformat"
13974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13975/* end confdefs.h. */
13976
13977 #include <stdio.h>
13978 #include <stddef.h>
13979
13980int
13981main ()
13982{
13983
13984 char *buffer;
13985 sprintf(buffer, "%lld", (long long)123);
13986 sprintf(buffer, "%lld", (long long)-123);
13987 sprintf(buffer, "%llu", (unsigned long long)123);
13988
13989 ;
13990 return 0;
13991}
13992_ACEOF
13993if ac_fn_c_try_compile "$LINENO"; then :
13994 ac_cv_have_long_long_format=yes
13995
13996fi
13997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13998 CFLAGS=$save_CFLAGS
13999 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014000else
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014002/* end confdefs.h. */
14003
14004 #include <stdio.h>
14005 #include <stddef.h>
14006 #include <string.h>
14007
14008 #ifdef HAVE_SYS_TYPES_H
14009 #include <sys/types.h>
14010 #endif
14011
14012 int main()
14013 {
14014 char buffer[256];
14015
14016 if (sprintf(buffer, "%lld", (long long)123) < 0)
14017 return 1;
14018 if (strcmp(buffer, "123"))
14019 return 1;
14020
14021 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14022 return 1;
14023 if (strcmp(buffer, "-123"))
14024 return 1;
14025
14026 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14027 return 1;
14028 if (strcmp(buffer, "123"))
14029 return 1;
14030
14031 return 0;
14032 }
14033
14034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014035if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014036 ac_cv_have_long_long_format=yes
14037else
Matthias Kloseb9621712010-04-24 17:59:49 +000014038 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14041 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014042fi
14043
14044
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014045fi
14046
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14048$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014049fi
14050
Mark Dickinson89d7d412009-12-31 20:50:59 +000014051if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014052then
14053
Matthias Kloseb9621712010-04-24 17:59:49 +000014054$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014055
14056fi
14057
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014058if test $ac_sys_system = Darwin
14059then
14060 LIBS="$LIBS -framework CoreFoundation"
14061fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014062
Matthias Kloseb9621712010-04-24 17:59:49 +000014063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14064$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014065if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014066 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014067else
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014069 ac_cv_have_size_t_format="cross -- assuming yes"
14070
Thomas Wouters477c8d52006-05-27 19:21:47 +000014071else
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014073/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014074
Thomas Wouters477c8d52006-05-27 19:21:47 +000014075#include <stdio.h>
14076#include <stddef.h>
14077#include <string.h>
14078
Christian Heimes2c181612007-12-17 20:04:13 +000014079#ifdef HAVE_SYS_TYPES_H
14080#include <sys/types.h>
14081#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014082
14083#ifdef HAVE_SSIZE_T
14084typedef ssize_t Py_ssize_t;
14085#elif SIZEOF_VOID_P == SIZEOF_LONG
14086typedef long Py_ssize_t;
14087#else
14088typedef int Py_ssize_t;
14089#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014090
Christian Heimes2c181612007-12-17 20:04:13 +000014091int main()
14092{
14093 char buffer[256];
14094
Thomas Wouters477c8d52006-05-27 19:21:47 +000014095 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14096 return 1;
14097
Thomas Wouters89f507f2006-12-13 04:49:30 +000014098 if (strcmp(buffer, "123"))
14099 return 1;
14100
14101 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14102 return 1;
14103
14104 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014105 return 1;
14106
14107 return 0;
14108}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014109
Thomas Wouters477c8d52006-05-27 19:21:47 +000014110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014111if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014112 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014113else
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14117 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014118fi
14119
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14122$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014123if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014124
Matthias Kloseb9621712010-04-24 17:59:49 +000014125$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014126
14127fi
14128
Matthias Kloseb9621712010-04-24 17:59:49 +000014129ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014130#ifdef HAVE_SYS_TYPES_H
14131#include <sys/types.h>
14132#endif
14133#ifdef HAVE_SYS_SOCKET_H
14134#include <sys/socket.h>
14135#endif
14136
Matthias Kloseb9621712010-04-24 17:59:49 +000014137"
Victor Stinnere0be4232011-10-25 13:06:09 +020014138if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014139
Martin v. Löwis11437992002-04-12 09:54:03 +000014140else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014141
Matthias Kloseb9621712010-04-24 17:59:49 +000014142$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014143
14144fi
14145
Michael W. Hudson54241132001-12-07 15:38:26 +000014146
Matthias Kloseb9621712010-04-24 17:59:49 +000014147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14148$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014149if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014151else
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014153 ac_cv_broken_mbstowcs=no
14154else
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014156/* end confdefs.h. */
14157
14158#include<stdlib.h>
14159int main() {
14160 size_t len = -1;
14161 const char *str = "text";
14162 len = mbstowcs(NULL, str, 0);
14163 return (len != 4);
14164}
14165
14166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014167if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014168 ac_cv_broken_mbstowcs=no
14169else
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14173 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014174fi
14175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014176fi
14177
Matthias Kloseb9621712010-04-24 17:59:49 +000014178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14179$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014180if test "$ac_cv_broken_mbstowcs" = yes
14181then
14182
Matthias Kloseb9621712010-04-24 17:59:49 +000014183$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014184
14185fi
14186
Antoine Pitroub52ec782009-01-25 16:34:23 +000014187# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14189$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014190
14191# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014192if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014193 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014194if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014195then
14196
Matthias Kloseb9621712010-04-24 17:59:49 +000014197$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14200$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014201fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014202if test "$withval" = no
14203then
14204
14205$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14206
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14208$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014209fi
14210
Antoine Pitrou042b1282010-08-13 21:15:58 +000014211else
14212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14213$as_echo "no value specified" >&6; }
14214fi
14215
Antoine Pitroub52ec782009-01-25 16:34:23 +000014216
Matthias Kloseb17289e2012-03-15 19:51:34 +010014217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14218$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14219if ${ac_cv_computed_gotos+:} false; then :
14220 $as_echo_n "(cached) " >&6
14221else
14222 if test "$cross_compiling" = yes; then :
14223 if test "${with_computed_gotos+set}" = set; then
14224 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14225 else
14226 ac_cv_computed_gotos=no
14227 fi
14228else
14229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14230/* end confdefs.h. */
14231
14232int main(int argc, char **argv)
14233{
14234 static void *targets[1] = { &&LABEL1 };
14235 goto LABEL2;
14236LABEL1:
14237 return 0;
14238LABEL2:
14239 goto *targets[0];
14240 return 1;
14241}
14242
14243_ACEOF
14244if ac_fn_c_try_run "$LINENO"; then :
14245 ac_cv_computed_gotos=yes
14246else
14247 ac_cv_computed_gotos=no
14248fi
14249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14250 conftest.$ac_objext conftest.beam conftest.$ac_ext
14251fi
14252
14253fi
14254
14255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14256$as_echo "$ac_cv_computed_gotos" >&6; }
14257case "$ac_cv_computed_gotos" in yes*)
14258
14259$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14260
14261esac
14262
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014263case $ac_sys_system in
14264AIX*)
14265
14266$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14267 ;;
14268esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014269
Michael W. Hudson54241132001-12-07 15:38:26 +000014270
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014271
14272
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014273for h in `(cd $srcdir;echo Python/thread_*.h)`
14274do
14275 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14276done
14277
Michael W. Hudson54241132001-12-07 15:38:26 +000014278
Neal Norwitzd24499d2005-12-18 21:36:39 +000014279SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14281$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014282for dir in $SRCDIRS; do
14283 if test ! -d $dir; then
14284 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014285 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014286done
Matthias Kloseb9621712010-04-24 17:59:49 +000014287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14288$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014289
Stefan Krah1919b7e2012-03-21 18:25:23 +010014290# Availability of -O2:
14291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14292$as_echo_n "checking for -O2... " >&6; }
14293saved_cflags="$CFLAGS"
14294CFLAGS="-O2"
14295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14296/* end confdefs.h. */
14297
14298int
14299main ()
14300{
14301
14302
14303 ;
14304 return 0;
14305}
14306_ACEOF
14307if ac_fn_c_try_compile "$LINENO"; then :
14308 have_O2=yes
14309else
14310 have_O2=no
14311fi
14312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14314$as_echo "$have_O2" >&6; }
14315CFLAGS="$saved_cflags"
14316
14317# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14318# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14320$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14321saved_cflags="$CFLAGS"
14322CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14323if test "$have_O2" = no; then
14324 CFLAGS=""
14325fi
14326if test "$cross_compiling" = yes; then :
14327 have_glibc_memmove_bug=undefined
14328else
14329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14330/* end confdefs.h. */
14331
14332#include <stdio.h>
14333#include <stdlib.h>
14334#include <string.h>
14335void foo(void *p, void *q) { memmove(p, q, 19); }
14336int main() {
14337 char a[32] = "123456789000000000";
14338 foo(&a[9], a);
14339 if (strcmp(a, "123456789123456789000000000") != 0)
14340 return 1;
14341 foo(a, &a[9]);
14342 if (strcmp(a, "123456789000000000") != 0)
14343 return 1;
14344 return 0;
14345}
14346
14347_ACEOF
14348if ac_fn_c_try_run "$LINENO"; then :
14349 have_glibc_memmove_bug=no
14350else
14351 have_glibc_memmove_bug=yes
14352fi
14353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14354 conftest.$ac_objext conftest.beam conftest.$ac_ext
14355fi
14356
14357CFLAGS="$saved_cflags"
14358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
14359$as_echo "$have_glibc_memmove_bug" >&6; }
14360if test "$have_glibc_memmove_bug" = yes; then
14361
14362$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
14363
14364fi
14365
14366if test "$have_gcc_asm_for_x87" = yes; then
14367 # Some versions of gcc miscompile inline asm:
14368 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
14369 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
14370 case $CC in
14371 *gcc*)
14372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
14373$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
14374 saved_cflags="$CFLAGS"
14375 CFLAGS="-O2"
14376 if test "$cross_compiling" = yes; then :
14377 have_ipa_pure_const_bug=undefined
14378else
14379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14380/* end confdefs.h. */
14381
14382 __attribute__((noinline)) int
14383 foo(int *p) {
14384 int r;
14385 asm ( "movl \$6, (%1)\n\t"
14386 "xorl %0, %0\n\t"
14387 : "=r" (r) : "r" (p) : "memory"
14388 );
14389 return r;
14390 }
14391 int main() {
14392 int p = 8;
14393 if ((foo(&p) ? : p) != 6)
14394 return 1;
14395 return 0;
14396 }
14397
14398_ACEOF
14399if ac_fn_c_try_run "$LINENO"; then :
14400 have_ipa_pure_const_bug=no
14401else
14402 have_ipa_pure_const_bug=yes
14403fi
14404rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14405 conftest.$ac_objext conftest.beam conftest.$ac_ext
14406fi
14407
14408 CFLAGS="$saved_cflags"
14409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
14410$as_echo "$have_ipa_pure_const_bug" >&6; }
14411 if test "$have_ipa_pure_const_bug" = yes; then
14412
14413$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
14414
14415 fi
14416 ;;
14417 esac
14418fi
14419
Guido van Rossum627b2d71993-12-24 10:39:16 +000014420# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014421ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014422
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014423ac_config_files="$ac_config_files Modules/ld_so_aix"
14424
Martin v. Löwis11437992002-04-12 09:54:03 +000014425cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014426# This file is a shell script that caches the results of configure
14427# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014428# scripts and configure runs, see configure's option --config-cache.
14429# It is not useful on other systems. If it contains results you don't
14430# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014431#
Martin v. Löwis11437992002-04-12 09:54:03 +000014432# config.status only pays attention to the cache file if you give it
14433# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014434#
Skip Montanaro6dead952003-09-25 14:50:04 +000014435# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014436# loading this file, other *unset* `ac_cv_foo' will be assigned the
14437# following values.
14438
14439_ACEOF
14440
Guido van Rossumf78abae1997-01-21 22:02:36 +000014441# The following way of writing the cache mishandles newlines in values,
14442# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014443# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014444# Ultrix sh set writes to stderr and can't be redirected directly,
14445# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014446(
14447 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14448 eval ac_val=\$$ac_var
14449 case $ac_val in #(
14450 *${as_nl}*)
14451 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14453$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454 esac
14455 case $ac_var in #(
14456 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14458 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459 esac ;;
14460 esac
14461 done
14462
Martin v. Löwis11437992002-04-12 09:54:03 +000014463 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14465 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 # `set' does not quote correctly, so add quotes: double-quote
14467 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014468 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014469 "s/'/'\\\\''/g;
14470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 *)
14473 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476 esac |
14477 sort
14478) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014479 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014481 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014482 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14484 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14486 :end' >>confcache
14487if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14488 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014489 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14491$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020014492 if test ! -f "$cache_file" || test -h "$cache_file"; then
14493 cat confcache >"$cache_file"
14494 else
14495 case $cache_file in #(
14496 */* | ?:*)
14497 mv -f confcache "$cache_file"$$ &&
14498 mv -f "$cache_file"$$ "$cache_file" ;; #(
14499 *)
14500 mv -f confcache "$cache_file" ;;
14501 esac
14502 fi
14503 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014504 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14506$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014507 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014508fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014509rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014510
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014511test "x$prefix" = xNONE && prefix=$ac_default_prefix
14512# Let make expand exec_prefix.
14513test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014514
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014515DEFS=-DHAVE_CONFIG_H
14516
Skip Montanaro6dead952003-09-25 14:50:04 +000014517ac_libobjs=
14518ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014519U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014520for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14521 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14525 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14527 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014528done
14529LIBOBJS=$ac_libobjs
14530
14531LTLIBOBJS=$ac_ltlibobjs
14532
14533
Martin v. Löwis11437992002-04-12 09:54:03 +000014534
Matthias Kloseb9621712010-04-24 17:59:49 +000014535
Victor Stinnere0be4232011-10-25 13:06:09 +020014536: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014537ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014538ac_clean_files_save=$ac_clean_files
14539ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014540{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14541$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14542as_write_fail=0
14543cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014544#! $SHELL
14545# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014546# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014547# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014548# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014549
Martin v. Löwis11437992002-04-12 09:54:03 +000014550debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014551ac_cs_recheck=false
14552ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554SHELL=\${CONFIG_SHELL-$SHELL}
14555export SHELL
14556_ASEOF
14557cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14558## -------------------- ##
14559## M4sh Initialization. ##
14560## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562# Be more Bourne compatible
14563DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014564if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014565 emulate sh
14566 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014567 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014568 # is contrary to our usage. Disable this feature.
14569 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014571else
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 case `(set -o) 2>/dev/null` in #(
14573 *posix*) :
14574 set -o posix ;; #(
14575 *) :
14576 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014578fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014579
14580
Matthias Kloseb9621712010-04-24 17:59:49 +000014581as_nl='
14582'
14583export as_nl
14584# Printing a long string crashes Solaris 7 /usr/bin/printf.
14585as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14586as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14587as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14588# Prefer a ksh shell builtin over an external printf program on Solaris,
14589# but without wasting forks for bash or zsh.
14590if test -z "$BASH_VERSION$ZSH_VERSION" \
14591 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14592 as_echo='print -r --'
14593 as_echo_n='print -rn --'
14594elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14595 as_echo='printf %s\n'
14596 as_echo_n='printf %s'
14597else
14598 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14599 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14600 as_echo_n='/usr/ucb/echo -n'
14601 else
14602 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14603 as_echo_n_body='eval
14604 arg=$1;
14605 case $arg in #(
14606 *"$as_nl"*)
14607 expr "X$arg" : "X\\(.*\\)$as_nl";
14608 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14609 esac;
14610 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14611 '
14612 export as_echo_n_body
14613 as_echo_n='sh -c $as_echo_n_body as_echo'
14614 fi
14615 export as_echo_body
14616 as_echo='sh -c $as_echo_body as_echo'
14617fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014618
14619# The user is always right.
14620if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 PATH_SEPARATOR=:
14622 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14623 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14624 PATH_SEPARATOR=';'
14625 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014628
14629# IFS
14630# We need space, tab and new line, in precisely that order. Quoting is
14631# there to prevent editors from complaining about space-tab.
14632# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14633# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014634IFS=" "" $as_nl"
14635
14636# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020014637as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014638case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014639 *[\\/]* ) as_myself=$0 ;;
14640 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014641for as_dir in $PATH
14642do
14643 IFS=$as_save_IFS
14644 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14646 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014647IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649 ;;
14650esac
14651# We did not find ourselves, most probably we were run as `sh COMMAND'
14652# in which case we are not to be found in the path.
14653if test "x$as_myself" = x; then
14654 as_myself=$0
14655fi
14656if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014657 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14658 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659fi
14660
Matthias Kloseb9621712010-04-24 17:59:49 +000014661# Unset variables that we do not need and which cause bugs (e.g. in
14662# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14663# suppresses any "Segmentation fault" message there. '((' could
14664# trigger a bug in pdksh 5.2.14.
14665for as_var in BASH_ENV ENV MAIL MAILPATH
14666do eval test x\${$as_var+set} = xset \
14667 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668done
14669PS1='$ '
14670PS2='> '
14671PS4='+ '
14672
14673# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014674LC_ALL=C
14675export LC_ALL
14676LANGUAGE=C
14677export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678
Matthias Kloseb9621712010-04-24 17:59:49 +000014679# CDPATH.
14680(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14681
14682
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014683# as_fn_error STATUS ERROR [LINENO LOG_FD]
14684# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014685# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14686# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014687# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014688as_fn_error ()
14689{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014690 as_status=$1; test $as_status -eq 0 && as_status=1
14691 if test "$4"; then
14692 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14693 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014694 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014695 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 as_fn_exit $as_status
14697} # as_fn_error
14698
14699
14700# as_fn_set_status STATUS
14701# -----------------------
14702# Set $? to STATUS, without forking.
14703as_fn_set_status ()
14704{
14705 return $1
14706} # as_fn_set_status
14707
14708# as_fn_exit STATUS
14709# -----------------
14710# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14711as_fn_exit ()
14712{
14713 set +e
14714 as_fn_set_status $1
14715 exit $1
14716} # as_fn_exit
14717
14718# as_fn_unset VAR
14719# ---------------
14720# Portably unset VAR.
14721as_fn_unset ()
14722{
14723 { eval $1=; unset $1;}
14724}
14725as_unset=as_fn_unset
14726# as_fn_append VAR VALUE
14727# ----------------------
14728# Append the text in VALUE to the end of the definition contained in VAR. Take
14729# advantage of any shell optimizations that allow amortized linear growth over
14730# repeated appends, instead of the typical quadratic growth present in naive
14731# implementations.
14732if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14733 eval 'as_fn_append ()
14734 {
14735 eval $1+=\$2
14736 }'
14737else
14738 as_fn_append ()
14739 {
14740 eval $1=\$$1\$2
14741 }
14742fi # as_fn_append
14743
14744# as_fn_arith ARG...
14745# ------------------
14746# Perform arithmetic evaluation on the ARGs, and store the result in the
14747# global $as_val. Take advantage of shells that can avoid forks. The arguments
14748# must be portable across $(()) and expr.
14749if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14750 eval 'as_fn_arith ()
14751 {
14752 as_val=$(( $* ))
14753 }'
14754else
14755 as_fn_arith ()
14756 {
14757 as_val=`expr "$@" || test $? -eq 1`
14758 }
14759fi # as_fn_arith
14760
14761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014762if expr a : '\(a\)' >/dev/null 2>&1 &&
14763 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14764 as_expr=expr
14765else
14766 as_expr=false
14767fi
14768
14769if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14770 as_basename=basename
14771else
14772 as_basename=false
14773fi
14774
Matthias Kloseb9621712010-04-24 17:59:49 +000014775if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14776 as_dirname=dirname
14777else
14778 as_dirname=false
14779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781as_me=`$as_basename -- "$0" ||
14782$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14783 X"$0" : 'X\(//\)$' \| \
14784 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014785$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786 sed '/^.*\/\([^/][^/]*\)\/*$/{
14787 s//\1/
14788 q
14789 }
14790 /^X\/\(\/\/\)$/{
14791 s//\1/
14792 q
14793 }
14794 /^X\/\(\/\).*/{
14795 s//\1/
14796 q
14797 }
14798 s/.*/./; q'`
14799
Matthias Kloseb9621712010-04-24 17:59:49 +000014800# Avoid depending upon Character Ranges.
14801as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14802as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14803as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14804as_cr_digits='0123456789'
14805as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014806
14807ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014808case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 xy) ECHO_C='\c';;
14813 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14814 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815 esac;;
14816*)
14817 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014818esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014819
Martin v. Löwis11437992002-04-12 09:54:03 +000014820rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821if test -d conf$$.dir; then
14822 rm -f conf$$.dir/conf$$.file
14823else
14824 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014825 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014827if (echo >conf$$.file) 2>/dev/null; then
14828 if ln -s conf$$.file conf$$ 2>/dev/null; then
14829 as_ln_s='ln -s'
14830 # ... but there are two gotchas:
14831 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14832 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14833 # In both cases, we have to default to `cp -p'.
14834 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14835 as_ln_s='cp -p'
14836 elif ln conf$$.file conf$$ 2>/dev/null; then
14837 as_ln_s=ln
14838 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014841else
14842 as_ln_s='cp -p'
14843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014844rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14845rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014846
Matthias Kloseb9621712010-04-24 17:59:49 +000014847
14848# as_fn_mkdir_p
14849# -------------
14850# Create "$as_dir" as a directory, including parents if necessary.
14851as_fn_mkdir_p ()
14852{
14853
14854 case $as_dir in #(
14855 -*) as_dir=./$as_dir;;
14856 esac
14857 test -d "$as_dir" || eval $as_mkdir_p || {
14858 as_dirs=
14859 while :; do
14860 case $as_dir in #(
14861 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14862 *) as_qdir=$as_dir;;
14863 esac
14864 as_dirs="'$as_qdir' $as_dirs"
14865 as_dir=`$as_dirname -- "$as_dir" ||
14866$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14867 X"$as_dir" : 'X\(//\)[^/]' \| \
14868 X"$as_dir" : 'X\(//\)$' \| \
14869 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14870$as_echo X"$as_dir" |
14871 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14872 s//\1/
14873 q
14874 }
14875 /^X\(\/\/\)[^/].*/{
14876 s//\1/
14877 q
14878 }
14879 /^X\(\/\/\)$/{
14880 s//\1/
14881 q
14882 }
14883 /^X\(\/\).*/{
14884 s//\1/
14885 q
14886 }
14887 s/.*/./; q'`
14888 test -d "$as_dir" && break
14889 done
14890 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014891 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014892
14893
14894} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014895if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014897else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014898 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014899 as_mkdir_p=false
14900fi
14901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902if test -x / >/dev/null 2>&1; then
14903 as_test_x='test -x'
14904else
14905 if ls -dL / >/dev/null 2>&1; then
14906 as_ls_L_option=L
14907 else
14908 as_ls_L_option=
14909 fi
14910 as_test_x='
14911 eval sh -c '\''
14912 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014913 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014914 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 case $1 in #(
14916 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919 ???[sx]*):;;*)false;;esac;fi
14920 '\'' sh
14921 '
14922fi
14923as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014924
14925# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014926as_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 +000014927
14928# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014929as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014930
14931
Martin v. Löwis11437992002-04-12 09:54:03 +000014932exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014933## ----------------------------------- ##
14934## Main body of $CONFIG_STATUS script. ##
14935## ----------------------------------- ##
14936_ASEOF
14937test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014938
Matthias Kloseb9621712010-04-24 17:59:49 +000014939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14940# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014941# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942# values after options handling.
14943ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014944This file was extended by python $as_me 3.3, which was
Victor Stinnere0be4232011-10-25 13:06:09 +020014945generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014946
14947 CONFIG_FILES = $CONFIG_FILES
14948 CONFIG_HEADERS = $CONFIG_HEADERS
14949 CONFIG_LINKS = $CONFIG_LINKS
14950 CONFIG_COMMANDS = $CONFIG_COMMANDS
14951 $ $0 $@
14952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953on `(hostname || uname -n) 2>/dev/null | sed 1q`
14954"
14955
Martin v. Löwis11437992002-04-12 09:54:03 +000014956_ACEOF
14957
Matthias Kloseb9621712010-04-24 17:59:49 +000014958case $ac_config_files in *"
14959"*) set x $ac_config_files; shift; ac_config_files=$*;;
14960esac
14961
14962case $ac_config_headers in *"
14963"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14964esac
14965
14966
14967cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014968# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014969config_files="$ac_config_files"
14970config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014973
Matthias Kloseb9621712010-04-24 17:59:49 +000014974cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014975ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014976\`$as_me' instantiates files and other configuration actions
14977from templates according to the current configuration. Unless the files
14978and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014979
Matthias Kloseb9621712010-04-24 17:59:49 +000014980Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014981
14982 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014984 --config print configuration, then exit
14985 -q, --quiet, --silent
14986 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 -d, --debug don't remove temporary files
14988 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014989 --file=FILE[:TEMPLATE]
14990 instantiate the configuration file FILE
14991 --header=FILE[:TEMPLATE]
14992 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014993
14994Configuration files:
14995$config_files
14996
14997Configuration headers:
14998$config_headers
14999
Matthias Kloseb9621712010-04-24 17:59:49 +000015000Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015003cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15004ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015005ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015006python config.status 3.3
Victor Stinnere0be4232011-10-25 13:06:09 +020015007configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015009
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015010Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015011This config.status script is free software; the Free Software Foundation
15012gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013
15014ac_pwd='$ac_pwd'
15015srcdir='$srcdir'
15016INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015017MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015018test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015019_ACEOF
15020
Matthias Kloseb9621712010-04-24 17:59:49 +000015021cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15022# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015023ac_need_defaults=:
15024while test $# != 0
15025do
15026 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015027 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15029 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015030 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015032 --*=)
15033 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15034 ac_optarg=
15035 ac_shift=:
15036 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015038 ac_option=$1
15039 ac_optarg=$2
15040 ac_shift=shift
15041 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 esac
15043
Skip Montanaro6dead952003-09-25 14:50:04 +000015044 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015046 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15047 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015049 $as_echo "$ac_cs_version"; exit ;;
15050 --config | --confi | --conf | --con | --co | --c )
15051 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015052 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015053 debug=: ;;
15054 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015055 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 case $ac_optarg in
15057 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015058 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 esac
15060 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015061 ac_need_defaults=false;;
15062 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015063 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015064 case $ac_optarg in
15065 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15066 esac
15067 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015068 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015069 --he | --h)
15070 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015071 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015072Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015074 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015075 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15076 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15077 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015078
15079 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015080 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015081Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015082
Matthias Kloseb9621712010-04-24 17:59:49 +000015083 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015085
15086 esac
15087 shift
15088done
15089
Skip Montanaro6dead952003-09-25 14:50:04 +000015090ac_configure_extra_args=
15091
15092if $ac_cs_silent; then
15093 exec 6>/dev/null
15094 ac_configure_extra_args="$ac_configure_extra_args --silent"
15095fi
15096
15097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015098cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015099if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15101 shift
15102 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15103 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015105 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015106fi
15107
Martin v. Löwis11437992002-04-12 09:54:03 +000015108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015109cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015110exec 5>>config.log
15111{
15112 echo
15113 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15114## Running $as_me. ##
15115_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015120cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015122
Matthias Kloseb9621712010-04-24 17:59:49 +000015123cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015124
15125# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015126for ac_config_target in $ac_config_targets
15127do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128 case $ac_config_target in
15129 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15130 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15131 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015132 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15133 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015134 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15135 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015136 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015137 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138
Victor Stinnere0be4232011-10-25 13:06:09 +020015139 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015140 esac
15141done
15142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015143
Martin v. Löwis11437992002-04-12 09:54:03 +000015144# If the user did not use the arguments to specify the items to instantiate,
15145# then the envvar interface is used. Set only those that are not.
15146# We use the long form for the default assignment because of an extremely
15147# bizarre bug on SunOS 4.1.3.
15148if $ac_need_defaults; then
15149 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15150 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15151fi
15152
Skip Montanaro6dead952003-09-25 14:50:04 +000015153# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015155# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156# Hook for its removal unless debugging.
15157# Note that there is a small window in which the directory will not be cleaned:
15158# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015159$debug ||
15160{
Victor Stinnere0be4232011-10-25 13:06:09 +020015161 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015163 : "${ac_tmp:=$tmp}"
15164 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015166 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015167}
Martin v. Löwis11437992002-04-12 09:54:03 +000015168# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015169
Martin v. Löwis11437992002-04-12 09:54:03 +000015170{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015171 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015172 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015173} ||
15174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015175 tmp=./conf$$-$RANDOM
15176 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015177} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015178ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015179
Matthias Kloseb9621712010-04-24 17:59:49 +000015180# Set up the scripts for CONFIG_FILES section.
15181# No need to generate them if there are no CONFIG_FILES.
15182# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015183if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015184
Matthias Kloseb9621712010-04-24 17:59:49 +000015185
15186ac_cr=`echo X | tr X '\015'`
15187# On cygwin, bash can eat \r inside `` if the user requested igncr.
15188# But we know of no other shell where ac_cr would be empty at this
15189# point, so we can use a bashism as a fallback.
15190if test "x$ac_cr" = x; then
15191 eval ac_cr=\$\'\\r\'
15192fi
15193ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15194if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015195 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015196else
15197 ac_cs_awk_cr=$ac_cr
15198fi
15199
Victor Stinnere0be4232011-10-25 13:06:09 +020015200echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015201_ACEOF
15202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203
Matthias Kloseb9621712010-04-24 17:59:49 +000015204{
15205 echo "cat >conf$$subs.awk <<_ACEOF" &&
15206 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15207 echo "_ACEOF"
15208} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015209 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15210ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211ac_delim='%!_!# '
15212for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015214 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215
Matthias Kloseb9621712010-04-24 17:59:49 +000015216 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15217 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218 break
15219 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015220 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221 else
15222 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224done
Matthias Kloseb9621712010-04-24 17:59:49 +000015225rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015226
Matthias Kloseb9621712010-04-24 17:59:49 +000015227cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015228cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015230sed -n '
15231h
15232s/^/S["/; s/!.*/"]=/
15233p
15234g
15235s/^[^!]*!//
15236:repl
15237t repl
15238s/'"$ac_delim"'$//
15239t delim
15240:nl
15241h
15242s/\(.\{148\}\)..*/\1/
15243t more1
15244s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15245p
15246n
15247b repl
15248:more1
15249s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15250p
15251g
15252s/.\{148\}//
15253t nl
15254:delim
15255h
15256s/\(.\{148\}\)..*/\1/
15257t more2
15258s/["\\]/\\&/g; s/^/"/; s/$/"/
15259p
15260b
15261:more2
15262s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15263p
15264g
15265s/.\{148\}//
15266t delim
15267' <conf$$subs.awk | sed '
15268/^[^""]/{
15269 N
15270 s/\n//
15271}
15272' >>$CONFIG_STATUS || ac_write_fail=1
15273rm -f conf$$subs.awk
15274cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15275_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015276cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015277 for (key in S) S_is_set[key] = 1
15278 FS = ""
15279
15280}
15281{
15282 line = $ 0
15283 nfields = split(line, field, "@")
15284 substed = 0
15285 len = length(field[1])
15286 for (i = 2; i < nfields; i++) {
15287 key = field[i]
15288 keylen = length(key)
15289 if (S_is_set[key]) {
15290 value = S[key]
15291 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15292 len += length(value) + length(field[++i])
15293 substed = 1
15294 } else
15295 len += 1 + keylen
15296 }
15297
15298 print line
15299}
15300
15301_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015303cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15304if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15305 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15306else
15307 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015308fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015309 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015310_ACEOF
15311
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015312# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15313# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015314# trailing colons and then remove the whole line if VPATH becomes empty
15315# (actually we leave an empty line to preserve line numbers).
15316if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015317 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15318h
15319s///
15320s/^/:/
15321s/[ ]*$/:/
15322s/:\$(srcdir):/:/g
15323s/:\${srcdir}:/:/g
15324s/:@srcdir@:/:/g
15325s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015326s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015327x
15328s/\(=[ ]*\).*/\1/
15329G
15330s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015331s/^[^=]*=[ ]*$//
15332}'
15333fi
15334
Matthias Kloseb9621712010-04-24 17:59:49 +000015335cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015336fi # test -n "$CONFIG_FILES"
15337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338# Set up the scripts for CONFIG_HEADERS section.
15339# No need to generate them if there are no CONFIG_HEADERS.
15340# This happens for instance with `./config.status Makefile'.
15341if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015342cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015343BEGIN {
15344_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015345
Matthias Kloseb9621712010-04-24 17:59:49 +000015346# Transform confdefs.h into an awk script `defines.awk', embedded as
15347# here-document in config.status, that substitutes the proper values into
15348# config.h.in to produce config.h.
15349
15350# Create a delimiter string that does not exist in confdefs.h, to ease
15351# handling of long lines.
15352ac_delim='%!_!# '
15353for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015354 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15355 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015356 break
15357 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015358 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015359 else
15360 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15361 fi
15362done
15363
15364# For the awk script, D is an array of macro values keyed by name,
15365# likewise P contains macro parameters if any. Preserve backslash
15366# newline sequences.
15367
15368ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15369sed -n '
15370s/.\{148\}/&'"$ac_delim"'/g
15371t rset
15372:rset
15373s/^[ ]*#[ ]*define[ ][ ]*/ /
15374t def
15375d
15376:def
15377s/\\$//
15378t bsnl
15379s/["\\]/\\&/g
15380s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15381D["\1"]=" \3"/p
15382s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15383d
15384:bsnl
15385s/["\\]/\\&/g
15386s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15387D["\1"]=" \3\\\\\\n"\\/p
15388t cont
15389s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15390t cont
15391d
15392:cont
15393n
15394s/.\{148\}/&'"$ac_delim"'/g
15395t clear
15396:clear
15397s/\\$//
15398t bsnlc
15399s/["\\]/\\&/g; s/^/"/; s/$/"/p
15400d
15401:bsnlc
15402s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15403b cont
15404' <confdefs.h | sed '
15405s/'"$ac_delim"'/"\\\
15406"/g' >>$CONFIG_STATUS || ac_write_fail=1
15407
15408cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15409 for (key in D) D_is_set[key] = 1
15410 FS = ""
15411}
15412/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15413 line = \$ 0
15414 split(line, arg, " ")
15415 if (arg[1] == "#") {
15416 defundef = arg[2]
15417 mac1 = arg[3]
15418 } else {
15419 defundef = substr(arg[1], 2)
15420 mac1 = arg[2]
15421 }
15422 split(mac1, mac2, "(") #)
15423 macro = mac2[1]
15424 prefix = substr(line, 1, index(line, defundef) - 1)
15425 if (D_is_set[macro]) {
15426 # Preserve the white space surrounding the "#".
15427 print prefix "define", macro P[macro] D[macro]
15428 next
15429 } else {
15430 # Replace #undef with comments. This is necessary, for example,
15431 # in the case of _POSIX_SOURCE, which is predefined and required
15432 # on some systems where configure will not decide to define it.
15433 if (defundef == "undef") {
15434 print "/*", prefix defundef, macro, "*/"
15435 next
15436 }
15437 }
15438}
15439{ print }
15440_ACAWK
15441_ACEOF
15442cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015443 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015444fi # test -n "$CONFIG_HEADERS"
15445
15446
15447eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15448shift
15449for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015450do
15451 case $ac_tag in
15452 :[FHLC]) ac_mode=$ac_tag; continue;;
15453 esac
15454 case $ac_mode$ac_tag in
15455 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015456 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015457 :[FH]-) ac_tag=-:-;;
15458 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15459 esac
15460 ac_save_IFS=$IFS
15461 IFS=:
15462 set x $ac_tag
15463 IFS=$ac_save_IFS
15464 shift
15465 ac_file=$1
15466 shift
15467
15468 case $ac_mode in
15469 :L) ac_source=$1;;
15470 :[FH])
15471 ac_file_inputs=
15472 for ac_f
15473 do
15474 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015475 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476 *) # Look for the file first in the build tree, then in the source tree
15477 # (if the path is not absolute). The absolute path cannot be DOS-style,
15478 # because $ac_f cannot contain `:'.
15479 test -f "$ac_f" ||
15480 case $ac_f in
15481 [\\/$]*) false;;
15482 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15483 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020015484 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015485 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015486 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15487 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015488 done
15489
15490 # Let's still pretend it is `configure' which instantiates (i.e., don't
15491 # use $as_me), people would be surprised to read:
15492 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015493 configure_input='Generated from '`
15494 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15495 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015496 if test x"$ac_file" != x-; then
15497 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015498 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15499$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015500 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015501 # Neutralize special characters interpreted by sed in replacement strings.
15502 case $configure_input in #(
15503 *\&* | *\|* | *\\* )
15504 ac_sed_conf_input=`$as_echo "$configure_input" |
15505 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15506 *) ac_sed_conf_input=$configure_input;;
15507 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015508
15509 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020015510 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15511 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015512 esac
15513 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015514 esac
15515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015516 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015517$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015518 X"$ac_file" : 'X\(//\)[^/]' \| \
15519 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015521$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15523 s//\1/
15524 q
15525 }
15526 /^X\(\/\/\)[^/].*/{
15527 s//\1/
15528 q
15529 }
15530 /^X\(\/\/\)$/{
15531 s//\1/
15532 q
15533 }
15534 /^X\(\/\).*/{
15535 s//\1/
15536 q
15537 }
15538 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015539 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015540 ac_builddir=.
15541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015542case "$ac_dir" in
15543.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15544*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015546 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015547 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015548 case $ac_top_builddir_sub in
15549 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15550 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15551 esac ;;
15552esac
15553ac_abs_top_builddir=$ac_pwd
15554ac_abs_builddir=$ac_pwd$ac_dir_suffix
15555# for backward compatibility:
15556ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015557
15558case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015559 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015561 ac_top_srcdir=$ac_top_builddir_sub
15562 ac_abs_top_srcdir=$ac_pwd ;;
15563 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565 ac_top_srcdir=$srcdir
15566 ac_abs_top_srcdir=$srcdir ;;
15567 *) # Relative name.
15568 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15569 ac_top_srcdir=$ac_top_build_prefix$srcdir
15570 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015571esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015572ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015573
Martin v. Löwis11437992002-04-12 09:54:03 +000015574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575 case $ac_mode in
15576 :F)
15577 #
15578 # CONFIG_FILE
15579 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015580
15581 case $INSTALL in
15582 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015584 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010015585 ac_MKDIR_P=$MKDIR_P
15586 case $MKDIR_P in
15587 [\\/$]* | ?:[\\/]* ) ;;
15588 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15589 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015590_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015591
Matthias Kloseb9621712010-04-24 17:59:49 +000015592cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015593# If the template does not know about datarootdir, expand it.
15594# FIXME: This hack should be removed a few years after 2.60.
15595ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015596ac_sed_dataroot='
15597/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015598 p
15599 q
15600}
15601/@datadir@/p
15602/@docdir@/p
15603/@infodir@/p
15604/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015605/@mandir@/p'
15606case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607*datarootdir*) ac_datarootdir_seen=yes;;
15608*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15610$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015612cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015613 ac_datarootdir_hack='
15614 s&@datadir@&$datadir&g
15615 s&@docdir@&$docdir&g
15616 s&@infodir@&$infodir&g
15617 s&@localedir@&$localedir&g
15618 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015619 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620esac
15621_ACEOF
15622
15623# Neutralize VPATH when `$srcdir' = `.'.
15624# Shell code in configure.ac might set extrasub.
15625# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015626cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15627ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015628$extrasub
15629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015631:t
15632/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015633s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015634s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015635s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015636s&@srcdir@&$ac_srcdir&;t t
15637s&@abs_srcdir@&$ac_abs_srcdir&;t t
15638s&@top_srcdir@&$ac_top_srcdir&;t t
15639s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15640s&@builddir@&$ac_builddir&;t t
15641s&@abs_builddir@&$ac_abs_builddir&;t t
15642s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15643s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010015644s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015645$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015646"
Victor Stinnere0be4232011-10-25 13:06:09 +020015647eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15648 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015650test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015651 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15652 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15653 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015655which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015656$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015657which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015658
Victor Stinnere0be4232011-10-25 13:06:09 +020015659 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020015661 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15662 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015663 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015664 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015665 ;;
15666 :H)
15667 #
15668 # CONFIG_HEADER
15669 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015670 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015671 {
15672 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015673 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15674 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015675 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015676 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015677 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15678$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015679 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020015681 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015682 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 fi
15684 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015685 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015686 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015687 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015688 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015689 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691
15692 esac
15693
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015694
15695 case $ac_file$ac_mode in
15696 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15697
15698 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015699done # for ac_tag
15700
Guido van Rossum627b2d71993-12-24 10:39:16 +000015701
Matthias Kloseb9621712010-04-24 17:59:49 +000015702as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015703_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015704ac_clean_files=$ac_clean_files_save
15705
Matthias Kloseb9621712010-04-24 17:59:49 +000015706test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015707 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015708
Martin v. Löwis11437992002-04-12 09:54:03 +000015709
15710# configure is writing to config.log, and then calls config.status.
15711# config.status does its own redirection, appending to config.log.
15712# Unfortunately, on DOS this fails, as config.log is still kept open
15713# by configure, so config.status won't be able to write to it; its
15714# output is simply discarded. So we exec the FD to /dev/null,
15715# effectively closing config.log, so it can be properly (re)opened and
15716# appended to by config.status. When coming back to configure, we
15717# need to make the FD available again.
15718if test "$no_create" != yes; then
15719 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015720 ac_config_status_args=
15721 test "$silent" = yes &&
15722 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015723 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015724 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015725 exec 5>>config.log
15726 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15727 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015728 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015729fi
15730if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15732$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015733fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015734
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015735
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015736echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015737if test ! -f Modules/Setup
15738then
15739 cp $srcdir/Modules/Setup.dist Modules/Setup
15740fi
15741
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015742echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015743if test ! -f Modules/Setup.local
15744then
15745 echo "# Edit this file for local setup changes" >Modules/Setup.local
15746fi
15747
15748echo "creating Makefile"
15749$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15750 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015751 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015752mv config.c Modules