blob: a1d8612fff8ad59bad6efa11d1378723a45d26a4 [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
Benjamin Peterson076ed002010-10-31 17:11:02 +0000765enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000766with_dbmliborder
767with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000768with_threads
769with_thread
770enable_ipv6
771with_doc_strings
772with_tsc
773with_pymalloc
774with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000775with_fpectl
776with_libm
777with_libc
778enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000779with_computed_gotos
780'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000781 ac_precious_vars='build_alias
782host_alias
783target_alias
784CC
785CFLAGS
786LDFLAGS
787LIBS
788CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200789CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000790
Guido van Rossum627b2d71993-12-24 10:39:16 +0000791
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000793ac_init_help=
794ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000795ac_unrecognized_opts=
796ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797# The variables have the same names as the options, with
798# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000799cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802no_recursion=
803prefix=NONE
804program_prefix=NONE
805program_suffix=NONE
806program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000807silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000808site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811x_includes=NONE
812x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000813
814# Installation directory options.
815# These are left unexpanded so users can "make install exec_prefix=/foo"
816# and all the variables that are supposed to be based on exec_prefix
817# by default will actually change.
818# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000819# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820bindir='${exec_prefix}/bin'
821sbindir='${exec_prefix}/sbin'
822libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000823datarootdir='${prefix}/share'
824datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825sysconfdir='${prefix}/etc'
826sharedstatedir='${prefix}/com'
827localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828includedir='${prefix}/include'
829oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
831infodir='${datarootdir}/info'
832htmldir='${docdir}'
833dvidir='${docdir}'
834pdfdir='${docdir}'
835psdir='${docdir}'
836libdir='${exec_prefix}/lib'
837localedir='${datarootdir}/locale'
838mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000843do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844 # If the previous option needs an argument, assign it.
845 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847 ac_prev=
848 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000849 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200852 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
853 *=) ac_optarg= ;;
854 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857 # Accept the important Cygnus configure options, so we can diagnose typos.
858
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859 case $ac_dashdash$ac_option in
860 --)
861 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863 -bindir | --bindir | --bindi | --bind | --bin | --bi)
864 ac_prev=bindir ;;
865 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000866 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867
868 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000871 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 -cache-file | --cache-file | --cache-fil | --cache-fi \
874 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
875 ac_prev=cache_file ;;
876 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
877 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 cache_file=$ac_optarg ;;
879
880 --config-cache | -C)
881 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000886 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
889 | --dataroo | --dataro | --datar)
890 ac_prev=datarootdir ;;
891 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
892 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
893 datarootdir=$ac_optarg ;;
894
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000896 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000897 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000898 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200899 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000900 ac_useropt_orig=$ac_useropt
901 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
902 case $ac_user_opts in
903 *"
904"enable_$ac_useropt"
905"*) ;;
906 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
907 ac_unrecognized_sep=', ';;
908 esac
909 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910
911 -docdir | --docdir | --docdi | --doc | --do)
912 ac_prev=docdir ;;
913 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
914 docdir=$ac_optarg ;;
915
916 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
917 ac_prev=dvidir ;;
918 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
919 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
921 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000922 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000924 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200925 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000926 ac_useropt_orig=$ac_useropt
927 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
928 case $ac_user_opts in
929 *"
930"enable_$ac_useropt"
931"*) ;;
932 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
933 ac_unrecognized_sep=', ';;
934 esac
935 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
938 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
939 | --exec | --exe | --ex)
940 ac_prev=exec_prefix ;;
941 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
942 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
943 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
946 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947 # Obsolete; use --with-gas.
948 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 -help | --help | --hel | --he | -h)
951 ac_init_help=long ;;
952 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
953 ac_init_help=recursive ;;
954 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
955 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
957 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000962 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
963 ac_prev=htmldir ;;
964 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
965 | --ht=*)
966 htmldir=$ac_optarg ;;
967
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968 -includedir | --includedir | --includedi | --included | --include \
969 | --includ | --inclu | --incl | --inc)
970 ac_prev=includedir ;;
971 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
972 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974
975 -infodir | --infodir | --infodi | --infod | --info | --inf)
976 ac_prev=infodir ;;
977 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000979
980 -libdir | --libdir | --libdi | --libd)
981 ac_prev=libdir ;;
982 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000984
985 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
986 | --libexe | --libex | --libe)
987 ac_prev=libexecdir ;;
988 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
989 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000992 -localedir | --localedir | --localedi | --localed | --locale)
993 ac_prev=localedir ;;
994 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
995 localedir=$ac_optarg ;;
996
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000997 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000998 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999 ac_prev=localstatedir ;;
1000 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001001 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
1004 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1005 ac_prev=mandir ;;
1006 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010 # Obsolete; use --without-fp.
1011 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
1013 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015 no_create=yes ;;
1016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1018 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1019 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1022 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1023 | --oldin | --oldi | --old | --ol | --o)
1024 ac_prev=oldincludedir ;;
1025 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1026 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1027 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1031 ac_prev=prefix ;;
1032 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
1035 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1036 | --program-pre | --program-pr | --program-p)
1037 ac_prev=program_prefix ;;
1038 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1039 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
1042 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1043 | --program-suf | --program-su | --program-s)
1044 ac_prev=program_suffix ;;
1045 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1046 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
1049 -program-transform-name | --program-transform-name \
1050 | --program-transform-nam | --program-transform-na \
1051 | --program-transform-n | --program-transform- \
1052 | --program-transform | --program-transfor \
1053 | --program-transfo | --program-transf \
1054 | --program-trans | --program-tran \
1055 | --progr-tra | --program-tr | --program-t)
1056 ac_prev=program_transform_name ;;
1057 -program-transform-name=* | --program-transform-name=* \
1058 | --program-transform-nam=* | --program-transform-na=* \
1059 | --program-transform-n=* | --program-transform-=* \
1060 | --program-transform=* | --program-transfor=* \
1061 | --program-transfo=* | --program-transf=* \
1062 | --program-trans=* | --program-tran=* \
1063 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001066 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1067 ac_prev=pdfdir ;;
1068 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1069 pdfdir=$ac_optarg ;;
1070
1071 -psdir | --psdir | --psdi | --psd | --ps)
1072 ac_prev=psdir ;;
1073 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1074 psdir=$ac_optarg ;;
1075
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1077 | -silent | --silent | --silen | --sile | --sil)
1078 silent=yes ;;
1079
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1081 ac_prev=sbindir ;;
1082 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1083 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085
1086 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1087 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1088 | --sharedst | --shareds | --shared | --share | --shar \
1089 | --sha | --sh)
1090 ac_prev=sharedstatedir ;;
1091 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1092 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1093 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1094 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097 -site | --site | --sit)
1098 ac_prev=site ;;
1099 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1103 ac_prev=srcdir ;;
1104 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001107 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1108 | --syscon | --sysco | --sysc | --sys | --sy)
1109 ac_prev=sysconfdir ;;
1110 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1111 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1120 verbose=yes ;;
1121
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 -version | --version | --versio | --versi | --vers | -V)
1123 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124
1125 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001126 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001128 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001129 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001130 ac_useropt_orig=$ac_useropt
1131 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1132 case $ac_user_opts in
1133 *"
1134"with_$ac_useropt"
1135"*) ;;
1136 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1137 ac_unrecognized_sep=', ';;
1138 esac
1139 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140
1141 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001142 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001143 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001144 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001145 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001146 ac_useropt_orig=$ac_useropt
1147 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1148 case $ac_user_opts in
1149 *"
1150"with_$ac_useropt"
1151"*) ;;
1152 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1153 ac_unrecognized_sep=', ';;
1154 esac
1155 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157 --x)
1158 # Obsolete; use --with-x.
1159 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160
1161 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1162 | --x-incl | --x-inc | --x-in | --x-i)
1163 ac_prev=x_includes ;;
1164 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1165 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
1168 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1169 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1170 ac_prev=x_libraries ;;
1171 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1172 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001175 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1176Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 ;;
1178
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 *=*)
1180 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1181 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001182 case $ac_envvar in #(
1183 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001184 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001186 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 export $ac_envvar ;;
1188
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001189 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001194 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 ;;
1196
1197 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001198done
1199
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001202 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203fi
1204
Matthias Kloseb9621712010-04-24 17:59:49 +00001205if test -n "$ac_unrecognized_opts"; then
1206 case $enable_option_checking in
1207 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001208 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1210 esac
1211fi
1212
1213# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001214for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1215 datadir sysconfdir sharedstatedir localstatedir includedir \
1216 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1217 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001219 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 # Remove trailing slashes.
1221 case $ac_val in
1222 */ )
1223 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1224 eval $ac_var=\$ac_val;;
1225 esac
1226 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001228 [\\/$]* | ?:[\\/]* ) continue;;
1229 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001231 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001232done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001233
Martin v. Löwis11437992002-04-12 09:54:03 +00001234# There might be people who depend on the old broken behavior: `$host'
1235# used to hold the argument of --host etc.
1236# FIXME: To remove some day.
1237build=$build_alias
1238host=$host_alias
1239target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240
Martin v. Löwis11437992002-04-12 09:54:03 +00001241# FIXME: To remove some day.
1242if test "x$host_alias" != x; then
1243 if test "x$build_alias" = x; then
1244 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1246 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 elif test "x$build_alias" != "x$host_alias"; then
1248 cross_compiling=yes
1249 fi
1250fi
1251
1252ac_tool_prefix=
1253test -n "$host_alias" && ac_tool_prefix=$host_alias-
1254
1255test "$silent" = yes && exec 6>/dev/null
1256
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258ac_pwd=`pwd` && test -n "$ac_pwd" &&
1259ac_ls_di=`ls -di .` &&
1260ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001261 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001264
1265
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266# Find the source files, if location was not specified.
1267if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 ac_confdir=`$as_dirname -- "$as_myself" ||
1271$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1272 X"$as_myself" : 'X\(//\)[^/]' \| \
1273 X"$as_myself" : 'X\(//\)$' \| \
1274 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1275$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001276 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1277 s//\1/
1278 q
1279 }
1280 /^X\(\/\/\)[^/].*/{
1281 s//\1/
1282 q
1283 }
1284 /^X\(\/\/\)$/{
1285 s//\1/
1286 q
1287 }
1288 /^X\(\/\).*/{
1289 s//\1/
1290 q
1291 }
1292 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001293 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295 srcdir=..
1296 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297else
1298 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300if test ! -r "$srcdir/$ac_unique_file"; then
1301 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1305ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001306 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307 pwd)`
1308# When building in place, set srcdir=.
1309if test "$ac_abs_confdir" = "$ac_pwd"; then
1310 srcdir=.
1311fi
1312# Remove unnecessary trailing slashes from srcdir.
1313# Double slashes in file names in object file debugging info
1314# mess up M-x gdb in Emacs.
1315case $srcdir in
1316*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1317esac
1318for ac_var in $ac_precious_vars; do
1319 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1320 eval ac_env_${ac_var}_value=\$${ac_var}
1321 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1322 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1323done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001324
Martin v. Löwis11437992002-04-12 09:54:03 +00001325#
1326# Report the --help message.
1327#
1328if test "$ac_init_help" = "long"; then
1329 # Omit some internal or obsolete options to make the list less imposing.
1330 # This message is too long to be a string in the A/UX 3.1 sh.
1331 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001332\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001333
1334Usage: $0 [OPTION]... [VAR=VALUE]...
1335
1336To assign environment variables (e.g., CC, CFLAGS...), specify them as
1337VAR=VALUE. See below for descriptions of some of the useful variables.
1338
1339Defaults for the options are specified in brackets.
1340
1341Configuration:
1342 -h, --help display this help and exit
1343 --help=short display options specific to this package
1344 --help=recursive display the short help of all the included packages
1345 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001346 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001347 --cache-file=FILE cache test results in FILE [disabled]
1348 -C, --config-cache alias for \`--cache-file=config.cache'
1349 -n, --no-create do not create output files
1350 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1351
Martin v. Löwis11437992002-04-12 09:54:03 +00001352Installation directories:
1353 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001354 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001355 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001356 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001357
1358By default, \`make install' will install all the files in
1359\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1360an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1361for instance \`--prefix=\$HOME'.
1362
1363For better control, use the options below.
1364
1365Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001366 --bindir=DIR user executables [EPREFIX/bin]
1367 --sbindir=DIR system admin executables [EPREFIX/sbin]
1368 --libexecdir=DIR program executables [EPREFIX/libexec]
1369 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1370 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1371 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1372 --libdir=DIR object code libraries [EPREFIX/lib]
1373 --includedir=DIR C header files [PREFIX/include]
1374 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1375 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1376 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1377 --infodir=DIR info documentation [DATAROOTDIR/info]
1378 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1379 --mandir=DIR man documentation [DATAROOTDIR/man]
1380 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1381 --htmldir=DIR html documentation [DOCDIR]
1382 --dvidir=DIR dvi documentation [DOCDIR]
1383 --pdfdir=DIR pdf documentation [DOCDIR]
1384 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001385_ACEOF
1386
1387 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001388
1389System types:
1390 --build=BUILD configure for building on BUILD [guessed]
1391 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392_ACEOF
1393fi
1394
1395if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001396 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001397 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001398 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 cat <<\_ACEOF
1400
1401Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001402 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001403 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1404 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001405 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001406 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001407 --enable-framework[=INSTALLDIR]
1408 Build (MacOSX|Darwin) framework
1409 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001410 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001411 --enable-loadable-sqlite-extensions
1412 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001413 --enable-ipv6 Enable ipv6 (with ipv4) support
1414 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001415 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001416 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001417
1418Optional Packages:
1419 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1420 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001421 --with-universal-archs=ARCH
1422 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001423 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001424 --with-framework-name=FRAMEWORK
1425 specify an alternate name of the framework built
1426 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001427 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001428 --with-cxx-main=<compiler>
1429 compile main() and link python executable with C++
1430 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001431 --with-suffix=.exe set executable suffix
1432 --with-pydebug build with Py_DEBUG defined
1433 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001434 --with-system-expat build pyexpat module using an installed expat
1435 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001436 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001437 --with-dbmliborder=db1:db2:...
1438 order to check db backends for dbm. Valid value is a
1439 colon separated string with the backend names
1440 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001441 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --with(out)-threads[=DIRECTORY]
1443 disable/enable thread support
1444 --with(out)-thread[=DIRECTORY]
1445 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001447 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001448 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001449 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001450 --with-fpectl enable SIGFPE catching
1451 --with-libm=STRING math library
1452 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001453 --with(out)-computed-gotos
1454 Use computed gotos in evaluation loop (enabled by
1455 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001456
1457Some influential environment variables:
1458 CC C compiler command
1459 CFLAGS C compiler flags
1460 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1461 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001462 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001463 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 CPP C preprocessor
1466
1467Use these variables to override the choices made by `configure' or to help
1468it to find libraries and programs with nonstandard names/locations.
1469
Georg Brandle2e15612009-05-20 18:25:10 +00001470Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001471_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001473fi
1474
1475if test "$ac_init_help" = "recursive"; then
1476 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001477 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 test -d "$ac_dir" ||
1479 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1480 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 ac_builddir=.
1482
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483case "$ac_dir" in
1484.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1485*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001488 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 case $ac_top_builddir_sub in
1490 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1491 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1492 esac ;;
1493esac
1494ac_abs_top_builddir=$ac_pwd
1495ac_abs_builddir=$ac_pwd$ac_dir_suffix
1496# for backward compatibility:
1497ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001501 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 ac_top_srcdir=$ac_top_builddir_sub
1503 ac_abs_top_srcdir=$ac_pwd ;;
1504 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001505 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506 ac_top_srcdir=$srcdir
1507 ac_abs_top_srcdir=$srcdir ;;
1508 *) # Relative name.
1509 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1510 ac_top_srcdir=$ac_top_build_prefix$srcdir
1511 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001512esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 cd "$ac_dir" || { ac_status=$?; continue; }
1516 # Check for guested configure.
1517 if test -f "$ac_srcdir/configure.gnu"; then
1518 echo &&
1519 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1520 elif test -f "$ac_srcdir/configure"; then
1521 echo &&
1522 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001523 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001524 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525 fi || ac_status=$?
1526 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001527 done
1528fi
1529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001531if $ac_init_version; then
1532 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001533python configure 3.3
Victor Stinnere0be4232011-10-25 13:06:09 +02001534generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001535
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001536Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001537This configure script is free software; the Free Software Foundation
1538gives unlimited permission to copy, distribute and modify it.
1539_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001542
1543## ------------------------ ##
1544## Autoconf initialization. ##
1545## ------------------------ ##
1546
1547# ac_fn_c_try_compile LINENO
1548# --------------------------
1549# Try to compile conftest.$ac_ext, and return whether this succeeded.
1550ac_fn_c_try_compile ()
1551{
1552 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1553 rm -f conftest.$ac_objext
1554 if { { ac_try="$ac_compile"
1555case "(($ac_try" in
1556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1557 *) ac_try_echo=$ac_try;;
1558esac
1559eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1560$as_echo "$ac_try_echo"; } >&5
1561 (eval "$ac_compile") 2>conftest.err
1562 ac_status=$?
1563 if test -s conftest.err; then
1564 grep -v '^ *+' conftest.err >conftest.er1
1565 cat conftest.er1 >&5
1566 mv -f conftest.er1 conftest.err
1567 fi
1568 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1569 test $ac_status = 0; } && {
1570 test -z "$ac_c_werror_flag" ||
1571 test ! -s conftest.err
1572 } && test -s conftest.$ac_objext; then :
1573 ac_retval=0
1574else
1575 $as_echo "$as_me: failed program was:" >&5
1576sed 's/^/| /' conftest.$ac_ext >&5
1577
1578 ac_retval=1
1579fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001580 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001581 as_fn_set_status $ac_retval
1582
1583} # ac_fn_c_try_compile
1584
Matthias Kloseb9621712010-04-24 17:59:49 +00001585# ac_fn_c_try_link LINENO
1586# -----------------------
1587# Try to link conftest.$ac_ext, and return whether this succeeded.
1588ac_fn_c_try_link ()
1589{
1590 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1591 rm -f conftest.$ac_objext conftest$ac_exeext
1592 if { { ac_try="$ac_link"
1593case "(($ac_try" in
1594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1595 *) ac_try_echo=$ac_try;;
1596esac
1597eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1598$as_echo "$ac_try_echo"; } >&5
1599 (eval "$ac_link") 2>conftest.err
1600 ac_status=$?
1601 if test -s conftest.err; then
1602 grep -v '^ *+' conftest.err >conftest.er1
1603 cat conftest.er1 >&5
1604 mv -f conftest.er1 conftest.err
1605 fi
1606 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1607 test $ac_status = 0; } && {
1608 test -z "$ac_c_werror_flag" ||
1609 test ! -s conftest.err
1610 } && test -s conftest$ac_exeext && {
1611 test "$cross_compiling" = yes ||
1612 $as_test_x conftest$ac_exeext
1613 }; then :
1614 ac_retval=0
1615else
1616 $as_echo "$as_me: failed program was:" >&5
1617sed 's/^/| /' conftest.$ac_ext >&5
1618
1619 ac_retval=1
1620fi
1621 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1622 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1623 # interfere with the next link command; also delete a directory that is
1624 # left behind by Apple's compiler. We do this before executing the actions.
1625 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001626 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001627 as_fn_set_status $ac_retval
1628
1629} # ac_fn_c_try_link
1630
Matthias Kloseb9621712010-04-24 17:59:49 +00001631# ac_fn_c_try_cpp LINENO
1632# ----------------------
1633# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1634ac_fn_c_try_cpp ()
1635{
1636 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1637 if { { ac_try="$ac_cpp conftest.$ac_ext"
1638case "(($ac_try" in
1639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1640 *) ac_try_echo=$ac_try;;
1641esac
1642eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1643$as_echo "$ac_try_echo"; } >&5
1644 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1645 ac_status=$?
1646 if test -s conftest.err; then
1647 grep -v '^ *+' conftest.err >conftest.er1
1648 cat conftest.er1 >&5
1649 mv -f conftest.er1 conftest.err
1650 fi
1651 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001652 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001653 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1654 test ! -s conftest.err
1655 }; then :
1656 ac_retval=0
1657else
1658 $as_echo "$as_me: failed program was:" >&5
1659sed 's/^/| /' conftest.$ac_ext >&5
1660
1661 ac_retval=1
1662fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001663 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001664 as_fn_set_status $ac_retval
1665
1666} # ac_fn_c_try_cpp
1667
1668# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1669# -------------------------------------------------------
1670# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1671# the include files in INCLUDES and setting the cache variable VAR
1672# accordingly.
1673ac_fn_c_check_header_mongrel ()
1674{
1675 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001676 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1678$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001679if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001680 $as_echo_n "(cached) " >&6
1681fi
1682eval ac_res=\$$3
1683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1684$as_echo "$ac_res" >&6; }
1685else
1686 # Is the header compilable?
1687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1688$as_echo_n "checking $2 usability... " >&6; }
1689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1690/* end confdefs.h. */
1691$4
1692#include <$2>
1693_ACEOF
1694if ac_fn_c_try_compile "$LINENO"; then :
1695 ac_header_compiler=yes
1696else
1697 ac_header_compiler=no
1698fi
1699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1701$as_echo "$ac_header_compiler" >&6; }
1702
1703# Is the header present?
1704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1705$as_echo_n "checking $2 presence... " >&6; }
1706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1707/* end confdefs.h. */
1708#include <$2>
1709_ACEOF
1710if ac_fn_c_try_cpp "$LINENO"; then :
1711 ac_header_preproc=yes
1712else
1713 ac_header_preproc=no
1714fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001715rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1717$as_echo "$ac_header_preproc" >&6; }
1718
1719# So? What about this header?
1720case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1721 yes:no: )
1722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1723$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1725$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1726 ;;
1727 no:yes:* )
1728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1729$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1731$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1733$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1735$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1737$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001738( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001739## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001740## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 ) | sed "s/^/$as_me: WARNING: /" >&2
1742 ;;
1743esac
1744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1745$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001746if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001747 $as_echo_n "(cached) " >&6
1748else
1749 eval "$3=\$ac_header_compiler"
1750fi
1751eval ac_res=\$$3
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1753$as_echo "$ac_res" >&6; }
1754fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001755 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001756
1757} # ac_fn_c_check_header_mongrel
1758
1759# ac_fn_c_try_run LINENO
1760# ----------------------
1761# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1762# that executables *can* be run.
1763ac_fn_c_try_run ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766 if { { ac_try="$ac_link"
1767case "(($ac_try" in
1768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1769 *) ac_try_echo=$ac_try;;
1770esac
1771eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1772$as_echo "$ac_try_echo"; } >&5
1773 (eval "$ac_link") 2>&5
1774 ac_status=$?
1775 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1776 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1777 { { case "(($ac_try" in
1778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1779 *) ac_try_echo=$ac_try;;
1780esac
1781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1782$as_echo "$ac_try_echo"; } >&5
1783 (eval "$ac_try") 2>&5
1784 ac_status=$?
1785 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1786 test $ac_status = 0; }; }; then :
1787 ac_retval=0
1788else
1789 $as_echo "$as_me: program exited with status $ac_status" >&5
1790 $as_echo "$as_me: failed program was:" >&5
1791sed 's/^/| /' conftest.$ac_ext >&5
1792
1793 ac_retval=$ac_status
1794fi
1795 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001796 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001797 as_fn_set_status $ac_retval
1798
1799} # ac_fn_c_try_run
1800
1801# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1802# -------------------------------------------------------
1803# Tests whether HEADER exists and can be compiled using the include files in
1804# INCLUDES, setting the cache variable VAR accordingly.
1805ac_fn_c_check_header_compile ()
1806{
1807 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1809$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001810if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001811 $as_echo_n "(cached) " >&6
1812else
1813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1814/* end confdefs.h. */
1815$4
1816#include <$2>
1817_ACEOF
1818if ac_fn_c_try_compile "$LINENO"; then :
1819 eval "$3=yes"
1820else
1821 eval "$3=no"
1822fi
1823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1824fi
1825eval ac_res=\$$3
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1827$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001828 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001829
1830} # ac_fn_c_check_header_compile
1831
Matthias Kloseb9621712010-04-24 17:59:49 +00001832# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1833# -------------------------------------------
1834# Tests whether TYPE exists after having included INCLUDES, setting cache
1835# variable VAR accordingly.
1836ac_fn_c_check_type ()
1837{
1838 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1840$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001841if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 $as_echo_n "(cached) " >&6
1843else
1844 eval "$3=no"
1845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1846/* end confdefs.h. */
1847$4
1848int
1849main ()
1850{
1851if (sizeof ($2))
1852 return 0;
1853 ;
1854 return 0;
1855}
1856_ACEOF
1857if ac_fn_c_try_compile "$LINENO"; then :
1858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1859/* end confdefs.h. */
1860$4
1861int
1862main ()
1863{
1864if (sizeof (($2)))
1865 return 0;
1866 ;
1867 return 0;
1868}
1869_ACEOF
1870if ac_fn_c_try_compile "$LINENO"; then :
1871
1872else
1873 eval "$3=yes"
1874fi
1875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1876fi
1877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1878fi
1879eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001882 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001883
1884} # ac_fn_c_check_type
1885
1886# ac_fn_c_find_uintX_t LINENO BITS VAR
1887# ------------------------------------
1888# Finds an unsigned integer type with width BITS, setting cache variable VAR
1889# accordingly.
1890ac_fn_c_find_uintX_t ()
1891{
1892 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1894$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001895if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001896 $as_echo_n "(cached) " >&6
1897else
1898 eval "$3=no"
1899 # Order is important - never check a type that is potentially smaller
1900 # than half of the expected target width.
1901 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1902 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905$ac_includes_default
1906int
1907main ()
1908{
1909static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1910test_array [0] = 0
1911
1912 ;
1913 return 0;
1914}
1915_ACEOF
1916if ac_fn_c_try_compile "$LINENO"; then :
1917 case $ac_type in #(
1918 uint$2_t) :
1919 eval "$3=yes" ;; #(
1920 *) :
1921 eval "$3=\$ac_type" ;;
1922esac
1923fi
1924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001925 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001926
1927else
1928 break
1929fi
1930 done
1931fi
1932eval ac_res=\$$3
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1934$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001935 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001936
1937} # ac_fn_c_find_uintX_t
1938
1939# ac_fn_c_find_intX_t LINENO BITS VAR
1940# -----------------------------------
1941# Finds a signed integer type with width BITS, setting cache variable VAR
1942# accordingly.
1943ac_fn_c_find_intX_t ()
1944{
1945 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1947$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001948if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001949 $as_echo_n "(cached) " >&6
1950else
1951 eval "$3=no"
1952 # Order is important - never check a type that is potentially smaller
1953 # than half of the expected target width.
1954 for ac_type in int$2_t 'int' 'long int' \
1955 'long long int' 'short int' 'signed char'; do
1956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1957/* end confdefs.h. */
1958$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001959 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001960int
1961main ()
1962{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001963static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001964test_array [0] = 0
1965
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970if ac_fn_c_try_compile "$LINENO"; then :
1971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1972/* end confdefs.h. */
1973$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001974 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001975int
1976main ()
1977{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001978static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001979 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1980test_array [0] = 0
1981
1982 ;
1983 return 0;
1984}
1985_ACEOF
1986if ac_fn_c_try_compile "$LINENO"; then :
1987
1988else
1989 case $ac_type in #(
1990 int$2_t) :
1991 eval "$3=yes" ;; #(
1992 *) :
1993 eval "$3=\$ac_type" ;;
1994esac
1995fi
1996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1997fi
1998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001999 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002000
2001else
2002 break
2003fi
2004 done
2005fi
2006eval ac_res=\$$3
2007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2008$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002009 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002010
2011} # ac_fn_c_find_intX_t
2012
2013# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2014# --------------------------------------------
2015# Tries to find the compile-time value of EXPR in a program that includes
2016# INCLUDES, setting VAR accordingly. Returns whether the value could be
2017# computed
2018ac_fn_c_compute_int ()
2019{
2020 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2021 if test "$cross_compiling" = yes; then
2022 # Depending upon the size, compute the lo and hi bounds.
2023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$4
2026int
2027main ()
2028{
2029static int test_array [1 - 2 * !(($2) >= 0)];
2030test_array [0] = 0
2031
2032 ;
2033 return 0;
2034}
2035_ACEOF
2036if ac_fn_c_try_compile "$LINENO"; then :
2037 ac_lo=0 ac_mid=0
2038 while :; do
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2046test_array [0] = 0
2047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=$ac_mid; break
2054else
2055 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2056 if test $ac_lo -le $ac_mid; then
2057 ac_lo= ac_hi=
2058 break
2059 fi
2060 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2061fi
2062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2063 done
2064else
2065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2066/* end confdefs.h. */
2067$4
2068int
2069main ()
2070{
2071static int test_array [1 - 2 * !(($2) < 0)];
2072test_array [0] = 0
2073
2074 ;
2075 return 0;
2076}
2077_ACEOF
2078if ac_fn_c_try_compile "$LINENO"; then :
2079 ac_hi=-1 ac_mid=-1
2080 while :; do
2081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2082/* end confdefs.h. */
2083$4
2084int
2085main ()
2086{
2087static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2088test_array [0] = 0
2089
2090 ;
2091 return 0;
2092}
2093_ACEOF
2094if ac_fn_c_try_compile "$LINENO"; then :
2095 ac_lo=$ac_mid; break
2096else
2097 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2098 if test $ac_mid -le $ac_hi; then
2099 ac_lo= ac_hi=
2100 break
2101 fi
2102 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2103fi
2104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2105 done
2106else
2107 ac_lo= ac_hi=
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112# Binary search between lo and hi bounds.
2113while test "x$ac_lo" != "x$ac_hi"; do
2114 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118int
2119main ()
2120{
2121static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2122test_array [0] = 0
2123
2124 ;
2125 return 0;
2126}
2127_ACEOF
2128if ac_fn_c_try_compile "$LINENO"; then :
2129 ac_hi=$ac_mid
2130else
2131 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2132fi
2133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2134done
2135case $ac_lo in #((
2136?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2137'') ac_retval=1 ;;
2138esac
2139 else
2140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141/* end confdefs.h. */
2142$4
2143static long int longval () { return $2; }
2144static unsigned long int ulongval () { return $2; }
2145#include <stdio.h>
2146#include <stdlib.h>
2147int
2148main ()
2149{
2150
2151 FILE *f = fopen ("conftest.val", "w");
2152 if (! f)
2153 return 1;
2154 if (($2) < 0)
2155 {
2156 long int i = longval ();
2157 if (i != ($2))
2158 return 1;
2159 fprintf (f, "%ld", i);
2160 }
2161 else
2162 {
2163 unsigned long int i = ulongval ();
2164 if (i != ($2))
2165 return 1;
2166 fprintf (f, "%lu", i);
2167 }
2168 /* Do not output a trailing newline, as this causes \r\n confusion
2169 on some platforms. */
2170 return ferror (f) || fclose (f) != 0;
2171
2172 ;
2173 return 0;
2174}
2175_ACEOF
2176if ac_fn_c_try_run "$LINENO"; then :
2177 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2178else
2179 ac_retval=1
2180fi
2181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2182 conftest.$ac_objext conftest.beam conftest.$ac_ext
2183rm -f conftest.val
2184
2185 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002186 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002187 as_fn_set_status $ac_retval
2188
2189} # ac_fn_c_compute_int
2190
2191# ac_fn_c_check_func LINENO FUNC VAR
2192# ----------------------------------
2193# Tests whether FUNC exists, setting the cache variable VAR accordingly
2194ac_fn_c_check_func ()
2195{
2196 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2198$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002199if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002200 $as_echo_n "(cached) " >&6
2201else
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h. */
2204/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2205 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2206#define $2 innocuous_$2
2207
2208/* System header to define __stub macros and hopefully few prototypes,
2209 which can conflict with char $2 (); below.
2210 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2211 <limits.h> exists even on freestanding compilers. */
2212
2213#ifdef __STDC__
2214# include <limits.h>
2215#else
2216# include <assert.h>
2217#endif
2218
2219#undef $2
2220
2221/* Override any GCC internal prototype to avoid an error.
2222 Use char because int might match the return type of a GCC
2223 builtin and then its argument prototype would still apply. */
2224#ifdef __cplusplus
2225extern "C"
2226#endif
2227char $2 ();
2228/* The GNU C library defines this for functions which it implements
2229 to always fail with ENOSYS. Some functions are actually named
2230 something starting with __ and the normal name is an alias. */
2231#if defined __stub_$2 || defined __stub___$2
2232choke me
2233#endif
2234
2235int
2236main ()
2237{
2238return $2 ();
2239 ;
2240 return 0;
2241}
2242_ACEOF
2243if ac_fn_c_try_link "$LINENO"; then :
2244 eval "$3=yes"
2245else
2246 eval "$3=no"
2247fi
2248rm -f core conftest.err conftest.$ac_objext \
2249 conftest$ac_exeext conftest.$ac_ext
2250fi
2251eval ac_res=\$$3
2252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2253$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002254 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002255
2256} # ac_fn_c_check_func
2257
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002258# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2259# ---------------------------------------------
2260# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2261# accordingly.
2262ac_fn_c_check_decl ()
2263{
2264 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2265 as_decl_name=`echo $2|sed 's/ *(.*//'`
2266 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2268$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2269if eval \${$3+:} false; then :
2270 $as_echo_n "(cached) " >&6
2271else
2272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h. */
2274$4
2275int
2276main ()
2277{
2278#ifndef $as_decl_name
2279#ifdef __cplusplus
2280 (void) $as_decl_use;
2281#else
2282 (void) $as_decl_name;
2283#endif
2284#endif
2285
2286 ;
2287 return 0;
2288}
2289_ACEOF
2290if ac_fn_c_try_compile "$LINENO"; then :
2291 eval "$3=yes"
2292else
2293 eval "$3=no"
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296fi
2297eval ac_res=\$$3
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299$as_echo "$ac_res" >&6; }
2300 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2301
2302} # ac_fn_c_check_decl
2303
Matthias Kloseb9621712010-04-24 17:59:49 +00002304# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2305# ----------------------------------------------------
2306# Tries to find if the field MEMBER exists in type AGGR, after including
2307# INCLUDES, setting cache variable VAR accordingly.
2308ac_fn_c_check_member ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2312$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002313if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002314 $as_echo_n "(cached) " >&6
2315else
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h. */
2318$5
2319int
2320main ()
2321{
2322static $2 ac_aggr;
2323if (ac_aggr.$3)
2324return 0;
2325 ;
2326 return 0;
2327}
2328_ACEOF
2329if ac_fn_c_try_compile "$LINENO"; then :
2330 eval "$4=yes"
2331else
2332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333/* end confdefs.h. */
2334$5
2335int
2336main ()
2337{
2338static $2 ac_aggr;
2339if (sizeof ac_aggr.$3)
2340return 0;
2341 ;
2342 return 0;
2343}
2344_ACEOF
2345if ac_fn_c_try_compile "$LINENO"; then :
2346 eval "$4=yes"
2347else
2348 eval "$4=no"
2349fi
2350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2351fi
2352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2353fi
2354eval ac_res=\$$4
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2356$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002357 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002358
2359} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002360cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002361This file contains any messages produced by compilers while
2362running configure, to aid debugging if configure makes a mistake.
2363
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002364It was created by python $as_me 3.3, which was
Victor Stinnere0be4232011-10-25 13:06:09 +02002365generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002366
2367 $ $0 $@
2368
2369_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002371{
2372cat <<_ASUNAME
2373## --------- ##
2374## Platform. ##
2375## --------- ##
2376
2377hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2378uname -m = `(uname -m) 2>/dev/null || echo unknown`
2379uname -r = `(uname -r) 2>/dev/null || echo unknown`
2380uname -s = `(uname -s) 2>/dev/null || echo unknown`
2381uname -v = `(uname -v) 2>/dev/null || echo unknown`
2382
2383/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2384/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2385
2386/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2387/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2388/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002389/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002390/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2391/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2392/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2393
2394_ASUNAME
2395
2396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2397for as_dir in $PATH
2398do
2399 IFS=$as_save_IFS
2400 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002401 $as_echo "PATH: $as_dir"
2402 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002403IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002404
2405} >&5
2406
2407cat >&5 <<_ACEOF
2408
2409
2410## ----------- ##
2411## Core tests. ##
2412## ----------- ##
2413
2414_ACEOF
2415
2416
2417# Keep a trace of the command line.
2418# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002419# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002420# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002421# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002422ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002423ac_configure_args0=
2424ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002425ac_must_keep_next=false
2426for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002427do
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 for ac_arg
2429 do
2430 case $ac_arg in
2431 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2432 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2433 | -silent | --silent | --silen | --sile | --sil)
2434 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 esac
2438 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002439 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002440 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002441 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002442 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002443 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002445 case $ac_arg in
2446 *=* | --config-cache | -C | -disable-* | --disable-* \
2447 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2448 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2449 | -with-* | --with-* | -without-* | --without-* | --x)
2450 case "$ac_configure_args0 " in
2451 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2452 esac
2453 ;;
2454 -* ) ac_must_keep_next=true ;;
2455 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002456 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002457 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 ;;
2459 esac
2460 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002461done
Matthias Kloseb9621712010-04-24 17:59:49 +00002462{ ac_configure_args0=; unset ac_configure_args0;}
2463{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002464
2465# When interrupted or exit'd, cleanup temporary files, and complete
2466# config.log. We remove comments because anyway the quotes in there
2467# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468# WARNING: Use '\'' to represent an apostrophe within the trap.
2469# 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 +00002470trap 'exit_status=$?
2471 # Save into config.log some information that might help in debugging.
2472 {
2473 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002474
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002475 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002476## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002477## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
2479 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480(
2481 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2482 eval ac_val=\$$ac_var
2483 case $ac_val in #(
2484 *${as_nl}*)
2485 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002486 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2487$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 esac
2489 case $ac_var in #(
2490 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2492 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 esac ;;
2494 esac
2495 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002496 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2498 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 "s/'\''/'\''\\\\'\'''\''/g;
2501 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2502 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002503 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002505 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 esac |
2507 sort
2508)
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002510
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002512## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 echo
2515 for ac_var in $ac_subst_vars
2516 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 eval ac_val=\$$ac_var
2518 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002521 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002522 done | sort
2523 echo
2524
2525 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002526 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002528## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 echo
2530 for ac_var in $ac_subst_files
2531 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 eval ac_val=\$$ac_var
2533 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002537 done | sort
2538 echo
2539 fi
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002542 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002543## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002544## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 echo
2548 fi
2549 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002550 $as_echo "$as_me: caught signal $ac_signal"
2551 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 rm -f core *.core core.conftest.* &&
2554 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002557for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002559done
2560ac_signal=0
2561
2562# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002564
Matthias Kloseb9621712010-04-24 17:59:49 +00002565$as_echo "/* confdefs.h */" > confdefs.h
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567# Predefined preprocessor variables.
2568
2569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_NAME "$PACKAGE_NAME"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2575_ACEOF
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_VERSION "$PACKAGE_VERSION"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581cat >>confdefs.h <<_ACEOF
2582#define PACKAGE_STRING "$PACKAGE_STRING"
2583_ACEOF
2584
Martin v. Löwis11437992002-04-12 09:54:03 +00002585cat >>confdefs.h <<_ACEOF
2586#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2587_ACEOF
2588
Matthias Kloseb9621712010-04-24 17:59:49 +00002589cat >>confdefs.h <<_ACEOF
2590#define PACKAGE_URL "$PACKAGE_URL"
2591_ACEOF
2592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593
2594# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002595# Prefer an explicitly selected file to automatically selected ones.
2596ac_site_file1=NONE
2597ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 # We do not want a PATH search for config.site.
2600 case $CONFIG_SITE in #((
2601 -*) ac_site_file1=./$CONFIG_SITE;;
2602 */*) ac_site_file1=$CONFIG_SITE;;
2603 *) ac_site_file1=./$CONFIG_SITE;;
2604 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 ac_site_file1=$prefix/share/config.site
2607 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608else
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 ac_site_file1=$ac_default_prefix/share/config.site
2610 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002612for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613do
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 test "x$ac_site_file" = xNONE && continue
2615 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2616 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2617$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002619 . "$ac_site_file" \
2620 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2622as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002623See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002624 fi
2625done
2626
2627if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 # Some versions of bash will fail to source /dev/null (special files
2629 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2630 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2631 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2632$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2635 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 esac
2637 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002638else
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2640$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 >$cache_file
2642fi
2643
2644# Check that the precious variables saved in the cache have kept the same
2645# value.
2646ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002647for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2649 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2651 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 case $ac_old_set,$ac_new_set in
2653 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2655$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 +00002656 ac_cache_corrupted=: ;;
2657 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2659$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 ac_cache_corrupted=: ;;
2661 ,);;
2662 *)
2663 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 # differences in whitespace do not lead to failure.
2665 ac_old_val_w=`echo x $ac_old_val`
2666 ac_new_val_w=`echo x $ac_new_val`
2667 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2669$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2670 ac_cache_corrupted=:
2671 else
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2673$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2674 eval $ac_var=\$ac_old_val
2675 fi
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2677$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2679$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 fi;;
2681 esac
2682 # Pass precious variables to config.status.
2683 if test "$ac_new_set" = set; then
2684 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 *) ac_arg=$ac_var=$ac_new_val ;;
2687 esac
2688 case " $ac_configure_args " in
2689 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 esac
2692 fi
2693done
2694if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002695 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2698$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002699 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002701## -------------------- ##
2702## Main body of script. ##
2703## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704
Guido van Rossum7f43da71994-08-01 12:15:30 +00002705ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002706ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002707ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2708ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2709ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002710
Guido van Rossum627b2d71993-12-24 10:39:16 +00002711
Michael W. Hudson54241132001-12-07 15:38:26 +00002712
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713
2714
2715
2716
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002717if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718then
2719# Extract the first word of "hg", so it can be a program name with args.
2720set dummy hg; ac_word=$2
2721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2722$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002723if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002724 $as_echo_n "(cached) " >&6
2725else
2726 if test -n "$HAS_HG"; then
2727 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2728else
2729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2730for as_dir in $PATH
2731do
2732 IFS=$as_save_IFS
2733 test -z "$as_dir" && as_dir=.
2734 for ac_exec_ext in '' $ac_executable_extensions; do
2735 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2736 ac_cv_prog_HAS_HG="found"
2737 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2738 break 2
2739 fi
2740done
2741 done
2742IFS=$as_save_IFS
2743
2744 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2745fi
2746fi
2747HAS_HG=$ac_cv_prog_HAS_HG
2748if test -n "$HAS_HG"; then
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2750$as_echo "$HAS_HG" >&6; }
2751else
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2753$as_echo "no" >&6; }
2754fi
2755
2756
2757else
2758HAS_HG=no-repository
2759fi
2760if test $HAS_HG = found
2761then
2762 HGVERSION="hg id -i \$(srcdir)"
2763 HGTAG="hg id -t \$(srcdir)"
2764 HGBRANCH="hg id -b \$(srcdir)"
2765else
2766 HGVERSION=""
2767 HGTAG=""
2768 HGBRANCH=""
2769fi
2770
2771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002772ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002773
2774
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002775ac_aux_dir=
2776for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2777 if test -f "$ac_dir/install-sh"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/install-sh -c"
2780 break
2781 elif test -f "$ac_dir/install.sh"; then
2782 ac_aux_dir=$ac_dir
2783 ac_install_sh="$ac_aux_dir/install.sh -c"
2784 break
2785 elif test -f "$ac_dir/shtool"; then
2786 ac_aux_dir=$ac_dir
2787 ac_install_sh="$ac_aux_dir/shtool install -c"
2788 break
2789 fi
2790done
2791if test -z "$ac_aux_dir"; then
2792 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2793fi
2794
2795# These three variables are undocumented and unsupported,
2796# and are intended to be withdrawn in a future Autoconf release.
2797# They can cause serious problems if a builder's source tree is in a directory
2798# whose full name contains unusual characters.
2799ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2800ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2801ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2802
2803
2804# Make sure we can run config.sub.
2805$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2806 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2807
2808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2809$as_echo_n "checking build system type... " >&6; }
2810if ${ac_cv_build+:} false; then :
2811 $as_echo_n "(cached) " >&6
2812else
2813 ac_build_alias=$build_alias
2814test "x$ac_build_alias" = x &&
2815 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2816test "x$ac_build_alias" = x &&
2817 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2818ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2819 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2820
2821fi
2822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2823$as_echo "$ac_cv_build" >&6; }
2824case $ac_cv_build in
2825*-*-*) ;;
2826*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2827esac
2828build=$ac_cv_build
2829ac_save_IFS=$IFS; IFS='-'
2830set x $ac_cv_build
2831shift
2832build_cpu=$1
2833build_vendor=$2
2834shift; shift
2835# Remember, the first character of IFS is used to create $*,
2836# except with old shells:
2837build_os=$*
2838IFS=$ac_save_IFS
2839case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2840
2841
2842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2843$as_echo_n "checking host system type... " >&6; }
2844if ${ac_cv_host+:} false; then :
2845 $as_echo_n "(cached) " >&6
2846else
2847 if test "x$host_alias" = x; then
2848 ac_cv_host=$ac_cv_build
2849else
2850 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2851 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2852fi
2853
2854fi
2855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2856$as_echo "$ac_cv_host" >&6; }
2857case $ac_cv_host in
2858*-*-*) ;;
2859*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2860esac
2861host=$ac_cv_host
2862ac_save_IFS=$IFS; IFS='-'
2863set x $ac_cv_host
2864shift
2865host_cpu=$1
2866host_vendor=$2
2867shift; shift
2868# Remember, the first character of IFS is used to create $*,
2869# except with old shells:
2870host_os=$*
2871IFS=$ac_save_IFS
2872case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2873
2874
2875
Martin v. Löwis11437992002-04-12 09:54:03 +00002876
Benjamin Petersond23f8222009-04-05 19:13:16 +00002877if test "$prefix" != "/"; then
2878 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2879fi
2880
2881
Martin v. Löwis11437992002-04-12 09:54:03 +00002882
2883
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002884# We don't use PACKAGE_ variables, and they cause conflicts
2885# with other autoconf-based packages that include Python.h
2886grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2887rm confdefs.h
2888mv confdefs.h.new confdefs.h
2889
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002890
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002891VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002892
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002893# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002894
2895SOVERSION=1.0
2896
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002897# The later defininition of _XOPEN_SOURCE disables certain features
2898# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2899
Matthias Kloseb9621712010-04-24 17:59:49 +00002900$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002901
2902
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002903# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2904# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2905# them.
2906
Matthias Kloseb9621712010-04-24 17:59:49 +00002907$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002908
2909
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002910# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2911# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2912# them.
2913
Matthias Kloseb9621712010-04-24 17:59:49 +00002914$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002915
2916
Martin v. Löwisd6320502004-08-12 13:45:08 +00002917# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2918# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2919
Matthias Kloseb9621712010-04-24 17:59:49 +00002920$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002921
2922
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002923# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2924# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2925# them.
2926
Matthias Kloseb9621712010-04-24 17:59:49 +00002927$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002928
2929
2930
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002931define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002932
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002933# Arguments passed to configure.
2934
2935CONFIG_ARGS="$ac_configure_args"
2936
Matthias Kloseb9621712010-04-24 17:59:49 +00002937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2938$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002939# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002940if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002941 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002942 case $enableval in
2943 yes)
2944 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002945 if test ! -d "${enableval}"
2946 then
2947 enableval=/
2948 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002949 ;;
2950 esac
2951 case $enableval in
2952 no)
2953 UNIVERSALSDK=
2954 enable_universalsdk=
2955 ;;
2956 *)
2957 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002958 if test ! -d "${UNIVERSALSDK}"
2959 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002960 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002961 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002962 ;;
2963 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002964
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002965
Thomas Wouters477c8d52006-05-27 19:21:47 +00002966else
2967
2968 UNIVERSALSDK=
2969 enable_universalsdk=
2970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002971fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002972
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002973if test -n "${UNIVERSALSDK}"
2974then
Matthias Kloseb9621712010-04-24 17:59:49 +00002975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2976$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002977else
Matthias Kloseb9621712010-04-24 17:59:49 +00002978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2979$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002980fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002982
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002983
2984
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002985UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2988$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002989
2990# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002991if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002992 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2994$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002995 UNIVERSAL_ARCHS="$withval"
2996
2997else
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3000$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003001
3002fi
3003
3004
3005
3006
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003007
3008# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003009if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003010 withval=$with_framework_name;
3011 PYTHONFRAMEWORK=${withval}
3012 PYTHONFRAMEWORKDIR=${withval}.framework
3013 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3014
3015else
3016
3017 PYTHONFRAMEWORK=Python
3018 PYTHONFRAMEWORKDIR=Python.framework
3019 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3020
3021fi
3022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003023# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003024if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003025 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003026 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003027 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003028 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003029 esac
3030 case $enableval in
3031 no)
3032 PYTHONFRAMEWORK=
3033 PYTHONFRAMEWORKDIR=no-framework
3034 PYTHONFRAMEWORKPREFIX=
3035 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036 FRAMEWORKINSTALLFIRST=
3037 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003038 FRAMEWORKALTINSTALLFIRST=
3039 FRAMEWORKALTINSTALLLAST=
3040 if test "x${prefix}" = "xNONE"; then
3041 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3042 else
3043 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3044 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003045 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003046 ;;
3047 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003048 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003049 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003051 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003052 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3053 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003054 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003055
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003056 if test "x${prefix}" = "xNONE" ; then
3057 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003058
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003059 else
3060 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3061 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003062
3063 case "${enableval}" in
3064 /System*)
3065 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3066 if test "${prefix}" = "NONE" ; then
3067 # See below
3068 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3069 fi
3070 ;;
3071
3072 /Library*)
3073 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3074 ;;
3075
3076 */Library/Frameworks)
3077 MDIR="`dirname "${enableval}"`"
3078 MDIR="`dirname "${MDIR}"`"
3079 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3080
3081 if test "${prefix}" = "NONE"; then
3082 # User hasn't specified the
3083 # --prefix option, but wants to install
3084 # the framework in a non-default location,
3085 # ensure that the compatibility links get
3086 # installed relative to that prefix as well
3087 # instead of in /usr/local.
3088 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3089 fi
3090 ;;
3091
3092 *)
3093 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3094 ;;
3095 esac
3096
Jack Jansen127e56e2001-09-11 14:41:54 +00003097 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003098
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003099 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003100 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003101 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003103 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003104
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003105 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3106
3107 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3108
Jack Jansene578a632001-08-15 01:27:14 +00003109 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003110
Guido van Rossum563e7081996-09-10 18:20:48 +00003111else
Martin v. Löwis11437992002-04-12 09:54:03 +00003112
Jack Jansene578a632001-08-15 01:27:14 +00003113 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003114 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003115 PYTHONFRAMEWORKPREFIX=
3116 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117 FRAMEWORKINSTALLFIRST=
3118 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003119 FRAMEWORKALTINSTALLFIRST=
3120 FRAMEWORKALTINSTALLLAST=
3121 if test "x${prefix}" = "xNONE" ; then
3122 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3123 else
3124 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3125 fi
Jack Jansene578a632001-08-15 01:27:14 +00003126 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003127
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003129fi
3130
Thomas Wouters477c8d52006-05-27 19:21:47 +00003131
3132
Michael W. Hudson54241132001-12-07 15:38:26 +00003133
3134
3135
3136
Jack Jansene578a632001-08-15 01:27:14 +00003137
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003138
3139
3140
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003141
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142
Jack Jansene578a632001-08-15 01:27:14 +00003143##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003144## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003145## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003146##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003147# Set name for machine-dependent library files
3148
Matthias Kloseb9621712010-04-24 17:59:49 +00003149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3150$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003151if test -z "$MACHDEP"
3152then
Guido van Rossum563e7081996-09-10 18:20:48 +00003153 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003154 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003155 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003156 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003157 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003158 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003159 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003160 ac_md_system=`echo $ac_sys_system |
3161 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3162 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003163 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003164 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003165
Guido van Rossum07397971997-04-29 21:49:50 +00003166 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003167 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003168 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003169 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003170 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003171 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003172 esac
3173fi
Guido van Rossum91922671997-10-09 20:24:13 +00003174
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003175# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3176# disable features if it is defined, without any means to access these
3177# features as extensions. For these systems, we skip the definition of
3178# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3179# some feature, make sure there is no alternative way to access this
3180# feature. Also, when using wildcards, make sure you have verified the
3181# need for not defining _XOPEN_SOURCE on all systems matching the
3182# wildcard, and that the wildcard does not include future systems
3183# (which may remove their limitations).
3184case $ac_sys_system/$ac_sys_release in
3185 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3186 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003187 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003188 # In addition, Stefan Krah confirms that issue #1244610 exists through
3189 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003190 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003191 define_xopen_source=no
3192 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3193 # also defined. This can be overridden by defining _BSD_SOURCE
3194 # As this has a different meaning on Linux, only define it on OpenBSD
3195
Matthias Kloseb9621712010-04-24 17:59:49 +00003196$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003197
3198 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003199 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003200 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3201 # also defined. This can be overridden by defining _BSD_SOURCE
3202 # As this has a different meaning on Linux, only define it on OpenBSD
3203
Matthias Kloseb9621712010-04-24 17:59:49 +00003204$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003205
3206 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003207 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3208 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3209 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003210 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 +00003211 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003212 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3213 # request to enable features supported by the standard as a request
3214 # to disable features not supported by the standard. The best way
3215 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3216 # entirely and define __EXTENSIONS__ instead.
3217 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003218 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003219 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3220 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003221 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003222 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003223 define_xopen_source=no;;
3224 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003225 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003226 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003227 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003228 # On FreeBSD 4, the math functions C89 does not cover are never defined
3229 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3230 FreeBSD/4.*)
3231 define_xopen_source=no;;
3232 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3233 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3234 # identifies itself as Darwin/7.*
3235 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3236 # disables platform specific features beyond repair.
3237 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3238 # has no effect, don't bother defining them
3239 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003240 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003241 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003242 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003243 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3244 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3245 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003246 AIX/4)
3247 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003248 AIX/5)
3249 if test `uname -r` -eq 1; then
3250 define_xopen_source=no
3251 fi
3252 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003253 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3254 # defining NI_NUMERICHOST.
3255 QNX/6.3.2)
3256 define_xopen_source=no
3257 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003258
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003259esac
3260
3261if test $define_xopen_source = yes
3262then
Victor Stinner14d098d2011-09-07 22:29:43 +02003263 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003264
Victor Stinner14d098d2011-09-07 22:29:43 +02003265$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003266
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003267
3268 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3269 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3270 # several APIs are not declared. Since this is also needed in some
3271 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003272
Matthias Kloseb9621712010-04-24 17:59:49 +00003273$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003274
3275
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003276
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003277$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003278
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003279fi
3280
Guido van Rossum91922671997-10-09 20:24:13 +00003281#
3282# SGI compilers allow the specification of the both the ABI and the
3283# ISA on the command line. Depending on the values of these switches,
3284# different and often incompatable code will be generated.
3285#
3286# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3287# thus supply support for various ABI/ISA combinations. The MACHDEP
3288# variable is also adjusted.
3289#
3290
3291if test ! -z "$SGI_ABI"
3292then
3293 CC="cc $SGI_ABI"
3294 LDFLAGS="$SGI_ABI $LDFLAGS"
3295 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3298$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003299
Jack Jansen6b08a402004-06-03 12:41:45 +00003300# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3301# it may influence the way we can build extensions, so distutils
3302# needs to check it
3303
Thomas Wouters477c8d52006-05-27 19:21:47 +00003304
Jack Jansen6b08a402004-06-03 12:41:45 +00003305CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003306EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003307
Matthias Kloseb9621712010-04-24 17:59:49 +00003308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3309$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003310ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3312$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003313
Guido van Rossum627b2d71993-12-24 10:39:16 +00003314# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003315
3316# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3317# for debug/optimization stuff. BASECFLAGS is for flags that are required
3318# just to get things to compile and link. Users are free to override OPT
3319# when running configure or make. The build should not break if they do.
3320# BASECFLAGS should generally not be messed with, however.
3321
3322# XXX shouldn't some/most/all of this code be merged with the stuff later
3323# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3325$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003327# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003328if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003329 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003330 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003331 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003332 without_gcc=yes;;
3333 yes) CC=gcc
3334 without_gcc=no;;
3335 *) CC=$withval
3336 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003337 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003338else
Martin v. Löwis11437992002-04-12 09:54:03 +00003339
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003340 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003341 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003342 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003343 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003344 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003345fi
3346
Matthias Kloseb9621712010-04-24 17:59:49 +00003347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3348$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003349
Guido van Rossum8b131c51995-03-09 14:10:13 +00003350# If the user switches compilers, we can't believe the cache
3351if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3352then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003353 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003354(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003355fi
3356
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003357# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3358# when the compiler supports them, but we don't always want -O2, and
3359# we set -g later.
3360if test -z "$CFLAGS"; then
3361 CFLAGS=
3362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003363ac_ext=c
3364ac_cpp='$CPP $CPPFLAGS'
3365ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3366ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3367ac_compiler_gnu=$ac_cv_c_compiler_gnu
3368if test -n "$ac_tool_prefix"; then
3369 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3370set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3372$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003373if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003374 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003375else
3376 if test -n "$CC"; then
3377 ac_cv_prog_CC="$CC" # Let the user override the test.
3378else
Martin v. Löwis11437992002-04-12 09:54:03 +00003379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3380for as_dir in $PATH
3381do
3382 IFS=$as_save_IFS
3383 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003384 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003385 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 +00003386 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003387 $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 +00003388 break 2
3389 fi
3390done
Matthias Kloseb9621712010-04-24 17:59:49 +00003391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003393
Jack Jansendd19cf82001-12-06 22:36:17 +00003394fi
3395fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003396CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003397if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3399$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003400else
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3402$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003403fi
3404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003405
Martin v. Löwis11437992002-04-12 09:54:03 +00003406fi
3407if test -z "$ac_cv_prog_CC"; then
3408 ac_ct_CC=$CC
3409 # Extract the first word of "gcc", so it can be a program name with args.
3410set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3412$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003413if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003414 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003415else
3416 if test -n "$ac_ct_CC"; then
3417 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3418else
3419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3420for as_dir in $PATH
3421do
3422 IFS=$as_save_IFS
3423 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003424 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003425 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 +00003426 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003427 $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 +00003428 break 2
3429 fi
3430done
Matthias Kloseb9621712010-04-24 17:59:49 +00003431 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003433
3434fi
3435fi
3436ac_ct_CC=$ac_cv_prog_ac_ct_CC
3437if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3439$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003440else
Matthias Kloseb9621712010-04-24 17:59:49 +00003441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3442$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003443fi
3444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003445 if test "x$ac_ct_CC" = x; then
3446 CC=""
3447 else
3448 case $cross_compiling:$ac_tool_warned in
3449yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003450{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3451$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003452ac_tool_warned=yes ;;
3453esac
3454 CC=$ac_ct_CC
3455 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003456else
3457 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003458fi
3459
Jack Jansendd19cf82001-12-06 22:36:17 +00003460if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461 if test -n "$ac_tool_prefix"; then
3462 # 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 +00003463set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3465$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003466if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003467 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003468else
3469 if test -n "$CC"; then
3470 ac_cv_prog_CC="$CC" # Let the user override the test.
3471else
Martin v. Löwis11437992002-04-12 09:54:03 +00003472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3473for as_dir in $PATH
3474do
3475 IFS=$as_save_IFS
3476 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003477 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 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 +00003479 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003480 $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 +00003481 break 2
3482 fi
3483done
Matthias Kloseb9621712010-04-24 17:59:49 +00003484 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003486
3487fi
3488fi
3489CC=$ac_cv_prog_CC
3490if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3492$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003493else
Matthias Kloseb9621712010-04-24 17:59:49 +00003494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3495$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003496fi
3497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003498
Martin v. Löwis11437992002-04-12 09:54:03 +00003499 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003500fi
3501if test -z "$CC"; then
3502 # Extract the first word of "cc", so it can be a program name with args.
3503set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3505$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003506if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003507 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003508else
3509 if test -n "$CC"; then
3510 ac_cv_prog_CC="$CC" # Let the user override the test.
3511else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003512 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3514for as_dir in $PATH
3515do
3516 IFS=$as_save_IFS
3517 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003518 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003519 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 +00003520 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3521 ac_prog_rejected=yes
3522 continue
3523 fi
3524 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003525 $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 +00003526 break 2
3527 fi
3528done
Matthias Kloseb9621712010-04-24 17:59:49 +00003529 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003531
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003532if test $ac_prog_rejected = yes; then
3533 # We found a bogon in the path, so make sure we never use it.
3534 set dummy $ac_cv_prog_CC
3535 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003536 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003537 # We chose a different compiler from the bogus one.
3538 # However, it has the same basename, so the bogon will be chosen
3539 # first if we set CC to just the basename; use the full file name.
3540 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003541 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003542 fi
3543fi
3544fi
3545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003546CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003547if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3549$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003550else
Matthias Kloseb9621712010-04-24 17:59:49 +00003551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3552$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003553fi
3554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003555
Martin v. Löwis11437992002-04-12 09:54:03 +00003556fi
3557if test -z "$CC"; then
3558 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003559 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 do
3561 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3562set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3564$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003565if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003566 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003567else
3568 if test -n "$CC"; then
3569 ac_cv_prog_CC="$CC" # Let the user override the test.
3570else
Martin v. Löwis11437992002-04-12 09:54:03 +00003571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3572for as_dir in $PATH
3573do
3574 IFS=$as_save_IFS
3575 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003576 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003577 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 +00003578 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 $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 +00003580 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003581 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003582done
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003585
3586fi
3587fi
3588CC=$ac_cv_prog_CC
3589if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3591$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003592else
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3594$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003595fi
3596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597
Martin v. Löwis11437992002-04-12 09:54:03 +00003598 test -n "$CC" && break
3599 done
3600fi
3601if test -z "$CC"; then
3602 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003604do
3605 # Extract the first word of "$ac_prog", so it can be a program name with args.
3606set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3608$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003609if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003611else
3612 if test -n "$ac_ct_CC"; then
3613 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3614else
3615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3616for as_dir in $PATH
3617do
3618 IFS=$as_save_IFS
3619 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621 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 +00003622 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 $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 +00003624 break 2
3625 fi
3626done
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003629
Martin v. Löwis11437992002-04-12 09:54:03 +00003630fi
3631fi
3632ac_ct_CC=$ac_cv_prog_ac_ct_CC
3633if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3635$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003636else
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3638$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003639fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003641
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 test -n "$ac_ct_CC" && break
3643done
Michael W. Hudson54241132001-12-07 15:38:26 +00003644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645 if test "x$ac_ct_CC" = x; then
3646 CC=""
3647 else
3648 case $cross_compiling:$ac_tool_warned in
3649yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003650{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3651$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652ac_tool_warned=yes ;;
3653esac
3654 CC=$ac_ct_CC
3655 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003656fi
3657
3658fi
3659
3660
Matthias Kloseb9621712010-04-24 17:59:49 +00003661test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003663as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003664See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003665
3666# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003667$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3668set X $ac_compile
3669ac_compiler=$2
3670for ac_option in --version -v -V -qversion; do
3671 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672case "(($ac_try" in
3673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3674 *) ac_try_echo=$ac_try;;
3675esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003676eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3677$as_echo "$ac_try_echo"; } >&5
3678 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 if test -s conftest.err; then
3681 sed '10a\
3682... rest of stderr output deleted ...
3683 10q' conftest.err >conftest.er1
3684 cat conftest.er1 >&5
3685 fi
3686 rm -f conftest.er1 conftest.err
3687 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3688 test $ac_status = 0; }
3689done
Martin v. Löwis11437992002-04-12 09:54:03 +00003690
Matthias Kloseb9621712010-04-24 17:59:49 +00003691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003692/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003693
Martin v. Löwis11437992002-04-12 09:54:03 +00003694int
3695main ()
3696{
3697
3698 ;
3699 return 0;
3700}
3701_ACEOF
3702ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003703ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003704# Try to create an executable without -o first, disregard a.out.
3705# It will help us diagnose broken compilers, and finding out an intuition
3706# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3708$as_echo_n "checking whether the C compiler works... " >&6; }
3709ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3710
3711# The possible output files:
3712ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714ac_rmfiles=
3715for ac_file in $ac_files
3716do
3717 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3720 esac
3721done
3722rm -f $ac_rmfiles
3723
Matthias Kloseb9621712010-04-24 17:59:49 +00003724if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725case "(($ac_try" in
3726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3727 *) ac_try_echo=$ac_try;;
3728esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003729eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3730$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3734 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3736# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3737# in a Makefile. We should not override ac_cv_exeext if it was cached,
3738# so that the user can short-circuit this test for compilers unknown to
3739# Autoconf.
3740for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003741do
3742 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003745 ;;
3746 [ab].out )
3747 # We found the default executable, but exeext='' is most
3748 # certainly right.
3749 break;;
3750 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752 then :; else
3753 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3754 fi
3755 # We set ac_cv_exeext here because the later test for it is not
3756 # safe: cross compilers may not add the suffix if given an `-o'
3757 # argument, so we may need to know it at that point already.
3758 # Even if this section looks crufty: it has the advantage of
3759 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003760 break;;
3761 * )
3762 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 esac
3764done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765test "$ac_cv_exeext" = no && ac_cv_exeext=
3766
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003767else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768 ac_file=''
3769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003770if test -z "$ac_file"; then :
3771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3772$as_echo "no" >&6; }
3773$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003774sed 's/^/| /' conftest.$ac_ext >&5
3775
Matthias Kloseb9621712010-04-24 17:59:49 +00003776{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3777$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003778as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003779See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003780else
3781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3782$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3785$as_echo_n "checking for C compiler default output file name... " >&6; }
3786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3787$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003788ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003789
Matthias Kloseb9621712010-04-24 17:59:49 +00003790rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003791ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3793$as_echo_n "checking for suffix of executables... " >&6; }
3794if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795case "(($ac_try" in
3796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3797 *) ac_try_echo=$ac_try;;
3798esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3800$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3804 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003805 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3806# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3807# work properly (i.e., refer to `conftest.exe'), while it won't with
3808# `rm'.
3809for ac_file in conftest.exe conftest conftest.*; do
3810 test -f "$ac_file" || continue
3811 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003813 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3814 break;;
3815 * ) break;;
3816 esac
3817done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003818else
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003821as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003822See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003824rm -f conftest conftest$ac_cv_exeext
3825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3826$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003827
3828rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003829EXEEXT=$ac_cv_exeext
3830ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3832/* end confdefs.h. */
3833#include <stdio.h>
3834int
3835main ()
3836{
3837FILE *f = fopen ("conftest.out", "w");
3838 return ferror (f) || fclose (f) != 0;
3839
3840 ;
3841 return 0;
3842}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003844ac_clean_files="$ac_clean_files conftest.out"
3845# Check that the compiler produces executables we can run. If not, either
3846# the compiler is broken, or we cross compile.
3847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3848$as_echo_n "checking whether we are cross compiling... " >&6; }
3849if test "$cross_compiling" != yes; then
3850 { { ac_try="$ac_link"
3851case "(($ac_try" in
3852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3853 *) ac_try_echo=$ac_try;;
3854esac
3855eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3856$as_echo "$ac_try_echo"; } >&5
3857 (eval "$ac_link") 2>&5
3858 ac_status=$?
3859 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3860 test $ac_status = 0; }
3861 if { ac_try='./conftest$ac_cv_exeext'
3862 { { case "(($ac_try" in
3863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3864 *) ac_try_echo=$ac_try;;
3865esac
3866eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3867$as_echo "$ac_try_echo"; } >&5
3868 (eval "$ac_try") 2>&5
3869 ac_status=$?
3870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3871 test $ac_status = 0; }; }; then
3872 cross_compiling=no
3873 else
3874 if test "$cross_compiling" = maybe; then
3875 cross_compiling=yes
3876 else
3877 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003879as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003880If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02003881See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003882 fi
3883 fi
3884fi
3885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3886$as_echo "$cross_compiling" >&6; }
3887
3888rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3889ac_clean_files=$ac_clean_files_save
3890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3891$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003892if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003893 $as_echo_n "(cached) " >&6
3894else
3895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003896/* end confdefs.h. */
3897
3898int
3899main ()
3900{
3901
3902 ;
3903 return 0;
3904}
3905_ACEOF
3906rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003907if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908case "(($ac_try" in
3909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3910 *) ac_try_echo=$ac_try;;
3911esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003912eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3913$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003915 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3917 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 for ac_file in conftest.o conftest.obj conftest.*; do
3919 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003920 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003922 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3923 break;;
3924 esac
3925done
3926else
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003928sed 's/^/| /' conftest.$ac_ext >&5
3929
Matthias Kloseb9621712010-04-24 17:59:49 +00003930{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3931$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003932as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02003933See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003934fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003935rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3938$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003939OBJEXT=$ac_cv_objext
3940ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3942$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003943if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003945else
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003948
Martin v. Löwis11437992002-04-12 09:54:03 +00003949int
3950main ()
3951{
3952#ifndef __GNUC__
3953 choke me
3954#endif
3955
3956 ;
3957 return 0;
3958}
3959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003960if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 ac_compiler_gnu=yes
3962else
Matthias Kloseb9621712010-04-24 17:59:49 +00003963 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003966ac_cv_c_compiler_gnu=$ac_compiler_gnu
3967
3968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3970$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3971if test $ac_compiler_gnu = yes; then
3972 GCC=yes
3973else
3974 GCC=
3975fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003976ac_test_CFLAGS=${CFLAGS+set}
3977ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3979$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003980if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003981 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003982else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983 ac_save_c_werror_flag=$ac_c_werror_flag
3984 ac_c_werror_flag=yes
3985 ac_cv_prog_cc_g=no
3986 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003989
Martin v. Löwis11437992002-04-12 09:54:03 +00003990int
3991main ()
3992{
3993
3994 ;
3995 return 0;
3996}
3997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003998if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003999 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004000else
Matthias Kloseb9621712010-04-24 17:59:49 +00004001 CFLAGS=""
4002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003/* end confdefs.h. */
4004
4005int
4006main ()
4007{
4008
4009 ;
4010 return 0;
4011}
4012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004013if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014
Matthias Kloseb9621712010-04-24 17:59:49 +00004015else
4016 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004017 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019/* end confdefs.h. */
4020
4021int
4022main ()
4023{
4024
4025 ;
4026 return 0;
4027}
4028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004029if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004030 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4037 ac_c_werror_flag=$ac_save_c_werror_flag
4038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4040$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004041if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004043elif test $ac_cv_prog_cc_g = yes; then
4044 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004045 CFLAGS="-g -O2"
4046 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004047 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004048 fi
4049else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004050 if test "$GCC" = yes; then
4051 CFLAGS="-O2"
4052 else
4053 CFLAGS=
4054 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4057$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004058if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004060else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004062ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004064/* end confdefs.h. */
4065#include <stdarg.h>
4066#include <stdio.h>
4067#include <sys/types.h>
4068#include <sys/stat.h>
4069/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4070struct buf { int x; };
4071FILE * (*rcsopen) (struct buf *, struct stat *, int);
4072static char *e (p, i)
4073 char **p;
4074 int i;
4075{
4076 return p[i];
4077}
4078static char *f (char * (*g) (char **, int), char **p, ...)
4079{
4080 char *s;
4081 va_list v;
4082 va_start (v,p);
4083 s = g (p, va_arg (v,int));
4084 va_end (v);
4085 return s;
4086}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004087
4088/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4089 function prototypes and stuff, but not '\xHH' hex character constants.
4090 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004091 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004092 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4093 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004095int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004097/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4098 inside strings and character constants. */
4099#define FOO(x) 'x'
4100int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4101
Skip Montanaro6dead952003-09-25 14:50:04 +00004102int test (int i, double x);
4103struct s1 {int (*f) (int a);};
4104struct s2 {int (*f) (double a);};
4105int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4106int argc;
4107char **argv;
4108int
4109main ()
4110{
4111return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4112 ;
4113 return 0;
4114}
4115_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4117 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004118do
4119 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004121 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123rm -f core conftest.err conftest.$ac_objext
4124 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004125done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004126rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004127CC=$ac_save_CC
4128
4129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130# AC_CACHE_VAL
4131case "x$ac_cv_prog_cc_c89" in
4132 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4134$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4137$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004138 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004139 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4141$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004142esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004143if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004144
Matthias Kloseb9621712010-04-24 17:59:49 +00004145fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004146
Martin v. Löwis11437992002-04-12 09:54:03 +00004147ac_ext=c
4148ac_cpp='$CPP $CPPFLAGS'
4149ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4150ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4151ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004152
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004153
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004154
4155
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4157$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004158
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004159# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004160if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004161 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004162
4163 case $withval in
4164 no) with_cxx_main=no
4165 MAINCC='$(CC)';;
4166 yes) with_cxx_main=yes
4167 MAINCC='$(CXX)';;
4168 *) with_cxx_main=yes
4169 MAINCC=$withval
4170 if test -z "$CXX"
4171 then
4172 CXX=$withval
4173 fi;;
4174 esac
4175else
4176
4177 with_cxx_main=no
4178 MAINCC='$(CC)'
4179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004180fi
4181
Matthias Kloseb9621712010-04-24 17:59:49 +00004182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4183$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004184
4185preset_cxx="$CXX"
4186if test -z "$CXX"
4187then
4188 case "$CC" in
4189 gcc) # Extract the first word of "g++", so it can be a program name with args.
4190set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4192$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004193if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004195else
4196 case $CXX in
4197 [\\/]* | ?:[\\/]*)
4198 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4199 ;;
4200 *)
4201 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4202for as_dir in notfound
4203do
4204 IFS=$as_save_IFS
4205 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207 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 +00004208 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004209 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004210 break 2
4211 fi
4212done
Matthias Kloseb9621712010-04-24 17:59:49 +00004213 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004215
4216 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4217 ;;
4218esac
4219fi
4220CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004221if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4223$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004224else
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4226$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004229 ;;
4230 cc) # Extract the first word of "c++", so it can be a program name with args.
4231set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4233$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004234if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004235 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004236else
4237 case $CXX in
4238 [\\/]* | ?:[\\/]*)
4239 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4240 ;;
4241 *)
4242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4243for as_dir in notfound
4244do
4245 IFS=$as_save_IFS
4246 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004247 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004248 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 +00004249 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004251 break 2
4252 fi
4253done
Matthias Kloseb9621712010-04-24 17:59:49 +00004254 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004256
4257 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4258 ;;
4259esac
4260fi
4261CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004262if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4264$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004265else
Matthias Kloseb9621712010-04-24 17:59:49 +00004266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4267$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004270 ;;
4271 esac
4272 if test "$CXX" = "notfound"
4273 then
4274 CXX=""
4275 fi
4276fi
4277if test -z "$CXX"
4278then
4279 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4280do
4281 # Extract the first word of "$ac_prog", so it can be a program name with args.
4282set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4284$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004285if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004287else
4288 if test -n "$CXX"; then
4289 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4290else
4291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4292for as_dir in $PATH
4293do
4294 IFS=$as_save_IFS
4295 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 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 +00004298 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004300 break 2
4301 fi
4302done
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004305
4306fi
4307fi
4308CXX=$ac_cv_prog_CXX
4309if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4311$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004312else
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4314$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004315fi
4316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004318 test -n "$CXX" && break
4319done
4320test -n "$CXX" || CXX="notfound"
4321
4322 if test "$CXX" = "notfound"
4323 then
4324 CXX=""
4325 fi
4326fi
4327if test "$preset_cxx" != "$CXX"
4328then
Matthias Kloseb9621712010-04-24 17:59:49 +00004329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004330
4331 By default, distutils will build C++ extension modules with \"$CXX\".
4332 If this is not intended, then set CXX on the configure command line.
4333 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004334$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004335
4336 By default, distutils will build C++ extension modules with \"$CXX\".
4337 If this is not intended, then set CXX on the configure command line.
4338 " >&2;}
4339fi
4340
4341
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4343$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4344save_LDFLAGS="$LDFLAGS"
4345LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004346
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4348/* end confdefs.h. */
4349
4350int
4351main ()
4352{
4353
4354 ;
4355 return 0;
4356}
4357_ACEOF
4358if ac_fn_c_try_link "$LINENO"; then :
4359 NO_AS_NEEDED="-Wl,--no-as-needed"
4360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4361$as_echo "yes" >&6; }
4362else
4363 NO_AS_NEEDED=""
4364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4365$as_echo "no" >&6; }
4366fi
4367rm -f core conftest.err conftest.$ac_objext \
4368 conftest$ac_exeext conftest.$ac_ext
4369LDFLAGS="$save_LDFLAGS"
4370
4371
4372
4373# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004374ac_ext=c
4375ac_cpp='$CPP $CPPFLAGS'
4376ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4377ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4378ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4380$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004381# On Suns, sometimes $CPP names a directory.
4382if test -n "$CPP" && test -d "$CPP"; then
4383 CPP=
4384fi
4385if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004386 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004388else
Martin v. Löwis11437992002-04-12 09:54:03 +00004389 # Double quotes because CPP needs to be expanded
4390 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4391 do
4392 ac_preproc_ok=false
4393for ac_c_preproc_warn_flag in '' yes
4394do
4395 # Use a header file that comes with gcc, so configuring glibc
4396 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004397 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4398 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004399 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004400 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004402/* end confdefs.h. */
4403#ifdef __STDC__
4404# include <limits.h>
4405#else
4406# include <assert.h>
4407#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004408 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004410if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004411
Matthias Kloseb9621712010-04-24 17:59:49 +00004412else
Martin v. Löwis11437992002-04-12 09:54:03 +00004413 # Broken: fails on valid input.
4414continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004415fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004416rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004419 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004422#include <ac_nonexistent.h>
4423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004424if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004425 # Broken: success on invalid input.
4426continue
4427else
Martin v. Löwis11437992002-04-12 09:54:03 +00004428 # Passes both tests.
4429ac_preproc_ok=:
4430break
4431fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004432rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004433
4434done
4435# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004436rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004437if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004438 break
4439fi
4440
4441 done
4442 ac_cv_prog_CPP=$CPP
4443
4444fi
4445 CPP=$ac_cv_prog_CPP
4446else
4447 ac_cv_prog_CPP=$CPP
4448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4450$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004451ac_preproc_ok=false
4452for ac_c_preproc_warn_flag in '' yes
4453do
4454 # Use a header file that comes with gcc, so configuring glibc
4455 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004456 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4457 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004458 # On the NeXT, cc -E runs the code through the compiler's parser,
4459 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004461/* end confdefs.h. */
4462#ifdef __STDC__
4463# include <limits.h>
4464#else
4465# include <assert.h>
4466#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004467 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004469if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004470
Matthias Kloseb9621712010-04-24 17:59:49 +00004471else
Martin v. Löwis11437992002-04-12 09:54:03 +00004472 # Broken: fails on valid input.
4473continue
4474fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004475rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004476
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004477 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004478 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004481#include <ac_nonexistent.h>
4482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004483if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004484 # Broken: success on invalid input.
4485continue
4486else
Martin v. Löwis11437992002-04-12 09:54:03 +00004487 # Passes both tests.
4488ac_preproc_ok=:
4489break
4490fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004491rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004492
4493done
4494# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004495rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004496if $ac_preproc_ok; then :
4497
Martin v. Löwis11437992002-04-12 09:54:03 +00004498else
Matthias Kloseb9621712010-04-24 17:59:49 +00004499 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004501as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004502See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004503fi
4504
4505ac_ext=c
4506ac_cpp='$CPP $CPPFLAGS'
4507ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4508ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4509ac_compiler_gnu=$ac_cv_c_compiler_gnu
4510
4511
Matthias Kloseb9621712010-04-24 17:59:49 +00004512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4513$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004514if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004515 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004516else
Matthias Kloseb9621712010-04-24 17:59:49 +00004517 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004518 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004519 # Loop through the user's path and test for each of PROGNAME-LIST
4520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004521for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4522do
4523 IFS=$as_save_IFS
4524 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004525 for ac_prog in grep ggrep; do
4526 for ac_exec_ext in '' $ac_executable_extensions; do
4527 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4528 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4529# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004530 # Check for GNU $ac_path_GREP
4531case `"$ac_path_GREP" --version 2>&1` in
4532*GNU*)
4533 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4534*)
4535 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004536 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004537 while :
4538 do
4539 cat "conftest.in" "conftest.in" >"conftest.tmp"
4540 mv "conftest.tmp" "conftest.in"
4541 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004542 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004543 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4544 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004545 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004546 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4547 # Best one so far, save it but keep looking for a better one
4548 ac_cv_path_GREP="$ac_path_GREP"
4549 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004550 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004551 # 10*(2^10) chars as input seems more than enough
4552 test $ac_count -gt 10 && break
4553 done
4554 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4555esac
4556
Matthias Kloseb9621712010-04-24 17:59:49 +00004557 $ac_path_GREP_found && break 3
4558 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004559 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004560 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004561IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004562 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004563 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 +00004564 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004565else
4566 ac_cv_path_GREP=$GREP
4567fi
4568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4571$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004572 GREP="$ac_cv_path_GREP"
4573
4574
Matthias Kloseb9621712010-04-24 17:59:49 +00004575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4576$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004577if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004578 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004579else
4580 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4581 then ac_cv_path_EGREP="$GREP -E"
4582 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004583 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004584 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004585 # Loop through the user's path and test for each of PROGNAME-LIST
4586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004587for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4588do
4589 IFS=$as_save_IFS
4590 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004591 for ac_prog in egrep; do
4592 for ac_exec_ext in '' $ac_executable_extensions; do
4593 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4594 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4595# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004596 # Check for GNU $ac_path_EGREP
4597case `"$ac_path_EGREP" --version 2>&1` in
4598*GNU*)
4599 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4600*)
4601 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004602 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004603 while :
4604 do
4605 cat "conftest.in" "conftest.in" >"conftest.tmp"
4606 mv "conftest.tmp" "conftest.in"
4607 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004608 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004609 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4610 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004611 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004612 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4613 # Best one so far, save it but keep looking for a better one
4614 ac_cv_path_EGREP="$ac_path_EGREP"
4615 ac_path_EGREP_max=$ac_count
4616 fi
4617 # 10*(2^10) chars as input seems more than enough
4618 test $ac_count -gt 10 && break
4619 done
4620 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4621esac
4622
Matthias Kloseb9621712010-04-24 17:59:49 +00004623 $ac_path_EGREP_found && break 3
4624 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004625 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004626 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004627IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004628 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004629 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 +00004630 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004631else
4632 ac_cv_path_EGREP=$EGREP
4633fi
4634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004635 fi
4636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4638$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004639 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004640
4641
Matthias Kloseb9621712010-04-24 17:59:49 +00004642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4643$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004644if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004645 $as_echo_n "(cached) " >&6
4646else
4647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004648/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004649#include <stdlib.h>
4650#include <stdarg.h>
4651#include <string.h>
4652#include <float.h>
4653
4654int
4655main ()
4656{
4657
4658 ;
4659 return 0;
4660}
4661_ACEOF
4662if ac_fn_c_try_compile "$LINENO"; then :
4663 ac_cv_header_stdc=yes
4664else
4665 ac_cv_header_stdc=no
4666fi
4667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4668
4669if test $ac_cv_header_stdc = yes; then
4670 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4672/* end confdefs.h. */
4673#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004674
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004675_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004676if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004677 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004678
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004679else
Matthias Kloseb9621712010-04-24 17:59:49 +00004680 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004681fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004682rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004683
Matthias Kloseb9621712010-04-24 17:59:49 +00004684fi
4685
4686if test $ac_cv_header_stdc = yes; then
4687 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4689/* end confdefs.h. */
4690#include <stdlib.h>
4691
4692_ACEOF
4693if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4694 $EGREP "free" >/dev/null 2>&1; then :
4695
4696else
4697 ac_cv_header_stdc=no
4698fi
4699rm -f conftest*
4700
4701fi
4702
4703if test $ac_cv_header_stdc = yes; then
4704 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4705 if test "$cross_compiling" = yes; then :
4706 :
4707else
4708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4709/* end confdefs.h. */
4710#include <ctype.h>
4711#include <stdlib.h>
4712#if ((' ' & 0x0FF) == 0x020)
4713# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4714# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4715#else
4716# define ISLOWER(c) \
4717 (('a' <= (c) && (c) <= 'i') \
4718 || ('j' <= (c) && (c) <= 'r') \
4719 || ('s' <= (c) && (c) <= 'z'))
4720# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4721#endif
4722
4723#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4724int
4725main ()
4726{
4727 int i;
4728 for (i = 0; i < 256; i++)
4729 if (XOR (islower (i), ISLOWER (i))
4730 || toupper (i) != TOUPPER (i))
4731 return 2;
4732 return 0;
4733}
4734_ACEOF
4735if ac_fn_c_try_run "$LINENO"; then :
4736
4737else
4738 ac_cv_header_stdc=no
4739fi
4740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4741 conftest.$ac_objext conftest.beam conftest.$ac_ext
4742fi
4743
4744fi
4745fi
4746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4747$as_echo "$ac_cv_header_stdc" >&6; }
4748if test $ac_cv_header_stdc = yes; then
4749
4750$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4751
4752fi
4753
4754# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4755for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4756 inttypes.h stdint.h unistd.h
4757do :
4758 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4759ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4760"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004761if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 cat >>confdefs.h <<_ACEOF
4763#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4764_ACEOF
4765
4766fi
4767
4768done
4769
4770
4771
4772 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 +02004773if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 MINIX=yes
4775else
4776 MINIX=
4777fi
4778
4779
4780 if test "$MINIX" = yes; then
4781
4782$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4783
4784
4785$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4786
4787
4788$as_echo "#define _MINIX 1" >>confdefs.h
4789
4790 fi
4791
4792
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4794$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004795if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 $as_echo_n "(cached) " >&6
4797else
4798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4799/* end confdefs.h. */
4800
4801# define __EXTENSIONS__ 1
4802 $ac_includes_default
4803int
4804main ()
4805{
4806
4807 ;
4808 return 0;
4809}
4810_ACEOF
4811if ac_fn_c_try_compile "$LINENO"; then :
4812 ac_cv_safe_to_define___extensions__=yes
4813else
4814 ac_cv_safe_to_define___extensions__=no
4815fi
4816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4817fi
4818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4819$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4820 test $ac_cv_safe_to_define___extensions__ = yes &&
4821 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4822
4823 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4824
4825 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4826
4827 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4828
4829 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4830
4831
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833# Check for unsupported systems
4834case $ac_sys_system/$ac_sys_release in
4835atheos*|Linux*/1*)
4836 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4837 echo See README for details.
4838 exit 1;;
4839esac
4840
4841
Matthias Kloseb9621712010-04-24 17:59:49 +00004842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4843$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844
4845# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004846if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847 withval=$with_suffix;
4848 case $withval in
4849 no) EXEEXT=;;
4850 yes) EXEEXT=.exe;;
4851 *) EXEEXT=$withval;;
4852 esac
4853fi
4854
Matthias Kloseb9621712010-04-24 17:59:49 +00004855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4856$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857
4858# Test whether we're running on a non-case-sensitive system, in which
4859# case we give a warning if no ext is given
4860
Matthias Kloseb9621712010-04-24 17:59:49 +00004861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4862$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004863if test ! -d CaseSensitiveTestDir; then
4864mkdir CaseSensitiveTestDir
4865fi
4866
4867if test -d casesensitivetestdir
4868then
Matthias Kloseb9621712010-04-24 17:59:49 +00004869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4870$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871 BUILDEXEEXT=.exe
4872else
Matthias Kloseb9621712010-04-24 17:59:49 +00004873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4874$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875 BUILDEXEEXT=$EXEEXT
4876fi
4877rmdir CaseSensitiveTestDir
4878
4879case $MACHDEP in
4880bsdos*)
4881 case $CC in
4882 gcc) CC="$CC -D_HAVE_BSDI";;
4883 esac;;
4884esac
4885
4886case $ac_sys_system in
4887hp*|HP*)
4888 case $CC in
4889 cc|*/cc) CC="$CC -Ae";;
4890 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891esac
4892
4893
4894
Matthias Kloseb9621712010-04-24 17:59:49 +00004895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4896$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897if test -z "$LIBRARY"
4898then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004899 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4902$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004903
4904# LDLIBRARY is the name of the library to link against (as opposed to the
4905# name of the library into which to insert object files). BLDLIBRARY is also
4906# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4907# is blank as the main program is not linked directly against LDLIBRARY.
4908# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4909# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4910# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4911# DLLLIBRARY is the shared (i.e., DLL) library.
4912#
4913# RUNSHARED is used to run shared python without installed libraries
4914#
4915# INSTSONAME is the name of the shared library that will be use to install
4916# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004917#
4918# LDVERSION is the shared library version number, normally the Python version
4919# with the ABI build flags appended.
4920
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004921
4922
4923
4924
4925
4926
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928LDLIBRARY="$LIBRARY"
4929BLDLIBRARY='$(LDLIBRARY)'
4930INSTSONAME='$(LDLIBRARY)'
4931DLLLIBRARY=''
4932LDLIBRARYDIR=''
4933RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004934LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935
4936# LINKCC is the command that links the python executable -- default is $(CC).
4937# If CXX is set, and if it is needed to link a main function that was
4938# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4939# python might then depend on the C++ runtime
4940# This is altered for AIX in order to build the export list before
4941# linking.
4942
Matthias Kloseb9621712010-04-24 17:59:49 +00004943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4944$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945if test -z "$LINKCC"
4946then
4947 LINKCC='$(PURIFY) $(MAINCC)'
4948 case $ac_sys_system in
4949 AIX*)
4950 exp_extra="\"\""
4951 if test $ac_sys_release -ge 5 -o \
4952 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4953 exp_extra="."
4954 fi
4955 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956 QNX*)
4957 # qcc must be used because the other compilers do not
4958 # support -N.
4959 LINKCC=qcc;;
4960 esac
4961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4963$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964
4965# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4966# make sure we default having it set to "no": this is used by
4967# distutils.unixccompiler to know if it should add --enable-new-dtags
4968# to linker command lines, and failing to detect GNU ld simply results
4969# in the same bahaviour as before.
4970
Matthias Kloseb9621712010-04-24 17:59:49 +00004971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4972$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973ac_prog=ld
4974if test "$GCC" = yes; then
4975 ac_prog=`$CC -print-prog-name=ld`
4976fi
4977case `"$ac_prog" -V 2>&1 < /dev/null` in
4978 *GNU*)
4979 GNULD=yes;;
4980 *)
4981 GNULD=no;;
4982esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4984$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004985
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4987$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004988if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004989 $as_echo_n "(cached) " >&6
4990else
4991 ac_cv_c_inline=no
4992for ac_kw in inline __inline__ __inline; do
4993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4994/* end confdefs.h. */
4995#ifndef __cplusplus
4996typedef int foo_t;
4997static $ac_kw foo_t static_foo () {return 0; }
4998$ac_kw foo_t foo () {return 0; }
4999#endif
5000
5001_ACEOF
5002if ac_fn_c_try_compile "$LINENO"; then :
5003 ac_cv_c_inline=$ac_kw
5004fi
5005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5006 test "$ac_cv_c_inline" != no && break
5007done
5008
5009fi
5010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5011$as_echo "$ac_cv_c_inline" >&6; }
5012
5013case $ac_cv_c_inline in
5014 inline | yes) ;;
5015 *)
5016 case $ac_cv_c_inline in
5017 no) ac_val=;;
5018 *) ac_val=$ac_cv_c_inline;;
5019 esac
5020 cat >>confdefs.h <<_ACEOF
5021#ifndef __cplusplus
5022#define inline $ac_val
5023#endif
5024_ACEOF
5025 ;;
5026esac
5027
5028if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005029
5030$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005031
5032
5033fi
5034
5035
Matthias Kloseb9621712010-04-24 17:59:49 +00005036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5037$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005038# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005039if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040 enableval=$enable_shared;
5041fi
5042
5043
5044if test -z "$enable_shared"
5045then
5046 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005047 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005048 enable_shared="yes";;
5049 *)
5050 enable_shared="no";;
5051 esac
5052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5054$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055
Matthias Kloseb9621712010-04-24 17:59:49 +00005056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5057$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005058# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005059if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060 enableval=$enable_profiling; ac_save_cc="$CC"
5061 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005063 ac_enable_profiling="no"
5064else
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066/* end confdefs.h. */
5067int main() { return 0; }
5068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005069if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005070 ac_enable_profiling="yes"
5071else
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5075 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076fi
5077
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078 CC="$ac_save_cc"
5079fi
5080
Matthias Kloseb9621712010-04-24 17:59:49 +00005081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
5082$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083
5084case "$ac_enable_profiling" in
5085 "yes")
5086 BASECFLAGS="-pg $BASECFLAGS"
5087 LDFLAGS="-pg $LDFLAGS"
5088 ;;
5089esac
5090
Matthias Kloseb9621712010-04-24 17:59:49 +00005091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5092$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093
5094# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5095# library that we build, but we do not want to link against it (we
5096# will find it with a -framework option). For this reason there is an
5097# extra variable BLDLIBRARY against which Python and the extension
5098# modules are linked, BLDLIBRARY. This is normally the same as
5099# LDLIBRARY, but empty for MacOSX framework builds.
5100if test "$enable_framework"
5101then
5102 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5103 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5104 BLDLIBRARY=''
5105else
5106 BLDLIBRARY='$(LDLIBRARY)'
5107fi
5108
5109# Other platforms follow
5110if test $enable_shared = "yes"; then
5111
Matthias Kloseb9621712010-04-24 17:59:49 +00005112$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005113
5114 case $ac_sys_system in
5115 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005116 LDLIBRARY='libpython$(LDVERSION).dll.a'
5117 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118 ;;
5119 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005120 LDLIBRARY='libpython$(LDVERSION).so'
5121 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5123 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005124 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005125 then
5126 PY3LIBRARY=libpython3.so
5127 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005129 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005130 LDLIBRARY='libpython$(LDVERSION).so'
5131 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5133 case $ac_sys_system in
5134 FreeBSD*)
5135 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5136 ;;
5137 esac
5138 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005139 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005140 then
5141 PY3LIBRARY=libpython3.so
5142 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143 ;;
5144 hp*|HP*)
5145 case `uname -m` in
5146 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005147 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005148 ;;
5149 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005150 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151 ;;
5152 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005153 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005154 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5155 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005156 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005157 LDLIBRARY='libpython$(LDVERSION).dylib'
5158 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005159 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5160 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005161 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005162 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005163 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5164 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005165
5166 esac
5167else # shared is disabled
5168 case $ac_sys_system in
5169 CYGWIN*)
5170 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005171 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005172 ;;
5173 esac
5174fi
5175
Matthias Kloseb9621712010-04-24 17:59:49 +00005176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5177$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005178
5179if test -n "$ac_tool_prefix"; then
5180 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5181set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5183$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005184if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005185 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186else
5187 if test -n "$RANLIB"; then
5188 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5189else
5190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5191for as_dir in $PATH
5192do
5193 IFS=$as_save_IFS
5194 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005195 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005196 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5197 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005198 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199 break 2
5200 fi
5201done
Matthias Kloseb9621712010-04-24 17:59:49 +00005202 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005203IFS=$as_save_IFS
5204
5205fi
5206fi
5207RANLIB=$ac_cv_prog_RANLIB
5208if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5210$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005211else
Matthias Kloseb9621712010-04-24 17:59:49 +00005212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005214fi
5215
5216
5217fi
5218if test -z "$ac_cv_prog_RANLIB"; then
5219 ac_ct_RANLIB=$RANLIB
5220 # Extract the first word of "ranlib", so it can be a program name with args.
5221set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5223$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005224if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005225 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005226else
5227 if test -n "$ac_ct_RANLIB"; then
5228 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5229else
5230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5231for as_dir in $PATH
5232do
5233 IFS=$as_save_IFS
5234 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005235 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5237 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005238 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005239 break 2
5240 fi
5241done
Matthias Kloseb9621712010-04-24 17:59:49 +00005242 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005243IFS=$as_save_IFS
5244
5245fi
5246fi
5247ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5248if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5250$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005251else
Matthias Kloseb9621712010-04-24 17:59:49 +00005252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5253$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005254fi
5255
5256 if test "x$ac_ct_RANLIB" = x; then
5257 RANLIB=":"
5258 else
5259 case $cross_compiling:$ac_tool_warned in
5260yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005261{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5262$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005263ac_tool_warned=yes ;;
5264esac
5265 RANLIB=$ac_ct_RANLIB
5266 fi
5267else
5268 RANLIB="$ac_cv_prog_RANLIB"
5269fi
5270
5271
5272for ac_prog in ar aal
5273do
5274 # Extract the first word of "$ac_prog", so it can be a program name with args.
5275set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5277$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005278if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005279 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005280else
5281 if test -n "$AR"; then
5282 ac_cv_prog_AR="$AR" # Let the user override the test.
5283else
5284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5285for as_dir in $PATH
5286do
5287 IFS=$as_save_IFS
5288 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005289 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5291 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005292 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005293 break 2
5294 fi
5295done
Matthias Kloseb9621712010-04-24 17:59:49 +00005296 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297IFS=$as_save_IFS
5298
5299fi
5300fi
5301AR=$ac_cv_prog_AR
5302if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5304$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305else
Matthias Kloseb9621712010-04-24 17:59:49 +00005306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308fi
5309
5310
5311 test -n "$AR" && break
5312done
5313test -n "$AR" || AR="ar"
5314
5315
5316# tweak ARFLAGS only if the user didn't set it on the command line
5317
5318if test -z "$ARFLAGS"
5319then
5320 ARFLAGS="rc"
5321fi
5322
5323
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005324DISABLE_ASDLGEN=""
5325# Extract the first word of "python", so it can be a program name with args.
5326set dummy python; ac_word=$2
5327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5328$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005329if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005330 $as_echo_n "(cached) " >&6
5331else
5332 if test -n "$HAS_PYTHON"; then
5333 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5334else
5335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5336for as_dir in $PATH
5337do
5338 IFS=$as_save_IFS
5339 test -z "$as_dir" && as_dir=.
5340 for ac_exec_ext in '' $ac_executable_extensions; do
5341 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5342 ac_cv_prog_HAS_PYTHON="found"
5343 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5344 break 2
5345 fi
5346done
5347 done
5348IFS=$as_save_IFS
5349
5350 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5351fi
5352fi
5353HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5354if test -n "$HAS_PYTHON"; then
5355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5356$as_echo "$HAS_PYTHON" >&6; }
5357else
5358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5359$as_echo "no" >&6; }
5360fi
5361
5362
5363if test $HAS_HG != found -o $HAS_PYTHON != found
5364then
5365 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5366fi
5367
5368
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369case $MACHDEP in
5370bsdos*|hp*|HP*)
5371 # install -d does not work on BSDI or HP-UX
5372 if test -z "$INSTALL"
5373 then
5374 INSTALL="${srcdir}/install-sh -c"
5375 fi
5376esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377# Find a good install program. We prefer a C program (faster),
5378# so one script is as good as another. But avoid the broken or
5379# incompatible versions:
5380# SysV /etc/install, /usr/sbin/install
5381# SunOS /usr/etc/install
5382# IRIX /sbin/install
5383# AIX /bin/install
5384# AmigaOS /C/install, which installs bootblocks on floppy discs
5385# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5386# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5387# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5388# OS/2's system install, which has a completely different semantic
5389# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005390# Reject install programs that cannot install multiple files.
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5392$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005394if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396else
5397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5398for as_dir in $PATH
5399do
5400 IFS=$as_save_IFS
5401 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 # Account for people who put trailing slashes in PATH elements.
5403case $as_dir/ in #((
5404 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005406 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407 /usr/ucb/* ) ;;
5408 *)
5409 # OSF1 and SCO ODT 3.0 have their own names for install.
5410 # Don't use installbsd from OSF since it installs stuff as root
5411 # by default.
5412 for ac_prog in ginstall scoinst install; do
5413 for ac_exec_ext in '' $ac_executable_extensions; do
5414 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5415 if test $ac_prog = install &&
5416 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5417 # AIX install. It has an incompatible calling convention.
5418 :
5419 elif test $ac_prog = install &&
5420 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5421 # program-specific install script used by HP pwplus--don't use.
5422 :
5423 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 rm -rf conftest.one conftest.two conftest.dir
5425 echo one > conftest.one
5426 echo two > conftest.two
5427 mkdir conftest.dir
5428 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5429 test -s conftest.one && test -s conftest.two &&
5430 test -s conftest.dir/conftest.one &&
5431 test -s conftest.dir/conftest.two
5432 then
5433 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5434 break 3
5435 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436 fi
5437 fi
5438 done
5439 done
5440 ;;
5441esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005442
5443 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444IFS=$as_save_IFS
5445
Matthias Kloseb9621712010-04-24 17:59:49 +00005446rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447
5448fi
5449 if test "${ac_cv_path_install+set}" = set; then
5450 INSTALL=$ac_cv_path_install
5451 else
5452 # As a last resort, use the slow shell script. Don't cache a
5453 # value for INSTALL within a source directory, because that will
5454 # break other packages using the cache if that directory is
5455 # removed, or if the value is a relative name.
5456 INSTALL=$ac_install_sh
5457 fi
5458fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5460$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005461
5462# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5463# It thinks the first close brace ends the variable substitution.
5464test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5465
5466test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5467
5468test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5469
Matthias Klose93a0ef12012-03-15 18:08:34 +01005470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5471$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5472if test -z "$MKDIR_P"; then
5473 if ${ac_cv_path_mkdir+:} false; then :
5474 $as_echo_n "(cached) " >&6
5475else
5476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5477for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5478do
5479 IFS=$as_save_IFS
5480 test -z "$as_dir" && as_dir=.
5481 for ac_prog in mkdir gmkdir; do
5482 for ac_exec_ext in '' $ac_executable_extensions; do
5483 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
5484 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5485 'mkdir (GNU coreutils) '* | \
5486 'mkdir (coreutils) '* | \
5487 'mkdir (fileutils) '4.1*)
5488 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5489 break 3;;
5490 esac
5491 done
5492 done
5493 done
5494IFS=$as_save_IFS
5495
5496fi
5497
5498 test -d ./--version && rmdir ./--version
5499 if test "${ac_cv_path_mkdir+set}" = set; then
5500 MKDIR_P="$ac_cv_path_mkdir -p"
5501 else
5502 # As a last resort, use the slow shell script. Don't cache a
5503 # value for MKDIR_P within a source directory, because that will
5504 # break other packages using the cache if that directory is
5505 # removed, or if the value is a relative name.
5506 MKDIR_P="$ac_install_sh -d"
5507 fi
5508fi
5509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5510$as_echo "$MKDIR_P" >&6; }
5511
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005512
5513# Not every filesystem supports hard links
5514
5515if test -z "$LN" ; then
5516 case $ac_sys_system in
5517 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518 *) LN=ln;;
5519 esac
5520fi
5521
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005522# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005523
5524ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005525
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5528$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005529
5530# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005531if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532 withval=$with_pydebug;
5533if test "$withval" != no
5534then
5535
Matthias Kloseb9621712010-04-24 17:59:49 +00005536$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537
Matthias Kloseb9621712010-04-24 17:59:49 +00005538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5539$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005540 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005541 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005542else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544fi
5545else
Matthias Kloseb9621712010-04-24 17:59:49 +00005546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5547$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548fi
5549
5550
5551# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5552# merged with this chunk of code?
5553
5554# Optimizer/debugger flags
5555# ------------------------
5556# (The following bit of code is complicated enough - please keep things
5557# indented properly. Just pretend you're editing Python code. ;-)
5558
5559# There are two parallel sets of case statements below, one that checks to
5560# see if OPT was set and one that does BASECFLAGS setting based upon
5561# compiler and platform. BASECFLAGS tweaks need to be made even if the
5562# user set OPT.
5563
5564# tweak OPT based on compiler and platform, only if the user didn't set
5565# it on the command line
5566
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005567if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005568then
5569 case $GCC in
5570 yes)
5571 if test "$CC" != 'g++' ; then
5572 STRICT_PROTO="-Wstrict-prototypes"
5573 fi
5574 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5575 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5576 WRAP="-fwrapv"
5577 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005578
5579 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005580 case $CC in
5581 *clang*) WRAP="-fwrapv"
5582 ;;
5583 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005584
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585 case $ac_cv_prog_cc_g in
5586 yes)
5587 if test "$Py_DEBUG" = 'true' ; then
5588 # Optimization messes up debuggers, so turn it off for
5589 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005590 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591 else
5592 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5593 fi
5594 ;;
5595 *)
5596 OPT="-O3 -Wall $STRICT_PROTO"
5597 ;;
5598 esac
5599 case $ac_sys_system in
5600 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5601 ;;
5602 esac
5603 ;;
5604
5605 *)
5606 OPT="-O"
5607 ;;
5608 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609fi
5610
5611
5612
5613# The -arch flags for universal builds on OSX
5614UNIVERSAL_ARCH_FLAGS=
5615
5616
5617# tweak BASECFLAGS based on compiler and platform
5618case $GCC in
5619yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005620 # Python doesn't violate C99 aliasing rules, but older versions of
5621 # GCC produce warnings for legal Python code. Enable
5622 # -fno-strict-aliasing on versions of GCC that support but produce
5623 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5625$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005626 ac_save_cc="$CC"
5627 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005628 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005629 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005630 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005631else
Matthias Kloseb9621712010-04-24 17:59:49 +00005632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005634
Matthias Kloseb159a552010-04-25 21:00:44 +00005635
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005636int
5637main ()
5638{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005639
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005640 ;
5641 return 0;
5642}
Matthias Kloseb159a552010-04-25 21:00:44 +00005643
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005645if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005646
5647 CC="$ac_save_cc -fstrict-aliasing"
5648 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005650/* end confdefs.h. */
5651
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005652 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005653int
5654main ()
5655{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005656double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005657 ;
5658 return 0;
5659}
Matthias Kloseb159a552010-04-25 21:00:44 +00005660
Benjamin Petersone6c9d242010-03-30 17:34:47 +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 ac_cv_no_strict_aliasing=no
5665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666else
Matthias Kloseb159a552010-04-25 21:00:44 +00005667
5668 ac_cv_no_strict_aliasing=yes
5669
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005670fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005672
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005673else
Matthias Kloseb159a552010-04-25 21:00:44 +00005674
5675 ac_cv_no_strict_aliasing=no
5676
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005679fi
5680
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005681 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5684$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005685 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686 then
5687 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5688 fi
5689
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
5691$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
5692 ac_save_cc="$CC"
5693 CC="$CC -Wunused-result -Werror"
5694 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005695 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005696 $as_echo_n "(cached) " >&6
5697else
5698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5699/* end confdefs.h. */
5700
5701
5702int
5703main ()
5704{
5705
5706 ;
5707 return 0;
5708}
5709
5710_ACEOF
5711if ac_fn_c_try_compile "$LINENO"; then :
5712
5713 ac_cv_disable_unused_result_warning=yes
5714
5715else
5716
5717 ac_cv_disable_unused_result_warning=no
5718
5719fi
5720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5721fi
5722
5723 CFLAGS="$save_CFLAGS"
5724 CC="$ac_save_cc"
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
5726$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
5727
5728 if test $ac_cv_disable_unused_result_warning = yes
5729 then
5730 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
5731 fi
5732
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5734 # support. Without this, treatment of subnormals doesn't follow
5735 # the standard.
5736 case $ac_sys_machine in
5737 alpha*)
5738 BASECFLAGS="$BASECFLAGS -mieee"
5739 ;;
5740 esac
5741
5742 case $ac_sys_system in
5743 SCO_SV*)
5744 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5745 ;;
5746 # is there any other compiler on Darwin besides gcc?
5747 Darwin*)
5748 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5749 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005750 if test "${CC}" = gcc
5751 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5753$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005754 case "${UNIVERSALSDK}" in
5755 */MacOSX10.4u.sdk)
5756 # Build using 10.4 SDK, force usage of gcc when the
5757 # compiler is gcc, otherwise the user will get very
5758 # confusing error messages when building on OSX 10.6
5759 CC=gcc-4.0
5760 CPP=cpp-4.0
5761 ;;
5762 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5764$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005765 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766
5767
5768 if test "${enable_universalsdk}"; then
5769 UNIVERSAL_ARCH_FLAGS=""
5770 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5771 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5772 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005773 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5775 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005776 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005777 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778
5779 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5780 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005781 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005782 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005784 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5785 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005786 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005787 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005788
5789 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5790 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005791 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005792 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005793
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005795 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 +00005796
5797 fi
5798
5799
Ronald Oussoren666028b2010-04-18 19:07:43 +00005800 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5801 if test "${UNIVERSALSDK}" != "/"
5802 then
5803 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5804 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005805 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806 fi
5807 fi
5808
5809 # Calculate the right deployment target for this build.
5810 #
5811 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5812 if test ${cur_target} '>' 10.2; then
5813 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005814 if test ${enable_universalsdk}; then
5815 if test "${UNIVERSAL_ARCHS}" = "all"; then
5816 # Ensure that the default platform for a
5817 # 4-way universal build is OSX 10.5,
5818 # that's the first OS release where
5819 # 4-way builds make sense.
5820 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005821
5822 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5823 cur_target='10.5'
5824
5825 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5826 cur_target='10.5'
5827
5828 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5829 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005830 fi
5831 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005832 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005833 # On Intel macs default to a deployment
5834 # target of 10.4, that's the first OSX
5835 # release with Intel support.
5836 cur_target="10.4"
5837 fi
5838 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839 fi
5840 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5841
5842 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5843 # environment with a value that is the same as what we'll use
5844 # in the Makefile to ensure that we'll get the same compiler
5845 # environment during configure and build time.
5846 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5847 export MACOSX_DEPLOYMENT_TARGET
5848 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5849
5850 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851 esac
5852 ;;
5853
5854*)
5855 case $ac_sys_system in
5856 OpenUNIX*|UnixWare*)
5857 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5858 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859 SCO_SV*)
5860 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5861 ;;
5862 esac
5863 ;;
5864esac
5865
5866if test "$Py_DEBUG" = 'true'; then
5867 :
5868else
5869 OPT="-DNDEBUG $OPT"
5870fi
5871
5872if test "$ac_arch_flags"
5873then
5874 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5875fi
5876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877# Check whether GCC supports PyArg_ParseTuple format
5878if test "$GCC" = "yes"
5879then
Matthias Kloseb9621712010-04-24 17:59:49 +00005880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5881$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882 save_CFLAGS=$CFLAGS
5883 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885/* end confdefs.h. */
5886
5887 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888int
5889main ()
5890{
5891
5892 ;
5893 return 0;
5894}
Matthias Kloseb159a552010-04-25 21:00:44 +00005895
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005897if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898
Matthias Kloseb159a552010-04-25 21:00:44 +00005899
Matthias Kloseb9621712010-04-24 17:59:49 +00005900$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901
Matthias Kloseb159a552010-04-25 21:00:44 +00005902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005903$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005904
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905else
Matthias Kloseb159a552010-04-25 21:00:44 +00005906
5907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005908$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909
5910fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5912 CFLAGS=$save_CFLAGS
5913fi
5914
5915# On some compilers, pthreads are available without further options
5916# (e.g. MacOS X). On some of these systems, the compiler will not
5917# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5918# So we have to see first whether pthreads are available without
5919# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5921$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005922if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005923 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924else
Matthias Kloseb9621712010-04-24 17:59:49 +00005925 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926 ac_cv_pthread_is_default=no
5927else
Matthias Kloseb9621712010-04-24 17:59:49 +00005928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929/* end confdefs.h. */
5930
5931#include <pthread.h>
5932
5933void* routine(void* p){return NULL;}
5934
5935int main(){
5936 pthread_t p;
5937 if(pthread_create(&p,NULL,routine,NULL)!=0)
5938 return 1;
5939 (void)pthread_detach(p);
5940 return 0;
5941}
5942
5943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005944if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945
5946 ac_cv_pthread_is_default=yes
5947 ac_cv_kthread=no
5948 ac_cv_pthread=no
5949
5950else
Matthias Kloseb9621712010-04-24 17:59:49 +00005951 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5954 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955fi
5956
5957
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958fi
5959
Matthias Kloseb9621712010-04-24 17:59:49 +00005960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5961$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962
5963
5964if test $ac_cv_pthread_is_default = yes
5965then
5966 ac_cv_kpthread=no
5967else
5968# -Kpthread, if available, provides the right #defines
5969# and linker options to make pthread_create available
5970# Some compilers won't report that they do not support -Kpthread,
5971# so we need to run a program to see whether it really made the
5972# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5974$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005975if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005976 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977else
5978 ac_save_cc="$CC"
5979CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005980if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 ac_cv_kpthread=no
5982else
Matthias Kloseb9621712010-04-24 17:59:49 +00005983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984/* end confdefs.h. */
5985
5986#include <pthread.h>
5987
5988void* routine(void* p){return NULL;}
5989
5990int main(){
5991 pthread_t p;
5992 if(pthread_create(&p,NULL,routine,NULL)!=0)
5993 return 1;
5994 (void)pthread_detach(p);
5995 return 0;
5996}
5997
5998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005999if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000 ac_cv_kpthread=yes
6001else
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6005 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006fi
6007
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008CC="$ac_save_cc"
6009fi
6010
Matthias Kloseb9621712010-04-24 17:59:49 +00006011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6012$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013fi
6014
6015if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6016then
6017# -Kthread, if available, provides the right #defines
6018# and linker options to make pthread_create available
6019# Some compilers won't report that they do not support -Kthread,
6020# so we need to run a program to see whether it really made the
6021# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6023$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006024if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026else
6027 ac_save_cc="$CC"
6028CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006029if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030 ac_cv_kthread=no
6031else
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033/* end confdefs.h. */
6034
6035#include <pthread.h>
6036
6037void* routine(void* p){return NULL;}
6038
6039int main(){
6040 pthread_t p;
6041 if(pthread_create(&p,NULL,routine,NULL)!=0)
6042 return 1;
6043 (void)pthread_detach(p);
6044 return 0;
6045}
6046
6047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006048if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049 ac_cv_kthread=yes
6050else
Matthias Kloseb9621712010-04-24 17:59:49 +00006051 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6054 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055fi
6056
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057CC="$ac_save_cc"
6058fi
6059
Matthias Kloseb9621712010-04-24 17:59:49 +00006060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6061$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062fi
6063
6064if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6065then
6066# -pthread, if available, provides the right #defines
6067# and linker options to make pthread_create available
6068# Some compilers won't report that they do not support -pthread,
6069# so we need to run a program to see whether it really made the
6070# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6072$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006073if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006074 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075else
6076 ac_save_cc="$CC"
6077CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006078if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079 ac_cv_pthread=no
6080else
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082/* end confdefs.h. */
6083
6084#include <pthread.h>
6085
6086void* routine(void* p){return NULL;}
6087
6088int main(){
6089 pthread_t p;
6090 if(pthread_create(&p,NULL,routine,NULL)!=0)
6091 return 1;
6092 (void)pthread_detach(p);
6093 return 0;
6094}
6095
6096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006097if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098 ac_cv_pthread=yes
6099else
Matthias Kloseb9621712010-04-24 17:59:49 +00006100 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6103 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006104fi
6105
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106CC="$ac_save_cc"
6107fi
6108
Matthias Kloseb9621712010-04-24 17:59:49 +00006109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6110$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006111fi
6112
6113# If we have set a CC compiler flag for thread support then
6114# check if it works for CXX, too.
6115ac_cv_cxx_thread=no
6116if test ! -z "$CXX"
6117then
Matthias Kloseb9621712010-04-24 17:59:49 +00006118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6119$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006120ac_save_cxx="$CXX"
6121
6122if test "$ac_cv_kpthread" = "yes"
6123then
6124 CXX="$CXX -Kpthread"
6125 ac_cv_cxx_thread=yes
6126elif test "$ac_cv_kthread" = "yes"
6127then
6128 CXX="$CXX -Kthread"
6129 ac_cv_cxx_thread=yes
6130elif test "$ac_cv_pthread" = "yes"
6131then
6132 CXX="$CXX -pthread"
6133 ac_cv_cxx_thread=yes
6134fi
6135
6136if test $ac_cv_cxx_thread = yes
6137then
6138 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6139 $CXX -c conftest.$ac_ext 2>&5
6140 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6141 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6142 then
6143 ac_cv_cxx_thread=yes
6144 else
6145 ac_cv_cxx_thread=no
6146 fi
6147 rm -fr conftest*
6148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6150$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006151fi
6152CXX="$ac_save_cxx"
6153
6154
6155# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6157$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006158if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006159 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160else
Matthias Kloseb9621712010-04-24 17:59:49 +00006161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162/* end confdefs.h. */
6163#include <stdlib.h>
6164#include <stdarg.h>
6165#include <string.h>
6166#include <float.h>
6167
6168int
6169main ()
6170{
6171
6172 ;
6173 return 0;
6174}
6175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006176if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177 ac_cv_header_stdc=yes
6178else
Matthias Kloseb9621712010-04-24 17:59:49 +00006179 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6182
6183if test $ac_cv_header_stdc = yes; then
6184 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006186/* end confdefs.h. */
6187#include <string.h>
6188
6189_ACEOF
6190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 $EGREP "memchr" >/dev/null 2>&1; then :
6192
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006193else
6194 ac_cv_header_stdc=no
6195fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006196rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006197
6198fi
6199
6200if test $ac_cv_header_stdc = yes; then
6201 # ISC 2.0.2 stdlib.h does not declare free, 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 <stdlib.h>
6205
6206_ACEOF
6207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 $EGREP "free" >/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 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006219 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220 :
6221else
Matthias Kloseb9621712010-04-24 17:59:49 +00006222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223/* end confdefs.h. */
6224#include <ctype.h>
6225#include <stdlib.h>
6226#if ((' ' & 0x0FF) == 0x020)
6227# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6228# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6229#else
6230# define ISLOWER(c) \
6231 (('a' <= (c) && (c) <= 'i') \
6232 || ('j' <= (c) && (c) <= 'r') \
6233 || ('s' <= (c) && (c) <= 'z'))
6234# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6235#endif
6236
6237#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6238int
6239main ()
6240{
6241 int i;
6242 for (i = 0; i < 256; i++)
6243 if (XOR (islower (i), ISLOWER (i))
6244 || toupper (i) != TOUPPER (i))
6245 return 2;
6246 return 0;
6247}
6248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006249if ac_fn_c_try_run "$LINENO"; then :
6250
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006251else
Matthias Kloseb9621712010-04-24 17:59:49 +00006252 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6255 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006256fi
6257
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006258fi
6259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6261$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006262if test $ac_cv_header_stdc = yes; then
6263
Matthias Kloseb9621712010-04-24 17:59:49 +00006264$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006265
6266fi
6267
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006268for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006269fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006270ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006271sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006272unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006273poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006274sys/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 +01006275sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006276sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006277sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006278sys/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 -07006279libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006280bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006281do :
6282 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6283ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006284if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006285 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006286#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006287_ACEOF
6288
6289fi
6290
Guido van Rossum627b2d71993-12-24 10:39:16 +00006291done
6292
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006293ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006294for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006295 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6297$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006298if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006299 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006300else
Matthias Kloseb9621712010-04-24 17:59:49 +00006301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006302/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006303#include <sys/types.h>
6304#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006305
Martin v. Löwis11437992002-04-12 09:54:03 +00006306int
6307main ()
6308{
6309if ((DIR *) 0)
6310return 0;
6311 ;
6312 return 0;
6313}
6314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006316 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006317else
Matthias Kloseb9621712010-04-24 17:59:49 +00006318 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006322eval ac_res=\$$as_ac_Header
6323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6324$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006325if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006326 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006327#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006328_ACEOF
6329
6330ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006331fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006332
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006333done
6334# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6335if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6337$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006338if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006339 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006340else
Martin v. Löwis11437992002-04-12 09:54:03 +00006341 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006344
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006345/* Override any GCC internal prototype to avoid an error.
6346 Use char because int might match the return type of a GCC
6347 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006348#ifdef __cplusplus
6349extern "C"
6350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006351char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006352int
6353main ()
6354{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006355return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006356 ;
6357 return 0;
6358}
6359_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006360for ac_lib in '' dir; do
6361 if test -z "$ac_lib"; then
6362 ac_res="none required"
6363 else
6364 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006365 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006366 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006367 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006368 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006370rm -f core conftest.err conftest.$ac_objext \
6371 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006372 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006373 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006375done
Victor Stinnere0be4232011-10-25 13:06:09 +02006376if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006377
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006378else
6379 ac_cv_search_opendir=no
6380fi
6381rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006382LIBS=$ac_func_search_save_LIBS
6383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6385$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006386ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006387if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006388 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006389
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006390fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006391
Michael W. Hudson54241132001-12-07 15:38:26 +00006392else
Matthias Kloseb9621712010-04-24 17:59:49 +00006393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6394$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006395if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006396 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006397else
6398 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006402/* Override any GCC internal prototype to avoid an error.
6403 Use char because int might match the return type of a GCC
6404 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006405#ifdef __cplusplus
6406extern "C"
6407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006408char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006409int
6410main ()
6411{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006412return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006413 ;
6414 return 0;
6415}
6416_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006417for ac_lib in '' x; do
6418 if test -z "$ac_lib"; then
6419 ac_res="none required"
6420 else
6421 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006422 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006423 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006424 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006425 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006427rm -f core conftest.err conftest.$ac_objext \
6428 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006429 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006430 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006432done
Victor Stinnere0be4232011-10-25 13:06:09 +02006433if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006434
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006435else
6436 ac_cv_search_opendir=no
6437fi
6438rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006439LIBS=$ac_func_search_save_LIBS
6440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6442$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006443ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006444if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006445 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006446
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006447fi
6448
6449fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006450
Matthias Kloseb9621712010-04-24 17:59:49 +00006451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6452$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006453if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006454 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006455else
Matthias Kloseb9621712010-04-24 17:59:49 +00006456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006457/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006458#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006459int
6460main ()
6461{
6462return makedev(0, 0);
6463 ;
6464 return 0;
6465}
6466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006467if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006468 ac_cv_header_sys_types_h_makedev=yes
6469else
Matthias Kloseb9621712010-04-24 17:59:49 +00006470 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006472rm -f core conftest.err conftest.$ac_objext \
6473 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006474
6475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6477$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006478
6479if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006480ac_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 +02006481if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006482
Matthias Kloseb9621712010-04-24 17:59:49 +00006483$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006484
6485fi
6486
6487
6488
6489 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006490 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 +02006491if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006492
Matthias Kloseb9621712010-04-24 17:59:49 +00006493$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006494
6495fi
6496
6497
6498 fi
6499fi
6500
Michael W. Hudson54241132001-12-07 15:38:26 +00006501
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006502# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6503for ac_header in net/if.h
6504do :
6505 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6506#ifdef STDC_HEADERS
6507# include <stdlib.h>
6508# include <stddef.h>
6509#else
6510# ifdef HAVE_STDLIB_H
6511# include <stdlib.h>
6512# endif
6513#endif
6514#ifdef HAVE_SYS_SOCKET_H
6515# include <sys/socket.h>
6516#endif
6517
6518"
Victor Stinnere0be4232011-10-25 13:06:09 +02006519if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006520 cat >>confdefs.h <<_ACEOF
6521#define HAVE_NET_IF_H 1
6522_ACEOF
6523
6524fi
6525
6526done
6527
6528
6529
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006530# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006531for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006532do :
6533 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006534#ifdef HAVE_CURSES_H
6535#include <curses.h>
6536#endif
6537
Matthias Kloseb9621712010-04-24 17:59:49 +00006538"
Victor Stinnere0be4232011-10-25 13:06:09 +02006539if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006540 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006541#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006542_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006543
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006544fi
6545
6546done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006547
6548
Martin v. Löwis11017b12006-01-14 18:12:57 +00006549# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006550for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006551do :
6552 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 +00006553#ifdef HAVE_ASM_TYPES_H
6554#include <asm/types.h>
6555#endif
6556#ifdef HAVE_SYS_SOCKET_H
6557#include <sys/socket.h>
6558#endif
6559
Matthias Kloseb9621712010-04-24 17:59:49 +00006560"
Victor Stinnere0be4232011-10-25 13:06:09 +02006561if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006562 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006563#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006564_ACEOF
6565
6566fi
6567
6568done
6569
6570
Charles-François Natali47413c12011-10-06 19:47:44 +02006571# On Linux, can.h and can/raw.h require sys/socket.h
6572for ac_header in linux/can.h linux/can/raw.h
6573do :
6574 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6575ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
6576#ifdef HAVE_SYS_SOCKET_H
6577#include <sys/socket.h>
6578#endif
6579
6580"
6581if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6582 cat >>confdefs.h <<_ACEOF
6583#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6584_ACEOF
6585
6586fi
6587
6588done
6589
6590
Guido van Rossum627b2d71993-12-24 10:39:16 +00006591# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006592was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6594$as_echo_n "checking for clock_t in time.h... " >&6; }
6595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006596/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006597#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006598
6599_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006601 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006602 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006603else
Martin v. Löwis11437992002-04-12 09:54:03 +00006604
6605
Matthias Kloseb9621712010-04-24 17:59:49 +00006606$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006607
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006608
Guido van Rossum627b2d71993-12-24 10:39:16 +00006609fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006610rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006611
Matthias Kloseb9621712010-04-24 17:59:49 +00006612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6613$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006614
Matthias Kloseb9621712010-04-24 17:59:49 +00006615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6616$as_echo_n "checking for makedev... " >&6; }
6617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006618/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006619
Jesus Cea740f53a2010-04-28 11:35:30 +00006620#if defined(MAJOR_IN_MKDEV)
6621#include <sys/mkdev.h>
6622#elif defined(MAJOR_IN_SYSMACROS)
6623#include <sys/sysmacros.h>
6624#else
6625#include <sys/types.h>
6626#endif
6627
Neal Norwitz11690112002-07-30 01:08:28 +00006628int
6629main ()
6630{
Jesus Cea740f53a2010-04-28 11:35:30 +00006631
6632 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006633 ;
6634 return 0;
6635}
Matthias Kloseb159a552010-04-25 21:00:44 +00006636
Neal Norwitz11690112002-07-30 01:08:28 +00006637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006638if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006639 ac_cv_has_makedev=yes
6640else
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006643rm -f core conftest.err conftest.$ac_objext \
6644 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6646$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006647if test "$ac_cv_has_makedev" = "yes"; then
6648
Matthias Kloseb9621712010-04-24 17:59:49 +00006649$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006650
6651fi
6652
Martin v. Löwis399a6892002-10-04 10:22:02 +00006653# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6654# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6655# defined, but the compiler does not support pragma redefine_extname,
6656# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6657# structures (such as rlimit64) without declaring them. As a
6658# work-around, disable LFS on such configurations
6659
6660use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6662$as_echo_n "checking Solaris LFS bug... " >&6; }
6663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006664/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006665
6666#define _LARGEFILE_SOURCE 1
6667#define _FILE_OFFSET_BITS 64
6668#include <sys/resource.h>
6669
Martin v. Löwis399a6892002-10-04 10:22:02 +00006670int
6671main ()
6672{
6673struct rlimit foo;
6674 ;
6675 return 0;
6676}
6677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006679 sol_lfs_bug=no
6680else
Matthias Kloseb9621712010-04-24 17:59:49 +00006681 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6685$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006686if test "$sol_lfs_bug" = "yes"; then
6687 use_lfs=no
6688fi
6689
6690if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006691# Two defines needed to enable largefile support on various platforms
6692# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006693case $ac_sys_system/$ac_sys_release in
6694AIX*)
6695
6696$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6697
6698 ;;
6699esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006700
Matthias Kloseb9621712010-04-24 17:59:49 +00006701$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006702
6703
Matthias Kloseb9621712010-04-24 17:59:49 +00006704$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006705
Martin v. Löwis399a6892002-10-04 10:22:02 +00006706fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006707
Guido van Rossum84e7b241996-08-19 21:59:00 +00006708# Add some code to confdefs.h so that the test for off_t works on SCO
6709cat >> confdefs.h <<\EOF
6710#if defined(SCO_DS)
6711#undef _OFF_T
6712#endif
6713EOF
6714
Guido van Rossumef2255b2000-03-10 22:30:29 +00006715# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006716ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006717if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006718
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006719else
Martin v. Löwis11437992002-04-12 09:54:03 +00006720
6721cat >>confdefs.h <<_ACEOF
6722#define mode_t int
6723_ACEOF
6724
6725fi
6726
Matthias Kloseb9621712010-04-24 17:59:49 +00006727ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006728if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006729
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006730else
Martin v. Löwis11437992002-04-12 09:54:03 +00006731
6732cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006733#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006734_ACEOF
6735
6736fi
6737
Matthias Kloseb9621712010-04-24 17:59:49 +00006738ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006739if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006740
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006741else
Martin v. Löwis11437992002-04-12 09:54:03 +00006742
6743cat >>confdefs.h <<_ACEOF
6744#define pid_t int
6745_ACEOF
6746
6747fi
6748
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006749
Martin v. Löwis11437992002-04-12 09:54:03 +00006750cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006751#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006752_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006753
Matthias Kloseb9621712010-04-24 17:59:49 +00006754ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006755if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006756
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006757else
Martin v. Löwis11437992002-04-12 09:54:03 +00006758
6759cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006760#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006761_ACEOF
6762
6763fi
6764
Matthias Kloseb9621712010-04-24 17:59:49 +00006765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6766$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006767if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006768 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006769else
Matthias Kloseb9621712010-04-24 17:59:49 +00006770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006771/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006772#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006773
6774_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006776 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006777 ac_cv_type_uid_t=yes
6778else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006779 ac_cv_type_uid_t=no
6780fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006781rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006782
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6785$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006786if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006787
Matthias Kloseb9621712010-04-24 17:59:49 +00006788$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006789
6790
Matthias Kloseb9621712010-04-24 17:59:49 +00006791$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006792
6793fi
6794
Matthias Kloseb9621712010-04-24 17:59:49 +00006795ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6796case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006797 no|yes) ;; #(
6798 *)
6799
Matthias Kloseb9621712010-04-24 17:59:49 +00006800$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006801
6802
6803cat >>confdefs.h <<_ACEOF
6804#define uint32_t $ac_cv_c_uint32_t
6805_ACEOF
6806;;
6807 esac
6808
Matthias Kloseb9621712010-04-24 17:59:49 +00006809ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6810case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006811 no|yes) ;; #(
6812 *)
6813
Matthias Kloseb9621712010-04-24 17:59:49 +00006814$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006815
6816
6817cat >>confdefs.h <<_ACEOF
6818#define uint64_t $ac_cv_c_uint64_t
6819_ACEOF
6820;;
6821 esac
6822
Matthias Kloseb9621712010-04-24 17:59:49 +00006823ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6824case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006825 no|yes) ;; #(
6826 *)
6827
6828cat >>confdefs.h <<_ACEOF
6829#define int32_t $ac_cv_c_int32_t
6830_ACEOF
6831;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006832esac
6833
Matthias Kloseb9621712010-04-24 17:59:49 +00006834ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6835case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006836 no|yes) ;; #(
6837 *)
6838
6839cat >>confdefs.h <<_ACEOF
6840#define int64_t $ac_cv_c_int64_t
6841_ACEOF
6842;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006843esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006844
Matthias Kloseb9621712010-04-24 17:59:49 +00006845ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006846if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006847
Matthias Kloseb9621712010-04-24 17:59:49 +00006848$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006849
6850fi
6851
Jack Jansendd19cf82001-12-06 22:36:17 +00006852
Michael W. Hudson54241132001-12-07 15:38:26 +00006853# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006854# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006855# The cast to long int works around a bug in the HP C Compiler
6856# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6857# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6858# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6860$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006861if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006862 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006863else
Matthias Kloseb9621712010-04-24 17:59:49 +00006864 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 +00006865
Martin v. Löwis11437992002-04-12 09:54:03 +00006866else
Matthias Kloseb9621712010-04-24 17:59:49 +00006867 if test "$ac_cv_type_int" = yes; then
6868 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006870as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02006871See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006872 else
6873 ac_cv_sizeof_int=0
6874 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006876
Martin v. Löwis11437992002-04-12 09:54:03 +00006877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6879$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006880
6881
6882
Martin v. Löwis11437992002-04-12 09:54:03 +00006883cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006884#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006885_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006886
6887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006888# The cast to long int works around a bug in the HP C Compiler
6889# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6890# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6891# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6893$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006894if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006895 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006896else
Matthias Kloseb9621712010-04-24 17:59:49 +00006897 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 +00006898
Martin v. Löwis11437992002-04-12 09:54:03 +00006899else
Matthias Kloseb9621712010-04-24 17:59:49 +00006900 if test "$ac_cv_type_long" = yes; then
6901 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006903as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02006904See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006905 else
6906 ac_cv_sizeof_long=0
6907 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006909
Martin v. Löwis11437992002-04-12 09:54:03 +00006910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6912$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006913
6914
6915
Martin v. Löwis11437992002-04-12 09:54:03 +00006916cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006917#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006918_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006919
6920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006921# The cast to long int works around a bug in the HP C Compiler
6922# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6923# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6924# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6926$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006927if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006928 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006929else
Matthias Kloseb9621712010-04-24 17:59:49 +00006930 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 +00006931
Martin v. Löwis11437992002-04-12 09:54:03 +00006932else
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 if test "$ac_cv_type_void_p" = yes; then
6934 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006936as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02006937See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006938 else
6939 ac_cv_sizeof_void_p=0
6940 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006942
Martin v. Löwis11437992002-04-12 09:54:03 +00006943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6945$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006946
6947
6948
Martin v. Löwis11437992002-04-12 09:54:03 +00006949cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006950#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006951_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006952
6953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006954# The cast to long int works around a bug in the HP C Compiler
6955# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6956# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6957# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6959$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006960if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006961 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006962else
Matthias Kloseb9621712010-04-24 17:59:49 +00006963 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 +00006964
Martin v. Löwis11437992002-04-12 09:54:03 +00006965else
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 if test "$ac_cv_type_short" = yes; then
6967 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006969as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02006970See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006971 else
6972 ac_cv_sizeof_short=0
6973 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006975
Martin v. Löwis11437992002-04-12 09:54:03 +00006976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6978$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006979
6980
6981
Martin v. Löwis11437992002-04-12 09:54:03 +00006982cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006983#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006984_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006985
6986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006987# The cast to long int works around a bug in the HP C Compiler
6988# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6989# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6990# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6992$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006993if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006995else
Matthias Kloseb9621712010-04-24 17:59:49 +00006996 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 +00006997
Martin v. Löwis11437992002-04-12 09:54:03 +00006998else
Matthias Kloseb9621712010-04-24 17:59:49 +00006999 if test "$ac_cv_type_float" = yes; then
7000 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7001$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007002as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007003See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007004 else
7005 ac_cv_sizeof_float=0
7006 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007008
Martin v. Löwis11437992002-04-12 09:54:03 +00007009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7011$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007012
7013
7014
Martin v. Löwis11437992002-04-12 09:54:03 +00007015cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007016#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007017_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007018
7019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007020# The cast to long int works around a bug in the HP C Compiler
7021# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7022# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7023# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7025$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007026if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007028else
Matthias Kloseb9621712010-04-24 17:59:49 +00007029 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 +00007030
Martin v. Löwis11437992002-04-12 09:54:03 +00007031else
Matthias Kloseb9621712010-04-24 17:59:49 +00007032 if test "$ac_cv_type_double" = yes; then
7033 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007035as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007036See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007037 else
7038 ac_cv_sizeof_double=0
7039 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007041
Martin v. Löwis11437992002-04-12 09:54:03 +00007042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7044$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007045
7046
7047
Martin v. Löwis11437992002-04-12 09:54:03 +00007048cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007049#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007050_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007051
7052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007053# The cast to long int works around a bug in the HP C Compiler
7054# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7055# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7056# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7058$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007059if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007060 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007061else
Matthias Kloseb9621712010-04-24 17:59:49 +00007062 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 +00007063
Martin v. Löwis11437992002-04-12 09:54:03 +00007064else
Matthias Kloseb9621712010-04-24 17:59:49 +00007065 if test "$ac_cv_type_fpos_t" = yes; then
7066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007068as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007069See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007070 else
7071 ac_cv_sizeof_fpos_t=0
7072 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007074
Martin v. Löwis11437992002-04-12 09:54:03 +00007075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7077$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007078
7079
7080
Martin v. Löwis11437992002-04-12 09:54:03 +00007081cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007082#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007083_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007084
Michael W. Hudson54241132001-12-07 15:38:26 +00007085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086# The cast to long int works around a bug in the HP C Compiler
7087# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7088# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7089# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7091$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007092if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007093 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007094else
Matthias Kloseb9621712010-04-24 17:59:49 +00007095 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 +00007096
Martin v. Löwis18e16552006-02-15 17:27:45 +00007097else
Matthias Kloseb9621712010-04-24 17:59:49 +00007098 if test "$ac_cv_type_size_t" = yes; then
7099 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7100$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007101as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007102See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007103 else
7104 ac_cv_sizeof_size_t=0
7105 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007107
Martin v. Löwis18e16552006-02-15 17:27:45 +00007108fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7110$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007111
7112
7113
Martin v. Löwis18e16552006-02-15 17:27:45 +00007114cat >>confdefs.h <<_ACEOF
7115#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7116_ACEOF
7117
7118
Christian Heimes400adb02008-02-01 08:12:03 +00007119# The cast to long int works around a bug in the HP C Compiler
7120# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7121# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7122# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7124$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007125if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007126 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007127else
Matthias Kloseb9621712010-04-24 17:59:49 +00007128 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 +00007129
Christian Heimes400adb02008-02-01 08:12:03 +00007130else
Matthias Kloseb9621712010-04-24 17:59:49 +00007131 if test "$ac_cv_type_pid_t" = yes; then
7132 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007134as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007135See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007136 else
7137 ac_cv_sizeof_pid_t=0
7138 fi
7139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007140
Christian Heimes400adb02008-02-01 08:12:03 +00007141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7143$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007144
7145
7146
7147cat >>confdefs.h <<_ACEOF
7148#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7149_ACEOF
7150
7151
Michael W. Hudson54241132001-12-07 15:38:26 +00007152
Matthias Kloseb9621712010-04-24 17:59:49 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7154$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007155have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007157/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007158
Martin v. Löwis11437992002-04-12 09:54:03 +00007159int
7160main ()
7161{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007162long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007163 ;
7164 return 0;
7165}
7166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007167if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007168
7169
Matthias Kloseb9621712010-04-24 17:59:49 +00007170$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007171
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007172 have_long_long=yes
7173
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7177$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007178if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007179# The cast to long int works around a bug in the HP C Compiler
7180# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7181# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7182# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7184$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007185if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007186 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007187else
Matthias Kloseb9621712010-04-24 17:59:49 +00007188 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 +00007189
Martin v. Löwis11437992002-04-12 09:54:03 +00007190else
Matthias Kloseb9621712010-04-24 17:59:49 +00007191 if test "$ac_cv_type_long_long" = yes; then
7192 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007194as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007195See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007196 else
7197 ac_cv_sizeof_long_long=0
7198 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007200
Martin v. Löwis11437992002-04-12 09:54:03 +00007201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7203$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007204
7205
7206
Martin v. Löwis11437992002-04-12 09:54:03 +00007207cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007208#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007209_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007210
Michael W. Hudson54241132001-12-07 15:38:26 +00007211
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007212fi
7213
Matthias Kloseb9621712010-04-24 17:59:49 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7215$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007216have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007218/* end confdefs.h. */
7219
7220int
7221main ()
7222{
7223long double x; x = (long double)0;
7224 ;
7225 return 0;
7226}
7227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007228if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007229
7230
Matthias Kloseb9621712010-04-24 17:59:49 +00007231$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007232
7233 have_long_double=yes
7234
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007235fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7238$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007239if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007240# The cast to long int works around a bug in the HP C Compiler
7241# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7242# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7243# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7245$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007246if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007248else
Matthias Kloseb9621712010-04-24 17:59:49 +00007249 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 +00007250
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007251else
Matthias Kloseb9621712010-04-24 17:59:49 +00007252 if test "$ac_cv_type_long_double" = yes; then
7253 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7254$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007255as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007256See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007257 else
7258 ac_cv_sizeof_long_double=0
7259 fi
7260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007261
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7264$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007265
7266
7267
7268cat >>confdefs.h <<_ACEOF
7269#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7270_ACEOF
7271
7272
7273fi
7274
7275
Matthias Kloseb9621712010-04-24 17:59:49 +00007276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7277$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007278have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007280/* end confdefs.h. */
7281
7282int
7283main ()
7284{
7285_Bool x; x = (_Bool)0;
7286 ;
7287 return 0;
7288}
7289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007290if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007291
7292
Matthias Kloseb9621712010-04-24 17:59:49 +00007293$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007294
7295 have_c99_bool=yes
7296
Thomas Woutersb2137042007-02-01 18:02:27 +00007297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7300$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007301if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007302# The cast to long int works around a bug in the HP C Compiler
7303# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7304# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7305# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7307$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007308if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007309 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007310else
Matthias Kloseb9621712010-04-24 17:59:49 +00007311 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 +00007312
Thomas Woutersb2137042007-02-01 18:02:27 +00007313else
Matthias Kloseb9621712010-04-24 17:59:49 +00007314 if test "$ac_cv_type__Bool" = yes; then
7315 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7316$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007317as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007318See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007319 else
7320 ac_cv_sizeof__Bool=0
7321 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007323
Thomas Woutersb2137042007-02-01 18:02:27 +00007324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7326$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007327
7328
7329
Thomas Woutersb2137042007-02-01 18:02:27 +00007330cat >>confdefs.h <<_ACEOF
7331#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7332_ACEOF
7333
7334
7335fi
7336
Matthias Kloseb9621712010-04-24 17:59:49 +00007337ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007338 #include <stdint.h>
7339 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007340 #ifdef HAVE_INTTYPES_H
7341 #include <inttypes.h>
7342 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007343"
Victor Stinnere0be4232011-10-25 13:06:09 +02007344if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007345
7346cat >>confdefs.h <<_ACEOF
7347#define HAVE_UINTPTR_T 1
7348_ACEOF
7349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007350# The cast to long int works around a bug in the HP C Compiler
7351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7353# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7355$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007356if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007357 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007358else
Matthias Kloseb9621712010-04-24 17:59:49 +00007359 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 +00007360
Martin v. Löwis11437992002-04-12 09:54:03 +00007361else
Matthias Kloseb9621712010-04-24 17:59:49 +00007362 if test "$ac_cv_type_uintptr_t" = yes; then
7363 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007365as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007366See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007367 else
7368 ac_cv_sizeof_uintptr_t=0
7369 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007370fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007371
Martin v. Löwis11437992002-04-12 09:54:03 +00007372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7374$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007375
7376
7377
Martin v. Löwis11437992002-04-12 09:54:03 +00007378cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007379#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007380_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007381
Michael W. Hudson54241132001-12-07 15:38:26 +00007382
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007383fi
7384
Thomas Wouters89f507f2006-12-13 04:49:30 +00007385
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007386# The cast to long int works around a bug in the HP C Compiler
7387# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7388# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7389# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7391$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007392if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007394else
Matthias Kloseb9621712010-04-24 17:59:49 +00007395 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007396#ifdef HAVE_SYS_TYPES_H
7397#include <sys/types.h>
7398#endif
7399
Matthias Kloseb9621712010-04-24 17:59:49 +00007400"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007401
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007402else
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 if test "$ac_cv_type_off_t" = yes; then
7404 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007406as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007407See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007408 else
7409 ac_cv_sizeof_off_t=0
7410 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007412
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7415$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007416
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007417
7418
Martin v. Löwis11437992002-04-12 09:54:03 +00007419cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007420#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007421_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007422
Michael W. Hudson54241132001-12-07 15:38:26 +00007423
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007424
Matthias Kloseb9621712010-04-24 17:59:49 +00007425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7426$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007427if test "$have_long_long" = yes
7428then
7429if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007430 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007431
Matthias Kloseb9621712010-04-24 17:59:49 +00007432$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007433
Matthias Kloseb9621712010-04-24 17:59:49 +00007434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7435$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007436else
Matthias Kloseb9621712010-04-24 17:59:49 +00007437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7438$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007439fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007440else
Matthias Kloseb9621712010-04-24 17:59:49 +00007441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7442$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007443fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007444
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007445# The cast to long int works around a bug in the HP C Compiler
7446# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7447# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7448# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7450$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007451if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007452 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007453else
Matthias Kloseb9621712010-04-24 17:59:49 +00007454 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007455#ifdef HAVE_SYS_TYPES_H
7456#include <sys/types.h>
7457#endif
7458#ifdef HAVE_TIME_H
7459#include <time.h>
7460#endif
7461
Matthias Kloseb9621712010-04-24 17:59:49 +00007462"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007463
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007464else
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 if test "$ac_cv_type_time_t" = yes; then
7466 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7467$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007468as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007469See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007470 else
7471 ac_cv_sizeof_time_t=0
7472 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007474
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7477$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007478
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007479
7480
Martin v. Löwis11437992002-04-12 09:54:03 +00007481cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007482#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007483_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007484
Michael W. Hudson54241132001-12-07 15:38:26 +00007485
7486
Trent Mick635f6fb2000-08-23 21:33:05 +00007487# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007488ac_save_cc="$CC"
7489if test "$ac_cv_kpthread" = "yes"
7490then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007491elif test "$ac_cv_kthread" = "yes"
7492then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007493elif test "$ac_cv_pthread" = "yes"
7494then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007495fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007496
Matthias Kloseb9621712010-04-24 17:59:49 +00007497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7498$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007499have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007501/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007502
7503 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007504int
7505main ()
7506{
Guido van Rossum12580492000-09-24 16:47:19 +00007507pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007508 ;
7509 return 0;
7510}
Matthias Kloseb159a552010-04-25 21:00:44 +00007511
Martin v. Löwis11437992002-04-12 09:54:03 +00007512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007513if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007514 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7518$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007519if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007520 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007521# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7522# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7523# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7525$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007526if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007527 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007528else
Matthias Kloseb9621712010-04-24 17:59:49 +00007529 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007530#ifdef HAVE_PTHREAD_H
7531#include <pthread.h>
7532#endif
7533
Matthias Kloseb9621712010-04-24 17:59:49 +00007534"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007535
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007536else
Matthias Kloseb9621712010-04-24 17:59:49 +00007537 if test "$ac_cv_type_pthread_t" = yes; then
7538 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7539$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007540as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007541See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007542 else
7543 ac_cv_sizeof_pthread_t=0
7544 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007546
Trent Mick635f6fb2000-08-23 21:33:05 +00007547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7549$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007550
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007551
7552
Martin v. Löwis11437992002-04-12 09:54:03 +00007553cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007554#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007555_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007556
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007557
Trent Mick635f6fb2000-08-23 21:33:05 +00007558fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007559CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007560
Michael W. Hudson54241132001-12-07 15:38:26 +00007561
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007562case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007563 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007564 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7565 ;;
7566 Darwin/*)
7567 OTHER_LIBTOOL_OPT=""
7568 ;;
7569esac
7570
7571
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007572ARCH_RUN_32BIT=""
7573
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007574case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007575 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007576 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7577 if test "${enable_universalsdk}"; then
7578 :
7579 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007580 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007581 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007582 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007583 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007584 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007585 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007586 if test ${gcc_version} '<' 4.0
7587 then
7588 LIBTOOL_CRUFT="-lcc_dynamic"
7589 else
7590 LIBTOOL_CRUFT=""
7591 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007592 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007593 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007594else
Matthias Kloseb9621712010-04-24 17:59:49 +00007595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007596/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007597
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007598 #include <unistd.h>
7599 int main(int argc, char*argv[])
7600 {
7601 if (sizeof(long) == 4) {
7602 return 0;
7603 } else {
7604 return 1;
7605 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007606 }
7607
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007609if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007610 ac_osx_32bit=yes
7611else
Matthias Kloseb9621712010-04-24 17:59:49 +00007612 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7615 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007616fi
7617
7618
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007619 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007620 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007621 i386)
7622 MACOSX_DEFAULT_ARCH="i386"
7623 ;;
7624 ppc)
7625 MACOSX_DEFAULT_ARCH="ppc"
7626 ;;
7627 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007628 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007629 ;;
7630 esac
7631 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007632 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007633 i386)
7634 MACOSX_DEFAULT_ARCH="x86_64"
7635 ;;
7636 ppc)
7637 MACOSX_DEFAULT_ARCH="ppc64"
7638 ;;
7639 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007640 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007641 ;;
7642 esac
7643
7644 #ARCH_RUN_32BIT="true"
7645 fi
7646
7647 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007648 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007649 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007650esac
7651
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7653$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007654if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007655then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007656 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007657 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007658 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007659
Matthias Kloseb9621712010-04-24 17:59:49 +00007660$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007661
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7663$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007664 if test $enable_shared = "yes"
7665 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007666 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 +00007667 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007668else
Matthias Kloseb9621712010-04-24 17:59:49 +00007669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7670$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007671fi
7672
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7674$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007675case $ac_sys_system/$ac_sys_release in
7676 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007677
Matthias Kloseb9621712010-04-24 17:59:49 +00007678$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007679
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7681$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007682 ;;
7683 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7685$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007686 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007687esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007688
Guido van Rossum0a516c91994-09-12 10:58:40 +00007689# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007690
Michael W. Hudson54241132001-12-07 15:38:26 +00007691
7692
7693
7694
Benjamin Peterson99f03762010-04-11 22:15:28 +00007695
Thomas Wouters477c8d52006-05-27 19:21:47 +00007696
Georg Brandlb1441c72009-01-03 22:33:39 +00007697
Thomas Wouters477c8d52006-05-27 19:21:47 +00007698cat >>confdefs.h <<_ACEOF
7699#define SHLIB_EXT "$SO"
7700_ACEOF
7701
Guido van Rossum0a516c91994-09-12 10:58:40 +00007702# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007703# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007704# (Shared libraries in this instance are shared modules to be loaded into
7705# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7707$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007708if test -z "$LDSHARED"
7709then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007710 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007711 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007712 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007713 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007714 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007715 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007716 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007717 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007718 if test "$GCC" = "yes" ; then
7719 LDSHARED='$(CC) -shared'
7720 LDCXXSHARED='$(CXX) -shared'
7721 else
7722 LDSHARED='$(CC) -G'
7723 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007724 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007725 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007726 if test "$GCC" = "yes" ; then
7727 LDSHARED='$(CC) -shared'
7728 LDCXXSHARED='$(CXX) -shared'
7729 else
7730 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007731 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007732 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007733 LDSHARED='$(CC) -bundle'
7734 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007735 if test "$enable_framework" ; then
7736 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007737 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7738 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007739 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007740 else
7741 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007742 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007743 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007744 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007745 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007746 LDSHARED='$(CC) -bundle'
7747 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007748 if test "$enable_framework" ; then
7749 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007750 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7751 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007752 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007753 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007754 # No framework, use the Python app as bundle-loader
7755 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007756 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007757 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007758 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007759 Darwin/*)
7760 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7761 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007762
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007763 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007764 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007765 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007766 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007767 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007768 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7769 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007770 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007771 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007772 LDSHARED='$(CC) -bundle'
7773 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007774 if test "$enable_framework" ; then
7775 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007776 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7777 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007778 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007779 else
7780 # No framework, use the Python app as bundle-loader
7781 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7782 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007783 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007784 fi
7785 fi
7786 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007787 Linux*|GNU*|QNX*)
7788 LDSHARED='$(CC) -shared'
7789 LDCXXSHARED='$(CXX) -shared';;
7790 BSD/OS*/4*)
7791 LDSHARED="gcc -shared"
7792 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007793 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007794 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007795 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007796 LDSHARED='$(CC) -shared'
7797 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007798 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007799 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007800 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007801 OpenBSD*)
7802 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7803 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007804 LDSHARED='$(CC) -shared $(CCSHARED)'
7805 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007806 else
7807 case `uname -r` in
7808 [01].* | 2.[0-7] | 2.[0-7].*)
7809 LDSHARED="ld -Bshareable ${LDFLAGS}"
7810 ;;
7811 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007812 LDSHARED='$(CC) -shared $(CCSHARED)'
7813 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007814 ;;
7815 esac
7816 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007817 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007818 LDSHARED='$(CC) -shared'
7819 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007820 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007821 if test "$GCC" = "yes" ; then
7822 LDSHARED='$(CC) -shared'
7823 LDCXXSHARED='$(CXX) -shared'
7824 else
7825 LDSHARED='$(CC) -G'
7826 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007827 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007828 SCO_SV*)
7829 LDSHARED='$(CC) -Wl,-G,-Bexport'
7830 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7831 CYGWIN*)
7832 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7833 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007834 *) LDSHARED="ld";;
7835 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7838$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007839LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007840BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007841# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007842# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7844$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007845if test -z "$CCSHARED"
7846then
Guido van Rossum07397971997-04-29 21:49:50 +00007847 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007848 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007849 then CCSHARED="-fPIC";
7850 elif test `uname -p` = sparc;
7851 then CCSHARED="-xcode=pic32";
7852 else CCSHARED="-Kpic";
7853 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007854 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007855 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007856 else CCSHARED="+z";
7857 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007858 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007859 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007860 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007861 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007862 if test "$GCC" = "yes"
7863 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007864 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007865 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007866 SCO_SV*)
7867 if test "$GCC" = "yes"
7868 then CCSHARED="-fPIC"
7869 else CCSHARED="-Kpic -belf"
7870 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007871 IRIX*/6*) case $CC in
7872 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007873 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007874 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007875 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7878$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007879# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007880# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7882$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007883if test -z "$LINKFORSHARED"
7884then
Guido van Rossum07397971997-04-29 21:49:50 +00007885 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007886 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007887 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007888 LINKFORSHARED="-Wl,-E -Wl,+s";;
7889# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007890 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007891 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007892 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007894 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007895 if test "$enable_framework"
7896 then
Jack Jansenda49e192005-01-07 13:08:22 +00007897 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007898 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007899 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007900 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007901 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007902 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007903 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007904 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7905 then
7906 LINKFORSHARED="-Wl,--export-dynamic"
7907 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007908 SunOS/5*) case $CC in
7909 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007910 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007911 then
7912 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007913 fi;;
7914 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007915 CYGWIN*)
7916 if test $enable_shared = "no"
7917 then
7918 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7919 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007920 QNX*)
7921 # -Wl,-E causes the symbols to be added to the dynamic
7922 # symbol table so that they can be found when a module
7923 # is loaded. -N 2048K causes the stack size to be set
7924 # to 2048 kilobytes so that the stack doesn't overflow
7925 # when running test_compile.py.
7926 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007927 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7930$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007931
Michael W. Hudson54241132001-12-07 15:38:26 +00007932
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007933
Matthias Kloseb9621712010-04-24 17:59:49 +00007934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7935$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007936if test ! "$LIBRARY" = "$LDLIBRARY"
7937then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007938 case $ac_sys_system in
7939 CYGWIN*)
7940 # Cygwin needs CCSHARED when building extension DLLs
7941 # but not when building the interpreter DLL.
7942 CFLAGSFORSHARED='';;
7943 *)
7944 CFLAGSFORSHARED='$(CCSHARED)'
7945 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7948$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007949
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007950# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7951# library (with --enable-shared).
7952# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007953# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7954# if it is not required, since it creates a dependency of the shared library
7955# to LIBS. This, in turn, means that applications linking the shared libpython
7956# don't need to link LIBS explicitly. The default should be only changed
7957# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007958
Matthias Kloseb9621712010-04-24 17:59:49 +00007959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7960$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007961case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007962 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007963 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007964esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7966$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007967
7968
Guido van Rossum627b2d71993-12-24 10:39:16 +00007969# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7971$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007972if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007973 $as_echo_n "(cached) " >&6
7974else
7975 ac_check_lib_save_LIBS=$LIBS
7976LIBS="-lsendfile $LIBS"
7977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7978/* end confdefs.h. */
7979
7980/* Override any GCC internal prototype to avoid an error.
7981 Use char because int might match the return type of a GCC
7982 builtin and then its argument prototype would still apply. */
7983#ifdef __cplusplus
7984extern "C"
7985#endif
7986char sendfile ();
7987int
7988main ()
7989{
7990return sendfile ();
7991 ;
7992 return 0;
7993}
7994_ACEOF
7995if ac_fn_c_try_link "$LINENO"; then :
7996 ac_cv_lib_sendfile_sendfile=yes
7997else
7998 ac_cv_lib_sendfile_sendfile=no
7999fi
8000rm -f core conftest.err conftest.$ac_objext \
8001 conftest$ac_exeext conftest.$ac_ext
8002LIBS=$ac_check_lib_save_LIBS
8003fi
8004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8005$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008006if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008007 cat >>confdefs.h <<_ACEOF
8008#define HAVE_LIBSENDFILE 1
8009_ACEOF
8010
8011 LIBS="-lsendfile $LIBS"
8012
8013fi
8014
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8016$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008017if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008018 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008019else
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008021LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025/* Override any GCC internal prototype to avoid an error.
8026 Use char because int might match the return type of a GCC
8027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008028#ifdef __cplusplus
8029extern "C"
8030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008031char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008032int
8033main ()
8034{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008036 ;
8037 return 0;
8038}
8039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008040if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008042else
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008045rm -f core conftest.err conftest.$ac_objext \
8046 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008047LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8050$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008051if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008052 cat >>confdefs.h <<_ACEOF
8053#define HAVE_LIBDL 1
8054_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008055
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008056 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008057
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008058fi
8059 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8061$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008062if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008064else
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008066LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008068/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070/* Override any GCC internal prototype to avoid an error.
8071 Use char because int might match the return type of a GCC
8072 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008073#ifdef __cplusplus
8074extern "C"
8075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008076char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008077int
8078main ()
8079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008080return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008081 ;
8082 return 0;
8083}
8084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008085if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008087else
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008090rm -f core conftest.err conftest.$ac_objext \
8091 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008092LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008093fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8095$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008096if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 cat >>confdefs.h <<_ACEOF
8098#define HAVE_LIBDLD 1
8099_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008100
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008101 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008102
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008103fi
8104 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008105
Georg Brandlb1441c72009-01-03 22:33:39 +00008106# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008107if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8109$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008110if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008112else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008113 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008117/* Override any GCC internal prototype to avoid an error.
8118 Use char because int might match the return type of a GCC
8119 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008120#ifdef __cplusplus
8121extern "C"
8122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008123char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008124int
8125main ()
8126{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008127return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008128 ;
8129 return 0;
8130}
8131_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008132for ac_lib in '' pthread rt posix4; do
8133 if test -z "$ac_lib"; then
8134 ac_res="none required"
8135 else
8136 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008137 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008142rm -f core conftest.err conftest.$ac_objext \
8143 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008144 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147done
Victor Stinnere0be4232011-10-25 13:06:09 +02008148if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008150else
8151 ac_cv_search_sem_init=no
8152fi
8153rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008154LIBS=$ac_func_search_save_LIBS
8155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8157$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008158ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008159if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008160 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008161
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008162fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008163 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008164 # posix4 on Solaris 2.6
8165 # pthread (first!) on Linux
8166fi
8167
Martin v. Löwis19d17342003-06-14 21:03:05 +00008168# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8170$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008171if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008173else
8174 ac_check_lib_save_LIBS=$LIBS
8175LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008177/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179/* Override any GCC internal prototype to avoid an error.
8180 Use char because int might match the return type of a GCC
8181 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008182#ifdef __cplusplus
8183extern "C"
8184#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008185char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008186int
8187main ()
8188{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008190 ;
8191 return 0;
8192}
8193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008194if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008195 ac_cv_lib_intl_textdomain=yes
8196else
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008199rm -f core conftest.err conftest.$ac_objext \
8200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008201LIBS=$ac_check_lib_save_LIBS
8202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8204$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008205if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008206
Matthias Kloseb9621712010-04-24 17:59:49 +00008207$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008208
Brett Cannonc6d936e2009-06-07 20:09:53 +00008209 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008210fi
8211
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008212
8213# checks for system dependent C++ extensions support
8214case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008215 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8216$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008218/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008219
Georg Brandl59e87bd2011-02-15 19:48:59 +00008220 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008221int
8222main ()
8223{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008224loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 ;
8226 return 0;
8227}
Matthias Kloseb159a552010-04-25 21:00:44 +00008228
Martin v. Löwis11437992002-04-12 09:54:03 +00008229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008230if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008231
Matthias Kloseb159a552010-04-25 21:00:44 +00008232
Matthias Kloseb9621712010-04-24 17:59:49 +00008233$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008234
Matthias Kloseb159a552010-04-25 21:00:44 +00008235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008236$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008237
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008238else
Matthias Kloseb159a552010-04-25 21:00:44 +00008239
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008241$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008242
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008244rm -f core conftest.err conftest.$ac_objext \
8245 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008246 *) ;;
8247esac
8248
Guido van Rossum70c7f481998-03-26 18:44:10 +00008249# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8251$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008252if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008253 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008254else
Martin v. Löwis11437992002-04-12 09:54:03 +00008255 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008256LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260/* Override any GCC internal prototype to avoid an error.
8261 Use char because int might match the return type of a GCC
8262 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008263#ifdef __cplusplus
8264extern "C"
8265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008266char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008267int
8268main ()
8269{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008271 ;
8272 return 0;
8273}
8274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008275if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008277else
Matthias Kloseb9621712010-04-24 17:59:49 +00008278 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008280rm -f core conftest.err conftest.$ac_objext \
8281 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008282LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8285$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008286if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008287 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008288fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008289 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8291$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008292if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008294else
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008296LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008299
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008300/* Override any GCC internal prototype to avoid an error.
8301 Use char because int might match the return type of a GCC
8302 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008303#ifdef __cplusplus
8304extern "C"
8305#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008306char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008307int
8308main ()
8309{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008311 ;
8312 return 0;
8313}
8314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008315if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008316 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008317else
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008320rm -f core conftest.err conftest.$ac_objext \
8321 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008322LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8325$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008326if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008327 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008328fi
8329 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008330
Matthias Kloseb9621712010-04-24 17:59:49 +00008331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8332$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008334# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008335if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008336 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8338$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008339LIBS="$withval $LIBS"
8340
8341else
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8343$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008344fi
8345
Guido van Rossum7f43da71994-08-01 12:15:30 +00008346
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008347if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008348 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8349set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8351$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008352if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008354else
8355 case $PKG_CONFIG in
8356 [\\/]* | ?:[\\/]*)
8357 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8358 ;;
8359 *)
8360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8361for as_dir in $PATH
8362do
8363 IFS=$as_save_IFS
8364 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008366 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8367 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008369 break 2
8370 fi
8371done
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008373IFS=$as_save_IFS
8374
8375 ;;
8376esac
8377fi
8378PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8379if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8381$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008382else
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8384$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008385fi
8386
8387
8388fi
8389if test -z "$ac_cv_path_PKG_CONFIG"; then
8390 ac_pt_PKG_CONFIG=$PKG_CONFIG
8391 # Extract the first word of "pkg-config", so it can be a program name with args.
8392set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8394$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008395if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008397else
8398 case $ac_pt_PKG_CONFIG in
8399 [\\/]* | ?:[\\/]*)
8400 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8401 ;;
8402 *)
8403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8404for as_dir in $PATH
8405do
8406 IFS=$as_save_IFS
8407 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008409 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8410 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008412 break 2
8413 fi
8414done
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008416IFS=$as_save_IFS
8417
8418 ;;
8419esac
8420fi
8421ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8422if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8424$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008425else
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8427$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008428fi
8429
8430 if test "x$ac_pt_PKG_CONFIG" = x; then
8431 PKG_CONFIG=""
8432 else
8433 case $cross_compiling:$ac_tool_warned in
8434yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8436$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008437ac_tool_warned=yes ;;
8438esac
8439 PKG_CONFIG=$ac_pt_PKG_CONFIG
8440 fi
8441else
8442 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8443fi
8444
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008445
8446# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8448$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008449
8450# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008451if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008452 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008453else
8454 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008455fi
8456
8457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8459$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008460
8461# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8463$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008464
8465# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008466if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008467 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008468else
8469 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008470fi
8471
8472
8473if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008474 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8475else
8476 LIBFFI_INCLUDEDIR=""
8477fi
8478
8479
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8481$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008482
Benjamin Peterson076ed002010-10-31 17:11:02 +00008483# Check for support for loadable sqlite extensions
8484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8485$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8486# Check whether --enable-loadable-sqlite-extensions was given.
8487if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8488 enableval=$enable_loadable_sqlite_extensions;
8489else
8490 enable_loadable_sqlite_extensions="no"
8491fi
8492
8493
8494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8495$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8496
Matthias Klose55708cc2009-04-30 08:06:49 +00008497# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8499$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008500
8501# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008502if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008503 withval=$with_dbmliborder;
8504if test x$with_dbmliborder = xyes
8505then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008506as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008507else
8508 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8509 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8510 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008511 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008512 fi
8513 done
8514fi
8515fi
8516
Matthias Kloseb9621712010-04-24 17:59:49 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8518$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008519
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008520# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008521
8522
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8524$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008527if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528 withval=$with_signal_module;
8529fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008530
8531
8532if test -z "$with_signal_module"
8533then with_signal_module="yes"
8534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8536$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008537
8538if test "${with_signal_module}" = "yes"; then
8539 USE_SIGNAL_MODULE=""
8540 SIGNAL_OBJS=""
8541else
8542 USE_SIGNAL_MODULE="#"
8543 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8544fi
8545
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008546# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008547
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008548USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550
Martin v. Löwis11437992002-04-12 09:54:03 +00008551
8552# Templates for things AC_DEFINEd more than once.
8553# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008554
8555
Martin v. Löwis11437992002-04-12 09:54:03 +00008556
Matthias Kloseb9621712010-04-24 17:59:49 +00008557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8558$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008561if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562 withval=$with_threads;
8563fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008564
8565
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008566# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008567
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008569if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570 withval=$with_thread; with_threads=$with_thread
8571fi
8572
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008573
8574if test -z "$with_threads"
8575then with_threads="yes"
8576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8578$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008579
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008580
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008581if test "$with_threads" = "no"
8582then
8583 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008584elif test "$ac_cv_pthread_is_default" = yes
8585then
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008587
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008588 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008590
8591 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008592 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008593elif test "$ac_cv_kpthread" = "yes"
8594then
8595 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008596 if test "$ac_cv_cxx_thread" = "yes"; then
8597 CXX="$CXX -Kpthread"
8598 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008600
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008601 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008602 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008603elif test "$ac_cv_kthread" = "yes"
8604then
8605 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008606 if test "$ac_cv_cxx_thread" = "yes"; then
8607 CXX="$CXX -Kthread"
8608 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008610
8611 posix_threads=yes
8612 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008613elif test "$ac_cv_pthread" = "yes"
8614then
8615 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008616 if test "$ac_cv_cxx_thread" = "yes"; then
8617 CXX="$CXX -pthread"
8618 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008620
8621 posix_threads=yes
8622 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008623else
8624 if test ! -z "$with_threads" -a -d "$with_threads"
8625 then LDFLAGS="$LDFLAGS -L$with_threads"
8626 fi
8627 if test ! -z "$withval" -a -d "$withval"
8628 then LDFLAGS="$LDFLAGS -L$withval"
8629 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008630
8631 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008632 # define _POSIX_THREADS in unistd.h. Some apparently don't
8633 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8635$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008637/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008638
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008639#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008640#ifdef _POSIX_THREADS
8641yes
8642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008643
8644_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008646 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008647 unistd_defines_pthreads=yes
8648else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008649 unistd_defines_pthreads=no
8650fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008651rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008652
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8654$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008655
Matthias Kloseb9621712010-04-24 17:59:49 +00008656 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008657
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008658 # Just looking for pthread_create in libpthread is not enough:
8659 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8660 # So we really have to include pthread.h, and then link.
8661 _libs=$LIBS
8662 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8664$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008666/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008667#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008668
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008669void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008670int
8671main ()
8672{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008673
8674pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ;
8676 return 0;
8677}
8678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008680
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8682$as_echo "yes" >&6; }
8683 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008684
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008685 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008686 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008687else
Martin v. Löwis11437992002-04-12 09:54:03 +00008688
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008689 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008690 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02008691if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008693
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008694 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008695 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008696else
Guido van Rossumad678af1998-10-02 14:42:15 +00008697
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8699$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008700if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008701 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008702else
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008704LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008708/* Override any GCC internal prototype to avoid an error.
8709 Use char because int might match the return type of a GCC
8710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008711#ifdef __cplusplus
8712extern "C"
8713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008714char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008715int
8716main ()
8717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008718return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 ;
8720 return 0;
8721}
8722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008723if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008725else
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728rm -f core conftest.err conftest.$ac_objext \
8729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008730LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8733$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008734if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008735 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008736
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008737 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008738 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008739 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008740else
Greg Steinadf63d62000-07-05 10:38:09 +00008741
Matthias Kloseb9621712010-04-24 17:59:49 +00008742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8743$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008744if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008745 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008746else
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008748LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752/* Override any GCC internal prototype to avoid an error.
8753 Use char because int might match the return type of a GCC
8754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008755#ifdef __cplusplus
8756extern "C"
8757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008758char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008759int
8760main ()
8761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008763 ;
8764 return 0;
8765}
8766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008769else
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008772rm -f core conftest.err conftest.$ac_objext \
8773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008774LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8777$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008778if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008779 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008780
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008781 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008782 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008783 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008784else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008785
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8787$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008788if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008790else
Martin v. Löwis11437992002-04-12 09:54:03 +00008791 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008792LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008796/* Override any GCC internal prototype to avoid an error.
8797 Use char because int might match the return type of a GCC
8798 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008799#ifdef __cplusplus
8800extern "C"
8801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008802char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008803int
8804main ()
8805{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 ;
8808 return 0;
8809}
8810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008811if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008813else
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008816rm -f core conftest.err conftest.$ac_objext \
8817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008818LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8821$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008822if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008824
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008825 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008826 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008827 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008828else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008829
Matthias Kloseb9621712010-04-24 17:59:49 +00008830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8831$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008832if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008834else
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008836LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008840/* Override any GCC internal prototype to avoid an error.
8841 Use char because int might match the return type of a GCC
8842 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008843#ifdef __cplusplus
8844extern "C"
8845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008846char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008847int
8848main ()
8849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008850return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ;
8852 return 0;
8853}
8854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008855if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008856 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008857else
Matthias Kloseb9621712010-04-24 17:59:49 +00008858 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008860rm -f core conftest.err conftest.$ac_objext \
8861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008862LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8865$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008866if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008867 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008868
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008869 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008870 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008871 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008872else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008873
Martin v. Löwis130fb172001-07-19 11:00:41 +00008874 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008875fi
8876
Guido van Rossum627b2d71993-12-24 10:39:16 +00008877
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008878fi
8879
Guido van Rossum0be3e491997-05-22 20:33:33 +00008880fi
8881
Guido van Rossum49545951997-12-02 19:28:29 +00008882fi
8883
Guido van Rossumb93a8621998-05-07 13:27:32 +00008884fi
8885
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008887rm -f core conftest.err conftest.$ac_objext \
8888 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008889
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8891$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008892if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008894else
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008896LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900/* Override any GCC internal prototype to avoid an error.
8901 Use char because int might match the return type of a GCC
8902 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008903#ifdef __cplusplus
8904extern "C"
8905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008906char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008907int
8908main ()
8909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008910return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 ;
8912 return 0;
8913}
8914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008915if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008917else
Matthias Kloseb9621712010-04-24 17:59:49 +00008918 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920rm -f core conftest.err conftest.$ac_objext \
8921 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008922LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8925$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008926if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008928
Martin v. Löwis130fb172001-07-19 11:00:41 +00008929 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008930 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008931 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008932fi
8933
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008934
Neal Norwitza978ab02002-11-02 16:58:05 +00008935 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8937$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008938if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008940else
Martin v. Löwis11437992002-04-12 09:54:03 +00008941 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008942LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008946/* Override any GCC internal prototype to avoid an error.
8947 Use char because int might match the return type of a GCC
8948 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008949#ifdef __cplusplus
8950extern "C"
8951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008952char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008953int
8954main ()
8955{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008956return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008957 ;
8958 return 0;
8959}
8960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008961if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008963else
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008966rm -f core conftest.err conftest.$ac_objext \
8967 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008968LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8971$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008972if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008974
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008975 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008976 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008977 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008978fi
8979
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008980 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008981fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008982
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008983if test "$posix_threads" = "yes"; then
8984 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008985
Matthias Kloseb9621712010-04-24 17:59:49 +00008986$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008987
8988 fi
8989
8990 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8991 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008992 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008993$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008994
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008995 ;;
8996 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008997$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008998
8999 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009000 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009001$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009002
9003 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009004 esac
9005
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9007$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009008 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009010else
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009012 ac_cv_pthread_system_supported=no
9013else
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009015/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009016#include <pthread.h>
9017 void *foo(void *parm) {
9018 return NULL;
9019 }
9020 main() {
9021 pthread_attr_t attr;
9022 pthread_t id;
9023 if (pthread_attr_init(&attr)) exit(-1);
9024 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9025 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9026 exit(0);
9027 }
9028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009029if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009030 ac_cv_pthread_system_supported=yes
9031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9035 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009036fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038
Guido van Rossum627b2d71993-12-24 10:39:16 +00009039fi
9040
Matthias Kloseb9621712010-04-24 17:59:49 +00009041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9042$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009043 if test "$ac_cv_pthread_system_supported" = "yes"; then
9044
Matthias Kloseb9621712010-04-24 17:59:49 +00009045$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009046
9047 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 for ac_func in pthread_sigmask
9049do :
9050 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009051if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009052 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009053#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009054_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009055 case $ac_sys_system in
9056 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009057
Matthias Kloseb9621712010-04-24 17:59:49 +00009058$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009059
9060 ;;
9061 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009062fi
9063done
9064
9065fi
9066
9067
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009069
Matthias Kloseb9621712010-04-24 17:59:49 +00009070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9071$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009072# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009073if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009074 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009075 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9077$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078 ipv6=no
9079 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9081$as_echo "yes" >&6; }
9082 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009083
9084 ipv6=yes
9085 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087else
Martin v. Löwis11437992002-04-12 09:54:03 +00009088
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009090
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9092$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009093 ipv6=no
9094
9095else
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009097/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009098 /* AF_INET6 available check */
9099#include <sys/types.h>
9100#include <sys/socket.h>
9101main()
9102{
9103 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9104 exit(1);
9105 else
9106 exit(0);
9107}
9108
Martin v. Löwis11437992002-04-12 09:54:03 +00009109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009110if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009111
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9113$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009114 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009115
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009116else
Matthias Kloseb159a552010-04-25 21:00:44 +00009117
Matthias Kloseb9621712010-04-24 17:59:49 +00009118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9119$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009120 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009121
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9124 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009125fi
9126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009128if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9130$as_echo_n "checking if RFC2553 API is available... " >&6; }
9131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009132/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009133
9134 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009135#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009136int
9137main ()
9138{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009139struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009140 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009141 ;
9142 return 0;
9143}
Matthias Kloseb159a552010-04-25 21:00:44 +00009144
Martin v. Löwis11437992002-04-12 09:54:03 +00009145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009146if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009147
9148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009149$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009150 ipv6=yes
9151
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009152else
Matthias Kloseb159a552010-04-25 21:00:44 +00009153
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009155$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009156 ipv6=no
9157
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009160fi
9161
9162if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009163 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009164
9165fi
9166
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009167fi
9168
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009169
9170ipv6type=unknown
9171ipv6lib=none
9172ipv6trylibc=no
9173
9174if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9176$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009177 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9178 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009179 case $i in
9180 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009182/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009183
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009184#include <netinet/in.h>
9185#ifdef IPV6_INRIA_VERSION
9186yes
9187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009188_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009189if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009190 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009191 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009192fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009193rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009194
9195 ;;
9196 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009198/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009199
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009200#include <netinet/in.h>
9201#ifdef __KAME__
9202yes
9203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009204_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009206 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009207 ipv6type=$i;
9208 ipv6lib=inet6
9209 ipv6libdir=/usr/local/v6/lib
9210 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009211fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009212rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009213
9214 ;;
9215 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009217/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009218
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009219#include <features.h>
9220#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9221yes
9222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009223_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009225 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009226 ipv6type=$i;
9227 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009228fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009229rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009230
9231 ;;
9232 linux-inet6)
9233 if test -d /usr/inet6; then
9234 ipv6type=$i
9235 ipv6lib=inet6
9236 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009237 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009238 fi
9239 ;;
9240 solaris)
9241 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009242 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009243 ipv6type=$i
9244 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009245 fi
9246 fi
9247 ;;
9248 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009250/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009251
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009252#include <sys/param.h>
9253#ifdef _TOSHIBA_INET6
9254yes
9255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009256_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009258 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009259 ipv6type=$i;
9260 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009261 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009262fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009263rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009264
9265 ;;
9266 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009268/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009269
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009270#include </usr/local/v6/include/sys/v6config.h>
9271#ifdef __V6D__
9272yes
9273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009274_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009275if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009276 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009277 ipv6type=$i;
9278 ipv6lib=v6;
9279 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009280 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009281fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009282rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009283
9284 ;;
9285 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009287/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009288
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009289#include <sys/param.h>
9290#ifdef _ZETA_MINAMI_INET6
9291yes
9292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009293_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009295 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009296 ipv6type=$i;
9297 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009298 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009299fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009300rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009301
9302 ;;
9303 esac
9304 if test "$ipv6type" != "unknown"; then
9305 break
9306 fi
9307 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9309$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009310fi
9311
9312if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9313 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9314 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9315 echo "using lib$ipv6lib"
9316 else
9317 if test $ipv6trylibc = "yes"; then
9318 echo "using libc"
9319 else
9320 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9321 echo "You need to fetch lib$ipv6lib.a from appropriate"
9322 echo 'ipv6 kit and compile beforehand.'
9323 exit 1
9324 fi
9325 fi
9326fi
9327
Matthias Kloseb9621712010-04-24 17:59:49 +00009328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9329$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009331/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009332
9333 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009334int
9335main ()
9336{
9337FSIORefNum fRef = 0
9338 ;
9339 return 0;
9340}
Matthias Kloseb159a552010-04-25 21:00:44 +00009341
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009343if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009344
Matthias Kloseb159a552010-04-25 21:00:44 +00009345
Matthias Kloseb9621712010-04-24 17:59:49 +00009346$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009347
Matthias Kloseb9621712010-04-24 17:59:49 +00009348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9349$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009350
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009351else
Matthias Kloseb159a552010-04-25 21:00:44 +00009352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9354$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009355
9356fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9358
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009359# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9361$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009363# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009364if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009365 withval=$with_doc_strings;
9366fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009367
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009368
9369if test -z "$with_doc_strings"
9370then with_doc_strings="yes"
9371fi
9372if test "$with_doc_strings" != "no"
9373then
9374
Matthias Kloseb9621712010-04-24 17:59:49 +00009375$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009376
9377fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9379$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009380
Antoine Pitrou042b1282010-08-13 21:15:58 +00009381# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9383$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009385# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009386if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009387 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009388if test "$withval" != no
9389then
9390
Matthias Kloseb9621712010-04-24 17:59:49 +00009391$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009392
Matthias Kloseb9621712010-04-24 17:59:49 +00009393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9394$as_echo "yes" >&6; }
9395else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9396$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009397fi
9398else
Matthias Kloseb9621712010-04-24 17:59:49 +00009399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9400$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009401fi
9402
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009403
9404# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9406$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009407
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009409if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410 withval=$with_pymalloc;
9411fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009412
Neil Schemenauera35c6882001-02-27 04:45:05 +00009413
Neil Schemenauer16c22972002-03-22 15:34:49 +00009414if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009415then
9416 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009417 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009418fi
9419if test "$with_pymalloc" != "no"
9420then
Martin v. Löwis11437992002-04-12 09:54:03 +00009421
Matthias Kloseb9621712010-04-24 17:59:49 +00009422$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009423
9424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9426$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009427
Benjamin Peterson05159c42009-12-03 03:01:27 +00009428# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9430$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009431
9432# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009433if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009434 withval=$with_valgrind;
9435else
9436 with_valgrind=no
9437fi
9438
Matthias Kloseb9621712010-04-24 17:59:49 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9440$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009441if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 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 +02009443if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009444
Matthias Kloseb9621712010-04-24 17:59:49 +00009445$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009446
9447else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009448 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009449
9450fi
9451
9452
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009453 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009454fi
9455
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009456# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009457
Guido van Rossum98935bf2001-09-05 19:13:16 +00009458DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009459
Guido van Rossume97ee181999-12-20 21:27:22 +00009460# the dlopen() function means we might want to use dynload_shlib.o. some
9461# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009462for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009463do :
9464 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +02009465if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009466 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009467#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009468_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009469
Guido van Rossume97ee181999-12-20 21:27:22 +00009470fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009471done
Guido van Rossume97ee181999-12-20 21:27:22 +00009472
Michael W. Hudson54241132001-12-07 15:38:26 +00009473
Guido van Rossume97ee181999-12-20 21:27:22 +00009474# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9475# loading of modules.
9476
Matthias Kloseb9621712010-04-24 17:59:49 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9478$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009479if test -z "$DYNLOADFILE"
9480then
9481 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009482 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9483 if test "$ac_cv_func_dlopen" = yes
9484 then DYNLOADFILE="dynload_shlib.o"
9485 else DYNLOADFILE="dynload_aix.o"
9486 fi
9487 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009488 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009489 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9490 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009491 *)
9492 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9493 # out any dynamic loading
9494 if test "$ac_cv_func_dlopen" = yes
9495 then DYNLOADFILE="dynload_shlib.o"
9496 else DYNLOADFILE="dynload_stub.o"
9497 fi
9498 ;;
9499 esac
9500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9502$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009503if test "$DYNLOADFILE" != "dynload_stub.o"
9504then
Martin v. Löwis11437992002-04-12 09:54:03 +00009505
Matthias Kloseb9621712010-04-24 17:59:49 +00009506$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009507
9508fi
9509
Neil Schemenauer4e425612001-06-19 15:44:15 +00009510# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9511
Michael W. Hudson54241132001-12-07 15:38:26 +00009512
Matthias Kloseb9621712010-04-24 17:59:49 +00009513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9514$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009515if test -z "$MACHDEP_OBJS"
9516then
Jack Jansene578a632001-08-15 01:27:14 +00009517 MACHDEP_OBJS=$extra_machdep_objs
9518else
9519 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9522$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009523
Guido van Rossum627b2d71993-12-24 10:39:16 +00009524# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009525for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -08009526 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009527 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009528 futimens futimes gai_strerror \
9529 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009530 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009531 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +01009532 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
9533 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009534 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009535 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009536 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009537 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009538 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009539 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009540 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9541 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009542 sigaction sigaltstack siginterrupt sigpending sigrelse \
9543 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009544 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009545 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9546 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009547do :
9548 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9549ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009550if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009551 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009552#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009553_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009554
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009555fi
9556done
9557
Michael W. Hudson54241132001-12-07 15:38:26 +00009558
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009559ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9560 #include <dirent.h>
9561"
9562if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9563
9564$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9565
9566fi
9567
9568
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009569# For some functions, having a definition is not sufficient, since
9570# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9572$as_echo_n "checking for chroot... " >&6; }
9573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009574/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009575#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009576int
9577main ()
9578{
9579void *x=chroot
9580 ;
9581 return 0;
9582}
9583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009584if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009585
Matthias Kloseb9621712010-04-24 17:59:49 +00009586$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009587
Matthias Kloseb159a552010-04-25 21:00:44 +00009588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009589$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009590else
Matthias Kloseb9621712010-04-24 17:59:49 +00009591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9592$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009593
9594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9597$as_echo_n "checking for link... " >&6; }
9598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009599/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009600#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009601int
9602main ()
9603{
9604void *x=link
9605 ;
9606 return 0;
9607}
9608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009609if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009610
Matthias Kloseb9621712010-04-24 17:59:49 +00009611$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009612
Matthias Kloseb159a552010-04-25 21:00:44 +00009613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009614$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009615else
Matthias Kloseb9621712010-04-24 17:59:49 +00009616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9617$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009618
9619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9622$as_echo_n "checking for symlink... " >&6; }
9623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009624/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009625#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009626int
9627main ()
9628{
9629void *x=symlink
9630 ;
9631 return 0;
9632}
9633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009635
Matthias Kloseb9621712010-04-24 17:59:49 +00009636$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009637
Matthias Kloseb159a552010-04-25 21:00:44 +00009638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009639$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009640else
Matthias Kloseb9621712010-04-24 17:59:49 +00009641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9642$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009643
9644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9647$as_echo_n "checking for fchdir... " >&6; }
9648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009649/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009650#include <unistd.h>
9651int
9652main ()
9653{
9654void *x=fchdir
9655 ;
9656 return 0;
9657}
9658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009659if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009660
Matthias Kloseb9621712010-04-24 17:59:49 +00009661$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009662
Matthias Kloseb159a552010-04-25 21:00:44 +00009663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009664$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009665else
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9667$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009668
9669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9672$as_echo_n "checking for fsync... " >&6; }
9673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009674/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009675#include <unistd.h>
9676int
9677main ()
9678{
9679void *x=fsync
9680 ;
9681 return 0;
9682}
9683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009685
Matthias Kloseb9621712010-04-24 17:59:49 +00009686$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009687
Matthias Kloseb159a552010-04-25 21:00:44 +00009688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009689$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009690else
Matthias Kloseb9621712010-04-24 17:59:49 +00009691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9692$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009693
9694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9697$as_echo_n "checking for fdatasync... " >&6; }
9698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009699/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009700#include <unistd.h>
9701int
9702main ()
9703{
9704void *x=fdatasync
9705 ;
9706 return 0;
9707}
9708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009709if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009710
Matthias Kloseb9621712010-04-24 17:59:49 +00009711$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009712
Matthias Kloseb159a552010-04-25 21:00:44 +00009713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009714$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009715else
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9717$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009718
9719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9722$as_echo_n "checking for epoll... " >&6; }
9723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009724/* end confdefs.h. */
9725#include <sys/epoll.h>
9726int
9727main ()
9728{
9729void *x=epoll_create
9730 ;
9731 return 0;
9732}
9733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009734if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009735
Matthias Kloseb9621712010-04-24 17:59:49 +00009736$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009737
Matthias Kloseb159a552010-04-25 21:00:44 +00009738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009739$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009740else
Matthias Kloseb9621712010-04-24 17:59:49 +00009741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9742$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009743
9744fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -06009746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
9747$as_echo_n "checking for epoll_create1... " >&6; }
9748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9749/* end confdefs.h. */
9750#include <sys/epoll.h>
9751int
9752main ()
9753{
9754void *x=epoll_create1
9755 ;
9756 return 0;
9757}
9758_ACEOF
9759if ac_fn_c_try_compile "$LINENO"; then :
9760
9761$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
9762
9763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9764$as_echo "yes" >&6; }
9765else
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9767$as_echo "no" >&6; }
9768
9769fi
9770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9772$as_echo_n "checking for kqueue... " >&6; }
9773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009774/* end confdefs.h. */
9775
9776#include <sys/types.h>
9777#include <sys/event.h>
9778
9779int
9780main ()
9781{
9782int x=kqueue()
9783 ;
9784 return 0;
9785}
9786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009787if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009788
Matthias Kloseb9621712010-04-24 17:59:49 +00009789$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009790
Matthias Kloseb159a552010-04-25 21:00:44 +00009791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009792$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009793else
Matthias Kloseb9621712010-04-24 17:59:49 +00009794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9795$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009796
9797fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009799# On some systems (eg. FreeBSD 5), we would find a definition of the
9800# functions ctermid_r, setgroups in the library, but no prototype
9801# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9802# address to avoid compiler warnings and potential miscompilations
9803# because of the missing prototypes.
9804
Matthias Kloseb9621712010-04-24 17:59:49 +00009805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9806$as_echo_n "checking for ctermid_r... " >&6; }
9807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009808/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009809
Martin v. Löwisd5843682002-11-21 20:41:28 +00009810#include <stdio.h>
9811
Martin v. Löwisd5843682002-11-21 20:41:28 +00009812int
9813main ()
9814{
9815void* p = ctermid_r
9816 ;
9817 return 0;
9818}
9819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009820if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009821
Matthias Kloseb9621712010-04-24 17:59:49 +00009822$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009823
Matthias Kloseb159a552010-04-25 21:00:44 +00009824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009825$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009826else
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9828$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009829
9830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9832
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9834$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009835if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009836 $as_echo_n "(cached) " >&6
9837else
9838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009839/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009840#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009841int
9842main ()
9843{
9844void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009845
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009846 ;
9847 return 0;
9848}
9849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009850if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009851 ac_cv_flock_decl=yes
9852else
9853 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009854
9855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009857
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009858fi
9859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9860$as_echo "$ac_cv_flock_decl" >&6; }
9861if test "x${ac_cv_flock_decl}" = xyes; then
9862 for ac_func in flock
9863do :
9864 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +02009865if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009866 cat >>confdefs.h <<_ACEOF
9867#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009868_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009869
Antoine Pitroua3000072010-09-07 14:52:42 +00009870else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009872$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009873if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009874 $as_echo_n "(cached) " >&6
9875else
9876 ac_check_lib_save_LIBS=$LIBS
9877LIBS="-lbsd $LIBS"
9878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9879/* end confdefs.h. */
9880
9881/* Override any GCC internal prototype to avoid an error.
9882 Use char because int might match the return type of a GCC
9883 builtin and then its argument prototype would still apply. */
9884#ifdef __cplusplus
9885extern "C"
9886#endif
9887char flock ();
9888int
9889main ()
9890{
9891return flock ();
9892 ;
9893 return 0;
9894}
9895_ACEOF
9896if ac_fn_c_try_link "$LINENO"; then :
9897 ac_cv_lib_bsd_flock=yes
9898else
9899 ac_cv_lib_bsd_flock=no
9900fi
9901rm -f core conftest.err conftest.$ac_objext \
9902 conftest$ac_exeext conftest.$ac_ext
9903LIBS=$ac_check_lib_save_LIBS
9904fi
9905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9906$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009907if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009908 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009909
9910
9911$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9912
9913
9914fi
9915
9916
9917fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009918done
9919
Antoine Pitroua3000072010-09-07 14:52:42 +00009920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009921
Matthias Kloseb9621712010-04-24 17:59:49 +00009922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9923$as_echo_n "checking for getpagesize... " >&6; }
9924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009925/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009926
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009927#include <unistd.h>
9928
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009929int
9930main ()
9931{
9932void* p = getpagesize
9933 ;
9934 return 0;
9935}
9936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009937if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009938
Matthias Kloseb9621712010-04-24 17:59:49 +00009939$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009940
Matthias Kloseb159a552010-04-25 21:00:44 +00009941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009942$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009943else
Matthias Kloseb9621712010-04-24 17:59:49 +00009944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9945$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009946
9947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009949
Victor Stinner984890f2011-11-24 13:53:38 +01009950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9951$as_echo_n "checking for broken unsetenv... " >&6; }
9952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9953/* end confdefs.h. */
9954
9955#include <stdlib.h>
9956
9957int
9958main ()
9959{
9960int res = unsetenv("DUMMY")
9961 ;
9962 return 0;
9963}
9964_ACEOF
9965if ac_fn_c_try_compile "$LINENO"; then :
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9967$as_echo "no" >&6; }
9968else
9969
9970$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9971
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9973$as_echo "yes" >&6; }
9974
9975fi
9976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9977
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009978for ac_prog in true
9979do
9980 # Extract the first word of "$ac_prog", so it can be a program name with args.
9981set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9983$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009984if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009985 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009986else
9987 if test -n "$TRUE"; then
9988 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9989else
9990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9991for as_dir in $PATH
9992do
9993 IFS=$as_save_IFS
9994 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009995 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996 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 +00009997 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 $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 +00009999 break 2
10000 fi
10001done
Matthias Kloseb9621712010-04-24 17:59:49 +000010002 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010003IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010004
10005fi
10006fi
10007TRUE=$ac_cv_prog_TRUE
10008if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10010$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010011else
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010014fi
10015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010017 test -n "$TRUE" && break
10018done
10019test -n "$TRUE" || TRUE="/bin/true"
10020
10021
Matthias Kloseb9621712010-04-24 17:59:49 +000010022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10023$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010024if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010025 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010026else
10027 ac_check_lib_save_LIBS=$LIBS
10028LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010030/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032/* Override any GCC internal prototype to avoid an error.
10033 Use char because int might match the return type of a GCC
10034 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010035#ifdef __cplusplus
10036extern "C"
10037#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010038char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010039int
10040main ()
10041{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010043 ;
10044 return 0;
10045}
10046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010047if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010048 ac_cv_lib_c_inet_aton=yes
10049else
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010052rm -f core conftest.err conftest.$ac_objext \
10053 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010054LIBS=$ac_check_lib_save_LIBS
10055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10057$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010058if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010059 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010060else
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10062$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010063if ${ac_cv_lib_resolv_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="-lresolv $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_resolv_inet_aton=yes
10088else
Matthias Kloseb9621712010-04-24 17:59:49 +000010089 ac_cv_lib_resolv_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_resolv_inet_aton" >&5
10096$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010097if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010098 cat >>confdefs.h <<_ACEOF
10099#define HAVE_LIBRESOLV 1
10100_ACEOF
10101
10102 LIBS="-lresolv $LIBS"
10103
10104fi
10105
10106
10107fi
10108
10109
Christian Heimesd0764e22007-12-04 15:00:33 +000010110# On Tru64, chflags seems to be present, but calling it will
10111# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10113$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010114if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010116else
Matthias Kloseb9621712010-04-24 17:59:49 +000010117 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010118 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010119else
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010121/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010122
Christian Heimesd0764e22007-12-04 15:00:33 +000010123#include <sys/stat.h>
10124#include <unistd.h>
10125int main(int argc, char*argv[])
10126{
10127 if(chflags(argv[0], 0) != 0)
10128 return 1;
10129 return 0;
10130}
Ned Deily3eb67d52011-06-28 00:00:28 -070010131
Christian Heimesd0764e22007-12-04 15:00:33 +000010132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010133if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010134 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010135else
Matthias Kloseb9621712010-04-24 17:59:49 +000010136 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10139 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010140fi
10141
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010142
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10145$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010146if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010148if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010149 ac_cv_have_chflags="yes"
10150else
10151 ac_cv_have_chflags="no"
10152fi
10153
10154fi
10155if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010156
Matthias Kloseb9621712010-04-24 17:59:49 +000010157$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010158
10159fi
10160
Matthias Kloseb9621712010-04-24 17:59:49 +000010161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10162$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010163if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010165else
Matthias Kloseb9621712010-04-24 17:59:49 +000010166 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010167 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010168else
Matthias Kloseb9621712010-04-24 17:59:49 +000010169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010170/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010171
Christian Heimesd0764e22007-12-04 15:00:33 +000010172#include <sys/stat.h>
10173#include <unistd.h>
10174int main(int argc, char*argv[])
10175{
10176 if(lchflags(argv[0], 0) != 0)
10177 return 1;
10178 return 0;
10179}
Ned Deily3eb67d52011-06-28 00:00:28 -070010180
Christian Heimesd0764e22007-12-04 15:00:33 +000010181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010182if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010183 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010184else
Matthias Kloseb9621712010-04-24 17:59:49 +000010185 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010189fi
10190
10191
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10194$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010195if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010197if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010198 ac_cv_have_lchflags="yes"
10199else
10200 ac_cv_have_lchflags="no"
10201fi
10202
10203fi
10204if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010205
Matthias Kloseb9621712010-04-24 17:59:49 +000010206$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010207
10208fi
10209
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010210case $ac_sys_system/$ac_sys_release in
10211Darwin/*)
10212 _CUR_CFLAGS="${CFLAGS}"
10213 _CUR_LDFLAGS="${LDFLAGS}"
10214 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10215 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10216 ;;
10217esac
10218
Matthias Kloseb9621712010-04-24 17:59:49 +000010219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10220$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010221if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010223else
10224 ac_check_lib_save_LIBS=$LIBS
10225LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010227/* end confdefs.h. */
10228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229/* Override any GCC internal prototype to avoid an error.
10230 Use char because int might match the return type of a GCC
10231 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010232#ifdef __cplusplus
10233extern "C"
10234#endif
10235char inflateCopy ();
10236int
10237main ()
10238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010240 ;
10241 return 0;
10242}
10243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010244if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010245 ac_cv_lib_z_inflateCopy=yes
10246else
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010249rm -f core conftest.err conftest.$ac_objext \
10250 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010251LIBS=$ac_check_lib_save_LIBS
10252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10254$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010255if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010256
Matthias Kloseb9621712010-04-24 17:59:49 +000010257$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010258
10259fi
10260
10261
10262case $ac_sys_system/$ac_sys_release in
10263Darwin/*)
10264 CFLAGS="${_CUR_CFLAGS}"
10265 LDFLAGS="${_CUR_LDFLAGS}"
10266 ;;
10267esac
10268
Matthias Kloseb9621712010-04-24 17:59:49 +000010269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10270$as_echo_n "checking for hstrerror... " >&6; }
10271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010272/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010273
Martin v. Löwise9416172003-05-03 10:12:45 +000010274#include <netdb.h>
10275
Martin v. Löwise9416172003-05-03 10:12:45 +000010276int
10277main ()
10278{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010279void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010280 ;
10281 return 0;
10282}
10283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010284if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010285
Matthias Kloseb9621712010-04-24 17:59:49 +000010286$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010287
Matthias Kloseb159a552010-04-25 21:00:44 +000010288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010289$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010290else
Matthias Kloseb9621712010-04-24 17:59:49 +000010291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10292$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010293
10294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010295rm -f core conftest.err conftest.$ac_objext \
10296 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297
Matthias Kloseb9621712010-04-24 17:59:49 +000010298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10299$as_echo_n "checking for inet_aton... " >&6; }
10300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010301/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010302
Martin v. Löwis86d66262006-02-17 08:40:11 +000010303#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010304#include <sys/socket.h>
10305#include <netinet/in.h>
10306#include <arpa/inet.h>
10307
Martin v. Löwise9416172003-05-03 10:12:45 +000010308int
10309main ()
10310{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010311void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010312 ;
10313 return 0;
10314}
10315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010316if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010317
Matthias Kloseb9621712010-04-24 17:59:49 +000010318$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010319
Matthias Kloseb159a552010-04-25 21:00:44 +000010320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010321$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010322else
Matthias Kloseb9621712010-04-24 17:59:49 +000010323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010325
10326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010327rm -f core conftest.err conftest.$ac_objext \
10328 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329
Matthias Kloseb9621712010-04-24 17:59:49 +000010330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10331$as_echo_n "checking for inet_pton... " >&6; }
10332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010333/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010334
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010335#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010336#include <sys/socket.h>
10337#include <netinet/in.h>
10338#include <arpa/inet.h>
10339
Martin v. Löwise9416172003-05-03 10:12:45 +000010340int
10341main ()
10342{
10343void* p = inet_pton
10344 ;
10345 return 0;
10346}
10347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010348if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010351
Matthias Kloseb159a552010-04-25 21:00:44 +000010352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010353$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010354else
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10356$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010357
10358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010360
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010361# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10363$as_echo_n "checking for setgroups... " >&6; }
10364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010365/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010366
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010367#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010368#ifdef HAVE_GRP_H
10369#include <grp.h>
10370#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010371
Martin v. Löwisd5843682002-11-21 20:41:28 +000010372int
10373main ()
10374{
10375void* p = setgroups
10376 ;
10377 return 0;
10378}
10379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010381
Matthias Kloseb9621712010-04-24 17:59:49 +000010382$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010383
Matthias Kloseb159a552010-04-25 21:00:44 +000010384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010385$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010386else
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10388$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010389
10390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010392
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010393# check for openpty and forkpty
10394
10395for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010396do :
10397 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010398if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010399 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010400#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010401_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010402
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010403else
Matthias Kloseb9621712010-04-24 17:59:49 +000010404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10405$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010406if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010407 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010408else
Martin v. Löwis11437992002-04-12 09:54:03 +000010409 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010410LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010414/* Override any GCC internal prototype to avoid an error.
10415 Use char because int might match the return type of a GCC
10416 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010417#ifdef __cplusplus
10418extern "C"
10419#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010420char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010421int
10422main ()
10423{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010424return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 ;
10426 return 0;
10427}
10428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010429if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010430 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010431else
Matthias Kloseb9621712010-04-24 17:59:49 +000010432 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010434rm -f core conftest.err conftest.$ac_objext \
10435 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010436LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010437fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10439$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010440if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010442 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010443else
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10445$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010446if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010448else
10449 ac_check_lib_save_LIBS=$LIBS
10450LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010452/* end confdefs.h. */
10453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010454/* Override any GCC internal prototype to avoid an error.
10455 Use char because int might match the return type of a GCC
10456 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010457#ifdef __cplusplus
10458extern "C"
10459#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010460char openpty ();
10461int
10462main ()
10463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010464return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010465 ;
10466 return 0;
10467}
10468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010470 ac_cv_lib_bsd_openpty=yes
10471else
Matthias Kloseb9621712010-04-24 17:59:49 +000010472 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010474rm -f core conftest.err conftest.$ac_objext \
10475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010476LIBS=$ac_check_lib_save_LIBS
10477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10479$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010480if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010482 LIBS="$LIBS -lbsd"
10483fi
10484
10485
10486fi
10487
Fred Drake8cef4cf2000-06-28 16:40:38 +000010488
10489fi
10490done
10491
10492for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010493do :
10494 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010495if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010497#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010498_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010499
Fred Drake8cef4cf2000-06-28 16:40:38 +000010500else
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10502$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010503if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010505else
Martin v. Löwis11437992002-04-12 09:54:03 +000010506 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010507LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010511/* Override any GCC internal prototype to avoid an error.
10512 Use char because int might match the return type of a GCC
10513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010514#ifdef __cplusplus
10515extern "C"
10516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010517char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010518int
10519main ()
10520{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010521return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010522 ;
10523 return 0;
10524}
10525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010526if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010527 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010528else
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010531rm -f core conftest.err conftest.$ac_objext \
10532 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010533LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10536$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010537if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010538 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010539 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010540else
Matthias Kloseb9621712010-04-24 17:59:49 +000010541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10542$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010543if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010544 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010545else
10546 ac_check_lib_save_LIBS=$LIBS
10547LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010549/* end confdefs.h. */
10550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010551/* Override any GCC internal prototype to avoid an error.
10552 Use char because int might match the return type of a GCC
10553 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010554#ifdef __cplusplus
10555extern "C"
10556#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010557char forkpty ();
10558int
10559main ()
10560{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010561return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010562 ;
10563 return 0;
10564}
10565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010566if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010567 ac_cv_lib_bsd_forkpty=yes
10568else
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010571rm -f core conftest.err conftest.$ac_objext \
10572 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010573LIBS=$ac_check_lib_save_LIBS
10574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10576$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010577if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010579 LIBS="$LIBS -lbsd"
10580fi
10581
10582
10583fi
10584
Fred Drake8cef4cf2000-06-28 16:40:38 +000010585
10586fi
10587done
10588
Jack Jansendd19cf82001-12-06 22:36:17 +000010589
Christian Heimesb186d002008-03-18 15:15:01 +000010590# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010591for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010592do :
10593 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020010594if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010595 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010596#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010597_ACEOF
10598
10599fi
10600done
10601
10602
Michael W. Hudson54241132001-12-07 15:38:26 +000010603# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010604for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010605do :
10606 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10607ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010608if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010609 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010610#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010611_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010612
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010613fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010614done
10615
Michael W. Hudson54241132001-12-07 15:38:26 +000010616
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010617ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020010618if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010619 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010620
Martin v. Löwis1142de32002-03-29 16:28:31 +000010621else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010623 *" dup2.$ac_objext "* ) ;;
10624 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010625 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010626esac
10627
Martin v. Löwis1142de32002-03-29 16:28:31 +000010628fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010629
10630ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020010631if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010632 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10633
10634else
10635 case " $LIBOBJS " in
10636 *" getcwd.$ac_objext "* ) ;;
10637 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10638 ;;
10639esac
10640
10641fi
10642
10643ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020010644if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010645 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10646
10647else
10648 case " $LIBOBJS " in
10649 *" strdup.$ac_objext "* ) ;;
10650 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10651 ;;
10652esac
10653
10654fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010655
10656
10657for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010658do :
10659 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010660if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010662#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010666#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010667int
10668main ()
10669{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010670getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010671 ;
10672 return 0;
10673}
10674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010675if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010676
Matthias Kloseb9621712010-04-24 17:59:49 +000010677$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010678
Guido van Rossum627b2d71993-12-24 10:39:16 +000010679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010681
Guido van Rossum627b2d71993-12-24 10:39:16 +000010682fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010683done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010684
Jack Jansen150753c2003-03-29 22:07:47 +000010685for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010686do :
10687 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010688if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010689 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010690#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010693/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010694#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010695int
10696main ()
10697{
10698setpgrp(0,0);
10699 ;
10700 return 0;
10701}
10702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010704
Matthias Kloseb9621712010-04-24 17:59:49 +000010705$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010706
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010709
10710fi
10711done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010712
Thomas Wouters3a584202000-08-05 23:28:51 +000010713for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010714do :
10715 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020010716if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010718#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010721/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010722#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010723int
10724main ()
10725{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010726gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010727 ;
10728 return 0;
10729}
10730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010731if ac_fn_c_try_compile "$LINENO"; then :
10732
Guido van Rossum627b2d71993-12-24 10:39:16 +000010733else
Skip Montanaro6dead952003-09-25 14:50:04 +000010734
Matthias Kloseb9621712010-04-24 17:59:49 +000010735$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010736
Martin v. Löwis11437992002-04-12 09:54:03 +000010737
Guido van Rossum627b2d71993-12-24 10:39:16 +000010738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010740
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010741fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010742done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010743
Michael W. Hudson54241132001-12-07 15:38:26 +000010744
Victor Stinnere0be4232011-10-25 13:06:09 +020010745for ac_func in clock_gettime
10746do :
10747 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
10748if test "x$ac_cv_func_clock_gettime" = xyes; then :
10749 cat >>confdefs.h <<_ACEOF
10750#define HAVE_CLOCK_GETTIME 1
10751_ACEOF
10752
10753else
10754
10755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
10756$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
10757if ${ac_cv_lib_rt_clock_gettime+:} false; then :
10758 $as_echo_n "(cached) " >&6
10759else
10760 ac_check_lib_save_LIBS=$LIBS
10761LIBS="-lrt $LIBS"
10762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10763/* end confdefs.h. */
10764
10765/* Override any GCC internal prototype to avoid an error.
10766 Use char because int might match the return type of a GCC
10767 builtin and then its argument prototype would still apply. */
10768#ifdef __cplusplus
10769extern "C"
10770#endif
10771char clock_gettime ();
10772int
10773main ()
10774{
10775return clock_gettime ();
10776 ;
10777 return 0;
10778}
10779_ACEOF
10780if ac_fn_c_try_link "$LINENO"; then :
10781 ac_cv_lib_rt_clock_gettime=yes
10782else
10783 ac_cv_lib_rt_clock_gettime=no
10784fi
10785rm -f core conftest.err conftest.$ac_objext \
10786 conftest$ac_exeext conftest.$ac_ext
10787LIBS=$ac_check_lib_save_LIBS
10788fi
10789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
10790$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
10791if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
10792
10793 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
10794
10795
10796$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
10797
10798
10799fi
10800
10801
10802fi
10803done
10804
10805
10806for ac_func in clock_getres
10807do :
10808 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
10809if test "x$ac_cv_func_clock_getres" = xyes; then :
10810 cat >>confdefs.h <<_ACEOF
10811#define HAVE_CLOCK_GETRES 1
10812_ACEOF
10813
10814else
10815
10816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
10817$as_echo_n "checking for clock_getres in -lrt... " >&6; }
10818if ${ac_cv_lib_rt_clock_getres+:} false; then :
10819 $as_echo_n "(cached) " >&6
10820else
10821 ac_check_lib_save_LIBS=$LIBS
10822LIBS="-lrt $LIBS"
10823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10824/* end confdefs.h. */
10825
10826/* Override any GCC internal prototype to avoid an error.
10827 Use char because int might match the return type of a GCC
10828 builtin and then its argument prototype would still apply. */
10829#ifdef __cplusplus
10830extern "C"
10831#endif
10832char clock_getres ();
10833int
10834main ()
10835{
10836return clock_getres ();
10837 ;
10838 return 0;
10839}
10840_ACEOF
10841if ac_fn_c_try_link "$LINENO"; then :
10842 ac_cv_lib_rt_clock_getres=yes
10843else
10844 ac_cv_lib_rt_clock_getres=no
10845fi
10846rm -f core conftest.err conftest.$ac_objext \
10847 conftest$ac_exeext conftest.$ac_ext
10848LIBS=$ac_check_lib_save_LIBS
10849fi
10850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
10851$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
10852if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
10853
10854 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
10855
10856
10857fi
10858
10859
10860fi
10861done
10862
10863
Matthias Kloseb9621712010-04-24 17:59:49 +000010864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10865$as_echo_n "checking for major... " >&6; }
10866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010867/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010868
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010869#if defined(MAJOR_IN_MKDEV)
10870#include <sys/mkdev.h>
10871#elif defined(MAJOR_IN_SYSMACROS)
10872#include <sys/sysmacros.h>
10873#else
10874#include <sys/types.h>
10875#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010876
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010877int
10878main ()
10879{
10880
10881 makedev(major(0),minor(0));
10882
10883 ;
10884 return 0;
10885}
10886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010887if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010888
10889
Matthias Kloseb9621712010-04-24 17:59:49 +000010890$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10893$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010894
10895else
Skip Montanaro6dead952003-09-25 14:50:04 +000010896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10898$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010899
10900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010901rm -f core conftest.err conftest.$ac_objext \
10902 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010903
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010904# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010905# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10907$as_echo_n "checking for getaddrinfo... " >&6; }
10908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010909/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010910
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010911#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010912#include <sys/socket.h>
10913#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010914#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010915
Martin v. Löwis11437992002-04-12 09:54:03 +000010916int
10917main ()
10918{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010919getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010920 ;
10921 return 0;
10922}
10923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010924if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010925 have_getaddrinfo=yes
10926else
Matthias Kloseb9621712010-04-24 17:59:49 +000010927 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010929rm -f core conftest.err conftest.$ac_objext \
10930 conftest$ac_exeext conftest.$ac_ext
10931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10932$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010933if test $have_getaddrinfo = yes
10934then
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10936$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010937 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010938 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010939else
Matthias Kloseb9621712010-04-24 17:59:49 +000010940 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010010941
10942if test "${enable_ipv6+set}" = set; then
10943 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
10944else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010945 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010010946fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010947else
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010949/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010950
10951#include <sys/types.h>
10952#include <netdb.h>
10953#include <string.h>
10954#include <sys/socket.h>
10955#include <netinet/in.h>
10956
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010957int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010958{
10959 int passive, gaierr, inet4 = 0, inet6 = 0;
10960 struct addrinfo hints, *ai, *aitop;
10961 char straddr[INET6_ADDRSTRLEN], strport[16];
10962
10963 for (passive = 0; passive <= 1; passive++) {
10964 memset(&hints, 0, sizeof(hints));
10965 hints.ai_family = AF_UNSPEC;
10966 hints.ai_flags = passive ? AI_PASSIVE : 0;
10967 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010968 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010969 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10970 (void)gai_strerror(gaierr);
10971 goto bad;
10972 }
10973 for (ai = aitop; ai; ai = ai->ai_next) {
10974 if (ai->ai_addr == NULL ||
10975 ai->ai_addrlen == 0 ||
10976 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10977 straddr, sizeof(straddr), strport, sizeof(strport),
10978 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10979 goto bad;
10980 }
10981 switch (ai->ai_family) {
10982 case AF_INET:
10983 if (strcmp(strport, "54321") != 0) {
10984 goto bad;
10985 }
10986 if (passive) {
10987 if (strcmp(straddr, "0.0.0.0") != 0) {
10988 goto bad;
10989 }
10990 } else {
10991 if (strcmp(straddr, "127.0.0.1") != 0) {
10992 goto bad;
10993 }
10994 }
10995 inet4++;
10996 break;
10997 case AF_INET6:
10998 if (strcmp(strport, "54321") != 0) {
10999 goto bad;
11000 }
11001 if (passive) {
11002 if (strcmp(straddr, "::") != 0) {
11003 goto bad;
11004 }
11005 } else {
11006 if (strcmp(straddr, "::1") != 0) {
11007 goto bad;
11008 }
11009 }
11010 inet6++;
11011 break;
11012 case AF_UNSPEC:
11013 goto bad;
11014 break;
11015 default:
11016 /* another family support? */
11017 break;
11018 }
11019 }
11020 }
11021
11022 if (!(inet4 == 0 || inet4 == 2))
11023 goto bad;
11024 if (!(inet6 == 0 || inet6 == 2))
11025 goto bad;
11026
11027 if (aitop)
11028 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011029 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011030
11031 bad:
11032 if (aitop)
11033 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011034 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011035}
11036
Martin v. Löwis11437992002-04-12 09:54:03 +000011037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011038if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011039 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011040else
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11044 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011046
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011047fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011048
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011050
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11052$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11053
Mark Dickinson2df5d282009-12-31 21:22:50 +000011054if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011055then
11056 if test $ipv6 = yes
11057 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011058 echo 'Fatal: You must get working getaddrinfo() function.'
11059 echo ' or you can specify "--disable-ipv6"'.
11060 exit 1
11061 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011062else
Martin v. Löwis11437992002-04-12 09:54:03 +000011063
Matthias Kloseb9621712010-04-24 17:59:49 +000011064$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011065
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011066fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011067
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011068for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011069do :
11070 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011071if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011072 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011073#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011074_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011075
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011076fi
11077done
11078
Michael W. Hudson54241132001-12-07 15:38:26 +000011079
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011080# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11082$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011083if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011085else
Matthias Kloseb9621712010-04-24 17:59:49 +000011086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011087/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011088#include <sys/types.h>
11089#include <sys/time.h>
11090#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011091
Martin v. Löwis11437992002-04-12 09:54:03 +000011092int
11093main ()
11094{
11095if ((struct tm *) 0)
11096return 0;
11097 ;
11098 return 0;
11099}
11100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011101if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011102 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011103else
Matthias Kloseb9621712010-04-24 17:59:49 +000011104 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11109$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011110if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011111
Matthias Kloseb9621712010-04-24 17:59:49 +000011112$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011113
11114fi
11115
Matthias Kloseb9621712010-04-24 17:59:49 +000011116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11117$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011118if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011120else
Matthias Kloseb9621712010-04-24 17:59:49 +000011121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011122/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011123#include <sys/types.h>
11124#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
Martin v. Löwis11437992002-04-12 09:54:03 +000011126int
11127main ()
11128{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129struct tm tm;
11130 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011132 ;
11133 return 0;
11134}
11135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011136if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011137 ac_cv_struct_tm=time.h
11138else
Matthias Kloseb9621712010-04-24 17:59:49 +000011139 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11144$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011145if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011146
Matthias Kloseb9621712010-04-24 17:59:49 +000011147$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011148
11149fi
11150
Matthias Kloseb9621712010-04-24 17:59:49 +000011151ac_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 +000011152#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011153
Matthias Kloseb9621712010-04-24 17:59:49 +000011154"
Victor Stinnere0be4232011-10-25 13:06:09 +020011155if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011156
11157cat >>confdefs.h <<_ACEOF
11158#define HAVE_STRUCT_TM_TM_ZONE 1
11159_ACEOF
11160
11161
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011162fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011163
Martin v. Löwis11437992002-04-12 09:54:03 +000011164if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11165
Matthias Kloseb9621712010-04-24 17:59:49 +000011166$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011167
11168else
Matthias Kloseb9621712010-04-24 17:59:49 +000011169 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11170"
Victor Stinnere0be4232011-10-25 13:06:09 +020011171if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011172 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011173else
Matthias Kloseb9621712010-04-24 17:59:49 +000011174 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011175fi
11176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011177cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011178#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011179_ACEOF
11180
Matthias Kloseb9621712010-04-24 17:59:49 +000011181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11182$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011183if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011184 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011185else
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011187/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011188#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011189#if !HAVE_DECL_TZNAME
11190extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011192
Martin v. Löwis11437992002-04-12 09:54:03 +000011193int
11194main ()
11195{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011196return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 ;
11198 return 0;
11199}
11200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011201if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011202 ac_cv_var_tzname=yes
11203else
Matthias Kloseb9621712010-04-24 17:59:49 +000011204 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011206rm -f core conftest.err conftest.$ac_objext \
11207 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11210$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011211 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011212
Matthias Kloseb9621712010-04-24 17:59:49 +000011213$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011214
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011215 fi
11216fi
11217
Matthias Kloseb9621712010-04-24 17:59:49 +000011218ac_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 +020011219if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
11221cat >>confdefs.h <<_ACEOF
11222#define HAVE_STRUCT_STAT_ST_RDEV 1
11223_ACEOF
11224
11225
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011226fi
11227
Matthias Kloseb9621712010-04-24 17:59:49 +000011228ac_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 +020011229if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011230
Martin v. Löwis11437992002-04-12 09:54:03 +000011231cat >>confdefs.h <<_ACEOF
11232#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11233_ACEOF
11234
11235
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011236fi
11237
Matthias Kloseb9621712010-04-24 17:59:49 +000011238ac_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 +020011239if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011240
11241cat >>confdefs.h <<_ACEOF
11242#define HAVE_STRUCT_STAT_ST_FLAGS 1
11243_ACEOF
11244
11245
11246fi
11247
Matthias Kloseb9621712010-04-24 17:59:49 +000011248ac_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 +020011249if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011250
11251cat >>confdefs.h <<_ACEOF
11252#define HAVE_STRUCT_STAT_ST_GEN 1
11253_ACEOF
11254
11255
11256fi
11257
Matthias Kloseb9621712010-04-24 17:59:49 +000011258ac_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 +020011259if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011260
11261cat >>confdefs.h <<_ACEOF
11262#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11263_ACEOF
11264
11265
11266fi
11267
Matthias Kloseb9621712010-04-24 17:59:49 +000011268ac_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 +020011269if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011270
Martin v. Löwis11437992002-04-12 09:54:03 +000011271cat >>confdefs.h <<_ACEOF
11272#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11273_ACEOF
11274
11275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011277
11278else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011279 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011280 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011281 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11282 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011283esac
11284
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011285fi
11286
Michael W. Hudson54241132001-12-07 15:38:26 +000011287
Martin v. Löwis11437992002-04-12 09:54:03 +000011288
Matthias Kloseb9621712010-04-24 17:59:49 +000011289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11290$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011291if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011293else
Matthias Kloseb159a552010-04-25 21:00:44 +000011294
Matthias Kloseb9621712010-04-24 17:59:49 +000011295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011296/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011297#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011298int
11299main ()
11300{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011301return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 ;
11303 return 0;
11304}
11305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011306if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011307 ac_cv_header_time_altzone=yes
11308else
Matthias Kloseb9621712010-04-24 17:59:49 +000011309 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313fi
11314
Matthias Kloseb9621712010-04-24 17:59:49 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11316$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011317if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011318
Matthias Kloseb9621712010-04-24 17:59:49 +000011319$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011320
11321fi
11322
Guido van Rossumda88dad1995-01-26 00:46:29 +000011323was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11325$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011327/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011328
11329#include <sys/types.h>
11330#include <sys/select.h>
11331#include <sys/time.h>
11332
Martin v. Löwis11437992002-04-12 09:54:03 +000011333int
11334main ()
11335{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011336;
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 ;
11338 return 0;
11339}
11340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011341if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011342
11343
Matthias Kloseb9621712010-04-24 17:59:49 +000011344$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011345
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011346 was_it_defined=yes
11347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11351$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011352
Matthias Kloseb9621712010-04-24 17:59:49 +000011353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11354$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011355if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011357else
Matthias Kloseb9621712010-04-24 17:59:49 +000011358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011359/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011360#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011361int
11362main ()
11363{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011364struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 ;
11366 return 0;
11367}
11368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011370 ac_cv_struct_addrinfo=yes
11371else
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11375fi
11376
Matthias Kloseb9621712010-04-24 17:59:49 +000011377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11378$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011379if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011380
Matthias Kloseb9621712010-04-24 17:59:49 +000011381$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011382
11383fi
11384
Matthias Kloseb9621712010-04-24 17:59:49 +000011385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11386$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011387if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011389else
Matthias Kloseb9621712010-04-24 17:59:49 +000011390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011391/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011392
11393# include <sys/types.h>
11394# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011395int
11396main ()
11397{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011398struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 ;
11400 return 0;
11401}
11402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011404 ac_cv_struct_sockaddr_storage=yes
11405else
Matthias Kloseb9621712010-04-24 17:59:49 +000011406 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11409fi
11410
Matthias Kloseb9621712010-04-24 17:59:49 +000011411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11412$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011413if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011414
Matthias Kloseb9621712010-04-24 17:59:49 +000011415$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011416
11417fi
11418
Guido van Rossum627b2d71993-12-24 10:39:16 +000011419# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011420
Matthias Kloseb9621712010-04-24 17:59:49 +000011421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11422$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011423if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011424 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011425else
Matthias Kloseb9621712010-04-24 17:59:49 +000011426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011428$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011429int
11430main ()
11431{
11432static int test_array [1 - 2 * !(((char) -1) < 0)];
11433test_array [0] = 0
11434
11435 ;
11436 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011437}
Martin v. Löwis11437992002-04-12 09:54:03 +000011438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011439if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011440 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011441else
Matthias Kloseb9621712010-04-24 17:59:49 +000011442 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11447$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011448if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011449 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011450
11451fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11454$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011455if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011457else
Matthias Kloseb9621712010-04-24 17:59:49 +000011458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011459/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011460
Martin v. Löwis11437992002-04-12 09:54:03 +000011461int
11462main ()
11463{
11464/* FIXME: Include the comments suggested by Paul. */
11465#ifndef __cplusplus
11466 /* Ultrix mips cc rejects this. */
11467 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011468 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011470 char const *const *pcpcc;
11471 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011472 /* NEC SVR4.0.2 mips cc rejects this. */
11473 struct point {int x, y;};
11474 static struct point const zero = {0,0};
11475 /* AIX XL C 1.02.0.0 rejects this.
11476 It does not let you subtract one const X* pointer from another in
11477 an arm of an if-expression whose if-part is not a constant
11478 expression */
11479 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011480 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011481 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011482 ++pcpcc;
11483 ppc = (char**) pcpcc;
11484 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011485 { /* SCO 3.2v4 cc rejects this. */
11486 char *t;
11487 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011488
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011490 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 }
11492 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11493 int x[] = {25, 17};
11494 const int *foo = &x[0];
11495 ++foo;
11496 }
11497 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11498 typedef const int *iptr;
11499 iptr p = 0;
11500 ++p;
11501 }
11502 { /* AIX XL C 1.02.0.0 rejects this saying
11503 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11504 struct s { int j; const int *ap[3]; };
11505 struct s *b; b->j = 5;
11506 }
11507 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11508 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011512#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011513
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ;
11515 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011516}
Martin v. Löwis11437992002-04-12 09:54:03 +000011517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011519 ac_cv_c_const=yes
11520else
Matthias Kloseb9621712010-04-24 17:59:49 +000011521 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11526$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011527if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011528
Matthias Kloseb9621712010-04-24 17:59:49 +000011529$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011530
11531fi
11532
Michael W. Hudson54241132001-12-07 15:38:26 +000011533
Guido van Rossumda88dad1995-01-26 00:46:29 +000011534works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11536$as_echo_n "checking for working volatile... " >&6; }
11537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011538/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011539
Martin v. Löwis11437992002-04-12 09:54:03 +000011540int
11541main ()
11542{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011543volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 ;
11545 return 0;
11546}
11547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011548if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011549 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011550else
Skip Montanaro6dead952003-09-25 14:50:04 +000011551
Matthias Kloseb9621712010-04-24 17:59:49 +000011552$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011553
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011554
Guido van Rossum627b2d71993-12-24 10:39:16 +000011555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11558$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011559
Guido van Rossumda88dad1995-01-26 00:46:29 +000011560works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11562$as_echo_n "checking for working signed char... " >&6; }
11563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011564/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011565
Martin v. Löwis11437992002-04-12 09:54:03 +000011566int
11567main ()
11568{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011569signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011570 ;
11571 return 0;
11572}
11573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011574if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011575 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011576else
Skip Montanaro6dead952003-09-25 14:50:04 +000011577
Matthias Kloseb9621712010-04-24 17:59:49 +000011578$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011579
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011580
Guido van Rossum7f43da71994-08-01 12:15:30 +000011581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11584$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011585
Guido van Rossumda88dad1995-01-26 00:46:29 +000011586have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11588$as_echo_n "checking for prototypes... " >&6; }
11589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011590/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011591int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011592int
11593main ()
11594{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011595return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 ;
11597 return 0;
11598}
11599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011600if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011603
Matthias Kloseb159a552010-04-25 21:00:44 +000011604 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11608$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011609
Guido van Rossumda88dad1995-01-26 00:46:29 +000011610works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11612$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011614/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011615
11616#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011617int foo(int x, ...) {
11618 va_list va;
11619 va_start(va, x);
11620 va_arg(va, int);
11621 va_arg(va, char *);
11622 va_arg(va, double);
11623 return 0;
11624}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011625
Martin v. Löwis11437992002-04-12 09:54:03 +000011626int
11627main ()
11628{
Guido van Rossum90eea071996-08-30 20:58:57 +000011629return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011630 ;
11631 return 0;
11632}
11633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
11636
Matthias Kloseb9621712010-04-24 17:59:49 +000011637$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011638
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011639 works=yes
11640
Guido van Rossum627b2d71993-12-24 10:39:16 +000011641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11644$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011645
Martin v. Löwisd6320502004-08-12 13:45:08 +000011646# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11648$as_echo_n "checking for socketpair... " >&6; }
11649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011650/* end confdefs.h. */
11651
11652#include <sys/types.h>
11653#include <sys/socket.h>
11654
11655int
11656main ()
11657{
11658void *x=socketpair
11659 ;
11660 return 0;
11661}
11662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011663if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011664
Matthias Kloseb9621712010-04-24 17:59:49 +000011665$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011666
Matthias Kloseb159a552010-04-25 21:00:44 +000011667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011668$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011669else
Matthias Kloseb9621712010-04-24 17:59:49 +000011670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11671$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011672
11673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011675
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011676# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11678$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011680/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011681#include <sys/types.h>
11682#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011683int
11684main ()
11685{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011686struct sockaddr x;
11687x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011688 ;
11689 return 0;
11690}
11691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011692if ac_fn_c_try_compile "$LINENO"; then :
11693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11694$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011695
Matthias Kloseb9621712010-04-24 17:59:49 +000011696$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011697
11698else
Matthias Kloseb9621712010-04-24 17:59:49 +000011699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11700$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011701
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011704
Guido van Rossumda88dad1995-01-26 00:46:29 +000011705va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11707$as_echo_n "checking whether va_list is an array... " >&6; }
11708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011709/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011710
11711#ifdef HAVE_STDARG_PROTOTYPES
11712#include <stdarg.h>
11713#else
11714#include <varargs.h>
11715#endif
11716
Martin v. Löwis11437992002-04-12 09:54:03 +000011717int
11718main ()
11719{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011720va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011721 ;
11722 return 0;
11723}
11724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011725if ac_fn_c_try_compile "$LINENO"; then :
11726
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011727else
Skip Montanaro6dead952003-09-25 14:50:04 +000011728
Martin v. Löwis11437992002-04-12 09:54:03 +000011729
Matthias Kloseb9621712010-04-24 17:59:49 +000011730$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011731
Guido van Rossumda88dad1995-01-26 00:46:29 +000011732 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011733
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11737$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011738
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011739# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011740
11741
Matthias Kloseb9621712010-04-24 17:59:49 +000011742ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020011743if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011746
Matthias Kloseb9621712010-04-24 17:59:49 +000011747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11748$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011749 OLD_CFLAGS=$CFLAGS
11750 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011752/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011753
11754# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011755
Martin v. Löwis11437992002-04-12 09:54:03 +000011756int
11757main ()
11758{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011759
11760 char *name;
11761 struct hostent *he, *res;
11762 char buffer[2048];
11763 int buflen = 2048;
11764 int h_errnop;
11765
11766 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011767
11768 ;
11769 return 0;
11770}
11771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011772if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011773
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011775
Martin v. Löwis11437992002-04-12 09:54:03 +000011776
Matthias Kloseb9621712010-04-24 17:59:49 +000011777$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011778
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11780$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011781
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011782else
Skip Montanaro6dead952003-09-25 14:50:04 +000011783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11785$as_echo "no" >&6; }
11786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11787$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011789/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011790
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011791# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011792
Martin v. Löwis11437992002-04-12 09:54:03 +000011793int
11794main ()
11795{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011796
11797 char *name;
11798 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011799 char buffer[2048];
11800 int buflen = 2048;
11801 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011802
Matthias Kloseb159a552010-04-25 21:00:44 +000011803 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011804
11805 ;
11806 return 0;
11807}
11808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011809if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011812
Martin v. Löwis11437992002-04-12 09:54:03 +000011813
Matthias Kloseb159a552010-04-25 21:00:44 +000011814$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011815
Matthias Kloseb9621712010-04-24 17:59:49 +000011816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11817$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011818
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011819else
Skip Montanaro6dead952003-09-25 14:50:04 +000011820
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11822$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11824$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11826/* end confdefs.h. */
11827
11828# include <netdb.h>
11829
11830int
11831main ()
11832{
11833
11834 char *name;
11835 struct hostent *he;
11836 struct hostent_data data;
11837
11838 (void) gethostbyname_r(name, he, &data);
11839
11840 ;
11841 return 0;
11842}
11843_ACEOF
11844if ac_fn_c_try_compile "$LINENO"; then :
11845
11846 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11847
11848
11849$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11850
11851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11852$as_echo "yes" >&6; }
11853
11854else
11855
11856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11857$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011858
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011861
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011864
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011867 CFLAGS=$OLD_CFLAGS
11868
11869else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011870
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 for ac_func in gethostbyname
11872do :
11873 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020011874if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011875 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011876#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011877_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011878
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011879fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011880done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011881
Michael W. Hudson54241132001-12-07 15:38:26 +000011882
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011883fi
11884
Michael W. Hudson54241132001-12-07 15:38:26 +000011885
11886
11887
11888
11889
11890
Guido van Rossum627b2d71993-12-24 10:39:16 +000011891# checks for system services
11892# (none yet)
11893
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011894# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011895ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020011896if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011897
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11900$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011901if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011903else
Martin v. Löwis11437992002-04-12 09:54:03 +000011904 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011905LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011909/* Override any GCC internal prototype to avoid an error.
11910 Use char because int might match the return type of a GCC
11911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011912#ifdef __cplusplus
11913extern "C"
11914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011915char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011916int
11917main ()
11918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011919return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011920 ;
11921 return 0;
11922}
11923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011926else
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011929rm -f core conftest.err conftest.$ac_objext \
11930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011931LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11934$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011935if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011936 cat >>confdefs.h <<_ACEOF
11937#define HAVE_LIBIEEE 1
11938_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011939
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011940 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011941
Guido van Rossum627b2d71993-12-24 10:39:16 +000011942fi
11943
Michael W. Hudson54241132001-12-07 15:38:26 +000011944
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011945fi
11946
Michael W. Hudson54241132001-12-07 15:38:26 +000011947
Guido van Rossum7f253911997-05-09 02:42:48 +000011948# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11950$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011952# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011953if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011954 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011955if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011956then
11957
Matthias Kloseb9621712010-04-24 17:59:49 +000011958$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011959
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11961$as_echo "yes" >&6; }
11962else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11963$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011964fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011965else
Matthias Kloseb9621712010-04-24 17:59:49 +000011966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11967$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011968fi
11969
Guido van Rossum7f253911997-05-09 02:42:48 +000011970
Guido van Rossum7f43da71994-08-01 12:15:30 +000011971# check for --with-libm=...
11972
Guido van Rossum563e7081996-09-10 18:20:48 +000011973case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011974Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011975*) LIBM=-lm
11976esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11978$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011980# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011981if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011983if test "$withval" = no
11984then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11986$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011987elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011988then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11990$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011991else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011992fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011993else
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11995$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011996fi
11997
Guido van Rossum7f43da71994-08-01 12:15:30 +000011998
11999# check for --with-libc=...
12000
Matthias Kloseb9621712010-04-24 17:59:49 +000012001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12002$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012004# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012005if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012006 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012007if test "$withval" = no
12008then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12010$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012011elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012012then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12014$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012015else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012016fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012017else
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12019$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012020fi
12021
Guido van Rossum7f43da71994-08-01 12:15:30 +000012022
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012023# **************************************************
12024# * Check for various properties of floating point *
12025# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012026
Matthias Kloseb9621712010-04-24 17:59:49 +000012027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12028$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012029if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012031else
12032
Matthias Kloseb9621712010-04-24 17:59:49 +000012033if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012034 ac_cv_little_endian_double=no
12035else
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012037/* end confdefs.h. */
12038
12039#include <string.h>
12040int main() {
12041 double x = 9006104071832581.0;
12042 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12043 return 0;
12044 else
12045 return 1;
12046}
12047
12048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012049if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012050 ac_cv_little_endian_double=yes
12051else
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012056fi
12057
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012058fi
12059
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12061$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012062if test "$ac_cv_little_endian_double" = yes
12063then
12064
Matthias Kloseb9621712010-04-24 17:59:49 +000012065$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012066
12067fi
12068
Matthias Kloseb9621712010-04-24 17:59:49 +000012069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12070$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012071if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012073else
12074
Matthias Kloseb9621712010-04-24 17:59:49 +000012075if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012076 ac_cv_big_endian_double=no
12077else
Matthias Kloseb9621712010-04-24 17:59:49 +000012078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012079/* end confdefs.h. */
12080
12081#include <string.h>
12082int main() {
12083 double x = 9006104071832581.0;
12084 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12085 return 0;
12086 else
12087 return 1;
12088}
12089
12090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012091if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012092 ac_cv_big_endian_double=yes
12093else
Matthias Kloseb9621712010-04-24 17:59:49 +000012094 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12097 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012098fi
12099
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012100fi
12101
Matthias Kloseb9621712010-04-24 17:59:49 +000012102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12103$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012104if test "$ac_cv_big_endian_double" = yes
12105then
12106
Matthias Kloseb9621712010-04-24 17:59:49 +000012107$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012108
12109fi
12110
12111# Some ARM platforms use a mixed-endian representation for doubles.
12112# While Python doesn't currently have full support for these platforms
12113# (see e.g., issue 1762561), we can at least make sure that float <-> string
12114# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12116$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012117if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012119else
12120
Matthias Kloseb9621712010-04-24 17:59:49 +000012121if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012122 ac_cv_mixed_endian_double=no
12123else
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012125/* end confdefs.h. */
12126
12127#include <string.h>
12128int main() {
12129 double x = 9006104071832581.0;
12130 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12131 return 0;
12132 else
12133 return 1;
12134}
12135
12136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012137if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012138 ac_cv_mixed_endian_double=yes
12139else
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12143 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012144fi
12145
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012146fi
12147
Matthias Kloseb9621712010-04-24 17:59:49 +000012148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12149$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012150if test "$ac_cv_mixed_endian_double" = yes
12151then
12152
Matthias Kloseb9621712010-04-24 17:59:49 +000012153$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012154
12155fi
12156
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012157# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012158# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012159# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012160# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012161# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012162# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012163
12164# This inline assembler syntax may also work for suncc and icc,
12165# so we try it on all platforms.
12166
Matthias Kloseb9621712010-04-24 17:59:49 +000012167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12168$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012170/* end confdefs.h. */
12171
12172int
12173main ()
12174{
12175
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012176 unsigned short cw;
12177 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12178 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012179
12180 ;
12181 return 0;
12182}
12183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012184if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012185 have_gcc_asm_for_x87=yes
12186else
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012188fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12191$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012192if test "$have_gcc_asm_for_x87" = yes
12193then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012194
Matthias Kloseb9621712010-04-24 17:59:49 +000012195$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012196
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012197fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012198
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012199# Detect whether system arithmetic is subject to x87-style double
12200# rounding issues. The result of this test has little meaning on non
12201# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12202# mode is round-to-nearest and double rounding issues are present, and
12203# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12205$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012206# $BASECFLAGS may affect the result
12207ac_save_cc="$CC"
12208CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012209if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012210 ac_cv_x87_double_rounding=no
12211else
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012213/* end confdefs.h. */
12214
12215#include <stdlib.h>
12216#include <math.h>
12217int main() {
12218 volatile double x, y, z;
12219 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12220 x = 0.99999999999999989; /* 1-2**-53 */
12221 y = 1./x;
12222 if (y != 1.)
12223 exit(0);
12224 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12225 x = 1e16;
12226 y = 2.99999;
12227 z = x + y;
12228 if (z != 1e16+4.)
12229 exit(0);
12230 /* both tests show evidence of double rounding */
12231 exit(1);
12232}
12233
12234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012235if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012236 ac_cv_x87_double_rounding=no
12237else
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12241 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012242fi
12243
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012244CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12246$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012247if test "$ac_cv_x87_double_rounding" = yes
12248then
12249
Matthias Kloseb9621712010-04-24 17:59:49 +000012250$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012251
12252fi
12253
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012254# ************************************
12255# * Check for mathematical functions *
12256# ************************************
12257
12258LIBS_SAVE=$LIBS
12259LIBS="$LIBS $LIBM"
12260
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012261for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12262do :
12263 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12264ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012265if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012266 cat >>confdefs.h <<_ACEOF
12267#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12268_ACEOF
12269
12270fi
12271done
12272
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012273for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012274do :
12275 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12276ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012277if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012278 cat >>confdefs.h <<_ACEOF
12279#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12280_ACEOF
12281
12282fi
12283done
12284
12285ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12286"
Victor Stinnere0be4232011-10-25 13:06:09 +020012287if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012288 ac_have_decl=1
12289else
12290 ac_have_decl=0
12291fi
12292
12293cat >>confdefs.h <<_ACEOF
12294#define HAVE_DECL_ISINF $ac_have_decl
12295_ACEOF
12296ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12297"
Victor Stinnere0be4232011-10-25 13:06:09 +020012298if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012299 ac_have_decl=1
12300else
12301 ac_have_decl=0
12302fi
12303
12304cat >>confdefs.h <<_ACEOF
12305#define HAVE_DECL_ISNAN $ac_have_decl
12306_ACEOF
12307ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12308"
Victor Stinnere0be4232011-10-25 13:06:09 +020012309if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012310 ac_have_decl=1
12311else
12312 ac_have_decl=0
12313fi
12314
12315cat >>confdefs.h <<_ACEOF
12316#define HAVE_DECL_ISFINITE $ac_have_decl
12317_ACEOF
12318
12319
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012320# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12321# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12323$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012324if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012325 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012326else
12327
Matthias Kloseb9621712010-04-24 17:59:49 +000012328if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012329 ac_cv_tanh_preserves_zero_sign=no
12330else
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012332/* end confdefs.h. */
12333
12334#include <math.h>
12335#include <stdlib.h>
12336int main() {
12337 /* return 0 if either negative zeros don't exist
12338 on this platform or if negative zeros exist
12339 and tanh(-0.) == -0. */
12340 if (atan2(0., -1.) == atan2(-0., -1.) ||
12341 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12342 else exit(1);
12343}
12344
12345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012346if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012347 ac_cv_tanh_preserves_zero_sign=yes
12348else
Matthias Kloseb9621712010-04-24 17:59:49 +000012349 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12352 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012353fi
12354
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012355fi
12356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12358$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012359if test "$ac_cv_tanh_preserves_zero_sign" = yes
12360then
12361
Matthias Kloseb9621712010-04-24 17:59:49 +000012362$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012363
12364fi
12365
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012366if test "$ac_cv_func_log1p" = yes
12367then
12368 # On some versions of AIX, log1p(-0.) returns 0. instead of
12369 # -0. See issue #9920.
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12371$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012372 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012373 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012374else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012375
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012376 if test "$cross_compiling" = yes; then :
12377 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012378else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12380/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012381
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012382 #include <math.h>
12383 #include <stdlib.h>
12384 int main() {
12385 /* Fail if the signs of log1p(-0.) and -0. can be
12386 distinguished. */
12387 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12388 return 0;
12389 else
12390 return 1;
12391 }
12392
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012393_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012394if ac_fn_c_try_run "$LINENO"; then :
12395 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012396else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012397 ac_cv_log1p_drops_zero_sign=yes
12398fi
12399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12400 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012401fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012402
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012403fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012404
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12406$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12407fi
12408if test "$ac_cv_log1p_drops_zero_sign" = yes
12409then
12410
12411$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12412
12413fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012414
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012415LIBS=$LIBS_SAVE
12416
Mark Dickinsona614f042009-11-28 12:48:43 +000012417# For multiprocessing module, check that sem_open
12418# actually works. For FreeBSD versions <= 7.2,
12419# the kernel module that provides POSIX semaphores
12420# isn't loaded by default, so an attempt to call
12421# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12423$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012424if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012426else
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012428 ac_cv_posix_semaphores_enabled=yes
12429else
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012431/* end confdefs.h. */
12432
12433#include <unistd.h>
12434#include <fcntl.h>
12435#include <stdio.h>
12436#include <semaphore.h>
12437#include <sys/stat.h>
12438
12439int main(void) {
12440 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12441 if (a == SEM_FAILED) {
12442 perror("sem_open");
12443 return 1;
12444 }
12445 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012446 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012447 return 0;
12448}
12449
12450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012452 ac_cv_posix_semaphores_enabled=yes
12453else
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12457 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012458fi
12459
12460
Mark Dickinsona614f042009-11-28 12:48:43 +000012461fi
12462
Matthias Kloseb9621712010-04-24 17:59:49 +000012463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12464$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012465if test $ac_cv_posix_semaphores_enabled = no
12466then
12467
Matthias Kloseb9621712010-04-24 17:59:49 +000012468$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012469
12470fi
12471
Mark Dickinson10683072009-04-18 21:18:19 +000012472# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12474$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012475if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012477else
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012479 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012480else
Matthias Kloseb9621712010-04-24 17:59:49 +000012481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012482/* end confdefs.h. */
12483
12484#include <unistd.h>
12485#include <fcntl.h>
12486#include <stdio.h>
12487#include <semaphore.h>
12488#include <sys/stat.h>
12489
12490int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012491 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012492 int count;
12493 int res;
12494 if(a==SEM_FAILED){
12495 perror("sem_open");
12496 return 1;
12497
12498 }
12499 res = sem_getvalue(a, &count);
12500 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012501 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012502 return res==-1 ? 1 : 0;
12503}
12504
Mark Dickinson10683072009-04-18 21:18:19 +000012505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012506if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012507 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012508else
Matthias Kloseb9621712010-04-24 17:59:49 +000012509 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012511rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12512 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012513fi
12514
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012515
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012516fi
12517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12519$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012520if test $ac_cv_broken_sem_getvalue = yes
12521then
12522
Matthias Kloseb9621712010-04-24 17:59:49 +000012523$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012524
12525fi
12526
Mark Dickinsonbd792642009-03-18 20:06:12 +000012527# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12529$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012530# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012531if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012532 enableval=$enable_big_digits; case $enable_big_digits in
12533yes)
12534 enable_big_digits=30 ;;
12535no)
12536 enable_big_digits=15 ;;
1253715|30)
12538 ;;
12539*)
Victor Stinnere0be4232011-10-25 13:06:09 +020012540 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 +000012541esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12543$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012544
12545cat >>confdefs.h <<_ACEOF
12546#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12547_ACEOF
12548
12549
12550else
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12552$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012553fi
12554
12555
Guido van Rossumef2255b2000-03-10 22:30:29 +000012556# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012557ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012558if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012559
12560
Matthias Kloseb9621712010-04-24 17:59:49 +000012561$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012562
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012563 wchar_h="yes"
12564
Guido van Rossumef2255b2000-03-10 22:30:29 +000012565else
Martin v. Löwis11437992002-04-12 09:54:03 +000012566 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012567
12568fi
12569
Michael W. Hudson54241132001-12-07 15:38:26 +000012570
Martin v. Löwis11437992002-04-12 09:54:03 +000012571
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012572# determine wchar_t size
12573if test "$wchar_h" = yes
12574then
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012576# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12577# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12578# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12580$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012581if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012583else
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12585"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012586
Martin v. Löwis11437992002-04-12 09:54:03 +000012587else
Matthias Kloseb9621712010-04-24 17:59:49 +000012588 if test "$ac_cv_type_wchar_t" = yes; then
12589 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012591as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020012592See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012593 else
12594 ac_cv_sizeof_wchar_t=0
12595 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012597
Martin v. Löwis11437992002-04-12 09:54:03 +000012598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12600$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012601
12602
12603
Martin v. Löwis11437992002-04-12 09:54:03 +000012604cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012605#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012606_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012607
Michael W. Hudson54241132001-12-07 15:38:26 +000012608
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012609fi
12610
Matthias Kloseb9621712010-04-24 17:59:49 +000012611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12612$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012613have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012615/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012616
12617#include <tcl.h>
12618#if TCL_UTF_MAX != 6
12619# error "NOT UCS4_TCL"
12620#endif
12621int
12622main ()
12623{
12624
12625 ;
12626 return 0;
12627}
12628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012629if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012630
12631
Matthias Kloseb9621712010-04-24 17:59:49 +000012632$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012633
12634 have_ucs4_tcl=yes
12635
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12639$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012640
Skip Montanaro6dead952003-09-25 14:50:04 +000012641# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012642if test "$wchar_h" = yes
12643then
12644 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12646$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012647 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012648 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012649else
12650
Matthias Kloseb9621712010-04-24 17:59:49 +000012651 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012652 ac_cv_wchar_t_signed=yes
12653else
Matthias Kloseb9621712010-04-24 17:59:49 +000012654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012655/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012656
12657 #include <wchar.h>
12658 int main()
12659 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012660 /* Success: exit code 0 */
12661 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012662 }
12663
12664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012666 ac_cv_wchar_t_signed=yes
12667else
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12671 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012672fi
12673
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012674fi
12675
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12677$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678fi
12679
Georg Brandl52d168a2008-01-07 18:10:24 +000012680# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012681if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012682 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012683then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012684 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012685
Matthias Kloseb9621712010-04-24 17:59:49 +000012686$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012687
Georg Brandl52d168a2008-01-07 18:10:24 +000012688else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012689 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012690fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
12692$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012693
12694# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12696$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012697if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012699else
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 ac_cv_c_bigendian=unknown
12701 # See if we're dealing with a universal compiler.
12702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12703/* end confdefs.h. */
12704#ifndef __APPLE_CC__
12705 not a universal capable compiler
12706 #endif
12707 typedef int dummy;
12708
Skip Montanaro6dead952003-09-25 14:50:04 +000012709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012710if ac_fn_c_try_compile "$LINENO"; then :
12711
12712 # Check for potential -arch flags. It is not universal unless
12713 # there are at least two -arch flags with different values.
12714 ac_arch=
12715 ac_prev=
12716 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12717 if test -n "$ac_prev"; then
12718 case $ac_word in
12719 i?86 | x86_64 | ppc | ppc64)
12720 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12721 ac_arch=$ac_word
12722 else
12723 ac_cv_c_bigendian=universal
12724 break
12725 fi
12726 ;;
12727 esac
12728 ac_prev=
12729 elif test "x$ac_word" = "x-arch"; then
12730 ac_prev=arch
12731 fi
12732 done
12733fi
12734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12735 if test $ac_cv_c_bigendian = unknown; then
12736 # See if sys/param.h defines the BYTE_ORDER macro.
12737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012738/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012739#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012740 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012741
Martin v. Löwis11437992002-04-12 09:54:03 +000012742int
12743main ()
12744{
Matthias Kloseb9621712010-04-24 17:59:49 +000012745#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12746 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12747 && LITTLE_ENDIAN)
12748 bogus endian macros
12749 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012750
12751 ;
12752 return 0;
12753}
12754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012755if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012756 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012758/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012759#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012761
Martin v. Löwis11437992002-04-12 09:54:03 +000012762int
12763main ()
12764{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012765#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 not big endian
12767 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012768
12769 ;
12770 return 0;
12771}
12772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012773if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012774 ac_cv_c_bigendian=yes
12775else
Matthias Kloseb9621712010-04-24 17:59:49 +000012776 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012779fi
12780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12781 fi
12782 if test $ac_cv_c_bigendian = unknown; then
12783 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012785/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012786#include <limits.h>
12787
Martin v. Löwis11437992002-04-12 09:54:03 +000012788int
12789main ()
12790{
Matthias Kloseb9621712010-04-24 17:59:49 +000012791#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12792 bogus endian macros
12793 #endif
12794
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 ;
12796 return 0;
12797}
12798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012799if ac_fn_c_try_compile "$LINENO"; then :
12800 # It does; now see whether it defined to _BIG_ENDIAN or not.
12801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12802/* end confdefs.h. */
12803#include <limits.h>
12804
12805int
12806main ()
12807{
12808#ifndef _BIG_ENDIAN
12809 not big endian
12810 #endif
12811
12812 ;
12813 return 0;
12814}
12815_ACEOF
12816if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012817 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012818else
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12822fi
12823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12824 fi
12825 if test $ac_cv_c_bigendian = unknown; then
12826 # Compile a test program.
12827 if test "$cross_compiling" = yes; then :
12828 # Try to guess by grepping values from an object file.
12829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12830/* end confdefs.h. */
12831short int ascii_mm[] =
12832 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12833 short int ascii_ii[] =
12834 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12835 int use_ascii (int i) {
12836 return ascii_mm[i] + ascii_ii[i];
12837 }
12838 short int ebcdic_ii[] =
12839 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12840 short int ebcdic_mm[] =
12841 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12842 int use_ebcdic (int i) {
12843 return ebcdic_mm[i] + ebcdic_ii[i];
12844 }
12845 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847int
12848main ()
12849{
12850return use_ascii (foo) == use_ebcdic (foo);
12851 ;
12852 return 0;
12853}
12854_ACEOF
12855if ac_fn_c_try_compile "$LINENO"; then :
12856 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12857 ac_cv_c_bigendian=yes
12858 fi
12859 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12860 if test "$ac_cv_c_bigendian" = unknown; then
12861 ac_cv_c_bigendian=no
12862 else
12863 # finding both strings is unlikely to happen, but who knows?
12864 ac_cv_c_bigendian=unknown
12865 fi
12866 fi
12867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012869else
Matthias Kloseb9621712010-04-24 17:59:49 +000012870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012871/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012872$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012873int
12874main ()
12875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876
Matthias Kloseb9621712010-04-24 17:59:49 +000012877 /* Are we little or big endian? From Harbison&Steele. */
12878 union
12879 {
12880 long int l;
12881 char c[sizeof (long int)];
12882 } u;
12883 u.l = 1;
12884 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012885
12886 ;
12887 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012888}
Martin v. Löwis11437992002-04-12 09:54:03 +000012889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012890if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012891 ac_cv_c_bigendian=no
12892else
Matthias Kloseb9621712010-04-24 17:59:49 +000012893 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12896 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898
Matthias Kloseb9621712010-04-24 17:59:49 +000012899 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12902$as_echo "$ac_cv_c_bigendian" >&6; }
12903 case $ac_cv_c_bigendian in #(
12904 yes)
12905 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12906;; #(
12907 no)
12908 ;; #(
12909 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012912
Matthias Kloseb9621712010-04-24 17:59:49 +000012913 ;; #(
12914 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012915 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020012916 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012917 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012918
Michael W. Hudson54241132001-12-07 15:38:26 +000012919
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012920# ABI version string for Python extension modules. This appears between the
12921# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12922# from the following attributes which affect the ABI of this Python build (in
12923# this order):
12924#
12925# * The Python implementation (always 'cpython-' for us)
12926# * The major and minor version numbers
12927# * --with-pydebug (adds a 'd')
12928# * --with-pymalloc (adds a 'm')
12929# * --with-wide-unicode (adds a 'u')
12930#
12931# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012932# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12933# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012934
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12936$as_echo_n "checking ABIFLAGS... " >&6; }
12937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12938$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12940$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012941SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12943$as_echo "$SOABI" >&6; }
12944
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12946$as_echo_n "checking LDVERSION... " >&6; }
12947LDVERSION='$(VERSION)$(ABIFLAGS)'
12948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12949$as_echo "$LDVERSION" >&6; }
12950
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012951# SO is the extension of shared libraries `(including the dot!)
12952# -- usually .so, .sl on HP-UX, .dll on Cygwin
12953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12954$as_echo_n "checking SO... " >&6; }
12955if test -z "$SO"
12956then
12957 case $ac_sys_system in
12958 hp*|HP*)
12959 case `uname -m` in
12960 ia64) SO=.so;;
12961 *) SO=.sl;;
12962 esac
12963 ;;
12964 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012965 Linux*|GNU*)
12966 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012967 *) SO=.so;;
12968 esac
12969else
12970 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012971 echo
12972 echo '====================================================================='
12973 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012974 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012975 echo '+ Do you really mean to change the extension for shared libraries? +'
12976 echo '+ Continuing in 10 seconds to let you to ponder. +'
12977 echo '+ +'
12978 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012979 sleep 10
12980fi
12981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12982$as_echo "$SO" >&6; }
12983
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012984# Check whether right shifting a negative integer extends the sign bit
12985# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12987$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012988if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012990else
Martin v. Löwis11437992002-04-12 09:54:03 +000012991
Matthias Kloseb9621712010-04-24 17:59:49 +000012992if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012993 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012996/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012997
12998int main()
12999{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013000 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013001}
13002
Martin v. Löwis11437992002-04-12 09:54:03 +000013003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013004if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013005 ac_cv_rshift_extends_sign=yes
13006else
Matthias Kloseb9621712010-04-24 17:59:49 +000013007 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13010 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013011fi
13012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013013fi
13014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13016$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013017if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013018then
Martin v. Löwis11437992002-04-12 09:54:03 +000013019
Matthias Kloseb9621712010-04-24 17:59:49 +000013020$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013021
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013022fi
13023
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013024# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13026$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013027if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013028 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013029else
Martin v. Löwis11437992002-04-12 09:54:03 +000013030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013032/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013033#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013034int
13035main ()
13036{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013037
13038 FILE *f = fopen("/dev/null", "r");
13039 flockfile(f);
13040 getc_unlocked(f);
13041 funlockfile(f);
13042
Martin v. Löwis11437992002-04-12 09:54:03 +000013043 ;
13044 return 0;
13045}
13046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013047if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013048 ac_cv_have_getc_unlocked=yes
13049else
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 ac_cv_have_getc_unlocked=no
13051fi
13052rm -f core conftest.err conftest.$ac_objext \
13053 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13057$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013058if test "$ac_cv_have_getc_unlocked" = yes
13059then
Martin v. Löwis11437992002-04-12 09:54:03 +000013060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013062
13063fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013064
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013065# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013066# save the value of LIBS so we don't actually link Python with readline
13067LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013068
Gregory P. Smith18820942008-09-07 06:24:49 +000013069# On some systems we need to link readline to a termcap compatible
13070# library. NOTE: Keep the precedence of listed libraries synchronised
13071# with setup.py.
13072py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13074$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013075for py_libtermcap in "" ncursesw ncurses curses termcap; do
13076 if test -z "$py_libtermcap"; then
13077 READLINE_LIBS="-lreadline"
13078 else
13079 READLINE_LIBS="-lreadline -l$py_libtermcap"
13080 fi
13081 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013083/* end confdefs.h. */
13084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013085/* Override any GCC internal prototype to avoid an error.
13086 Use char because int might match the return type of a GCC
13087 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013088#ifdef __cplusplus
13089extern "C"
13090#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013091char readline ();
13092int
13093main ()
13094{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013095return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013096 ;
13097 return 0;
13098}
13099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013100if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013101 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013103rm -f core conftest.err conftest.$ac_objext \
13104 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013105 if test $py_cv_lib_readline = yes; then
13106 break
13107 fi
13108done
13109# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13110#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013111if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13113$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013114else
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13116$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013119
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013120fi
13121
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013122# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13124$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013125if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013127else
13128 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013129LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013131/* end confdefs.h. */
13132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013133/* Override any GCC internal prototype to avoid an error.
13134 Use char because int might match the return type of a GCC
13135 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013136#ifdef __cplusplus
13137extern "C"
13138#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013139char rl_callback_handler_install ();
13140int
13141main ()
13142{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013143return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013144 ;
13145 return 0;
13146}
13147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013148if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013149 ac_cv_lib_readline_rl_callback_handler_install=yes
13150else
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013153rm -f core conftest.err conftest.$ac_objext \
13154 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013155LIBS=$ac_check_lib_save_LIBS
13156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13158$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013159if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013160
Matthias Kloseb9621712010-04-24 17:59:49 +000013161$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013162
13163fi
13164
13165
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013166# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013168/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013169#include <readline/readline.h>
13170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013171if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013172 have_readline=yes
13173else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013174 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013175
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013176fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013177rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013178if test $have_readline = yes
13179then
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013181/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013182#include <readline/readline.h>
13183
13184_ACEOF
13185if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013186 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013187
Matthias Kloseb9621712010-04-24 17:59:49 +000013188$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013189
13190fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013191rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013194/* end confdefs.h. */
13195#include <readline/readline.h>
13196
13197_ACEOF
13198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013202
13203fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013204rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013205
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013206fi
13207
Martin v. Löwis0daad592001-09-30 21:09:59 +000013208# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13210$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013211if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013212 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013213else
Martin v. Löwis11437992002-04-12 09:54:03 +000013214 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013215LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013219/* Override any GCC internal prototype to avoid an error.
13220 Use char because int might match the return type of a GCC
13221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013222#ifdef __cplusplus
13223extern "C"
13224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013225char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013226int
13227main ()
13228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013229return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013230 ;
13231 return 0;
13232}
13233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013236else
Matthias Kloseb9621712010-04-24 17:59:49 +000013237 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013239rm -f core conftest.err conftest.$ac_objext \
13240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013241LIBS=$ac_check_lib_save_LIBS
13242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13244$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013245if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013248
Martin v. Löwis0daad592001-09-30 21:09:59 +000013249fi
13250
Michael W. Hudson54241132001-12-07 15:38:26 +000013251
Thomas Wouters89d996e2007-09-08 17:39:28 +000013252# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13254$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013255if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013256 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013257else
13258 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013259LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013261/* end confdefs.h. */
13262
13263/* Override any GCC internal prototype to avoid an error.
13264 Use char because int might match the return type of a GCC
13265 builtin and then its argument prototype would still apply. */
13266#ifdef __cplusplus
13267extern "C"
13268#endif
13269char rl_completion_display_matches_hook ();
13270int
13271main ()
13272{
13273return rl_completion_display_matches_hook ();
13274 ;
13275 return 0;
13276}
13277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013278if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013279 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13280else
Matthias Kloseb9621712010-04-24 17:59:49 +000013281 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013283rm -f core conftest.err conftest.$ac_objext \
13284 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013285LIBS=$ac_check_lib_save_LIBS
13286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13288$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013289if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013290
Matthias Kloseb9621712010-04-24 17:59:49 +000013291$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013292
13293fi
13294
13295
Martin v. Löwis0daad592001-09-30 21:09:59 +000013296# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13298$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013299if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013301else
Martin v. Löwis11437992002-04-12 09:54:03 +000013302 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013303LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013307/* Override any GCC internal prototype to avoid an error.
13308 Use char because int might match the return type of a GCC
13309 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013310#ifdef __cplusplus
13311extern "C"
13312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013313char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013314int
13315main ()
13316{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013318 ;
13319 return 0;
13320}
13321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013322if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013323 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013327rm -f core conftest.err conftest.$ac_objext \
13328 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013329LIBS=$ac_check_lib_save_LIBS
13330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13332$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013333if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013334
Matthias Kloseb9621712010-04-24 17:59:49 +000013335$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013336
Guido van Rossum353ae582001-07-10 16:45:32 +000013337fi
13338
Jack Jansendd19cf82001-12-06 22:36:17 +000013339
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013340# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013342/* end confdefs.h. */
13343#include <readline/readline.h>
13344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013345if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013346 have_readline=yes
13347else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013348 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013349
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013350fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013351rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013352if test $have_readline = yes
13353then
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013355/* end confdefs.h. */
13356#include <readline/readline.h>
13357
13358_ACEOF
13359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013363
13364fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013365rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013366
13367fi
13368
Martin v. Löwis82bca632006-02-10 20:49:30 +000013369# End of readline checks: restore LIBS
13370LIBS=$LIBS_no_readline
13371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13373$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013374if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013376else
Martin v. Löwis11437992002-04-12 09:54:03 +000013377
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013379 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013382/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013383
13384int main()
13385{
13386 int val1 = nice(1);
13387 if (val1 != -1 && val1 == nice(2))
13388 exit(0);
13389 exit(1);
13390}
13391
Martin v. Löwis11437992002-04-12 09:54:03 +000013392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013393if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013394 ac_cv_broken_nice=yes
13395else
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13399 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013400fi
13401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402fi
13403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13405$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013406if test "$ac_cv_broken_nice" = yes
13407then
Martin v. Löwis11437992002-04-12 09:54:03 +000013408
Matthias Kloseb9621712010-04-24 17:59:49 +000013409$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013410
13411fi
13412
Matthias Kloseb9621712010-04-24 17:59:49 +000013413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13414$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013415if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013417else
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013419 ac_cv_broken_poll=no
13420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013422/* end confdefs.h. */
13423
13424#include <poll.h>
13425
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013426int main()
13427{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013428 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013429 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013430
13431 close (42);
13432
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013433 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013434 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013435 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013436 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013437 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013438 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013439 return 1;
13440}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013441
13442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013443if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013444 ac_cv_broken_poll=yes
13445else
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13449 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013452fi
13453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13455$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013456if test "$ac_cv_broken_poll" = yes
13457then
13458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013460
13461fi
13462
Brett Cannon43802422005-02-10 20:48:03 +000013463# 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 +000013464# (which is not required by ISO C or UNIX spec) and/or if we support
13465# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013466ac_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 +000013467#include <$ac_cv_struct_tm>
13468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469"
Victor Stinnere0be4232011-10-25 13:06:09 +020013470if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013471
13472cat >>confdefs.h <<_ACEOF
13473#define HAVE_STRUCT_TM_TM_ZONE 1
13474_ACEOF
13475
13476
13477fi
13478
13479if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13480
Matthias Kloseb9621712010-04-24 17:59:49 +000013481$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013482
13483else
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13485"
Victor Stinnere0be4232011-10-25 13:06:09 +020013486if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013488else
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013490fi
13491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013492cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013493#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013494_ACEOF
13495
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13497$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013498if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013500else
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013502/* end confdefs.h. */
13503#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013504#if !HAVE_DECL_TZNAME
13505extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013506#endif
13507
13508int
13509main ()
13510{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013511return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013512 ;
13513 return 0;
13514}
13515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013516if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013517 ac_cv_var_tzname=yes
13518else
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013521rm -f core conftest.err conftest.$ac_objext \
13522 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13525$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013526 if test $ac_cv_var_tzname = yes; then
13527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013529
13530 fi
13531fi
13532
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013533
Martin v. Löwis1d459062005-03-14 21:23:33 +000013534# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13536$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013537if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013539else
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013542 ac_cv_working_tzset=no
13543else
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013545/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013546
13547#include <stdlib.h>
13548#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013549#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013550
13551#if HAVE_TZNAME
13552extern char *tzname[];
13553#endif
13554
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013555int main()
13556{
Brett Cannon18367812003-09-19 00:59:16 +000013557 /* Note that we need to ensure that not only does tzset(3)
13558 do 'something' with localtime, but it works as documented
13559 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013560 This includes making sure that tzname is set properly if
13561 tm->tm_zone does not exist since it is the alternative way
13562 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013563
13564 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013565 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013566 */
13567
Martin v. Löwis1d459062005-03-14 21:23:33 +000013568 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013569 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13570
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013571 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013572 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013573 if (localtime(&groundhogday)->tm_hour != 0)
13574 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013575#if HAVE_TZNAME
13576 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13577 if (strcmp(tzname[0], "UTC") ||
13578 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13579 exit(1);
13580#endif
Brett Cannon18367812003-09-19 00:59:16 +000013581
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013582 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013583 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013584 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013585 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013586#if HAVE_TZNAME
13587 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13588 exit(1);
13589#endif
Brett Cannon18367812003-09-19 00:59:16 +000013590
13591 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13592 tzset();
13593 if (localtime(&groundhogday)->tm_hour != 11)
13594 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013595#if HAVE_TZNAME
13596 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13597 exit(1);
13598#endif
13599
13600#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013601 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13602 exit(1);
13603 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13604 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013605#endif
Brett Cannon18367812003-09-19 00:59:16 +000013606
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013607 exit(0);
13608}
13609
13610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013611if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013612 ac_cv_working_tzset=yes
13613else
Matthias Kloseb9621712010-04-24 17:59:49 +000013614 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13617 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013618fi
13619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013620fi
13621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13623$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013624if test "$ac_cv_working_tzset" = yes
13625then
13626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013628
13629fi
13630
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013631# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13633$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013634if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013635 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013636else
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013638/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013639#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013640int
13641main ()
13642{
13643
13644struct stat st;
13645st.st_mtim.tv_nsec = 1;
13646
13647 ;
13648 return 0;
13649}
13650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013651if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013652 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013653else
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13657fi
13658
Matthias Kloseb9621712010-04-24 17:59:49 +000013659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13660$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013661if test "$ac_cv_stat_tv_nsec" = yes
13662then
13663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013665
13666fi
13667
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013668# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13670$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013671if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013673else
Matthias Kloseb9621712010-04-24 17:59:49 +000013674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013675/* end confdefs.h. */
13676#include <sys/stat.h>
13677int
13678main ()
13679{
13680
13681struct stat st;
13682st.st_mtimespec.tv_nsec = 1;
13683
13684 ;
13685 return 0;
13686}
13687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013689 ac_cv_stat_tv_nsec2=yes
13690else
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13694fi
13695
Matthias Kloseb9621712010-04-24 17:59:49 +000013696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13697$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013698if test "$ac_cv_stat_tv_nsec2" = yes
13699then
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013702
13703fi
13704
Jack Jansen666b1e72001-10-31 12:11:48 +000013705# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13707$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013708if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013710else
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013712/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013713#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013714int
13715main ()
13716{
Jack Jansen666b1e72001-10-31 12:11:48 +000013717
13718 int rtn;
13719 rtn = mvwdelch(0,0,0);
13720
Martin v. Löwis11437992002-04-12 09:54:03 +000013721 ;
13722 return 0;
13723}
13724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013725if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013726 ac_cv_mvwdelch_is_expression=yes
13727else
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13731fi
13732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13734$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013735
13736if test "$ac_cv_mvwdelch_is_expression" = yes
13737then
Martin v. Löwis11437992002-04-12 09:54:03 +000013738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013740
13741fi
13742
Matthias Kloseb9621712010-04-24 17:59:49 +000013743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13744$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013745if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013749/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013750#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013751int
13752main ()
13753{
Jack Jansen666b1e72001-10-31 12:11:48 +000013754
13755 WINDOW *w;
13756 w->_flags = 0;
13757
Martin v. Löwis11437992002-04-12 09:54:03 +000013758 ;
13759 return 0;
13760}
13761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013762if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013763 ac_cv_window_has_flags=yes
13764else
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13768fi
13769
Matthias Kloseb9621712010-04-24 17:59:49 +000013770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13771$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013772
Jack Jansen666b1e72001-10-31 12:11:48 +000013773
13774if test "$ac_cv_window_has_flags" = yes
13775then
Martin v. Löwis11437992002-04-12 09:54:03 +000013776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013778
13779fi
13780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13782$as_echo_n "checking for is_term_resized... " >&6; }
13783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013784/* end confdefs.h. */
13785#include <curses.h>
13786int
13787main ()
13788{
13789void *x=is_term_resized
13790 ;
13791 return 0;
13792}
13793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013794if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013795
Matthias Kloseb9621712010-04-24 17:59:49 +000013796$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013797
Matthias Kloseb159a552010-04-25 21:00:44 +000013798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013799$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013800else
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13802$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013803
13804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13806
Matthias Kloseb9621712010-04-24 17:59:49 +000013807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13808$as_echo_n "checking for resize_term... " >&6; }
13809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013810/* end confdefs.h. */
13811#include <curses.h>
13812int
13813main ()
13814{
13815void *x=resize_term
13816 ;
13817 return 0;
13818}
13819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013820if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013821
Matthias Kloseb9621712010-04-24 17:59:49 +000013822$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013823
Matthias Kloseb159a552010-04-25 21:00:44 +000013824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013825$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013826else
Matthias Kloseb9621712010-04-24 17:59:49 +000013827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13828$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013829
13830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13832
Matthias Kloseb9621712010-04-24 17:59:49 +000013833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13834$as_echo_n "checking for resizeterm... " >&6; }
13835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013836/* end confdefs.h. */
13837#include <curses.h>
13838int
13839main ()
13840{
13841void *x=resizeterm
13842 ;
13843 return 0;
13844}
13845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013846if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013847
Matthias Kloseb9621712010-04-24 17:59:49 +000013848$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013849
Matthias Kloseb159a552010-04-25 21:00:44 +000013850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013851$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013852else
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13854$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013855
13856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13860$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013861
13862if test -r /dev/ptmx
13863then
Matthias Kloseb9621712010-04-24 17:59:49 +000013864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13865$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013866
Matthias Kloseb9621712010-04-24 17:59:49 +000013867$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013868
Thomas Wouters89f507f2006-12-13 04:49:30 +000013869else
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13871$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013872fi
13873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13875$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013876
13877if test -r /dev/ptc
13878then
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13880$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013881
Matthias Kloseb9621712010-04-24 17:59:49 +000013882$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013883
Thomas Wouters89f507f2006-12-13 04:49:30 +000013884else
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13886$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013887fi
13888
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013889if test "$have_long_long" = yes
13890then
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13892$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013893 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013895else
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010013897 ac_cv_have_long_long_format="cross -- assuming no"
13898 if test x$GCC = xyes; then
13899 save_CFLAGS=$CFLAGS
13900 CFLAGS="$CFLAGS -Werror -Wformat"
13901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13902/* end confdefs.h. */
13903
13904 #include <stdio.h>
13905 #include <stddef.h>
13906
13907int
13908main ()
13909{
13910
13911 char *buffer;
13912 sprintf(buffer, "%lld", (long long)123);
13913 sprintf(buffer, "%lld", (long long)-123);
13914 sprintf(buffer, "%llu", (unsigned long long)123);
13915
13916 ;
13917 return 0;
13918}
13919_ACEOF
13920if ac_fn_c_try_compile "$LINENO"; then :
13921 ac_cv_have_long_long_format=yes
13922
13923fi
13924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13925 CFLAGS=$save_CFLAGS
13926 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013927else
Matthias Kloseb9621712010-04-24 17:59:49 +000013928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013929/* end confdefs.h. */
13930
13931 #include <stdio.h>
13932 #include <stddef.h>
13933 #include <string.h>
13934
13935 #ifdef HAVE_SYS_TYPES_H
13936 #include <sys/types.h>
13937 #endif
13938
13939 int main()
13940 {
13941 char buffer[256];
13942
13943 if (sprintf(buffer, "%lld", (long long)123) < 0)
13944 return 1;
13945 if (strcmp(buffer, "123"))
13946 return 1;
13947
13948 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13949 return 1;
13950 if (strcmp(buffer, "-123"))
13951 return 1;
13952
13953 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13954 return 1;
13955 if (strcmp(buffer, "123"))
13956 return 1;
13957
13958 return 0;
13959 }
13960
13961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013962if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013963 ac_cv_have_long_long_format=yes
13964else
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13968 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013969fi
13970
13971
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013972fi
13973
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13975$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013976fi
13977
Mark Dickinson89d7d412009-12-31 20:50:59 +000013978if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013979then
13980
Matthias Kloseb9621712010-04-24 17:59:49 +000013981$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013982
13983fi
13984
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013985if test $ac_sys_system = Darwin
13986then
13987 LIBS="$LIBS -framework CoreFoundation"
13988fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13991$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013992if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013994else
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013996 ac_cv_have_size_t_format="cross -- assuming yes"
13997
Thomas Wouters477c8d52006-05-27 19:21:47 +000013998else
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014000/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014001
Thomas Wouters477c8d52006-05-27 19:21:47 +000014002#include <stdio.h>
14003#include <stddef.h>
14004#include <string.h>
14005
Christian Heimes2c181612007-12-17 20:04:13 +000014006#ifdef HAVE_SYS_TYPES_H
14007#include <sys/types.h>
14008#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014009
14010#ifdef HAVE_SSIZE_T
14011typedef ssize_t Py_ssize_t;
14012#elif SIZEOF_VOID_P == SIZEOF_LONG
14013typedef long Py_ssize_t;
14014#else
14015typedef int Py_ssize_t;
14016#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014017
Christian Heimes2c181612007-12-17 20:04:13 +000014018int main()
14019{
14020 char buffer[256];
14021
Thomas Wouters477c8d52006-05-27 19:21:47 +000014022 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14023 return 1;
14024
Thomas Wouters89f507f2006-12-13 04:49:30 +000014025 if (strcmp(buffer, "123"))
14026 return 1;
14027
14028 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14029 return 1;
14030
14031 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014032 return 1;
14033
14034 return 0;
14035}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014036
Thomas Wouters477c8d52006-05-27 19:21:47 +000014037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014038if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014039 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014040else
Matthias Kloseb9621712010-04-24 17:59:49 +000014041 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14044 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014045fi
14046
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14049$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014050if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014051
Matthias Kloseb9621712010-04-24 17:59:49 +000014052$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014053
14054fi
14055
Matthias Kloseb9621712010-04-24 17:59:49 +000014056ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014057#ifdef HAVE_SYS_TYPES_H
14058#include <sys/types.h>
14059#endif
14060#ifdef HAVE_SYS_SOCKET_H
14061#include <sys/socket.h>
14062#endif
14063
Matthias Kloseb9621712010-04-24 17:59:49 +000014064"
Victor Stinnere0be4232011-10-25 13:06:09 +020014065if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014066
Martin v. Löwis11437992002-04-12 09:54:03 +000014067else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014068
Matthias Kloseb9621712010-04-24 17:59:49 +000014069$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014070
14071fi
14072
Michael W. Hudson54241132001-12-07 15:38:26 +000014073
Matthias Kloseb9621712010-04-24 17:59:49 +000014074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14075$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014076if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014078else
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014080 ac_cv_broken_mbstowcs=no
14081else
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014083/* end confdefs.h. */
14084
14085#include<stdlib.h>
14086int main() {
14087 size_t len = -1;
14088 const char *str = "text";
14089 len = mbstowcs(NULL, str, 0);
14090 return (len != 4);
14091}
14092
14093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014094if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014095 ac_cv_broken_mbstowcs=no
14096else
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14100 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014101fi
14102
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014103fi
14104
Matthias Kloseb9621712010-04-24 17:59:49 +000014105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14106$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014107if test "$ac_cv_broken_mbstowcs" = yes
14108then
14109
Matthias Kloseb9621712010-04-24 17:59:49 +000014110$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014111
14112fi
14113
Antoine Pitroub52ec782009-01-25 16:34:23 +000014114# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14116$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014117
14118# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014119if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014120 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014121if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014122then
14123
Matthias Kloseb9621712010-04-24 17:59:49 +000014124$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014125
Matthias Kloseb9621712010-04-24 17:59:49 +000014126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14127$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014128fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014129if test "$withval" = no
14130then
14131
14132$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14133
Matthias Kloseb9621712010-04-24 17:59:49 +000014134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14135$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014136fi
14137
Antoine Pitrou042b1282010-08-13 21:15:58 +000014138else
14139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14140$as_echo "no value specified" >&6; }
14141fi
14142
Antoine Pitroub52ec782009-01-25 16:34:23 +000014143
Matthias Kloseb17289e2012-03-15 19:51:34 +010014144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14145$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14146if ${ac_cv_computed_gotos+:} false; then :
14147 $as_echo_n "(cached) " >&6
14148else
14149 if test "$cross_compiling" = yes; then :
14150 if test "${with_computed_gotos+set}" = set; then
14151 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14152 else
14153 ac_cv_computed_gotos=no
14154 fi
14155else
14156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14157/* end confdefs.h. */
14158
14159int main(int argc, char **argv)
14160{
14161 static void *targets[1] = { &&LABEL1 };
14162 goto LABEL2;
14163LABEL1:
14164 return 0;
14165LABEL2:
14166 goto *targets[0];
14167 return 1;
14168}
14169
14170_ACEOF
14171if ac_fn_c_try_run "$LINENO"; then :
14172 ac_cv_computed_gotos=yes
14173else
14174 ac_cv_computed_gotos=no
14175fi
14176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14177 conftest.$ac_objext conftest.beam conftest.$ac_ext
14178fi
14179
14180fi
14181
14182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14183$as_echo "$ac_cv_computed_gotos" >&6; }
14184case "$ac_cv_computed_gotos" in yes*)
14185
14186$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14187
14188esac
14189
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014190case $ac_sys_system in
14191AIX*)
14192
14193$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14194 ;;
14195esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014196
Michael W. Hudson54241132001-12-07 15:38:26 +000014197
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014198
14199
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014200for h in `(cd $srcdir;echo Python/thread_*.h)`
14201do
14202 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14203done
14204
Michael W. Hudson54241132001-12-07 15:38:26 +000014205
Neal Norwitzd24499d2005-12-18 21:36:39 +000014206SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14208$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014209for dir in $SRCDIRS; do
14210 if test ! -d $dir; then
14211 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014212 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014213done
Matthias Kloseb9621712010-04-24 17:59:49 +000014214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14215$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014216
Guido van Rossum627b2d71993-12-24 10:39:16 +000014217# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014218ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014219
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014220ac_config_files="$ac_config_files Modules/ld_so_aix"
14221
Martin v. Löwis11437992002-04-12 09:54:03 +000014222cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014223# This file is a shell script that caches the results of configure
14224# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014225# scripts and configure runs, see configure's option --config-cache.
14226# It is not useful on other systems. If it contains results you don't
14227# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014228#
Martin v. Löwis11437992002-04-12 09:54:03 +000014229# config.status only pays attention to the cache file if you give it
14230# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014231#
Skip Montanaro6dead952003-09-25 14:50:04 +000014232# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014233# loading this file, other *unset* `ac_cv_foo' will be assigned the
14234# following values.
14235
14236_ACEOF
14237
Guido van Rossumf78abae1997-01-21 22:02:36 +000014238# The following way of writing the cache mishandles newlines in values,
14239# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014240# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014241# Ultrix sh set writes to stderr and can't be redirected directly,
14242# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243(
14244 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14245 eval ac_val=\$$ac_var
14246 case $ac_val in #(
14247 *${as_nl}*)
14248 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014249 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14250$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251 esac
14252 case $ac_var in #(
14253 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014254 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14255 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014256 esac ;;
14257 esac
14258 done
14259
Martin v. Löwis11437992002-04-12 09:54:03 +000014260 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014261 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14262 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014263 # `set' does not quote correctly, so add quotes: double-quote
14264 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014265 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014266 "s/'/'\\\\''/g;
14267 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014269 *)
14270 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014271 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014272 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273 esac |
14274 sort
14275) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014276 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014277 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014278 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014279 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014280 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14281 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14283 :end' >>confcache
14284if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14285 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014286 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14288$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020014289 if test ! -f "$cache_file" || test -h "$cache_file"; then
14290 cat confcache >"$cache_file"
14291 else
14292 case $cache_file in #(
14293 */* | ?:*)
14294 mv -f confcache "$cache_file"$$ &&
14295 mv -f "$cache_file"$$ "$cache_file" ;; #(
14296 *)
14297 mv -f confcache "$cache_file" ;;
14298 esac
14299 fi
14300 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014301 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14303$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014304 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014305fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014306rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014307
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014308test "x$prefix" = xNONE && prefix=$ac_default_prefix
14309# Let make expand exec_prefix.
14310test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014311
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014312DEFS=-DHAVE_CONFIG_H
14313
Skip Montanaro6dead952003-09-25 14:50:04 +000014314ac_libobjs=
14315ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014316U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014317for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14318 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014319 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014321 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14322 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14324 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014325done
14326LIBOBJS=$ac_libobjs
14327
14328LTLIBOBJS=$ac_ltlibobjs
14329
14330
Martin v. Löwis11437992002-04-12 09:54:03 +000014331
Matthias Kloseb9621712010-04-24 17:59:49 +000014332
Victor Stinnere0be4232011-10-25 13:06:09 +020014333: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014334ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014335ac_clean_files_save=$ac_clean_files
14336ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014337{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14338$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14339as_write_fail=0
14340cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014341#! $SHELL
14342# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014343# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014344# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014345# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014346
Martin v. Löwis11437992002-04-12 09:54:03 +000014347debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014348ac_cs_recheck=false
14349ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014350
Matthias Kloseb9621712010-04-24 17:59:49 +000014351SHELL=\${CONFIG_SHELL-$SHELL}
14352export SHELL
14353_ASEOF
14354cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14355## -------------------- ##
14356## M4sh Initialization. ##
14357## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359# Be more Bourne compatible
14360DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014361if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014362 emulate sh
14363 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014365 # is contrary to our usage. Disable this feature.
14366 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014367 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014368else
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 case `(set -o) 2>/dev/null` in #(
14370 *posix*) :
14371 set -o posix ;; #(
14372 *) :
14373 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014375fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014376
14377
Matthias Kloseb9621712010-04-24 17:59:49 +000014378as_nl='
14379'
14380export as_nl
14381# Printing a long string crashes Solaris 7 /usr/bin/printf.
14382as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14383as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14384as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14385# Prefer a ksh shell builtin over an external printf program on Solaris,
14386# but without wasting forks for bash or zsh.
14387if test -z "$BASH_VERSION$ZSH_VERSION" \
14388 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14389 as_echo='print -r --'
14390 as_echo_n='print -rn --'
14391elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14392 as_echo='printf %s\n'
14393 as_echo_n='printf %s'
14394else
14395 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14396 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14397 as_echo_n='/usr/ucb/echo -n'
14398 else
14399 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14400 as_echo_n_body='eval
14401 arg=$1;
14402 case $arg in #(
14403 *"$as_nl"*)
14404 expr "X$arg" : "X\\(.*\\)$as_nl";
14405 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14406 esac;
14407 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14408 '
14409 export as_echo_n_body
14410 as_echo_n='sh -c $as_echo_n_body as_echo'
14411 fi
14412 export as_echo_body
14413 as_echo='sh -c $as_echo_body as_echo'
14414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014415
14416# The user is always right.
14417if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 PATH_SEPARATOR=:
14419 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14420 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14421 PATH_SEPARATOR=';'
14422 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425
14426# IFS
14427# We need space, tab and new line, in precisely that order. Quoting is
14428# there to prevent editors from complaining about space-tab.
14429# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14430# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014431IFS=" "" $as_nl"
14432
14433# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020014434as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014435case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436 *[\\/]* ) as_myself=$0 ;;
14437 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014438for as_dir in $PATH
14439do
14440 IFS=$as_save_IFS
14441 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014442 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014444IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014446 ;;
14447esac
14448# We did not find ourselves, most probably we were run as `sh COMMAND'
14449# in which case we are not to be found in the path.
14450if test "x$as_myself" = x; then
14451 as_myself=$0
14452fi
14453if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14455 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456fi
14457
Matthias Kloseb9621712010-04-24 17:59:49 +000014458# Unset variables that we do not need and which cause bugs (e.g. in
14459# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14460# suppresses any "Segmentation fault" message there. '((' could
14461# trigger a bug in pdksh 5.2.14.
14462for as_var in BASH_ENV ENV MAIL MAILPATH
14463do eval test x\${$as_var+set} = xset \
14464 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465done
14466PS1='$ '
14467PS2='> '
14468PS4='+ '
14469
14470# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014471LC_ALL=C
14472export LC_ALL
14473LANGUAGE=C
14474export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475
Matthias Kloseb9621712010-04-24 17:59:49 +000014476# CDPATH.
14477(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14478
14479
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014480# as_fn_error STATUS ERROR [LINENO LOG_FD]
14481# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014482# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14483# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014484# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014485as_fn_error ()
14486{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014487 as_status=$1; test $as_status -eq 0 && as_status=1
14488 if test "$4"; then
14489 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14490 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014492 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 as_fn_exit $as_status
14494} # as_fn_error
14495
14496
14497# as_fn_set_status STATUS
14498# -----------------------
14499# Set $? to STATUS, without forking.
14500as_fn_set_status ()
14501{
14502 return $1
14503} # as_fn_set_status
14504
14505# as_fn_exit STATUS
14506# -----------------
14507# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14508as_fn_exit ()
14509{
14510 set +e
14511 as_fn_set_status $1
14512 exit $1
14513} # as_fn_exit
14514
14515# as_fn_unset VAR
14516# ---------------
14517# Portably unset VAR.
14518as_fn_unset ()
14519{
14520 { eval $1=; unset $1;}
14521}
14522as_unset=as_fn_unset
14523# as_fn_append VAR VALUE
14524# ----------------------
14525# Append the text in VALUE to the end of the definition contained in VAR. Take
14526# advantage of any shell optimizations that allow amortized linear growth over
14527# repeated appends, instead of the typical quadratic growth present in naive
14528# implementations.
14529if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14530 eval 'as_fn_append ()
14531 {
14532 eval $1+=\$2
14533 }'
14534else
14535 as_fn_append ()
14536 {
14537 eval $1=\$$1\$2
14538 }
14539fi # as_fn_append
14540
14541# as_fn_arith ARG...
14542# ------------------
14543# Perform arithmetic evaluation on the ARGs, and store the result in the
14544# global $as_val. Take advantage of shells that can avoid forks. The arguments
14545# must be portable across $(()) and expr.
14546if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14547 eval 'as_fn_arith ()
14548 {
14549 as_val=$(( $* ))
14550 }'
14551else
14552 as_fn_arith ()
14553 {
14554 as_val=`expr "$@" || test $? -eq 1`
14555 }
14556fi # as_fn_arith
14557
14558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559if expr a : '\(a\)' >/dev/null 2>&1 &&
14560 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14561 as_expr=expr
14562else
14563 as_expr=false
14564fi
14565
14566if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14567 as_basename=basename
14568else
14569 as_basename=false
14570fi
14571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14573 as_dirname=dirname
14574else
14575 as_dirname=false
14576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014578as_me=`$as_basename -- "$0" ||
14579$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14580 X"$0" : 'X\(//\)$' \| \
14581 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014582$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014583 sed '/^.*\/\([^/][^/]*\)\/*$/{
14584 s//\1/
14585 q
14586 }
14587 /^X\/\(\/\/\)$/{
14588 s//\1/
14589 q
14590 }
14591 /^X\/\(\/\).*/{
14592 s//\1/
14593 q
14594 }
14595 s/.*/./; q'`
14596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597# Avoid depending upon Character Ranges.
14598as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14599as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14600as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14601as_cr_digits='0123456789'
14602as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014603
14604ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014605case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014606-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014609 xy) ECHO_C='\c';;
14610 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14611 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014612 esac;;
14613*)
14614 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014615esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014616
Martin v. Löwis11437992002-04-12 09:54:03 +000014617rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618if test -d conf$$.dir; then
14619 rm -f conf$$.dir/conf$$.file
14620else
14621 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014624if (echo >conf$$.file) 2>/dev/null; then
14625 if ln -s conf$$.file conf$$ 2>/dev/null; then
14626 as_ln_s='ln -s'
14627 # ... but there are two gotchas:
14628 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14629 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14630 # In both cases, we have to default to `cp -p'.
14631 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14632 as_ln_s='cp -p'
14633 elif ln conf$$.file conf$$ 2>/dev/null; then
14634 as_ln_s=ln
14635 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014636 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014638else
14639 as_ln_s='cp -p'
14640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14642rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014643
Matthias Kloseb9621712010-04-24 17:59:49 +000014644
14645# as_fn_mkdir_p
14646# -------------
14647# Create "$as_dir" as a directory, including parents if necessary.
14648as_fn_mkdir_p ()
14649{
14650
14651 case $as_dir in #(
14652 -*) as_dir=./$as_dir;;
14653 esac
14654 test -d "$as_dir" || eval $as_mkdir_p || {
14655 as_dirs=
14656 while :; do
14657 case $as_dir in #(
14658 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14659 *) as_qdir=$as_dir;;
14660 esac
14661 as_dirs="'$as_qdir' $as_dirs"
14662 as_dir=`$as_dirname -- "$as_dir" ||
14663$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14664 X"$as_dir" : 'X\(//\)[^/]' \| \
14665 X"$as_dir" : 'X\(//\)$' \| \
14666 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14667$as_echo X"$as_dir" |
14668 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14669 s//\1/
14670 q
14671 }
14672 /^X\(\/\/\)[^/].*/{
14673 s//\1/
14674 q
14675 }
14676 /^X\(\/\/\)$/{
14677 s//\1/
14678 q
14679 }
14680 /^X\(\/\).*/{
14681 s//\1/
14682 q
14683 }
14684 s/.*/./; q'`
14685 test -d "$as_dir" && break
14686 done
14687 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014688 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014689
14690
14691} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014692if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014694else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014695 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014696 as_mkdir_p=false
14697fi
14698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014699if test -x / >/dev/null 2>&1; then
14700 as_test_x='test -x'
14701else
14702 if ls -dL / >/dev/null 2>&1; then
14703 as_ls_L_option=L
14704 else
14705 as_ls_L_option=
14706 fi
14707 as_test_x='
14708 eval sh -c '\''
14709 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014711 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014712 case $1 in #(
14713 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014716 ???[sx]*):;;*)false;;esac;fi
14717 '\'' sh
14718 '
14719fi
14720as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014721
14722# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014723as_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 +000014724
14725# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014726as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014727
14728
Martin v. Löwis11437992002-04-12 09:54:03 +000014729exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014730## ----------------------------------- ##
14731## Main body of $CONFIG_STATUS script. ##
14732## ----------------------------------- ##
14733_ASEOF
14734test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014735
Matthias Kloseb9621712010-04-24 17:59:49 +000014736cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14737# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014738# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014739# values after options handling.
14740ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014741This file was extended by python $as_me 3.3, which was
Victor Stinnere0be4232011-10-25 13:06:09 +020014742generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014743
14744 CONFIG_FILES = $CONFIG_FILES
14745 CONFIG_HEADERS = $CONFIG_HEADERS
14746 CONFIG_LINKS = $CONFIG_LINKS
14747 CONFIG_COMMANDS = $CONFIG_COMMANDS
14748 $ $0 $@
14749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750on `(hostname || uname -n) 2>/dev/null | sed 1q`
14751"
14752
Martin v. Löwis11437992002-04-12 09:54:03 +000014753_ACEOF
14754
Matthias Kloseb9621712010-04-24 17:59:49 +000014755case $ac_config_files in *"
14756"*) set x $ac_config_files; shift; ac_config_files=$*;;
14757esac
14758
14759case $ac_config_headers in *"
14760"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14761esac
14762
14763
14764cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014765# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014766config_files="$ac_config_files"
14767config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014770
Matthias Kloseb9621712010-04-24 17:59:49 +000014771cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014772ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014773\`$as_me' instantiates files and other configuration actions
14774from templates according to the current configuration. Unless the files
14775and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014776
Matthias Kloseb9621712010-04-24 17:59:49 +000014777Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014778
14779 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014780 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 --config print configuration, then exit
14782 -q, --quiet, --silent
14783 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014784 -d, --debug don't remove temporary files
14785 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 --file=FILE[:TEMPLATE]
14787 instantiate the configuration file FILE
14788 --header=FILE[:TEMPLATE]
14789 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014790
14791Configuration files:
14792$config_files
14793
14794Configuration headers:
14795$config_headers
14796
Matthias Kloseb9621712010-04-24 17:59:49 +000014797Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014800cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14801ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014802ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014803python config.status 3.3
Victor Stinnere0be4232011-10-25 13:06:09 +020014804configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014805 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014806
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014807Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014808This config.status script is free software; the Free Software Foundation
14809gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810
14811ac_pwd='$ac_pwd'
14812srcdir='$srcdir'
14813INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010014814MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014815test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014816_ACEOF
14817
Matthias Kloseb9621712010-04-24 17:59:49 +000014818cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14819# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014820ac_need_defaults=:
14821while test $# != 0
14822do
14823 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014824 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014825 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14826 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014827 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014828 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014829 --*=)
14830 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14831 ac_optarg=
14832 ac_shift=:
14833 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014835 ac_option=$1
14836 ac_optarg=$2
14837 ac_shift=shift
14838 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 esac
14840
Skip Montanaro6dead952003-09-25 14:50:04 +000014841 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014842 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014843 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14844 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014845 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014846 $as_echo "$ac_cs_version"; exit ;;
14847 --config | --confi | --conf | --con | --co | --c )
14848 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014849 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014850 debug=: ;;
14851 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014852 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 case $ac_optarg in
14854 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014855 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 esac
14857 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014858 ac_need_defaults=false;;
14859 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014860 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014861 case $ac_optarg in
14862 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14863 esac
14864 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014865 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866 --he | --h)
14867 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014868 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014869Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014872 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14873 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14874 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014875
14876 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014877 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014878Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014879
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014882
14883 esac
14884 shift
14885done
14886
Skip Montanaro6dead952003-09-25 14:50:04 +000014887ac_configure_extra_args=
14888
14889if $ac_cs_silent; then
14890 exec 6>/dev/null
14891 ac_configure_extra_args="$ac_configure_extra_args --silent"
14892fi
14893
14894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014895cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014896if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14898 shift
14899 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14900 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014903fi
14904
Martin v. Löwis11437992002-04-12 09:54:03 +000014905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907exec 5>>config.log
14908{
14909 echo
14910 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14911## Running $as_me. ##
14912_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014913 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014914} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014917cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014918_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014919
Matthias Kloseb9621712010-04-24 17:59:49 +000014920cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921
14922# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014923for ac_config_target in $ac_config_targets
14924do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925 case $ac_config_target in
14926 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14927 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14928 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014929 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14930 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14932 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014933 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014934 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935
Victor Stinnere0be4232011-10-25 13:06:09 +020014936 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 esac
14938done
14939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940
Martin v. Löwis11437992002-04-12 09:54:03 +000014941# If the user did not use the arguments to specify the items to instantiate,
14942# then the envvar interface is used. Set only those that are not.
14943# We use the long form for the default assignment because of an extremely
14944# bizarre bug on SunOS 4.1.3.
14945if $ac_need_defaults; then
14946 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14947 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14948fi
14949
Skip Montanaro6dead952003-09-25 14:50:04 +000014950# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014951# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014952# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953# Hook for its removal unless debugging.
14954# Note that there is a small window in which the directory will not be cleaned:
14955# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014956$debug ||
14957{
Victor Stinnere0be4232011-10-25 13:06:09 +020014958 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014959 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020014960 : "${ac_tmp:=$tmp}"
14961 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014963 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014964}
Martin v. Löwis11437992002-04-12 09:54:03 +000014965# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014966
Martin v. Löwis11437992002-04-12 09:54:03 +000014967{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020014969 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014970} ||
14971{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972 tmp=./conf$$-$RANDOM
14973 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014974} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020014975ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014976
Matthias Kloseb9621712010-04-24 17:59:49 +000014977# Set up the scripts for CONFIG_FILES section.
14978# No need to generate them if there are no CONFIG_FILES.
14979# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014981
Matthias Kloseb9621712010-04-24 17:59:49 +000014982
14983ac_cr=`echo X | tr X '\015'`
14984# On cygwin, bash can eat \r inside `` if the user requested igncr.
14985# But we know of no other shell where ac_cr would be empty at this
14986# point, so we can use a bashism as a fallback.
14987if test "x$ac_cr" = x; then
14988 eval ac_cr=\$\'\\r\'
14989fi
14990ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14991if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014992 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014993else
14994 ac_cs_awk_cr=$ac_cr
14995fi
14996
Victor Stinnere0be4232011-10-25 13:06:09 +020014997echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014998_ACEOF
14999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000
Matthias Kloseb9621712010-04-24 17:59:49 +000015001{
15002 echo "cat >conf$$subs.awk <<_ACEOF" &&
15003 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15004 echo "_ACEOF"
15005} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015006 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15007ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008ac_delim='%!_!# '
15009for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015011 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15014 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 break
15016 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015017 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018 else
15019 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021done
Matthias Kloseb9621712010-04-24 17:59:49 +000015022rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023
Matthias Kloseb9621712010-04-24 17:59:49 +000015024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015025cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015027sed -n '
15028h
15029s/^/S["/; s/!.*/"]=/
15030p
15031g
15032s/^[^!]*!//
15033:repl
15034t repl
15035s/'"$ac_delim"'$//
15036t delim
15037:nl
15038h
15039s/\(.\{148\}\)..*/\1/
15040t more1
15041s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15042p
15043n
15044b repl
15045:more1
15046s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15047p
15048g
15049s/.\{148\}//
15050t nl
15051:delim
15052h
15053s/\(.\{148\}\)..*/\1/
15054t more2
15055s/["\\]/\\&/g; s/^/"/; s/$/"/
15056p
15057b
15058:more2
15059s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15060p
15061g
15062s/.\{148\}//
15063t delim
15064' <conf$$subs.awk | sed '
15065/^[^""]/{
15066 N
15067 s/\n//
15068}
15069' >>$CONFIG_STATUS || ac_write_fail=1
15070rm -f conf$$subs.awk
15071cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15072_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015073cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015074 for (key in S) S_is_set[key] = 1
15075 FS = ""
15076
15077}
15078{
15079 line = $ 0
15080 nfields = split(line, field, "@")
15081 substed = 0
15082 len = length(field[1])
15083 for (i = 2; i < nfields; i++) {
15084 key = field[i]
15085 keylen = length(key)
15086 if (S_is_set[key]) {
15087 value = S[key]
15088 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15089 len += length(value) + length(field[++i])
15090 substed = 1
15091 } else
15092 len += 1 + keylen
15093 }
15094
15095 print line
15096}
15097
15098_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015100cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15101if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15102 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15103else
15104 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015105fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015106 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015107_ACEOF
15108
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015109# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15110# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111# trailing colons and then remove the whole line if VPATH becomes empty
15112# (actually we leave an empty line to preserve line numbers).
15113if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015114 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15115h
15116s///
15117s/^/:/
15118s/[ ]*$/:/
15119s/:\$(srcdir):/:/g
15120s/:\${srcdir}:/:/g
15121s/:@srcdir@:/:/g
15122s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015124x
15125s/\(=[ ]*\).*/\1/
15126G
15127s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128s/^[^=]*=[ ]*$//
15129}'
15130fi
15131
Matthias Kloseb9621712010-04-24 17:59:49 +000015132cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015133fi # test -n "$CONFIG_FILES"
15134
Matthias Kloseb9621712010-04-24 17:59:49 +000015135# Set up the scripts for CONFIG_HEADERS section.
15136# No need to generate them if there are no CONFIG_HEADERS.
15137# This happens for instance with `./config.status Makefile'.
15138if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015139cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015140BEGIN {
15141_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142
Matthias Kloseb9621712010-04-24 17:59:49 +000015143# Transform confdefs.h into an awk script `defines.awk', embedded as
15144# here-document in config.status, that substitutes the proper values into
15145# config.h.in to produce config.h.
15146
15147# Create a delimiter string that does not exist in confdefs.h, to ease
15148# handling of long lines.
15149ac_delim='%!_!# '
15150for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015151 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15152 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015153 break
15154 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015155 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015156 else
15157 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15158 fi
15159done
15160
15161# For the awk script, D is an array of macro values keyed by name,
15162# likewise P contains macro parameters if any. Preserve backslash
15163# newline sequences.
15164
15165ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15166sed -n '
15167s/.\{148\}/&'"$ac_delim"'/g
15168t rset
15169:rset
15170s/^[ ]*#[ ]*define[ ][ ]*/ /
15171t def
15172d
15173:def
15174s/\\$//
15175t bsnl
15176s/["\\]/\\&/g
15177s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15178D["\1"]=" \3"/p
15179s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15180d
15181:bsnl
15182s/["\\]/\\&/g
15183s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15184D["\1"]=" \3\\\\\\n"\\/p
15185t cont
15186s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15187t cont
15188d
15189:cont
15190n
15191s/.\{148\}/&'"$ac_delim"'/g
15192t clear
15193:clear
15194s/\\$//
15195t bsnlc
15196s/["\\]/\\&/g; s/^/"/; s/$/"/p
15197d
15198:bsnlc
15199s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15200b cont
15201' <confdefs.h | sed '
15202s/'"$ac_delim"'/"\\\
15203"/g' >>$CONFIG_STATUS || ac_write_fail=1
15204
15205cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15206 for (key in D) D_is_set[key] = 1
15207 FS = ""
15208}
15209/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15210 line = \$ 0
15211 split(line, arg, " ")
15212 if (arg[1] == "#") {
15213 defundef = arg[2]
15214 mac1 = arg[3]
15215 } else {
15216 defundef = substr(arg[1], 2)
15217 mac1 = arg[2]
15218 }
15219 split(mac1, mac2, "(") #)
15220 macro = mac2[1]
15221 prefix = substr(line, 1, index(line, defundef) - 1)
15222 if (D_is_set[macro]) {
15223 # Preserve the white space surrounding the "#".
15224 print prefix "define", macro P[macro] D[macro]
15225 next
15226 } else {
15227 # Replace #undef with comments. This is necessary, for example,
15228 # in the case of _POSIX_SOURCE, which is predefined and required
15229 # on some systems where configure will not decide to define it.
15230 if (defundef == "undef") {
15231 print "/*", prefix defundef, macro, "*/"
15232 next
15233 }
15234 }
15235}
15236{ print }
15237_ACAWK
15238_ACEOF
15239cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015240 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015241fi # test -n "$CONFIG_HEADERS"
15242
15243
15244eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15245shift
15246for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247do
15248 case $ac_tag in
15249 :[FHLC]) ac_mode=$ac_tag; continue;;
15250 esac
15251 case $ac_mode$ac_tag in
15252 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015253 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254 :[FH]-) ac_tag=-:-;;
15255 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15256 esac
15257 ac_save_IFS=$IFS
15258 IFS=:
15259 set x $ac_tag
15260 IFS=$ac_save_IFS
15261 shift
15262 ac_file=$1
15263 shift
15264
15265 case $ac_mode in
15266 :L) ac_source=$1;;
15267 :[FH])
15268 ac_file_inputs=
15269 for ac_f
15270 do
15271 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015272 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015273 *) # Look for the file first in the build tree, then in the source tree
15274 # (if the path is not absolute). The absolute path cannot be DOS-style,
15275 # because $ac_f cannot contain `:'.
15276 test -f "$ac_f" ||
15277 case $ac_f in
15278 [\\/$]*) false;;
15279 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15280 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020015281 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015283 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15284 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015285 done
15286
15287 # Let's still pretend it is `configure' which instantiates (i.e., don't
15288 # use $as_me), people would be surprised to read:
15289 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015290 configure_input='Generated from '`
15291 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15292 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293 if test x"$ac_file" != x-; then
15294 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015295 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15296$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015298 # Neutralize special characters interpreted by sed in replacement strings.
15299 case $configure_input in #(
15300 *\&* | *\|* | *\\* )
15301 ac_sed_conf_input=`$as_echo "$configure_input" |
15302 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15303 *) ac_sed_conf_input=$configure_input;;
15304 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015305
15306 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020015307 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15308 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015309 esac
15310 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015311 esac
15312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015313 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015314$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015315 X"$ac_file" : 'X\(//\)[^/]' \| \
15316 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015318$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15320 s//\1/
15321 q
15322 }
15323 /^X\(\/\/\)[^/].*/{
15324 s//\1/
15325 q
15326 }
15327 /^X\(\/\/\)$/{
15328 s//\1/
15329 q
15330 }
15331 /^X\(\/\).*/{
15332 s//\1/
15333 q
15334 }
15335 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015336 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015337 ac_builddir=.
15338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015339case "$ac_dir" in
15340.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15341*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015342 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015344 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015345 case $ac_top_builddir_sub in
15346 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15347 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15348 esac ;;
15349esac
15350ac_abs_top_builddir=$ac_pwd
15351ac_abs_builddir=$ac_pwd$ac_dir_suffix
15352# for backward compatibility:
15353ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015354
15355case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015357 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358 ac_top_srcdir=$ac_top_builddir_sub
15359 ac_abs_top_srcdir=$ac_pwd ;;
15360 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015361 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015362 ac_top_srcdir=$srcdir
15363 ac_abs_top_srcdir=$srcdir ;;
15364 *) # Relative name.
15365 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15366 ac_top_srcdir=$ac_top_build_prefix$srcdir
15367 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015368esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015370
Martin v. Löwis11437992002-04-12 09:54:03 +000015371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372 case $ac_mode in
15373 :F)
15374 #
15375 # CONFIG_FILE
15376 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015377
15378 case $INSTALL in
15379 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015380 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010015382 ac_MKDIR_P=$MKDIR_P
15383 case $MKDIR_P in
15384 [\\/$]* | ?:[\\/]* ) ;;
15385 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15386 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015387_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388
Matthias Kloseb9621712010-04-24 17:59:49 +000015389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390# If the template does not know about datarootdir, expand it.
15391# FIXME: This hack should be removed a few years after 2.60.
15392ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015393ac_sed_dataroot='
15394/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015395 p
15396 q
15397}
15398/@datadir@/p
15399/@docdir@/p
15400/@infodir@/p
15401/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015402/@mandir@/p'
15403case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015404*datarootdir*) ac_datarootdir_seen=yes;;
15405*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15407$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015409cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015410 ac_datarootdir_hack='
15411 s&@datadir@&$datadir&g
15412 s&@docdir@&$docdir&g
15413 s&@infodir@&$infodir&g
15414 s&@localedir@&$localedir&g
15415 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015416 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015417esac
15418_ACEOF
15419
15420# Neutralize VPATH when `$srcdir' = `.'.
15421# Shell code in configure.ac might set extrasub.
15422# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015423cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15424ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015425$extrasub
15426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015427cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015428:t
15429/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015430s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015431s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015432s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015433s&@srcdir@&$ac_srcdir&;t t
15434s&@abs_srcdir@&$ac_abs_srcdir&;t t
15435s&@top_srcdir@&$ac_top_srcdir&;t t
15436s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15437s&@builddir@&$ac_builddir&;t t
15438s&@abs_builddir@&$ac_abs_builddir&;t t
15439s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15440s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010015441s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015442$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015443"
Victor Stinnere0be4232011-10-25 13:06:09 +020015444eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15445 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015448 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15449 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15450 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015451 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015452which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015453$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015454which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015455
Victor Stinnere0be4232011-10-25 13:06:09 +020015456 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015457 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020015458 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15459 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015460 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015461 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015462 ;;
15463 :H)
15464 #
15465 # CONFIG_HEADER
15466 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015467 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015468 {
15469 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015470 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15471 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015472 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015473 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015474 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15475$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020015478 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015479 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015480 fi
15481 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015482 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015483 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015484 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015485 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015486 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015488
15489 esac
15490
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015491
15492 case $ac_file$ac_mode in
15493 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15494
15495 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015496done # for ac_tag
15497
Guido van Rossum627b2d71993-12-24 10:39:16 +000015498
Matthias Kloseb9621712010-04-24 17:59:49 +000015499as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015500_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015501ac_clean_files=$ac_clean_files_save
15502
Matthias Kloseb9621712010-04-24 17:59:49 +000015503test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015504 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015505
Martin v. Löwis11437992002-04-12 09:54:03 +000015506
15507# configure is writing to config.log, and then calls config.status.
15508# config.status does its own redirection, appending to config.log.
15509# Unfortunately, on DOS this fails, as config.log is still kept open
15510# by configure, so config.status won't be able to write to it; its
15511# output is simply discarded. So we exec the FD to /dev/null,
15512# effectively closing config.log, so it can be properly (re)opened and
15513# appended to by config.status. When coming back to configure, we
15514# need to make the FD available again.
15515if test "$no_create" != yes; then
15516 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015517 ac_config_status_args=
15518 test "$silent" = yes &&
15519 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015520 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015521 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015522 exec 5>>config.log
15523 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15524 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015525 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015526fi
15527if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15528 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15529$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015530fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015531
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015532
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015533echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015534if test ! -f Modules/Setup
15535then
15536 cp $srcdir/Modules/Setup.dist Modules/Setup
15537fi
15538
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015539echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015540if test ! -f Modules/Setup.local
15541then
15542 echo "# Edit this file for local setup changes" >Modules/Setup.local
15543fi
15544
15545echo "creating Makefile"
15546$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15547 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015548 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015549mv config.c Modules