blob: 7c1113db437724e8323f51cffabbae774b7e56ee [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
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003153 # avoid using uname for cross builds
3154 if test "$cross_compiling" = yes; then
3155 # ac_sys_system and ac_sys_release are only used for setting
3156 # `define_xopen_source' in the case statement below. For the
3157 # current supported cross builds, this macro is not adjusted.
3158 case "$host" in
3159 *-*-linux*)
3160 ac_sys_system=Linux
3161 ;;
3162 *-*-cygwin*)
3163 ac_sys_system=Cygwin
3164 ;;
3165 *)
3166 # for now, limit cross builds to known configurations
3167 MACHDEP="unknown"
3168 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3169 esac
3170 ac_sys_release=
3171 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003172 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003173 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003174 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003175 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003176 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003177 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003178 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003179 fi
3180 ac_md_system=`echo $ac_sys_system |
3181 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3182 ac_md_release=`echo $ac_sys_release |
3183 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3184 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003185
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003186 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003187 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003188 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003189 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003190 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003191 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003192 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003193fi
Guido van Rossum91922671997-10-09 20:24:13 +00003194
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003195# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3196# disable features if it is defined, without any means to access these
3197# features as extensions. For these systems, we skip the definition of
3198# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3199# some feature, make sure there is no alternative way to access this
3200# feature. Also, when using wildcards, make sure you have verified the
3201# need for not defining _XOPEN_SOURCE on all systems matching the
3202# wildcard, and that the wildcard does not include future systems
3203# (which may remove their limitations).
3204case $ac_sys_system/$ac_sys_release in
3205 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3206 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003207 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003208 # In addition, Stefan Krah confirms that issue #1244610 exists through
3209 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003210 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003211 define_xopen_source=no
3212 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3213 # also defined. This can be overridden by defining _BSD_SOURCE
3214 # As this has a different meaning on Linux, only define it on OpenBSD
3215
Matthias Kloseb9621712010-04-24 17:59:49 +00003216$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003217
3218 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003219 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003220 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3221 # also defined. This can be overridden by defining _BSD_SOURCE
3222 # As this has a different meaning on Linux, only define it on OpenBSD
3223
Matthias Kloseb9621712010-04-24 17:59:49 +00003224$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003225
3226 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003227 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3228 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3229 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003230 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 +00003231 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003232 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3233 # request to enable features supported by the standard as a request
3234 # to disable features not supported by the standard. The best way
3235 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3236 # entirely and define __EXTENSIONS__ instead.
3237 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003238 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003239 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3240 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003241 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003242 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003243 define_xopen_source=no;;
3244 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003245 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003246 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003247 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003248 # On FreeBSD 4, the math functions C89 does not cover are never defined
3249 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3250 FreeBSD/4.*)
3251 define_xopen_source=no;;
3252 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3253 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3254 # identifies itself as Darwin/7.*
3255 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3256 # disables platform specific features beyond repair.
3257 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3258 # has no effect, don't bother defining them
3259 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003260 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003261 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003262 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003263 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3264 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3265 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003266 AIX/4)
3267 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003268 AIX/5)
3269 if test `uname -r` -eq 1; then
3270 define_xopen_source=no
3271 fi
3272 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003273 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3274 # defining NI_NUMERICHOST.
3275 QNX/6.3.2)
3276 define_xopen_source=no
3277 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003278
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003279esac
3280
3281if test $define_xopen_source = yes
3282then
Victor Stinner14d098d2011-09-07 22:29:43 +02003283 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003284
Victor Stinner14d098d2011-09-07 22:29:43 +02003285$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003286
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003287
3288 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3289 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3290 # several APIs are not declared. Since this is also needed in some
3291 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003292
Matthias Kloseb9621712010-04-24 17:59:49 +00003293$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003294
3295
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003296
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003297$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003298
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003299fi
3300
Guido van Rossum91922671997-10-09 20:24:13 +00003301#
3302# SGI compilers allow the specification of the both the ABI and the
3303# ISA on the command line. Depending on the values of these switches,
3304# different and often incompatable code will be generated.
3305#
3306# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3307# thus supply support for various ABI/ISA combinations. The MACHDEP
3308# variable is also adjusted.
3309#
3310
3311if test ! -z "$SGI_ABI"
3312then
3313 CC="cc $SGI_ABI"
3314 LDFLAGS="$SGI_ABI $LDFLAGS"
3315 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3316fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3318$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003319
Jack Jansen6b08a402004-06-03 12:41:45 +00003320# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3321# it may influence the way we can build extensions, so distutils
3322# needs to check it
3323
Thomas Wouters477c8d52006-05-27 19:21:47 +00003324
Jack Jansen6b08a402004-06-03 12:41:45 +00003325CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003326EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003327
Guido van Rossum627b2d71993-12-24 10:39:16 +00003328# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003329
3330# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3331# for debug/optimization stuff. BASECFLAGS is for flags that are required
3332# just to get things to compile and link. Users are free to override OPT
3333# when running configure or make. The build should not break if they do.
3334# BASECFLAGS should generally not be messed with, however.
3335
3336# XXX shouldn't some/most/all of this code be merged with the stuff later
3337# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3339$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003340
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003341# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003342if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003343 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003344 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003345 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003346 without_gcc=yes;;
3347 yes) CC=gcc
3348 without_gcc=no;;
3349 *) CC=$withval
3350 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003351 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003352else
Martin v. Löwis11437992002-04-12 09:54:03 +00003353
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003354 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003355 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003356 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003357 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003358 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003359fi
3360
Matthias Kloseb9621712010-04-24 17:59:49 +00003361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3362$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003363
Guido van Rossum8b131c51995-03-09 14:10:13 +00003364# If the user switches compilers, we can't believe the cache
3365if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3366then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003367 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003368(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003369fi
3370
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003371# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3372# when the compiler supports them, but we don't always want -O2, and
3373# we set -g later.
3374if test -z "$CFLAGS"; then
3375 CFLAGS=
3376fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003377ac_ext=c
3378ac_cpp='$CPP $CPPFLAGS'
3379ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3380ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3381ac_compiler_gnu=$ac_cv_c_compiler_gnu
3382if test -n "$ac_tool_prefix"; then
3383 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3384set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3386$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003387if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003388 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003389else
3390 if test -n "$CC"; then
3391 ac_cv_prog_CC="$CC" # Let the user override the test.
3392else
Martin v. Löwis11437992002-04-12 09:54:03 +00003393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3394for as_dir in $PATH
3395do
3396 IFS=$as_save_IFS
3397 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003399 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 +00003400 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 $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 +00003402 break 2
3403 fi
3404done
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003406IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003407
Jack Jansendd19cf82001-12-06 22:36:17 +00003408fi
3409fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003410CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003411if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3413$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003414else
Matthias Kloseb9621712010-04-24 17:59:49 +00003415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3416$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003417fi
3418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003419
Martin v. Löwis11437992002-04-12 09:54:03 +00003420fi
3421if test -z "$ac_cv_prog_CC"; then
3422 ac_ct_CC=$CC
3423 # Extract the first word of "gcc", so it can be a program name with args.
3424set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3426$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003427if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003428 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003429else
3430 if test -n "$ac_ct_CC"; then
3431 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3432else
3433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3434for as_dir in $PATH
3435do
3436 IFS=$as_save_IFS
3437 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003438 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003439 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 +00003440 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003441 $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 +00003442 break 2
3443 fi
3444done
Matthias Kloseb9621712010-04-24 17:59:49 +00003445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003446IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003447
3448fi
3449fi
3450ac_ct_CC=$ac_cv_prog_ac_ct_CC
3451if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3453$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003454else
Matthias Kloseb9621712010-04-24 17:59:49 +00003455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3456$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003457fi
3458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003459 if test "x$ac_ct_CC" = x; then
3460 CC=""
3461 else
3462 case $cross_compiling:$ac_tool_warned in
3463yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003464{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3465$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466ac_tool_warned=yes ;;
3467esac
3468 CC=$ac_ct_CC
3469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003470else
3471 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003472fi
3473
Jack Jansendd19cf82001-12-06 22:36:17 +00003474if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475 if test -n "$ac_tool_prefix"; then
3476 # 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 +00003477set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3479$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003480if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003481 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003482else
3483 if test -n "$CC"; then
3484 ac_cv_prog_CC="$CC" # Let the user override the test.
3485else
Martin v. Löwis11437992002-04-12 09:54:03 +00003486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3487for as_dir in $PATH
3488do
3489 IFS=$as_save_IFS
3490 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003491 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003492 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 +00003493 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003494 $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 +00003495 break 2
3496 fi
3497done
Matthias Kloseb9621712010-04-24 17:59:49 +00003498 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003500
3501fi
3502fi
3503CC=$ac_cv_prog_CC
3504if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3506$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003507else
Matthias Kloseb9621712010-04-24 17:59:49 +00003508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3509$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003510fi
3511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003512
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003514fi
3515if test -z "$CC"; then
3516 # Extract the first word of "cc", so it can be a program name with args.
3517set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3519$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003520if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003521 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003522else
3523 if test -n "$CC"; then
3524 ac_cv_prog_CC="$CC" # Let the user override the test.
3525else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003526 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3528for as_dir in $PATH
3529do
3530 IFS=$as_save_IFS
3531 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003532 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533 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 +00003534 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3535 ac_prog_rejected=yes
3536 continue
3537 fi
3538 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 $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 +00003540 break 2
3541 fi
3542done
Matthias Kloseb9621712010-04-24 17:59:49 +00003543 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003544IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003545
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003546if test $ac_prog_rejected = yes; then
3547 # We found a bogon in the path, so make sure we never use it.
3548 set dummy $ac_cv_prog_CC
3549 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003551 # We chose a different compiler from the bogus one.
3552 # However, it has the same basename, so the bogon will be chosen
3553 # first if we set CC to just the basename; use the full file name.
3554 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003555 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003556 fi
3557fi
3558fi
3559fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003560CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003561if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3563$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003564else
Matthias Kloseb9621712010-04-24 17:59:49 +00003565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3566$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003567fi
3568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003569
Martin v. Löwis11437992002-04-12 09:54:03 +00003570fi
3571if test -z "$CC"; then
3572 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003573 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 do
3575 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3576set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3578$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003579if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003581else
3582 if test -n "$CC"; then
3583 ac_cv_prog_CC="$CC" # Let the user override the test.
3584else
Martin v. Löwis11437992002-04-12 09:54:03 +00003585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586for as_dir in $PATH
3587do
3588 IFS=$as_save_IFS
3589 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003591 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 +00003592 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 $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 +00003594 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003595 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003596done
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003599
3600fi
3601fi
3602CC=$ac_cv_prog_CC
3603if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3605$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606else
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3608$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003609fi
3610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 test -n "$CC" && break
3613 done
3614fi
3615if test -z "$CC"; then
3616 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003618do
3619 # Extract the first word of "$ac_prog", so it can be a program name with args.
3620set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3622$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003623if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003625else
3626 if test -n "$ac_ct_CC"; then
3627 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3628else
3629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3630for as_dir in $PATH
3631do
3632 IFS=$as_save_IFS
3633 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635 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 +00003636 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 $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 +00003638 break 2
3639 fi
3640done
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003642IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003643
Martin v. Löwis11437992002-04-12 09:54:03 +00003644fi
3645fi
3646ac_ct_CC=$ac_cv_prog_ac_ct_CC
3647if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3649$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650else
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655
Martin v. Löwis11437992002-04-12 09:54:03 +00003656 test -n "$ac_ct_CC" && break
3657done
Michael W. Hudson54241132001-12-07 15:38:26 +00003658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 if test "x$ac_ct_CC" = x; then
3660 CC=""
3661 else
3662 case $cross_compiling:$ac_tool_warned in
3663yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003664{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3665$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003666ac_tool_warned=yes ;;
3667esac
3668 CC=$ac_ct_CC
3669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003670fi
3671
3672fi
3673
3674
Matthias Kloseb9621712010-04-24 17:59:49 +00003675test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003677as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003678See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003679
3680# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003681$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3682set X $ac_compile
3683ac_compiler=$2
3684for ac_option in --version -v -V -qversion; do
3685 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686case "(($ac_try" in
3687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3688 *) ac_try_echo=$ac_try;;
3689esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3691$as_echo "$ac_try_echo"; } >&5
3692 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 if test -s conftest.err; then
3695 sed '10a\
3696... rest of stderr output deleted ...
3697 10q' conftest.err >conftest.er1
3698 cat conftest.er1 >&5
3699 fi
3700 rm -f conftest.er1 conftest.err
3701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3702 test $ac_status = 0; }
3703done
Martin v. Löwis11437992002-04-12 09:54:03 +00003704
Matthias Kloseb9621712010-04-24 17:59:49 +00003705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003706/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003707
Martin v. Löwis11437992002-04-12 09:54:03 +00003708int
3709main ()
3710{
3711
3712 ;
3713 return 0;
3714}
3715_ACEOF
3716ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003717ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003718# Try to create an executable without -o first, disregard a.out.
3719# It will help us diagnose broken compilers, and finding out an intuition
3720# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3722$as_echo_n "checking whether the C compiler works... " >&6; }
3723ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3724
3725# The possible output files:
3726ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728ac_rmfiles=
3729for ac_file in $ac_files
3730do
3731 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3734 esac
3735done
3736rm -f $ac_rmfiles
3737
Matthias Kloseb9621712010-04-24 17:59:49 +00003738if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739case "(($ac_try" in
3740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3741 *) ac_try_echo=$ac_try;;
3742esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003743eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3744$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3748 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3750# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3751# in a Makefile. We should not override ac_cv_exeext if it was cached,
3752# so that the user can short-circuit this test for compilers unknown to
3753# Autoconf.
3754for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003755do
3756 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003759 ;;
3760 [ab].out )
3761 # We found the default executable, but exeext='' is most
3762 # certainly right.
3763 break;;
3764 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 then :; else
3767 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3768 fi
3769 # We set ac_cv_exeext here because the later test for it is not
3770 # safe: cross compilers may not add the suffix if given an `-o'
3771 # argument, so we may need to know it at that point already.
3772 # Even if this section looks crufty: it has the advantage of
3773 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003774 break;;
3775 * )
3776 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 esac
3778done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779test "$ac_cv_exeext" = no && ac_cv_exeext=
3780
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003781else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782 ac_file=''
3783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003784if test -z "$ac_file"; then :
3785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3786$as_echo "no" >&6; }
3787$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003788sed 's/^/| /' conftest.$ac_ext >&5
3789
Matthias Kloseb9621712010-04-24 17:59:49 +00003790{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003792as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003793See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003794else
3795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3796$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3799$as_echo_n "checking for C compiler default output file name... " >&6; }
3800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3801$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003802ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003803
Matthias Kloseb9621712010-04-24 17:59:49 +00003804rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003805ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3807$as_echo_n "checking for suffix of executables... " >&6; }
3808if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809case "(($ac_try" in
3810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3811 *) ac_try_echo=$ac_try;;
3812esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3814$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003816 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3818 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003819 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3820# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3821# work properly (i.e., refer to `conftest.exe'), while it won't with
3822# `rm'.
3823for ac_file in conftest.exe conftest conftest.*; do
3824 test -f "$ac_file" || continue
3825 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003827 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3828 break;;
3829 * ) break;;
3830 esac
3831done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3834$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003835as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003836See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003838rm -f conftest conftest$ac_cv_exeext
3839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3840$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003841
3842rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003843EXEEXT=$ac_cv_exeext
3844ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3846/* end confdefs.h. */
3847#include <stdio.h>
3848int
3849main ()
3850{
3851FILE *f = fopen ("conftest.out", "w");
3852 return ferror (f) || fclose (f) != 0;
3853
3854 ;
3855 return 0;
3856}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003858ac_clean_files="$ac_clean_files conftest.out"
3859# Check that the compiler produces executables we can run. If not, either
3860# the compiler is broken, or we cross compile.
3861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3862$as_echo_n "checking whether we are cross compiling... " >&6; }
3863if test "$cross_compiling" != yes; then
3864 { { ac_try="$ac_link"
3865case "(($ac_try" in
3866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3867 *) ac_try_echo=$ac_try;;
3868esac
3869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3870$as_echo "$ac_try_echo"; } >&5
3871 (eval "$ac_link") 2>&5
3872 ac_status=$?
3873 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3874 test $ac_status = 0; }
3875 if { ac_try='./conftest$ac_cv_exeext'
3876 { { case "(($ac_try" in
3877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3878 *) ac_try_echo=$ac_try;;
3879esac
3880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3881$as_echo "$ac_try_echo"; } >&5
3882 (eval "$ac_try") 2>&5
3883 ac_status=$?
3884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3885 test $ac_status = 0; }; }; then
3886 cross_compiling=no
3887 else
3888 if test "$cross_compiling" = maybe; then
3889 cross_compiling=yes
3890 else
3891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003893as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003894If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02003895See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003896 fi
3897 fi
3898fi
3899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3900$as_echo "$cross_compiling" >&6; }
3901
3902rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3903ac_clean_files=$ac_clean_files_save
3904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3905$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003906if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003907 $as_echo_n "(cached) " >&6
3908else
3909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003910/* end confdefs.h. */
3911
3912int
3913main ()
3914{
3915
3916 ;
3917 return 0;
3918}
3919_ACEOF
3920rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003921if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922case "(($ac_try" in
3923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3924 *) ac_try_echo=$ac_try;;
3925esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3927$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003930 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3931 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932 for ac_file in conftest.o conftest.obj conftest.*; do
3933 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003935 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3937 break;;
3938 esac
3939done
3940else
Matthias Kloseb9621712010-04-24 17:59:49 +00003941 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003942sed 's/^/| /' conftest.$ac_ext >&5
3943
Matthias Kloseb9621712010-04-24 17:59:49 +00003944{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003946as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02003947See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003948fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003949rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3952$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003953OBJEXT=$ac_cv_objext
3954ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3956$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003957if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003959else
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003962
Martin v. Löwis11437992002-04-12 09:54:03 +00003963int
3964main ()
3965{
3966#ifndef __GNUC__
3967 choke me
3968#endif
3969
3970 ;
3971 return 0;
3972}
3973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003974if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003975 ac_compiler_gnu=yes
3976else
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003980ac_cv_c_compiler_gnu=$ac_compiler_gnu
3981
3982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3984$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3985if test $ac_compiler_gnu = yes; then
3986 GCC=yes
3987else
3988 GCC=
3989fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003990ac_test_CFLAGS=${CFLAGS+set}
3991ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3993$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003994if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003996else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997 ac_save_c_werror_flag=$ac_c_werror_flag
3998 ac_c_werror_flag=yes
3999 ac_cv_prog_cc_g=no
4000 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004003
Martin v. Löwis11437992002-04-12 09:54:03 +00004004int
4005main ()
4006{
4007
4008 ;
4009 return 0;
4010}
4011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004012if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004013 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004014else
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 CFLAGS=""
4016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004017/* end confdefs.h. */
4018
4019int
4020main ()
4021{
4022
4023 ;
4024 return 0;
4025}
4026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004027if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028
Matthias Kloseb9621712010-04-24 17:59:49 +00004029else
4030 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004031 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033/* end confdefs.h. */
4034
4035int
4036main ()
4037{
4038
4039 ;
4040 return 0;
4041}
4042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004043if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004044 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4051 ac_c_werror_flag=$ac_save_c_werror_flag
4052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4054$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004055if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004057elif test $ac_cv_prog_cc_g = yes; then
4058 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004059 CFLAGS="-g -O2"
4060 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004061 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004062 fi
4063else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004064 if test "$GCC" = yes; then
4065 CFLAGS="-O2"
4066 else
4067 CFLAGS=
4068 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4071$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004072if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004074else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004075 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004076ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004078/* end confdefs.h. */
4079#include <stdarg.h>
4080#include <stdio.h>
4081#include <sys/types.h>
4082#include <sys/stat.h>
4083/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4084struct buf { int x; };
4085FILE * (*rcsopen) (struct buf *, struct stat *, int);
4086static char *e (p, i)
4087 char **p;
4088 int i;
4089{
4090 return p[i];
4091}
4092static char *f (char * (*g) (char **, int), char **p, ...)
4093{
4094 char *s;
4095 va_list v;
4096 va_start (v,p);
4097 s = g (p, va_arg (v,int));
4098 va_end (v);
4099 return s;
4100}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004101
4102/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4103 function prototypes and stuff, but not '\xHH' hex character constants.
4104 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004105 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004106 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4107 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004108 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004109int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4112 inside strings and character constants. */
4113#define FOO(x) 'x'
4114int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4115
Skip Montanaro6dead952003-09-25 14:50:04 +00004116int test (int i, double x);
4117struct s1 {int (*f) (int a);};
4118struct s2 {int (*f) (double a);};
4119int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4120int argc;
4121char **argv;
4122int
4123main ()
4124{
4125return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4126 ;
4127 return 0;
4128}
4129_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4131 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004132do
4133 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004137rm -f core conftest.err conftest.$ac_objext
4138 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004139done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004140rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004141CC=$ac_save_CC
4142
4143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004144# AC_CACHE_VAL
4145case "x$ac_cv_prog_cc_c89" in
4146 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4148$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004149 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4151$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004152 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004153 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4155$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004156esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004157if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004158
Matthias Kloseb9621712010-04-24 17:59:49 +00004159fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004160
Martin v. Löwis11437992002-04-12 09:54:03 +00004161ac_ext=c
4162ac_cpp='$CPP $CPPFLAGS'
4163ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4164ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4165ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004166
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004167
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004168
4169
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4171$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004173# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004174if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004175 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004176
4177 case $withval in
4178 no) with_cxx_main=no
4179 MAINCC='$(CC)';;
4180 yes) with_cxx_main=yes
4181 MAINCC='$(CXX)';;
4182 *) with_cxx_main=yes
4183 MAINCC=$withval
4184 if test -z "$CXX"
4185 then
4186 CXX=$withval
4187 fi;;
4188 esac
4189else
4190
4191 with_cxx_main=no
4192 MAINCC='$(CC)'
4193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194fi
4195
Matthias Kloseb9621712010-04-24 17:59:49 +00004196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4197$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004198
4199preset_cxx="$CXX"
4200if test -z "$CXX"
4201then
4202 case "$CC" in
4203 gcc) # Extract the first word of "g++", so it can be a program name with args.
4204set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4206$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004207if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004209else
4210 case $CXX in
4211 [\\/]* | ?:[\\/]*)
4212 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4213 ;;
4214 *)
4215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4216for as_dir in notfound
4217do
4218 IFS=$as_save_IFS
4219 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004220 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221 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 +00004222 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004223 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004224 break 2
4225 fi
4226done
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004229
4230 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4231 ;;
4232esac
4233fi
4234CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004235if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4237$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004238else
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4240$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004243 ;;
4244 cc) # Extract the first word of "c++", so it can be a program name with args.
4245set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4247$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004248if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004249 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004250else
4251 case $CXX in
4252 [\\/]* | ?:[\\/]*)
4253 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4254 ;;
4255 *)
4256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4257for as_dir in notfound
4258do
4259 IFS=$as_save_IFS
4260 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004261 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262 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 +00004263 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004264 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004265 break 2
4266 fi
4267done
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004270
4271 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4272 ;;
4273esac
4274fi
4275CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004276if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4278$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004279else
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4281$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004283
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004284 ;;
4285 esac
4286 if test "$CXX" = "notfound"
4287 then
4288 CXX=""
4289 fi
4290fi
4291if test -z "$CXX"
4292then
4293 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4294do
4295 # Extract the first word of "$ac_prog", so it can be a program name with args.
4296set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4298$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004299if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004301else
4302 if test -n "$CXX"; then
4303 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4304else
4305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4306for as_dir in $PATH
4307do
4308 IFS=$as_save_IFS
4309 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004310 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311 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 +00004312 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004314 break 2
4315 fi
4316done
Matthias Kloseb9621712010-04-24 17:59:49 +00004317 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004319
4320fi
4321fi
4322CXX=$ac_cv_prog_CXX
4323if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4325$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004326else
Matthias Kloseb9621712010-04-24 17:59:49 +00004327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4328$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004329fi
4330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004332 test -n "$CXX" && break
4333done
4334test -n "$CXX" || CXX="notfound"
4335
4336 if test "$CXX" = "notfound"
4337 then
4338 CXX=""
4339 fi
4340fi
4341if test "$preset_cxx" != "$CXX"
4342then
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004344
4345 By default, distutils will build C++ extension modules with \"$CXX\".
4346 If this is not intended, then set CXX on the configure command line.
4347 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004348$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004349
4350 By default, distutils will build C++ extension modules with \"$CXX\".
4351 If this is not intended, then set CXX on the configure command line.
4352 " >&2;}
4353fi
4354
4355
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4357$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4358save_LDFLAGS="$LDFLAGS"
4359LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004360
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4362/* end confdefs.h. */
4363
4364int
4365main ()
4366{
4367
4368 ;
4369 return 0;
4370}
4371_ACEOF
4372if ac_fn_c_try_link "$LINENO"; then :
4373 NO_AS_NEEDED="-Wl,--no-as-needed"
4374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4375$as_echo "yes" >&6; }
4376else
4377 NO_AS_NEEDED=""
4378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4379$as_echo "no" >&6; }
4380fi
4381rm -f core conftest.err conftest.$ac_objext \
4382 conftest$ac_exeext conftest.$ac_ext
4383LDFLAGS="$save_LDFLAGS"
4384
4385
4386
4387# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004388ac_ext=c
4389ac_cpp='$CPP $CPPFLAGS'
4390ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4391ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4392ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4394$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004395# On Suns, sometimes $CPP names a directory.
4396if test -n "$CPP" && test -d "$CPP"; then
4397 CPP=
4398fi
4399if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004400 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004401 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004402else
Martin v. Löwis11437992002-04-12 09:54:03 +00004403 # Double quotes because CPP needs to be expanded
4404 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4405 do
4406 ac_preproc_ok=false
4407for ac_c_preproc_warn_flag in '' yes
4408do
4409 # Use a header file that comes with gcc, so configuring glibc
4410 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004411 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4412 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004413 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004414 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004416/* end confdefs.h. */
4417#ifdef __STDC__
4418# include <limits.h>
4419#else
4420# include <assert.h>
4421#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004422 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004424if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004425
Matthias Kloseb9621712010-04-24 17:59:49 +00004426else
Martin v. Löwis11437992002-04-12 09:54:03 +00004427 # Broken: fails on valid input.
4428continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004429fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004430rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004431
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004432 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004433 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004436#include <ac_nonexistent.h>
4437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004438if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004439 # Broken: success on invalid input.
4440continue
4441else
Martin v. Löwis11437992002-04-12 09:54:03 +00004442 # Passes both tests.
4443ac_preproc_ok=:
4444break
4445fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004446rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004447
4448done
4449# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004450rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004451if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004452 break
4453fi
4454
4455 done
4456 ac_cv_prog_CPP=$CPP
4457
4458fi
4459 CPP=$ac_cv_prog_CPP
4460else
4461 ac_cv_prog_CPP=$CPP
4462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4464$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004465ac_preproc_ok=false
4466for ac_c_preproc_warn_flag in '' yes
4467do
4468 # Use a header file that comes with gcc, so configuring glibc
4469 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004470 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4471 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004472 # On the NeXT, cc -E runs the code through the compiler's parser,
4473 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004475/* end confdefs.h. */
4476#ifdef __STDC__
4477# include <limits.h>
4478#else
4479# include <assert.h>
4480#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004481 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004483if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004484
Matthias Kloseb9621712010-04-24 17:59:49 +00004485else
Martin v. Löwis11437992002-04-12 09:54:03 +00004486 # Broken: fails on valid input.
4487continue
4488fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004489rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004490
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004492 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004495#include <ac_nonexistent.h>
4496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004497if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004498 # Broken: success on invalid input.
4499continue
4500else
Martin v. Löwis11437992002-04-12 09:54:03 +00004501 # Passes both tests.
4502ac_preproc_ok=:
4503break
4504fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004505rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004506
4507done
4508# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004509rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004510if $ac_preproc_ok; then :
4511
Martin v. Löwis11437992002-04-12 09:54:03 +00004512else
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4514$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004515as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004516See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004517fi
4518
4519ac_ext=c
4520ac_cpp='$CPP $CPPFLAGS'
4521ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4522ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4523ac_compiler_gnu=$ac_cv_c_compiler_gnu
4524
4525
Matthias Kloseb9621712010-04-24 17:59:49 +00004526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4527$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004528if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004529 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004530else
Matthias Kloseb9621712010-04-24 17:59:49 +00004531 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004532 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004533 # Loop through the user's path and test for each of PROGNAME-LIST
4534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004535for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4536do
4537 IFS=$as_save_IFS
4538 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004539 for ac_prog in grep ggrep; do
4540 for ac_exec_ext in '' $ac_executable_extensions; do
4541 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4542 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4543# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004544 # Check for GNU $ac_path_GREP
4545case `"$ac_path_GREP" --version 2>&1` in
4546*GNU*)
4547 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4548*)
4549 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004550 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004551 while :
4552 do
4553 cat "conftest.in" "conftest.in" >"conftest.tmp"
4554 mv "conftest.tmp" "conftest.in"
4555 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004556 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004557 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4558 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004560 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4561 # Best one so far, save it but keep looking for a better one
4562 ac_cv_path_GREP="$ac_path_GREP"
4563 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004564 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004565 # 10*(2^10) chars as input seems more than enough
4566 test $ac_count -gt 10 && break
4567 done
4568 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4569esac
4570
Matthias Kloseb9621712010-04-24 17:59:49 +00004571 $ac_path_GREP_found && break 3
4572 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004573 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004574 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004575IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004576 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004577 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 +00004578 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004579else
4580 ac_cv_path_GREP=$GREP
4581fi
4582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4585$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004586 GREP="$ac_cv_path_GREP"
4587
4588
Matthias Kloseb9621712010-04-24 17:59:49 +00004589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4590$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004591if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004592 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004593else
4594 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4595 then ac_cv_path_EGREP="$GREP -E"
4596 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004597 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004598 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004599 # Loop through the user's path and test for each of PROGNAME-LIST
4600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004601for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4602do
4603 IFS=$as_save_IFS
4604 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004605 for ac_prog in egrep; do
4606 for ac_exec_ext in '' $ac_executable_extensions; do
4607 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4608 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4609# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004610 # Check for GNU $ac_path_EGREP
4611case `"$ac_path_EGREP" --version 2>&1` in
4612*GNU*)
4613 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4614*)
4615 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004616 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004617 while :
4618 do
4619 cat "conftest.in" "conftest.in" >"conftest.tmp"
4620 mv "conftest.tmp" "conftest.in"
4621 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004622 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004623 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4624 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004625 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004626 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4627 # Best one so far, save it but keep looking for a better one
4628 ac_cv_path_EGREP="$ac_path_EGREP"
4629 ac_path_EGREP_max=$ac_count
4630 fi
4631 # 10*(2^10) chars as input seems more than enough
4632 test $ac_count -gt 10 && break
4633 done
4634 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4635esac
4636
Matthias Kloseb9621712010-04-24 17:59:49 +00004637 $ac_path_EGREP_found && break 3
4638 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004639 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004640 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004641IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004642 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004643 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 +00004644 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004645else
4646 ac_cv_path_EGREP=$EGREP
4647fi
4648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004649 fi
4650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4652$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004653 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004654
4655
Matthias Kloseb9621712010-04-24 17:59:49 +00004656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4657$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004658if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004659 $as_echo_n "(cached) " >&6
4660else
4661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004662/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004663#include <stdlib.h>
4664#include <stdarg.h>
4665#include <string.h>
4666#include <float.h>
4667
4668int
4669main ()
4670{
4671
4672 ;
4673 return 0;
4674}
4675_ACEOF
4676if ac_fn_c_try_compile "$LINENO"; then :
4677 ac_cv_header_stdc=yes
4678else
4679 ac_cv_header_stdc=no
4680fi
4681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4682
4683if test $ac_cv_header_stdc = yes; then
4684 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4686/* end confdefs.h. */
4687#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004688
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004689_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004690if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004691 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004692
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004693else
Matthias Kloseb9621712010-04-24 17:59:49 +00004694 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004695fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004696rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004697
Matthias Kloseb9621712010-04-24 17:59:49 +00004698fi
4699
4700if test $ac_cv_header_stdc = yes; then
4701 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4703/* end confdefs.h. */
4704#include <stdlib.h>
4705
4706_ACEOF
4707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4708 $EGREP "free" >/dev/null 2>&1; then :
4709
4710else
4711 ac_cv_header_stdc=no
4712fi
4713rm -f conftest*
4714
4715fi
4716
4717if test $ac_cv_header_stdc = yes; then
4718 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4719 if test "$cross_compiling" = yes; then :
4720 :
4721else
4722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4723/* end confdefs.h. */
4724#include <ctype.h>
4725#include <stdlib.h>
4726#if ((' ' & 0x0FF) == 0x020)
4727# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4728# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4729#else
4730# define ISLOWER(c) \
4731 (('a' <= (c) && (c) <= 'i') \
4732 || ('j' <= (c) && (c) <= 'r') \
4733 || ('s' <= (c) && (c) <= 'z'))
4734# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4735#endif
4736
4737#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4738int
4739main ()
4740{
4741 int i;
4742 for (i = 0; i < 256; i++)
4743 if (XOR (islower (i), ISLOWER (i))
4744 || toupper (i) != TOUPPER (i))
4745 return 2;
4746 return 0;
4747}
4748_ACEOF
4749if ac_fn_c_try_run "$LINENO"; then :
4750
4751else
4752 ac_cv_header_stdc=no
4753fi
4754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4755 conftest.$ac_objext conftest.beam conftest.$ac_ext
4756fi
4757
4758fi
4759fi
4760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4761$as_echo "$ac_cv_header_stdc" >&6; }
4762if test $ac_cv_header_stdc = yes; then
4763
4764$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4765
4766fi
4767
4768# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4769for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4770 inttypes.h stdint.h unistd.h
4771do :
4772 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4773ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4774"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004775if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004776 cat >>confdefs.h <<_ACEOF
4777#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4778_ACEOF
4779
4780fi
4781
4782done
4783
4784
4785
4786 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 +02004787if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 MINIX=yes
4789else
4790 MINIX=
4791fi
4792
4793
4794 if test "$MINIX" = yes; then
4795
4796$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4797
4798
4799$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4800
4801
4802$as_echo "#define _MINIX 1" >>confdefs.h
4803
4804 fi
4805
4806
4807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4808$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004809if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 $as_echo_n "(cached) " >&6
4811else
4812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4813/* end confdefs.h. */
4814
4815# define __EXTENSIONS__ 1
4816 $ac_includes_default
4817int
4818main ()
4819{
4820
4821 ;
4822 return 0;
4823}
4824_ACEOF
4825if ac_fn_c_try_compile "$LINENO"; then :
4826 ac_cv_safe_to_define___extensions__=yes
4827else
4828 ac_cv_safe_to_define___extensions__=no
4829fi
4830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4831fi
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4833$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4834 test $ac_cv_safe_to_define___extensions__ = yes &&
4835 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4836
4837 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4838
4839 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4840
4841 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4842
4843 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4844
4845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004846
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847# Check for unsupported systems
4848case $ac_sys_system/$ac_sys_release in
4849atheos*|Linux*/1*)
4850 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4851 echo See README for details.
4852 exit 1;;
4853esac
4854
4855
Matthias Kloseb9621712010-04-24 17:59:49 +00004856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4857$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858
4859# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004860if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861 withval=$with_suffix;
4862 case $withval in
4863 no) EXEEXT=;;
4864 yes) EXEEXT=.exe;;
4865 *) EXEEXT=$withval;;
4866 esac
4867fi
4868
Matthias Kloseb9621712010-04-24 17:59:49 +00004869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4870$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871
4872# Test whether we're running on a non-case-sensitive system, in which
4873# case we give a warning if no ext is given
4874
Matthias Kloseb9621712010-04-24 17:59:49 +00004875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4876$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004877if test ! -d CaseSensitiveTestDir; then
4878mkdir CaseSensitiveTestDir
4879fi
4880
4881if test -d casesensitivetestdir
4882then
Matthias Kloseb9621712010-04-24 17:59:49 +00004883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4884$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885 BUILDEXEEXT=.exe
4886else
Matthias Kloseb9621712010-04-24 17:59:49 +00004887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4888$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004889 BUILDEXEEXT=$EXEEXT
4890fi
4891rmdir CaseSensitiveTestDir
4892
4893case $MACHDEP in
4894bsdos*)
4895 case $CC in
4896 gcc) CC="$CC -D_HAVE_BSDI";;
4897 esac;;
4898esac
4899
4900case $ac_sys_system in
4901hp*|HP*)
4902 case $CC in
4903 cc|*/cc) CC="$CC -Ae";;
4904 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004905esac
4906
4907
4908
Matthias Kloseb9621712010-04-24 17:59:49 +00004909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4910$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004911if test -z "$LIBRARY"
4912then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004913 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4916$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917
4918# LDLIBRARY is the name of the library to link against (as opposed to the
4919# name of the library into which to insert object files). BLDLIBRARY is also
4920# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4921# is blank as the main program is not linked directly against LDLIBRARY.
4922# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4923# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4924# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4925# DLLLIBRARY is the shared (i.e., DLL) library.
4926#
4927# RUNSHARED is used to run shared python without installed libraries
4928#
4929# INSTSONAME is the name of the shared library that will be use to install
4930# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004931#
4932# LDVERSION is the shared library version number, normally the Python version
4933# with the ABI build flags appended.
4934
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935
4936
4937
4938
4939
4940
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004941
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942LDLIBRARY="$LIBRARY"
4943BLDLIBRARY='$(LDLIBRARY)'
4944INSTSONAME='$(LDLIBRARY)'
4945DLLLIBRARY=''
4946LDLIBRARYDIR=''
4947RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004948LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949
4950# LINKCC is the command that links the python executable -- default is $(CC).
4951# If CXX is set, and if it is needed to link a main function that was
4952# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4953# python might then depend on the C++ runtime
4954# This is altered for AIX in order to build the export list before
4955# linking.
4956
Matthias Kloseb9621712010-04-24 17:59:49 +00004957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4958$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004959if test -z "$LINKCC"
4960then
4961 LINKCC='$(PURIFY) $(MAINCC)'
4962 case $ac_sys_system in
4963 AIX*)
4964 exp_extra="\"\""
4965 if test $ac_sys_release -ge 5 -o \
4966 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4967 exp_extra="."
4968 fi
4969 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970 QNX*)
4971 # qcc must be used because the other compilers do not
4972 # support -N.
4973 LINKCC=qcc;;
4974 esac
4975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4977$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978
4979# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4980# make sure we default having it set to "no": this is used by
4981# distutils.unixccompiler to know if it should add --enable-new-dtags
4982# to linker command lines, and failing to detect GNU ld simply results
4983# in the same bahaviour as before.
4984
Matthias Kloseb9621712010-04-24 17:59:49 +00004985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4986$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004987ac_prog=ld
4988if test "$GCC" = yes; then
4989 ac_prog=`$CC -print-prog-name=ld`
4990fi
4991case `"$ac_prog" -V 2>&1 < /dev/null` in
4992 *GNU*)
4993 GNULD=yes;;
4994 *)
4995 GNULD=no;;
4996esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4998$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004999
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5001$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005002if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005003 $as_echo_n "(cached) " >&6
5004else
5005 ac_cv_c_inline=no
5006for ac_kw in inline __inline__ __inline; do
5007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5008/* end confdefs.h. */
5009#ifndef __cplusplus
5010typedef int foo_t;
5011static $ac_kw foo_t static_foo () {return 0; }
5012$ac_kw foo_t foo () {return 0; }
5013#endif
5014
5015_ACEOF
5016if ac_fn_c_try_compile "$LINENO"; then :
5017 ac_cv_c_inline=$ac_kw
5018fi
5019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5020 test "$ac_cv_c_inline" != no && break
5021done
5022
5023fi
5024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5025$as_echo "$ac_cv_c_inline" >&6; }
5026
5027case $ac_cv_c_inline in
5028 inline | yes) ;;
5029 *)
5030 case $ac_cv_c_inline in
5031 no) ac_val=;;
5032 *) ac_val=$ac_cv_c_inline;;
5033 esac
5034 cat >>confdefs.h <<_ACEOF
5035#ifndef __cplusplus
5036#define inline $ac_val
5037#endif
5038_ACEOF
5039 ;;
5040esac
5041
5042if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005043
5044$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005045
5046
5047fi
5048
5049
Matthias Kloseb9621712010-04-24 17:59:49 +00005050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5051$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005053if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054 enableval=$enable_shared;
5055fi
5056
5057
5058if test -z "$enable_shared"
5059then
5060 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005061 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062 enable_shared="yes";;
5063 *)
5064 enable_shared="no";;
5065 esac
5066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5068$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069
Matthias Kloseb9621712010-04-24 17:59:49 +00005070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5071$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005073if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074 enableval=$enable_profiling; ac_save_cc="$CC"
5075 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077 ac_enable_profiling="no"
5078else
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005080/* end confdefs.h. */
5081int main() { return 0; }
5082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005083if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084 ac_enable_profiling="yes"
5085else
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5089 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090fi
5091
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005092 CC="$ac_save_cc"
5093fi
5094
Matthias Kloseb9621712010-04-24 17:59:49 +00005095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
5096$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097
5098case "$ac_enable_profiling" in
5099 "yes")
5100 BASECFLAGS="-pg $BASECFLAGS"
5101 LDFLAGS="-pg $LDFLAGS"
5102 ;;
5103esac
5104
Matthias Kloseb9621712010-04-24 17:59:49 +00005105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5106$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107
5108# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5109# library that we build, but we do not want to link against it (we
5110# will find it with a -framework option). For this reason there is an
5111# extra variable BLDLIBRARY against which Python and the extension
5112# modules are linked, BLDLIBRARY. This is normally the same as
5113# LDLIBRARY, but empty for MacOSX framework builds.
5114if test "$enable_framework"
5115then
5116 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5117 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5118 BLDLIBRARY=''
5119else
5120 BLDLIBRARY='$(LDLIBRARY)'
5121fi
5122
5123# Other platforms follow
5124if test $enable_shared = "yes"; then
5125
Matthias Kloseb9621712010-04-24 17:59:49 +00005126$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005127
5128 case $ac_sys_system in
5129 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005130 LDLIBRARY='libpython$(LDVERSION).dll.a'
5131 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132 ;;
5133 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005134 LDLIBRARY='libpython$(LDVERSION).so'
5135 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005136 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5137 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005138 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005139 then
5140 PY3LIBRARY=libpython3.so
5141 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005143 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005144 LDLIBRARY='libpython$(LDVERSION).so'
5145 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005146 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5147 case $ac_sys_system in
5148 FreeBSD*)
5149 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5150 ;;
5151 esac
5152 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005153 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005154 then
5155 PY3LIBRARY=libpython3.so
5156 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005157 ;;
5158 hp*|HP*)
5159 case `uname -m` in
5160 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005161 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005162 ;;
5163 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005164 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005165 ;;
5166 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005167 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5169 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005170 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005171 LDLIBRARY='libpython$(LDVERSION).dylib'
5172 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005173 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5174 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005175 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005176 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005177 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5178 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005179
5180 esac
5181else # shared is disabled
5182 case $ac_sys_system in
5183 CYGWIN*)
5184 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005185 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186 ;;
5187 esac
5188fi
5189
Matthias Kloseb9621712010-04-24 17:59:49 +00005190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5191$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005192
5193if test -n "$ac_tool_prefix"; then
5194 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5195set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5197$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005198if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005199 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200else
5201 if test -n "$RANLIB"; then
5202 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5203else
5204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5205for as_dir in $PATH
5206do
5207 IFS=$as_save_IFS
5208 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005209 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005210 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5211 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005213 break 2
5214 fi
5215done
Matthias Kloseb9621712010-04-24 17:59:49 +00005216 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005217IFS=$as_save_IFS
5218
5219fi
5220fi
5221RANLIB=$ac_cv_prog_RANLIB
5222if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5224$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005225else
Matthias Kloseb9621712010-04-24 17:59:49 +00005226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5227$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228fi
5229
5230
5231fi
5232if test -z "$ac_cv_prog_RANLIB"; then
5233 ac_ct_RANLIB=$RANLIB
5234 # Extract the first word of "ranlib", so it can be a program name with args.
5235set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5237$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005238if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005239 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005240else
5241 if test -n "$ac_ct_RANLIB"; then
5242 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5243else
5244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5245for as_dir in $PATH
5246do
5247 IFS=$as_save_IFS
5248 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005249 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005250 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5251 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005252 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005253 break 2
5254 fi
5255done
Matthias Kloseb9621712010-04-24 17:59:49 +00005256 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005257IFS=$as_save_IFS
5258
5259fi
5260fi
5261ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5262if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5264$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005265else
Matthias Kloseb9621712010-04-24 17:59:49 +00005266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5267$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005268fi
5269
5270 if test "x$ac_ct_RANLIB" = x; then
5271 RANLIB=":"
5272 else
5273 case $cross_compiling:$ac_tool_warned in
5274yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005275{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5276$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005277ac_tool_warned=yes ;;
5278esac
5279 RANLIB=$ac_ct_RANLIB
5280 fi
5281else
5282 RANLIB="$ac_cv_prog_RANLIB"
5283fi
5284
5285
5286for ac_prog in ar aal
5287do
5288 # Extract the first word of "$ac_prog", so it can be a program name with args.
5289set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5291$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005292if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005293 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005294else
5295 if test -n "$AR"; then
5296 ac_cv_prog_AR="$AR" # Let the user override the test.
5297else
5298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5299for as_dir in $PATH
5300do
5301 IFS=$as_save_IFS
5302 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005303 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5305 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005307 break 2
5308 fi
5309done
Matthias Kloseb9621712010-04-24 17:59:49 +00005310 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005311IFS=$as_save_IFS
5312
5313fi
5314fi
5315AR=$ac_cv_prog_AR
5316if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5318$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005319else
Matthias Kloseb9621712010-04-24 17:59:49 +00005320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5321$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322fi
5323
5324
5325 test -n "$AR" && break
5326done
5327test -n "$AR" || AR="ar"
5328
5329
5330# tweak ARFLAGS only if the user didn't set it on the command line
5331
5332if test -z "$ARFLAGS"
5333then
5334 ARFLAGS="rc"
5335fi
5336
5337
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005338DISABLE_ASDLGEN=""
5339# Extract the first word of "python", so it can be a program name with args.
5340set dummy python; ac_word=$2
5341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5342$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005343if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005344 $as_echo_n "(cached) " >&6
5345else
5346 if test -n "$HAS_PYTHON"; then
5347 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5348else
5349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5350for as_dir in $PATH
5351do
5352 IFS=$as_save_IFS
5353 test -z "$as_dir" && as_dir=.
5354 for ac_exec_ext in '' $ac_executable_extensions; do
5355 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5356 ac_cv_prog_HAS_PYTHON="found"
5357 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5358 break 2
5359 fi
5360done
5361 done
5362IFS=$as_save_IFS
5363
5364 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5365fi
5366fi
5367HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5368if test -n "$HAS_PYTHON"; then
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5370$as_echo "$HAS_PYTHON" >&6; }
5371else
5372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5373$as_echo "no" >&6; }
5374fi
5375
5376
5377if test $HAS_HG != found -o $HAS_PYTHON != found
5378then
5379 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5380fi
5381
5382
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383case $MACHDEP in
5384bsdos*|hp*|HP*)
5385 # install -d does not work on BSDI or HP-UX
5386 if test -z "$INSTALL"
5387 then
5388 INSTALL="${srcdir}/install-sh -c"
5389 fi
5390esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005391# Find a good install program. We prefer a C program (faster),
5392# so one script is as good as another. But avoid the broken or
5393# incompatible versions:
5394# SysV /etc/install, /usr/sbin/install
5395# SunOS /usr/etc/install
5396# IRIX /sbin/install
5397# AIX /bin/install
5398# AmigaOS /C/install, which installs bootblocks on floppy discs
5399# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5400# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5401# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5402# OS/2's system install, which has a completely different semantic
5403# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005404# Reject install programs that cannot install multiple files.
5405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5406$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005408if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410else
5411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5412for as_dir in $PATH
5413do
5414 IFS=$as_save_IFS
5415 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 # Account for people who put trailing slashes in PATH elements.
5417case $as_dir/ in #((
5418 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005421 /usr/ucb/* ) ;;
5422 *)
5423 # OSF1 and SCO ODT 3.0 have their own names for install.
5424 # Don't use installbsd from OSF since it installs stuff as root
5425 # by default.
5426 for ac_prog in ginstall scoinst install; do
5427 for ac_exec_ext in '' $ac_executable_extensions; do
5428 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5429 if test $ac_prog = install &&
5430 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5431 # AIX install. It has an incompatible calling convention.
5432 :
5433 elif test $ac_prog = install &&
5434 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5435 # program-specific install script used by HP pwplus--don't use.
5436 :
5437 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005438 rm -rf conftest.one conftest.two conftest.dir
5439 echo one > conftest.one
5440 echo two > conftest.two
5441 mkdir conftest.dir
5442 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5443 test -s conftest.one && test -s conftest.two &&
5444 test -s conftest.dir/conftest.one &&
5445 test -s conftest.dir/conftest.two
5446 then
5447 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5448 break 3
5449 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450 fi
5451 fi
5452 done
5453 done
5454 ;;
5455esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005456
5457 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458IFS=$as_save_IFS
5459
Matthias Kloseb9621712010-04-24 17:59:49 +00005460rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005461
5462fi
5463 if test "${ac_cv_path_install+set}" = set; then
5464 INSTALL=$ac_cv_path_install
5465 else
5466 # As a last resort, use the slow shell script. Don't cache a
5467 # value for INSTALL within a source directory, because that will
5468 # break other packages using the cache if that directory is
5469 # removed, or if the value is a relative name.
5470 INSTALL=$ac_install_sh
5471 fi
5472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5474$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
5476# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5477# It thinks the first close brace ends the variable substitution.
5478test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5479
5480test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5481
5482test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5483
Matthias Klose93a0ef12012-03-15 18:08:34 +01005484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5485$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5486if test -z "$MKDIR_P"; then
5487 if ${ac_cv_path_mkdir+:} false; then :
5488 $as_echo_n "(cached) " >&6
5489else
5490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5491for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5492do
5493 IFS=$as_save_IFS
5494 test -z "$as_dir" && as_dir=.
5495 for ac_prog in mkdir gmkdir; do
5496 for ac_exec_ext in '' $ac_executable_extensions; do
5497 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
5498 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5499 'mkdir (GNU coreutils) '* | \
5500 'mkdir (coreutils) '* | \
5501 'mkdir (fileutils) '4.1*)
5502 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5503 break 3;;
5504 esac
5505 done
5506 done
5507 done
5508IFS=$as_save_IFS
5509
5510fi
5511
5512 test -d ./--version && rmdir ./--version
5513 if test "${ac_cv_path_mkdir+set}" = set; then
5514 MKDIR_P="$ac_cv_path_mkdir -p"
5515 else
5516 # As a last resort, use the slow shell script. Don't cache a
5517 # value for MKDIR_P within a source directory, because that will
5518 # break other packages using the cache if that directory is
5519 # removed, or if the value is a relative name.
5520 MKDIR_P="$ac_install_sh -d"
5521 fi
5522fi
5523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5524$as_echo "$MKDIR_P" >&6; }
5525
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526
5527# Not every filesystem supports hard links
5528
5529if test -z "$LN" ; then
5530 case $ac_sys_system in
5531 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532 *) LN=ln;;
5533 esac
5534fi
5535
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005536# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005537
5538ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005539
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005540# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5542$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543
5544# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005545if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546 withval=$with_pydebug;
5547if test "$withval" != no
5548then
5549
Matthias Kloseb9621712010-04-24 17:59:49 +00005550$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551
Matthias Kloseb9621712010-04-24 17:59:49 +00005552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5553$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005555 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005556else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5557$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558fi
5559else
Matthias Kloseb9621712010-04-24 17:59:49 +00005560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5561$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562fi
5563
5564
5565# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5566# merged with this chunk of code?
5567
5568# Optimizer/debugger flags
5569# ------------------------
5570# (The following bit of code is complicated enough - please keep things
5571# indented properly. Just pretend you're editing Python code. ;-)
5572
5573# There are two parallel sets of case statements below, one that checks to
5574# see if OPT was set and one that does BASECFLAGS setting based upon
5575# compiler and platform. BASECFLAGS tweaks need to be made even if the
5576# user set OPT.
5577
5578# tweak OPT based on compiler and platform, only if the user didn't set
5579# it on the command line
5580
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005581if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582then
5583 case $GCC in
5584 yes)
5585 if test "$CC" != 'g++' ; then
5586 STRICT_PROTO="-Wstrict-prototypes"
5587 fi
5588 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5589 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5590 WRAP="-fwrapv"
5591 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005592
5593 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005594 case $CC in
5595 *clang*) WRAP="-fwrapv"
5596 ;;
5597 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005598
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599 case $ac_cv_prog_cc_g in
5600 yes)
5601 if test "$Py_DEBUG" = 'true' ; then
5602 # Optimization messes up debuggers, so turn it off for
5603 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005604 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605 else
5606 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5607 fi
5608 ;;
5609 *)
5610 OPT="-O3 -Wall $STRICT_PROTO"
5611 ;;
5612 esac
5613 case $ac_sys_system in
5614 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5615 ;;
5616 esac
5617 ;;
5618
5619 *)
5620 OPT="-O"
5621 ;;
5622 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623fi
5624
5625
5626
5627# The -arch flags for universal builds on OSX
5628UNIVERSAL_ARCH_FLAGS=
5629
5630
5631# tweak BASECFLAGS based on compiler and platform
5632case $GCC in
5633yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005634 # Python doesn't violate C99 aliasing rules, but older versions of
5635 # GCC produce warnings for legal Python code. Enable
5636 # -fno-strict-aliasing on versions of GCC that support but produce
5637 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5639$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640 ac_save_cc="$CC"
5641 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005642 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005643 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005644 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005645else
Matthias Kloseb9621712010-04-24 17:59:49 +00005646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005648
Matthias Kloseb159a552010-04-25 21:00:44 +00005649
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005650int
5651main ()
5652{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005653
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005654 ;
5655 return 0;
5656}
Matthias Kloseb159a552010-04-25 21:00:44 +00005657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005659if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005660
5661 CC="$ac_save_cc -fstrict-aliasing"
5662 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005664/* end confdefs.h. */
5665
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005666 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005667int
5668main ()
5669{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005670double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005671 ;
5672 return 0;
5673}
Matthias Kloseb159a552010-04-25 21:00:44 +00005674
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005676if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005677
5678 ac_cv_no_strict_aliasing=no
5679
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680else
Matthias Kloseb159a552010-04-25 21:00:44 +00005681
5682 ac_cv_no_strict_aliasing=yes
5683
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005684fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005686
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005687else
Matthias Kloseb159a552010-04-25 21:00:44 +00005688
5689 ac_cv_no_strict_aliasing=no
5690
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005693fi
5694
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005695 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5698$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005699 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 then
5701 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5702 fi
5703
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
5705$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
5706 ac_save_cc="$CC"
5707 CC="$CC -Wunused-result -Werror"
5708 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005709 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005710 $as_echo_n "(cached) " >&6
5711else
5712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5713/* end confdefs.h. */
5714
5715
5716int
5717main ()
5718{
5719
5720 ;
5721 return 0;
5722}
5723
5724_ACEOF
5725if ac_fn_c_try_compile "$LINENO"; then :
5726
5727 ac_cv_disable_unused_result_warning=yes
5728
5729else
5730
5731 ac_cv_disable_unused_result_warning=no
5732
5733fi
5734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5735fi
5736
5737 CFLAGS="$save_CFLAGS"
5738 CC="$ac_save_cc"
5739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
5740$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
5741
5742 if test $ac_cv_disable_unused_result_warning = yes
5743 then
5744 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
5745 fi
5746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5748 # support. Without this, treatment of subnormals doesn't follow
5749 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01005750 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751 alpha*)
5752 BASECFLAGS="$BASECFLAGS -mieee"
5753 ;;
5754 esac
5755
5756 case $ac_sys_system in
5757 SCO_SV*)
5758 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5759 ;;
5760 # is there any other compiler on Darwin besides gcc?
5761 Darwin*)
5762 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5763 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005764 if test "${CC}" = gcc
5765 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5767$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005768 case "${UNIVERSALSDK}" in
5769 */MacOSX10.4u.sdk)
5770 # Build using 10.4 SDK, force usage of gcc when the
5771 # compiler is gcc, otherwise the user will get very
5772 # confusing error messages when building on OSX 10.6
5773 CC=gcc-4.0
5774 CPP=cpp-4.0
5775 ;;
5776 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5778$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005779 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780
5781
5782 if test "${enable_universalsdk}"; then
5783 UNIVERSAL_ARCH_FLAGS=""
5784 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5785 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5786 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005787 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5789 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005790 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005791 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792
5793 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5794 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005795 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005796 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005798 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5799 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005800 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005801 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005802
5803 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5804 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005805 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005806 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005809 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 +00005810
5811 fi
5812
5813
Ronald Oussoren666028b2010-04-18 19:07:43 +00005814 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5815 if test "${UNIVERSALSDK}" != "/"
5816 then
5817 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5818 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005819 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820 fi
5821 fi
5822
5823 # Calculate the right deployment target for this build.
5824 #
5825 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5826 if test ${cur_target} '>' 10.2; then
5827 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005828 if test ${enable_universalsdk}; then
5829 if test "${UNIVERSAL_ARCHS}" = "all"; then
5830 # Ensure that the default platform for a
5831 # 4-way universal build is OSX 10.5,
5832 # that's the first OS release where
5833 # 4-way builds make sense.
5834 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005835
5836 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5837 cur_target='10.5'
5838
5839 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5840 cur_target='10.5'
5841
5842 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5843 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005844 fi
5845 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005846 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005847 # On Intel macs default to a deployment
5848 # target of 10.4, that's the first OSX
5849 # release with Intel support.
5850 cur_target="10.4"
5851 fi
5852 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853 fi
5854 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5855
5856 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5857 # environment with a value that is the same as what we'll use
5858 # in the Makefile to ensure that we'll get the same compiler
5859 # environment during configure and build time.
5860 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5861 export MACOSX_DEPLOYMENT_TARGET
5862 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5863
5864 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 esac
5866 ;;
5867
5868*)
5869 case $ac_sys_system in
5870 OpenUNIX*|UnixWare*)
5871 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5872 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873 SCO_SV*)
5874 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5875 ;;
5876 esac
5877 ;;
5878esac
5879
5880if test "$Py_DEBUG" = 'true'; then
5881 :
5882else
5883 OPT="-DNDEBUG $OPT"
5884fi
5885
5886if test "$ac_arch_flags"
5887then
5888 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5889fi
5890
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891# Check whether GCC supports PyArg_ParseTuple format
5892if test "$GCC" = "yes"
5893then
Matthias Kloseb9621712010-04-24 17:59:49 +00005894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5895$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 save_CFLAGS=$CFLAGS
5897 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899/* end confdefs.h. */
5900
5901 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902int
5903main ()
5904{
5905
5906 ;
5907 return 0;
5908}
Matthias Kloseb159a552010-04-25 21:00:44 +00005909
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005911if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912
Matthias Kloseb159a552010-04-25 21:00:44 +00005913
Matthias Kloseb9621712010-04-24 17:59:49 +00005914$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915
Matthias Kloseb159a552010-04-25 21:00:44 +00005916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005917$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005918
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919else
Matthias Kloseb159a552010-04-25 21:00:44 +00005920
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005922$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923
5924fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5926 CFLAGS=$save_CFLAGS
5927fi
5928
5929# On some compilers, pthreads are available without further options
5930# (e.g. MacOS X). On some of these systems, the compiler will not
5931# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5932# So we have to see first whether pthreads are available without
5933# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5935$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005936if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005937 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938else
Matthias Kloseb9621712010-04-24 17:59:49 +00005939 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ac_cv_pthread_is_default=no
5941else
Matthias Kloseb9621712010-04-24 17:59:49 +00005942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943/* end confdefs.h. */
5944
5945#include <pthread.h>
5946
5947void* routine(void* p){return NULL;}
5948
5949int main(){
5950 pthread_t p;
5951 if(pthread_create(&p,NULL,routine,NULL)!=0)
5952 return 1;
5953 (void)pthread_detach(p);
5954 return 0;
5955}
5956
5957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005958if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959
5960 ac_cv_pthread_is_default=yes
5961 ac_cv_kthread=no
5962 ac_cv_pthread=no
5963
5964else
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5968 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969fi
5970
5971
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972fi
5973
Matthias Kloseb9621712010-04-24 17:59:49 +00005974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5975$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976
5977
5978if test $ac_cv_pthread_is_default = yes
5979then
5980 ac_cv_kpthread=no
5981else
5982# -Kpthread, if available, provides the right #defines
5983# and linker options to make pthread_create available
5984# Some compilers won't report that they do not support -Kpthread,
5985# so we need to run a program to see whether it really made the
5986# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5988$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005989if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991else
5992 ac_save_cc="$CC"
5993CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005994if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995 ac_cv_kpthread=no
5996else
Matthias Kloseb9621712010-04-24 17:59:49 +00005997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998/* end confdefs.h. */
5999
6000#include <pthread.h>
6001
6002void* routine(void* p){return NULL;}
6003
6004int main(){
6005 pthread_t p;
6006 if(pthread_create(&p,NULL,routine,NULL)!=0)
6007 return 1;
6008 (void)pthread_detach(p);
6009 return 0;
6010}
6011
6012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006013if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014 ac_cv_kpthread=yes
6015else
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6019 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020fi
6021
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022CC="$ac_save_cc"
6023fi
6024
Matthias Kloseb9621712010-04-24 17:59:49 +00006025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6026$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027fi
6028
6029if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6030then
6031# -Kthread, if available, provides the right #defines
6032# and linker options to make pthread_create available
6033# Some compilers won't report that they do not support -Kthread,
6034# so we need to run a program to see whether it really made the
6035# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6037$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006038if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040else
6041 ac_save_cc="$CC"
6042CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006043if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044 ac_cv_kthread=no
6045else
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047/* end confdefs.h. */
6048
6049#include <pthread.h>
6050
6051void* routine(void* p){return NULL;}
6052
6053int main(){
6054 pthread_t p;
6055 if(pthread_create(&p,NULL,routine,NULL)!=0)
6056 return 1;
6057 (void)pthread_detach(p);
6058 return 0;
6059}
6060
6061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006062if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063 ac_cv_kthread=yes
6064else
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006067rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6068 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069fi
6070
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071CC="$ac_save_cc"
6072fi
6073
Matthias Kloseb9621712010-04-24 17:59:49 +00006074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6075$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076fi
6077
6078if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6079then
6080# -pthread, if available, provides the right #defines
6081# and linker options to make pthread_create available
6082# Some compilers won't report that they do not support -pthread,
6083# so we need to run a program to see whether it really made the
6084# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6086$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006087if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006088 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089else
6090 ac_save_cc="$CC"
6091CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006092if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093 ac_cv_pthread=no
6094else
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096/* end confdefs.h. */
6097
6098#include <pthread.h>
6099
6100void* routine(void* p){return NULL;}
6101
6102int main(){
6103 pthread_t p;
6104 if(pthread_create(&p,NULL,routine,NULL)!=0)
6105 return 1;
6106 (void)pthread_detach(p);
6107 return 0;
6108}
6109
6110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006111if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006112 ac_cv_pthread=yes
6113else
Matthias Kloseb9621712010-04-24 17:59:49 +00006114 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6117 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006118fi
6119
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006120CC="$ac_save_cc"
6121fi
6122
Matthias Kloseb9621712010-04-24 17:59:49 +00006123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6124$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006125fi
6126
6127# If we have set a CC compiler flag for thread support then
6128# check if it works for CXX, too.
6129ac_cv_cxx_thread=no
6130if test ! -z "$CXX"
6131then
Matthias Kloseb9621712010-04-24 17:59:49 +00006132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6133$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134ac_save_cxx="$CXX"
6135
6136if test "$ac_cv_kpthread" = "yes"
6137then
6138 CXX="$CXX -Kpthread"
6139 ac_cv_cxx_thread=yes
6140elif test "$ac_cv_kthread" = "yes"
6141then
6142 CXX="$CXX -Kthread"
6143 ac_cv_cxx_thread=yes
6144elif test "$ac_cv_pthread" = "yes"
6145then
6146 CXX="$CXX -pthread"
6147 ac_cv_cxx_thread=yes
6148fi
6149
6150if test $ac_cv_cxx_thread = yes
6151then
6152 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6153 $CXX -c conftest.$ac_ext 2>&5
6154 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6155 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6156 then
6157 ac_cv_cxx_thread=yes
6158 else
6159 ac_cv_cxx_thread=no
6160 fi
6161 rm -fr conftest*
6162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6164$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165fi
6166CXX="$ac_save_cxx"
6167
6168
6169# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6171$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006172if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006173 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174else
Matthias Kloseb9621712010-04-24 17:59:49 +00006175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176/* end confdefs.h. */
6177#include <stdlib.h>
6178#include <stdarg.h>
6179#include <string.h>
6180#include <float.h>
6181
6182int
6183main ()
6184{
6185
6186 ;
6187 return 0;
6188}
6189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006190if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191 ac_cv_header_stdc=yes
6192else
Matthias Kloseb9621712010-04-24 17:59:49 +00006193 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6196
6197if test $ac_cv_header_stdc = yes; then
6198 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200/* end confdefs.h. */
6201#include <string.h>
6202
6203_ACEOF
6204if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006205 $EGREP "memchr" >/dev/null 2>&1; then :
6206
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207else
6208 ac_cv_header_stdc=no
6209fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006210rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211
6212fi
6213
6214if test $ac_cv_header_stdc = yes; then
6215 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217/* end confdefs.h. */
6218#include <stdlib.h>
6219
6220_ACEOF
6221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006222 $EGREP "free" >/dev/null 2>&1; then :
6223
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006224else
6225 ac_cv_header_stdc=no
6226fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006227rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228
6229fi
6230
6231if test $ac_cv_header_stdc = yes; then
6232 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006233 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234 :
6235else
Matthias Kloseb9621712010-04-24 17:59:49 +00006236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237/* end confdefs.h. */
6238#include <ctype.h>
6239#include <stdlib.h>
6240#if ((' ' & 0x0FF) == 0x020)
6241# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6242# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6243#else
6244# define ISLOWER(c) \
6245 (('a' <= (c) && (c) <= 'i') \
6246 || ('j' <= (c) && (c) <= 'r') \
6247 || ('s' <= (c) && (c) <= 'z'))
6248# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6249#endif
6250
6251#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6252int
6253main ()
6254{
6255 int i;
6256 for (i = 0; i < 256; i++)
6257 if (XOR (islower (i), ISLOWER (i))
6258 || toupper (i) != TOUPPER (i))
6259 return 2;
6260 return 0;
6261}
6262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006263if ac_fn_c_try_run "$LINENO"; then :
6264
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006265else
Matthias Kloseb9621712010-04-24 17:59:49 +00006266 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6269 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270fi
6271
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006272fi
6273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6275$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006276if test $ac_cv_header_stdc = yes; then
6277
Matthias Kloseb9621712010-04-24 17:59:49 +00006278$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279
6280fi
6281
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006282for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006283fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006284ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006285sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006286unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006287poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006288sys/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 +01006289sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006290sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006291sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006292sys/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 -07006293libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006294bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006295do :
6296 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6297ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006298if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006299 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006300#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006301_ACEOF
6302
6303fi
6304
Guido van Rossum627b2d71993-12-24 10:39:16 +00006305done
6306
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006307ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006308for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006309 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6311$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006312if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006313 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006314else
Matthias Kloseb9621712010-04-24 17:59:49 +00006315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006316/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006317#include <sys/types.h>
6318#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006319
Martin v. Löwis11437992002-04-12 09:54:03 +00006320int
6321main ()
6322{
6323if ((DIR *) 0)
6324return 0;
6325 ;
6326 return 0;
6327}
6328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006330 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006331else
Matthias Kloseb9621712010-04-24 17:59:49 +00006332 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006336eval ac_res=\$$as_ac_Header
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6338$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006339if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006340 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006341#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006342_ACEOF
6343
6344ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006345fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006346
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006347done
6348# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6349if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6351$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006352if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006353 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006354else
Martin v. Löwis11437992002-04-12 09:54:03 +00006355 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006359/* Override any GCC internal prototype to avoid an error.
6360 Use char because int might match the return type of a GCC
6361 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006362#ifdef __cplusplus
6363extern "C"
6364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006365char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006366int
6367main ()
6368{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006369return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006370 ;
6371 return 0;
6372}
6373_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006374for ac_lib in '' dir; do
6375 if test -z "$ac_lib"; then
6376 ac_res="none required"
6377 else
6378 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006379 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006380 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006381 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006382 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006384rm -f core conftest.err conftest.$ac_objext \
6385 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006386 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006387 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006389done
Victor Stinnere0be4232011-10-25 13:06:09 +02006390if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006391
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006392else
6393 ac_cv_search_opendir=no
6394fi
6395rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006396LIBS=$ac_func_search_save_LIBS
6397fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6399$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006400ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006401if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006402 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006403
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006405
Michael W. Hudson54241132001-12-07 15:38:26 +00006406else
Matthias Kloseb9621712010-04-24 17:59:49 +00006407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6408$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006409if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006410 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006411else
6412 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006416/* Override any GCC internal prototype to avoid an error.
6417 Use char because int might match the return type of a GCC
6418 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006419#ifdef __cplusplus
6420extern "C"
6421#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006422char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006423int
6424main ()
6425{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006426return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006427 ;
6428 return 0;
6429}
6430_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006431for ac_lib in '' x; do
6432 if test -z "$ac_lib"; then
6433 ac_res="none required"
6434 else
6435 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006436 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006437 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006438 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006439 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006441rm -f core conftest.err conftest.$ac_objext \
6442 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006443 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006444 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006446done
Victor Stinnere0be4232011-10-25 13:06:09 +02006447if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006449else
6450 ac_cv_search_opendir=no
6451fi
6452rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006453LIBS=$ac_func_search_save_LIBS
6454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6456$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006457ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006458if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006459 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006461fi
6462
6463fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006464
Matthias Kloseb9621712010-04-24 17:59:49 +00006465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6466$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006467if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006468 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006469else
Matthias Kloseb9621712010-04-24 17:59:49 +00006470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006471/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006472#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006473int
6474main ()
6475{
6476return makedev(0, 0);
6477 ;
6478 return 0;
6479}
6480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006482 ac_cv_header_sys_types_h_makedev=yes
6483else
Matthias Kloseb9621712010-04-24 17:59:49 +00006484 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006485fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006486rm -f core conftest.err conftest.$ac_objext \
6487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006488
6489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6491$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006492
6493if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006494ac_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 +02006495if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006496
Matthias Kloseb9621712010-04-24 17:59:49 +00006497$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006498
6499fi
6500
6501
6502
6503 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006504 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 +02006505if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006506
Matthias Kloseb9621712010-04-24 17:59:49 +00006507$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006508
6509fi
6510
6511
6512 fi
6513fi
6514
Michael W. Hudson54241132001-12-07 15:38:26 +00006515
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006516# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6517for ac_header in net/if.h
6518do :
6519 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6520#ifdef STDC_HEADERS
6521# include <stdlib.h>
6522# include <stddef.h>
6523#else
6524# ifdef HAVE_STDLIB_H
6525# include <stdlib.h>
6526# endif
6527#endif
6528#ifdef HAVE_SYS_SOCKET_H
6529# include <sys/socket.h>
6530#endif
6531
6532"
Victor Stinnere0be4232011-10-25 13:06:09 +02006533if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006534 cat >>confdefs.h <<_ACEOF
6535#define HAVE_NET_IF_H 1
6536_ACEOF
6537
6538fi
6539
6540done
6541
6542
6543
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006544# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006545for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006546do :
6547 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006548#ifdef HAVE_CURSES_H
6549#include <curses.h>
6550#endif
6551
Matthias Kloseb9621712010-04-24 17:59:49 +00006552"
Victor Stinnere0be4232011-10-25 13:06:09 +02006553if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006554 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006555#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006556_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006557
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006558fi
6559
6560done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006561
6562
Martin v. Löwis11017b12006-01-14 18:12:57 +00006563# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006564for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006565do :
6566 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 +00006567#ifdef HAVE_ASM_TYPES_H
6568#include <asm/types.h>
6569#endif
6570#ifdef HAVE_SYS_SOCKET_H
6571#include <sys/socket.h>
6572#endif
6573
Matthias Kloseb9621712010-04-24 17:59:49 +00006574"
Victor Stinnere0be4232011-10-25 13:06:09 +02006575if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006576 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006577#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006578_ACEOF
6579
6580fi
6581
6582done
6583
6584
Charles-François Natali47413c12011-10-06 19:47:44 +02006585# On Linux, can.h and can/raw.h require sys/socket.h
6586for ac_header in linux/can.h linux/can/raw.h
6587do :
6588 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6589ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
6590#ifdef HAVE_SYS_SOCKET_H
6591#include <sys/socket.h>
6592#endif
6593
6594"
6595if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6596 cat >>confdefs.h <<_ACEOF
6597#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6598_ACEOF
6599
6600fi
6601
6602done
6603
6604
Guido van Rossum627b2d71993-12-24 10:39:16 +00006605# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006606was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6608$as_echo_n "checking for clock_t in time.h... " >&6; }
6609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006610/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006611#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006612
6613_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006614if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006615 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006616 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006617else
Martin v. Löwis11437992002-04-12 09:54:03 +00006618
6619
Matthias Kloseb9621712010-04-24 17:59:49 +00006620$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006621
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006622
Guido van Rossum627b2d71993-12-24 10:39:16 +00006623fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006624rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006625
Matthias Kloseb9621712010-04-24 17:59:49 +00006626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6627$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006628
Matthias Kloseb9621712010-04-24 17:59:49 +00006629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6630$as_echo_n "checking for makedev... " >&6; }
6631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006632/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006633
Jesus Cea740f53a2010-04-28 11:35:30 +00006634#if defined(MAJOR_IN_MKDEV)
6635#include <sys/mkdev.h>
6636#elif defined(MAJOR_IN_SYSMACROS)
6637#include <sys/sysmacros.h>
6638#else
6639#include <sys/types.h>
6640#endif
6641
Neal Norwitz11690112002-07-30 01:08:28 +00006642int
6643main ()
6644{
Jesus Cea740f53a2010-04-28 11:35:30 +00006645
6646 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006647 ;
6648 return 0;
6649}
Matthias Kloseb159a552010-04-25 21:00:44 +00006650
Neal Norwitz11690112002-07-30 01:08:28 +00006651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006652if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006653 ac_cv_has_makedev=yes
6654else
Matthias Kloseb9621712010-04-24 17:59:49 +00006655 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006657rm -f core conftest.err conftest.$ac_objext \
6658 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6660$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006661if test "$ac_cv_has_makedev" = "yes"; then
6662
Matthias Kloseb9621712010-04-24 17:59:49 +00006663$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006664
6665fi
6666
Martin v. Löwis399a6892002-10-04 10:22:02 +00006667# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6668# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6669# defined, but the compiler does not support pragma redefine_extname,
6670# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6671# structures (such as rlimit64) without declaring them. As a
6672# work-around, disable LFS on such configurations
6673
6674use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6676$as_echo_n "checking Solaris LFS bug... " >&6; }
6677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006678/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006679
6680#define _LARGEFILE_SOURCE 1
6681#define _FILE_OFFSET_BITS 64
6682#include <sys/resource.h>
6683
Martin v. Löwis399a6892002-10-04 10:22:02 +00006684int
6685main ()
6686{
6687struct rlimit foo;
6688 ;
6689 return 0;
6690}
6691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006692if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006693 sol_lfs_bug=no
6694else
Matthias Kloseb9621712010-04-24 17:59:49 +00006695 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6699$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006700if test "$sol_lfs_bug" = "yes"; then
6701 use_lfs=no
6702fi
6703
6704if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006705# Two defines needed to enable largefile support on various platforms
6706# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006707case $ac_sys_system/$ac_sys_release in
6708AIX*)
6709
6710$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6711
6712 ;;
6713esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006714
Matthias Kloseb9621712010-04-24 17:59:49 +00006715$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006716
6717
Matthias Kloseb9621712010-04-24 17:59:49 +00006718$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006719
Martin v. Löwis399a6892002-10-04 10:22:02 +00006720fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006721
Guido van Rossum84e7b241996-08-19 21:59:00 +00006722# Add some code to confdefs.h so that the test for off_t works on SCO
6723cat >> confdefs.h <<\EOF
6724#if defined(SCO_DS)
6725#undef _OFF_T
6726#endif
6727EOF
6728
Guido van Rossumef2255b2000-03-10 22:30:29 +00006729# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006730ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006731if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006732
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006733else
Martin v. Löwis11437992002-04-12 09:54:03 +00006734
6735cat >>confdefs.h <<_ACEOF
6736#define mode_t int
6737_ACEOF
6738
6739fi
6740
Matthias Kloseb9621712010-04-24 17:59:49 +00006741ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006742if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006743
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006744else
Martin v. Löwis11437992002-04-12 09:54:03 +00006745
6746cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006747#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006748_ACEOF
6749
6750fi
6751
Matthias Kloseb9621712010-04-24 17:59:49 +00006752ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006753if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006754
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006755else
Martin v. Löwis11437992002-04-12 09:54:03 +00006756
6757cat >>confdefs.h <<_ACEOF
6758#define pid_t int
6759_ACEOF
6760
6761fi
6762
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006763
Martin v. Löwis11437992002-04-12 09:54:03 +00006764cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006765#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006766_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006767
Matthias Kloseb9621712010-04-24 17:59:49 +00006768ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006769if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006770
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006771else
Martin v. Löwis11437992002-04-12 09:54:03 +00006772
6773cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006774#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006775_ACEOF
6776
6777fi
6778
Matthias Kloseb9621712010-04-24 17:59:49 +00006779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6780$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006781if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006782 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006783else
Matthias Kloseb9621712010-04-24 17:59:49 +00006784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006785/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006786#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006787
6788_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006789if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006790 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006791 ac_cv_type_uid_t=yes
6792else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006793 ac_cv_type_uid_t=no
6794fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006795rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006796
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6799$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006800if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006801
Matthias Kloseb9621712010-04-24 17:59:49 +00006802$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006803
6804
Matthias Kloseb9621712010-04-24 17:59:49 +00006805$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006806
6807fi
6808
Matthias Kloseb9621712010-04-24 17:59:49 +00006809ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6810case $ac_cv_c_uint32_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 _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006815
6816
6817cat >>confdefs.h <<_ACEOF
6818#define uint32_t $ac_cv_c_uint32_t
6819_ACEOF
6820;;
6821 esac
6822
Matthias Kloseb9621712010-04-24 17:59:49 +00006823ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6824case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006825 no|yes) ;; #(
6826 *)
6827
Matthias Kloseb9621712010-04-24 17:59:49 +00006828$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006829
6830
6831cat >>confdefs.h <<_ACEOF
6832#define uint64_t $ac_cv_c_uint64_t
6833_ACEOF
6834;;
6835 esac
6836
Matthias Kloseb9621712010-04-24 17:59:49 +00006837ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6838case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006839 no|yes) ;; #(
6840 *)
6841
6842cat >>confdefs.h <<_ACEOF
6843#define int32_t $ac_cv_c_int32_t
6844_ACEOF
6845;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006846esac
6847
Matthias Kloseb9621712010-04-24 17:59:49 +00006848ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6849case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006850 no|yes) ;; #(
6851 *)
6852
6853cat >>confdefs.h <<_ACEOF
6854#define int64_t $ac_cv_c_int64_t
6855_ACEOF
6856;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006857esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006858
Matthias Kloseb9621712010-04-24 17:59:49 +00006859ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006860if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006861
Matthias Kloseb9621712010-04-24 17:59:49 +00006862$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006863
6864fi
6865
Stefan Krah1919b7e2012-03-21 18:25:23 +01006866ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
6867if test "x$ac_cv_type___uint128_t" = xyes; then :
6868
6869$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
6870
6871fi
6872
Jack Jansendd19cf82001-12-06 22:36:17 +00006873
Michael W. Hudson54241132001-12-07 15:38:26 +00006874# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006875# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006876# The cast to long int works around a bug in the HP C Compiler
6877# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6878# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6879# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6881$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006882if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006883 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006884else
Matthias Kloseb9621712010-04-24 17:59:49 +00006885 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 +00006886
Martin v. Löwis11437992002-04-12 09:54:03 +00006887else
Matthias Kloseb9621712010-04-24 17:59:49 +00006888 if test "$ac_cv_type_int" = yes; then
6889 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6890$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006891as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02006892See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893 else
6894 ac_cv_sizeof_int=0
6895 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006897
Martin v. Löwis11437992002-04-12 09:54:03 +00006898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6900$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006901
6902
6903
Martin v. Löwis11437992002-04-12 09:54:03 +00006904cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006905#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006906_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006907
6908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006909# The cast to long int works around a bug in the HP C Compiler
6910# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6911# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6912# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6914$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006915if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006916 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006917else
Matthias Kloseb9621712010-04-24 17:59:49 +00006918 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 +00006919
Martin v. Löwis11437992002-04-12 09:54:03 +00006920else
Matthias Kloseb9621712010-04-24 17:59:49 +00006921 if test "$ac_cv_type_long" = yes; then
6922 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006924as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02006925See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006926 else
6927 ac_cv_sizeof_long=0
6928 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006930
Martin v. Löwis11437992002-04-12 09:54:03 +00006931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6933$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006934
6935
6936
Martin v. Löwis11437992002-04-12 09:54:03 +00006937cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006938#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006939_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006940
6941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006942# The cast to long int works around a bug in the HP C Compiler
6943# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6944# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6945# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6947$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006948if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006949 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006950else
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 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 +00006952
Martin v. Löwis11437992002-04-12 09:54:03 +00006953else
Matthias Kloseb9621712010-04-24 17:59:49 +00006954 if test "$ac_cv_type_void_p" = yes; then
6955 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6956$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006957as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02006958See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006959 else
6960 ac_cv_sizeof_void_p=0
6961 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006963
Martin v. Löwis11437992002-04-12 09:54:03 +00006964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6966$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006967
6968
6969
Martin v. Löwis11437992002-04-12 09:54:03 +00006970cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006971#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006972_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006973
6974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006975# The cast to long int works around a bug in the HP C Compiler
6976# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6977# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6978# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6980$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006981if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006983else
Matthias Kloseb9621712010-04-24 17:59:49 +00006984 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 +00006985
Martin v. Löwis11437992002-04-12 09:54:03 +00006986else
Matthias Kloseb9621712010-04-24 17:59:49 +00006987 if test "$ac_cv_type_short" = yes; then
6988 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006990as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02006991See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006992 else
6993 ac_cv_sizeof_short=0
6994 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006996
Martin v. Löwis11437992002-04-12 09:54:03 +00006997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6999$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007000
7001
7002
Martin v. Löwis11437992002-04-12 09:54:03 +00007003cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007004#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007005_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007006
7007
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007008# The cast to long int works around a bug in the HP C Compiler
7009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7011# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7013$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007014if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007015 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007016else
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 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 +00007018
Martin v. Löwis11437992002-04-12 09:54:03 +00007019else
Matthias Kloseb9621712010-04-24 17:59:49 +00007020 if test "$ac_cv_type_float" = yes; then
7021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007023as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007024See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007025 else
7026 ac_cv_sizeof_float=0
7027 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007029
Martin v. Löwis11437992002-04-12 09:54:03 +00007030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7032$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007033
7034
7035
Martin v. Löwis11437992002-04-12 09:54:03 +00007036cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007037#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007038_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007039
7040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007041# The cast to long int works around a bug in the HP C Compiler
7042# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7043# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7044# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7046$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007047if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007048 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007049else
Matthias Kloseb9621712010-04-24 17:59:49 +00007050 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 +00007051
Martin v. Löwis11437992002-04-12 09:54:03 +00007052else
Matthias Kloseb9621712010-04-24 17:59:49 +00007053 if test "$ac_cv_type_double" = yes; then
7054 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7055$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007056as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007057See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007058 else
7059 ac_cv_sizeof_double=0
7060 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007062
Martin v. Löwis11437992002-04-12 09:54:03 +00007063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7065$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066
7067
7068
Martin v. Löwis11437992002-04-12 09:54:03 +00007069cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007070#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007071_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007072
7073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007074# The cast to long int works around a bug in the HP C Compiler
7075# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7076# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7077# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7079$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007080if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007081 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007082else
Matthias Kloseb9621712010-04-24 17:59:49 +00007083 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 +00007084
Martin v. Löwis11437992002-04-12 09:54:03 +00007085else
Matthias Kloseb9621712010-04-24 17:59:49 +00007086 if test "$ac_cv_type_fpos_t" = yes; then
7087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007089as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007090See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007091 else
7092 ac_cv_sizeof_fpos_t=0
7093 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007095
Martin v. Löwis11437992002-04-12 09:54:03 +00007096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7098$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099
7100
7101
Martin v. Löwis11437992002-04-12 09:54:03 +00007102cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007103#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007104_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007105
Michael W. Hudson54241132001-12-07 15:38:26 +00007106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007107# The cast to long int works around a bug in the HP C Compiler
7108# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7109# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7110# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7112$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007113if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007114 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007115else
Matthias Kloseb9621712010-04-24 17:59:49 +00007116 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 +00007117
Martin v. Löwis18e16552006-02-15 17:27:45 +00007118else
Matthias Kloseb9621712010-04-24 17:59:49 +00007119 if test "$ac_cv_type_size_t" = yes; then
7120 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7121$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007122as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007123See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007124 else
7125 ac_cv_sizeof_size_t=0
7126 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007128
Martin v. Löwis18e16552006-02-15 17:27:45 +00007129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7131$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007132
7133
7134
Martin v. Löwis18e16552006-02-15 17:27:45 +00007135cat >>confdefs.h <<_ACEOF
7136#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7137_ACEOF
7138
7139
Christian Heimes400adb02008-02-01 08:12:03 +00007140# The cast to long int works around a bug in the HP C Compiler
7141# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7142# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7143# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7145$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007146if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007147 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007148else
Matthias Kloseb9621712010-04-24 17:59:49 +00007149 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 +00007150
Christian Heimes400adb02008-02-01 08:12:03 +00007151else
Matthias Kloseb9621712010-04-24 17:59:49 +00007152 if test "$ac_cv_type_pid_t" = yes; then
7153 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007155as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007156See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007157 else
7158 ac_cv_sizeof_pid_t=0
7159 fi
7160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007161
Christian Heimes400adb02008-02-01 08:12:03 +00007162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7164$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007165
7166
7167
7168cat >>confdefs.h <<_ACEOF
7169#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7170_ACEOF
7171
7172
Michael W. Hudson54241132001-12-07 15:38:26 +00007173
Matthias Kloseb9621712010-04-24 17:59:49 +00007174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7175$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007176have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007178/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007179
Martin v. Löwis11437992002-04-12 09:54:03 +00007180int
7181main ()
7182{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007183long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007184 ;
7185 return 0;
7186}
7187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007188if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007189
7190
Matthias Kloseb9621712010-04-24 17:59:49 +00007191$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007192
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007193 have_long_long=yes
7194
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7198$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007199if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007200# The cast to long int works around a bug in the HP C Compiler
7201# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7202# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7203# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7205$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007206if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007207 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007208else
Matthias Kloseb9621712010-04-24 17:59:49 +00007209 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 +00007210
Martin v. Löwis11437992002-04-12 09:54:03 +00007211else
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 if test "$ac_cv_type_long_long" = yes; then
7213 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7214$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007215as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007216See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007217 else
7218 ac_cv_sizeof_long_long=0
7219 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007221
Martin v. Löwis11437992002-04-12 09:54:03 +00007222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7224$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007225
7226
7227
Martin v. Löwis11437992002-04-12 09:54:03 +00007228cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007229#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007230_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007231
Michael W. Hudson54241132001-12-07 15:38:26 +00007232
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007233fi
7234
Matthias Kloseb9621712010-04-24 17:59:49 +00007235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7236$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007237have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007239/* end confdefs.h. */
7240
7241int
7242main ()
7243{
7244long double x; x = (long double)0;
7245 ;
7246 return 0;
7247}
7248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007249if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007250
7251
Matthias Kloseb9621712010-04-24 17:59:49 +00007252$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007253
7254 have_long_double=yes
7255
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007256fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7259$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007260if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007261# The cast to long int works around a bug in the HP C Compiler
7262# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7263# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7264# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7266$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007267if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007269else
Matthias Kloseb9621712010-04-24 17:59:49 +00007270 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 +00007271
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007272else
Matthias Kloseb9621712010-04-24 17:59:49 +00007273 if test "$ac_cv_type_long_double" = yes; then
7274 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7275$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007276as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007277See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007278 else
7279 ac_cv_sizeof_long_double=0
7280 fi
7281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007282
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7285$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007286
7287
7288
7289cat >>confdefs.h <<_ACEOF
7290#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7291_ACEOF
7292
7293
7294fi
7295
7296
Matthias Kloseb9621712010-04-24 17:59:49 +00007297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7298$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007299have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007301/* end confdefs.h. */
7302
7303int
7304main ()
7305{
7306_Bool x; x = (_Bool)0;
7307 ;
7308 return 0;
7309}
7310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007311if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007312
7313
Matthias Kloseb9621712010-04-24 17:59:49 +00007314$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007315
7316 have_c99_bool=yes
7317
Thomas Woutersb2137042007-02-01 18:02:27 +00007318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7321$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007322if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007323# The cast to long int works around a bug in the HP C Compiler
7324# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7325# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7326# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7328$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007329if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 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 +00007333
Thomas Woutersb2137042007-02-01 18:02:27 +00007334else
Matthias Kloseb9621712010-04-24 17:59:49 +00007335 if test "$ac_cv_type__Bool" = yes; then
7336 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7337$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007338as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007339See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007340 else
7341 ac_cv_sizeof__Bool=0
7342 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007344
Thomas Woutersb2137042007-02-01 18:02:27 +00007345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7347$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007348
7349
7350
Thomas Woutersb2137042007-02-01 18:02:27 +00007351cat >>confdefs.h <<_ACEOF
7352#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7353_ACEOF
7354
7355
7356fi
7357
Matthias Kloseb9621712010-04-24 17:59:49 +00007358ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007359 #include <stdint.h>
7360 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007361 #ifdef HAVE_INTTYPES_H
7362 #include <inttypes.h>
7363 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007364"
Victor Stinnere0be4232011-10-25 13:06:09 +02007365if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007366
7367cat >>confdefs.h <<_ACEOF
7368#define HAVE_UINTPTR_T 1
7369_ACEOF
7370
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007371# The cast to long int works around a bug in the HP C Compiler
7372# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7373# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7374# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7376$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007377if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007378 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007379else
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 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 +00007381
Martin v. Löwis11437992002-04-12 09:54:03 +00007382else
Matthias Kloseb9621712010-04-24 17:59:49 +00007383 if test "$ac_cv_type_uintptr_t" = yes; then
7384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007386as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007387See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007388 else
7389 ac_cv_sizeof_uintptr_t=0
7390 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007392
Martin v. Löwis11437992002-04-12 09:54:03 +00007393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7395$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007396
7397
7398
Martin v. Löwis11437992002-04-12 09:54:03 +00007399cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007400#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007401_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007402
Michael W. Hudson54241132001-12-07 15:38:26 +00007403
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007404fi
7405
Thomas Wouters89f507f2006-12-13 04:49:30 +00007406
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007407# The cast to long int works around a bug in the HP C Compiler
7408# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7409# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7410# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7412$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007413if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007414 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007415else
Matthias Kloseb9621712010-04-24 17:59:49 +00007416 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007417#ifdef HAVE_SYS_TYPES_H
7418#include <sys/types.h>
7419#endif
7420
Matthias Kloseb9621712010-04-24 17:59:49 +00007421"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007422
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007423else
Matthias Kloseb9621712010-04-24 17:59:49 +00007424 if test "$ac_cv_type_off_t" = yes; then
7425 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7426$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007427as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007428See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007429 else
7430 ac_cv_sizeof_off_t=0
7431 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007433
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7436$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007437
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007438
7439
Martin v. Löwis11437992002-04-12 09:54:03 +00007440cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007441#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007442_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007443
Michael W. Hudson54241132001-12-07 15:38:26 +00007444
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007445
Matthias Kloseb9621712010-04-24 17:59:49 +00007446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7447$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007448if test "$have_long_long" = yes
7449then
7450if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007451 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007452
Matthias Kloseb9621712010-04-24 17:59:49 +00007453$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7456$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007457else
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7459$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007460fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007461else
Matthias Kloseb9621712010-04-24 17:59:49 +00007462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7463$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007464fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007465
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007466# The cast to long int works around a bug in the HP C Compiler
7467# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7468# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7469# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7471$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007472if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007474else
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007476#ifdef HAVE_SYS_TYPES_H
7477#include <sys/types.h>
7478#endif
7479#ifdef HAVE_TIME_H
7480#include <time.h>
7481#endif
7482
Matthias Kloseb9621712010-04-24 17:59:49 +00007483"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007484
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007485else
Matthias Kloseb9621712010-04-24 17:59:49 +00007486 if test "$ac_cv_type_time_t" = yes; then
7487 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7488$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007489as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007490See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007491 else
7492 ac_cv_sizeof_time_t=0
7493 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007495
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7498$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007499
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007500
7501
Martin v. Löwis11437992002-04-12 09:54:03 +00007502cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007503#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007504_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007505
Michael W. Hudson54241132001-12-07 15:38:26 +00007506
7507
Trent Mick635f6fb2000-08-23 21:33:05 +00007508# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007509ac_save_cc="$CC"
7510if test "$ac_cv_kpthread" = "yes"
7511then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007512elif test "$ac_cv_kthread" = "yes"
7513then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007514elif test "$ac_cv_pthread" = "yes"
7515then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007516fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007517
Matthias Kloseb9621712010-04-24 17:59:49 +00007518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7519$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007520have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007522/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007523
7524 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007525int
7526main ()
7527{
Guido van Rossum12580492000-09-24 16:47:19 +00007528pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007529 ;
7530 return 0;
7531}
Matthias Kloseb159a552010-04-25 21:00:44 +00007532
Martin v. Löwis11437992002-04-12 09:54:03 +00007533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007534if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007535 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7539$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007540if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007541 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007542# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7543# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7544# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7546$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007547if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007548 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007549else
Matthias Kloseb9621712010-04-24 17:59:49 +00007550 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007551#ifdef HAVE_PTHREAD_H
7552#include <pthread.h>
7553#endif
7554
Matthias Kloseb9621712010-04-24 17:59:49 +00007555"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007556
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007557else
Matthias Kloseb9621712010-04-24 17:59:49 +00007558 if test "$ac_cv_type_pthread_t" = yes; then
7559 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7560$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007561as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007562See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007563 else
7564 ac_cv_sizeof_pthread_t=0
7565 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007567
Trent Mick635f6fb2000-08-23 21:33:05 +00007568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7570$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007571
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007572
7573
Martin v. Löwis11437992002-04-12 09:54:03 +00007574cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007575#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007576_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007577
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007578
Trent Mick635f6fb2000-08-23 21:33:05 +00007579fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007580CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007581
Michael W. Hudson54241132001-12-07 15:38:26 +00007582
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007583case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007584 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007585 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7586 ;;
7587 Darwin/*)
7588 OTHER_LIBTOOL_OPT=""
7589 ;;
7590esac
7591
7592
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007593ARCH_RUN_32BIT=""
7594
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007595case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007596 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007597 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7598 if test "${enable_universalsdk}"; then
7599 :
7600 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007601 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007602 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007603 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007604 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007605 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007606 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007607 if test ${gcc_version} '<' 4.0
7608 then
7609 LIBTOOL_CRUFT="-lcc_dynamic"
7610 else
7611 LIBTOOL_CRUFT=""
7612 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007614 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007615else
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007617/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007618
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007619 #include <unistd.h>
7620 int main(int argc, char*argv[])
7621 {
7622 if (sizeof(long) == 4) {
7623 return 0;
7624 } else {
7625 return 1;
7626 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007627 }
7628
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007630if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007631 ac_osx_32bit=yes
7632else
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7636 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007637fi
7638
7639
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007640 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007641 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007642 i386)
7643 MACOSX_DEFAULT_ARCH="i386"
7644 ;;
7645 ppc)
7646 MACOSX_DEFAULT_ARCH="ppc"
7647 ;;
7648 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007649 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007650 ;;
7651 esac
7652 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007653 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007654 i386)
7655 MACOSX_DEFAULT_ARCH="x86_64"
7656 ;;
7657 ppc)
7658 MACOSX_DEFAULT_ARCH="ppc64"
7659 ;;
7660 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007661 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007662 ;;
7663 esac
7664
7665 #ARCH_RUN_32BIT="true"
7666 fi
7667
7668 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007669 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007670 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007671esac
7672
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7674$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007675if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007676then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007677 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007679 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007680
Matthias Kloseb9621712010-04-24 17:59:49 +00007681$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007682
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7684$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007685 if test $enable_shared = "yes"
7686 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007687 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 +00007688 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007689else
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7691$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007692fi
7693
Matthias Kloseb9621712010-04-24 17:59:49 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7695$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007696case $ac_sys_system/$ac_sys_release in
7697 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007698
Matthias Kloseb9621712010-04-24 17:59:49 +00007699$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007700
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7702$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007703 ;;
7704 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007707 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007708esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007709
Guido van Rossum0a516c91994-09-12 10:58:40 +00007710# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007711
Michael W. Hudson54241132001-12-07 15:38:26 +00007712
7713
7714
7715
Benjamin Peterson99f03762010-04-11 22:15:28 +00007716
Thomas Wouters477c8d52006-05-27 19:21:47 +00007717
Georg Brandlb1441c72009-01-03 22:33:39 +00007718
Thomas Wouters477c8d52006-05-27 19:21:47 +00007719cat >>confdefs.h <<_ACEOF
7720#define SHLIB_EXT "$SO"
7721_ACEOF
7722
Guido van Rossum0a516c91994-09-12 10:58:40 +00007723# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007724# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007725# (Shared libraries in this instance are shared modules to be loaded into
7726# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7728$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007729if test -z "$LDSHARED"
7730then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007731 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007732 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007733 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007734 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007735 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007736 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007737 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007739 if test "$GCC" = "yes" ; then
7740 LDSHARED='$(CC) -shared'
7741 LDCXXSHARED='$(CXX) -shared'
7742 else
7743 LDSHARED='$(CC) -G'
7744 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007745 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007746 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007747 if test "$GCC" = "yes" ; then
7748 LDSHARED='$(CC) -shared'
7749 LDCXXSHARED='$(CXX) -shared'
7750 else
7751 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007752 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007753 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007754 LDSHARED='$(CC) -bundle'
7755 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007756 if test "$enable_framework" ; then
7757 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007758 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7759 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007760 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007761 else
7762 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007763 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007764 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007765 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007766 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007767 LDSHARED='$(CC) -bundle'
7768 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007769 if test "$enable_framework" ; then
7770 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007771 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7772 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007773 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007774 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007775 # No framework, use the Python app as bundle-loader
7776 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007777 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007778 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007779 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007780 Darwin/*)
7781 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7782 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007783
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007784 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007785 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007786 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007787 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007788 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007789 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7790 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007791 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007792 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007793 LDSHARED='$(CC) -bundle'
7794 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007795 if test "$enable_framework" ; then
7796 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007797 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7798 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007799 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007800 else
7801 # No framework, use the Python app as bundle-loader
7802 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7803 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007804 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007805 fi
7806 fi
7807 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007808 Linux*|GNU*|QNX*)
7809 LDSHARED='$(CC) -shared'
7810 LDCXXSHARED='$(CXX) -shared';;
7811 BSD/OS*/4*)
7812 LDSHARED="gcc -shared"
7813 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007814 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007815 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007816 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007817 LDSHARED='$(CC) -shared'
7818 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007819 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007820 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007821 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007822 OpenBSD*)
7823 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7824 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007825 LDSHARED='$(CC) -shared $(CCSHARED)'
7826 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007827 else
7828 case `uname -r` in
7829 [01].* | 2.[0-7] | 2.[0-7].*)
7830 LDSHARED="ld -Bshareable ${LDFLAGS}"
7831 ;;
7832 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007833 LDSHARED='$(CC) -shared $(CCSHARED)'
7834 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007835 ;;
7836 esac
7837 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007838 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007839 LDSHARED='$(CC) -shared'
7840 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007841 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007842 if test "$GCC" = "yes" ; then
7843 LDSHARED='$(CC) -shared'
7844 LDCXXSHARED='$(CXX) -shared'
7845 else
7846 LDSHARED='$(CC) -G'
7847 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007848 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007849 SCO_SV*)
7850 LDSHARED='$(CC) -Wl,-G,-Bexport'
7851 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7852 CYGWIN*)
7853 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7854 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007855 *) LDSHARED="ld";;
7856 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7859$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007860LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007861BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007862# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007863# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7865$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007866if test -z "$CCSHARED"
7867then
Guido van Rossum07397971997-04-29 21:49:50 +00007868 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007869 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007870 then CCSHARED="-fPIC";
7871 elif test `uname -p` = sparc;
7872 then CCSHARED="-xcode=pic32";
7873 else CCSHARED="-Kpic";
7874 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007875 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007876 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007877 else CCSHARED="+z";
7878 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007879 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007880 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007881 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007882 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007883 if test "$GCC" = "yes"
7884 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007885 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007886 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007887 SCO_SV*)
7888 if test "$GCC" = "yes"
7889 then CCSHARED="-fPIC"
7890 else CCSHARED="-Kpic -belf"
7891 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007892 IRIX*/6*) case $CC in
7893 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007894 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007895 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007896 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7899$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007900# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007901# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7903$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007904if test -z "$LINKFORSHARED"
7905then
Guido van Rossum07397971997-04-29 21:49:50 +00007906 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007907 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007908 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007909 LINKFORSHARED="-Wl,-E -Wl,+s";;
7910# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007911 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007912 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007913 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007914 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007915 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007916 if test "$enable_framework"
7917 then
Jack Jansenda49e192005-01-07 13:08:22 +00007918 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007919 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007920 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007921 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007922 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007923 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007924 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007925 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7926 then
7927 LINKFORSHARED="-Wl,--export-dynamic"
7928 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007929 SunOS/5*) case $CC in
7930 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007931 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007932 then
7933 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007934 fi;;
7935 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007936 CYGWIN*)
7937 if test $enable_shared = "no"
7938 then
7939 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7940 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007941 QNX*)
7942 # -Wl,-E causes the symbols to be added to the dynamic
7943 # symbol table so that they can be found when a module
7944 # is loaded. -N 2048K causes the stack size to be set
7945 # to 2048 kilobytes so that the stack doesn't overflow
7946 # when running test_compile.py.
7947 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007948 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7951$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007952
Michael W. Hudson54241132001-12-07 15:38:26 +00007953
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007954
Matthias Kloseb9621712010-04-24 17:59:49 +00007955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7956$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007957if test ! "$LIBRARY" = "$LDLIBRARY"
7958then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007959 case $ac_sys_system in
7960 CYGWIN*)
7961 # Cygwin needs CCSHARED when building extension DLLs
7962 # but not when building the interpreter DLL.
7963 CFLAGSFORSHARED='';;
7964 *)
7965 CFLAGSFORSHARED='$(CCSHARED)'
7966 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7969$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007970
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007971# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7972# library (with --enable-shared).
7973# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007974# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7975# if it is not required, since it creates a dependency of the shared library
7976# to LIBS. This, in turn, means that applications linking the shared libpython
7977# don't need to link LIBS explicitly. The default should be only changed
7978# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007979
Matthias Kloseb9621712010-04-24 17:59:49 +00007980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7981$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007982case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007983 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007984 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007985esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7987$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007988
7989
Guido van Rossum627b2d71993-12-24 10:39:16 +00007990# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7992$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007993if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007994 $as_echo_n "(cached) " >&6
7995else
7996 ac_check_lib_save_LIBS=$LIBS
7997LIBS="-lsendfile $LIBS"
7998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7999/* end confdefs.h. */
8000
8001/* Override any GCC internal prototype to avoid an error.
8002 Use char because int might match the return type of a GCC
8003 builtin and then its argument prototype would still apply. */
8004#ifdef __cplusplus
8005extern "C"
8006#endif
8007char sendfile ();
8008int
8009main ()
8010{
8011return sendfile ();
8012 ;
8013 return 0;
8014}
8015_ACEOF
8016if ac_fn_c_try_link "$LINENO"; then :
8017 ac_cv_lib_sendfile_sendfile=yes
8018else
8019 ac_cv_lib_sendfile_sendfile=no
8020fi
8021rm -f core conftest.err conftest.$ac_objext \
8022 conftest$ac_exeext conftest.$ac_ext
8023LIBS=$ac_check_lib_save_LIBS
8024fi
8025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8026$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008027if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008028 cat >>confdefs.h <<_ACEOF
8029#define HAVE_LIBSENDFILE 1
8030_ACEOF
8031
8032 LIBS="-lsendfile $LIBS"
8033
8034fi
8035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8037$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008038if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008040else
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008042LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046/* Override any GCC internal prototype to avoid an error.
8047 Use char because int might match the return type of a GCC
8048 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008049#ifdef __cplusplus
8050extern "C"
8051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008052char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008053int
8054main ()
8055{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008057 ;
8058 return 0;
8059}
8060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008061if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008062 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008063else
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008066rm -f core conftest.err conftest.$ac_objext \
8067 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008068LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8071$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008072if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008073 cat >>confdefs.h <<_ACEOF
8074#define HAVE_LIBDL 1
8075_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008076
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008077 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008079fi
8080 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8082$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008083if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008085else
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008087LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091/* Override any GCC internal prototype to avoid an error.
8092 Use char because int might match the return type of a GCC
8093 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008094#ifdef __cplusplus
8095extern "C"
8096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008097char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008098int
8099main ()
8100{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 ;
8103 return 0;
8104}
8105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008106if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008107 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008108else
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008111rm -f core conftest.err conftest.$ac_objext \
8112 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008113LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8116$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008117if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 cat >>confdefs.h <<_ACEOF
8119#define HAVE_LIBDLD 1
8120_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008121
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008122 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008123
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008124fi
8125 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008126
Georg Brandlb1441c72009-01-03 22:33:39 +00008127# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008128if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8130$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008131if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008133else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008134 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138/* Override any GCC internal prototype to avoid an error.
8139 Use char because int might match the return type of a GCC
8140 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008141#ifdef __cplusplus
8142extern "C"
8143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008144char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008145int
8146main ()
8147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008149 ;
8150 return 0;
8151}
8152_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153for ac_lib in '' pthread rt posix4; do
8154 if test -z "$ac_lib"; then
8155 ac_res="none required"
8156 else
8157 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008158 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008159 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008160 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008161 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008163rm -f core conftest.err conftest.$ac_objext \
8164 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008165 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008166 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008168done
Victor Stinnere0be4232011-10-25 13:06:09 +02008169if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008171else
8172 ac_cv_search_sem_init=no
8173fi
8174rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008175LIBS=$ac_func_search_save_LIBS
8176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8178$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008180if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008181 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008182
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008183fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008184 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008185 # posix4 on Solaris 2.6
8186 # pthread (first!) on Linux
8187fi
8188
Martin v. Löwis19d17342003-06-14 21:03:05 +00008189# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8191$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008192if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008194else
8195 ac_check_lib_save_LIBS=$LIBS
8196LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008198/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008200/* Override any GCC internal prototype to avoid an error.
8201 Use char because int might match the return type of a GCC
8202 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008203#ifdef __cplusplus
8204extern "C"
8205#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008206char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008207int
8208main ()
8209{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008211 ;
8212 return 0;
8213}
8214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008215if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008216 ac_cv_lib_intl_textdomain=yes
8217else
Matthias Kloseb9621712010-04-24 17:59:49 +00008218 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008220rm -f core conftest.err conftest.$ac_objext \
8221 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008222LIBS=$ac_check_lib_save_LIBS
8223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8225$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008226if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008227
Matthias Kloseb9621712010-04-24 17:59:49 +00008228$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008229
Brett Cannonc6d936e2009-06-07 20:09:53 +00008230 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008231fi
8232
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008233
8234# checks for system dependent C++ extensions support
8235case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8237$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008239/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008240
Georg Brandl59e87bd2011-02-15 19:48:59 +00008241 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008242int
8243main ()
8244{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008245loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008246 ;
8247 return 0;
8248}
Matthias Kloseb159a552010-04-25 21:00:44 +00008249
Martin v. Löwis11437992002-04-12 09:54:03 +00008250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008251if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008252
Matthias Kloseb159a552010-04-25 21:00:44 +00008253
Matthias Kloseb9621712010-04-24 17:59:49 +00008254$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008255
Matthias Kloseb159a552010-04-25 21:00:44 +00008256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008257$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008258
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008259else
Matthias Kloseb159a552010-04-25 21:00:44 +00008260
8261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008262$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008263
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008265rm -f core conftest.err conftest.$ac_objext \
8266 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008267 *) ;;
8268esac
8269
Guido van Rossum70c7f481998-03-26 18:44:10 +00008270# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8272$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008273if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008274 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008275else
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008277LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008280
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008281/* Override any GCC internal prototype to avoid an error.
8282 Use char because int might match the return type of a GCC
8283 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008284#ifdef __cplusplus
8285extern "C"
8286#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008287char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008288int
8289main ()
8290{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 ;
8293 return 0;
8294}
8295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008296if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008297 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008298else
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008300fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008301rm -f core conftest.err conftest.$ac_objext \
8302 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008303LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8306$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008307if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008308 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008309fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008310 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8312$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008313if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008314 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008315else
Martin v. Löwis11437992002-04-12 09:54:03 +00008316 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008317LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008320
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008321/* Override any GCC internal prototype to avoid an error.
8322 Use char because int might match the return type of a GCC
8323 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008324#ifdef __cplusplus
8325extern "C"
8326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008327char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008328int
8329main ()
8330{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008331return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 ;
8333 return 0;
8334}
8335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008336if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008337 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008338else
Matthias Kloseb9621712010-04-24 17:59:49 +00008339 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008341rm -f core conftest.err conftest.$ac_objext \
8342 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008343LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8346$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008347if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008348 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008349fi
8350 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8353$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008354
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008355# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008356if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008357 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8359$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008360LIBS="$withval $LIBS"
8361
8362else
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8364$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008365fi
8366
Guido van Rossum7f43da71994-08-01 12:15:30 +00008367
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008368if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008369 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8370set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8372$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008373if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008375else
8376 case $PKG_CONFIG in
8377 [\\/]* | ?:[\\/]*)
8378 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8379 ;;
8380 *)
8381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8382for as_dir in $PATH
8383do
8384 IFS=$as_save_IFS
8385 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008387 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8388 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008390 break 2
8391 fi
8392done
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008394IFS=$as_save_IFS
8395
8396 ;;
8397esac
8398fi
8399PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8400if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8402$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008403else
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8405$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008406fi
8407
8408
8409fi
8410if test -z "$ac_cv_path_PKG_CONFIG"; then
8411 ac_pt_PKG_CONFIG=$PKG_CONFIG
8412 # Extract the first word of "pkg-config", so it can be a program name with args.
8413set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8415$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008416if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008418else
8419 case $ac_pt_PKG_CONFIG in
8420 [\\/]* | ?:[\\/]*)
8421 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8422 ;;
8423 *)
8424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8425for as_dir in $PATH
8426do
8427 IFS=$as_save_IFS
8428 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008430 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8431 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008432 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008433 break 2
8434 fi
8435done
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008437IFS=$as_save_IFS
8438
8439 ;;
8440esac
8441fi
8442ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8443if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8445$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008446else
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8448$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008449fi
8450
8451 if test "x$ac_pt_PKG_CONFIG" = x; then
8452 PKG_CONFIG=""
8453 else
8454 case $cross_compiling:$ac_tool_warned in
8455yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008456{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8457$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008458ac_tool_warned=yes ;;
8459esac
8460 PKG_CONFIG=$ac_pt_PKG_CONFIG
8461 fi
8462else
8463 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8464fi
8465
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008466
8467# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8469$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008470
8471# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008472if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008473 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008474else
8475 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008476fi
8477
8478
Matthias Kloseb9621712010-04-24 17:59:49 +00008479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8480$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008481
8482# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8484$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008485
8486# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008487if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008488 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008489else
8490 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008491fi
8492
8493
8494if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008495 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8496else
8497 LIBFFI_INCLUDEDIR=""
8498fi
8499
8500
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8502$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008503
Benjamin Peterson076ed002010-10-31 17:11:02 +00008504# Check for support for loadable sqlite extensions
8505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8506$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8507# Check whether --enable-loadable-sqlite-extensions was given.
8508if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8509 enableval=$enable_loadable_sqlite_extensions;
8510else
8511 enable_loadable_sqlite_extensions="no"
8512fi
8513
8514
8515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8516$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8517
Matthias Klose55708cc2009-04-30 08:06:49 +00008518# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8520$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008521
8522# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008523if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008524 withval=$with_dbmliborder;
8525if test x$with_dbmliborder = xyes
8526then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008527as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008528else
8529 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8530 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8531 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008532 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008533 fi
8534 done
8535fi
8536fi
8537
Matthias Kloseb9621712010-04-24 17:59:49 +00008538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8539$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008540
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008541# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008542
8543
Matthias Kloseb9621712010-04-24 17:59:49 +00008544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8545$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008548if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549 withval=$with_signal_module;
8550fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008551
8552
8553if test -z "$with_signal_module"
8554then with_signal_module="yes"
8555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8557$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008558
8559if test "${with_signal_module}" = "yes"; then
8560 USE_SIGNAL_MODULE=""
8561 SIGNAL_OBJS=""
8562else
8563 USE_SIGNAL_MODULE="#"
8564 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8565fi
8566
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008567# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008568
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008569USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571
Martin v. Löwis11437992002-04-12 09:54:03 +00008572
8573# Templates for things AC_DEFINEd more than once.
8574# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008575
8576
Martin v. Löwis11437992002-04-12 09:54:03 +00008577
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8579$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008582if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583 withval=$with_threads;
8584fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008585
8586
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008587# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008590if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591 withval=$with_thread; with_threads=$with_thread
8592fi
8593
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008594
8595if test -z "$with_threads"
8596then with_threads="yes"
8597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8599$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008600
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008601
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008602if test "$with_threads" = "no"
8603then
8604 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008605elif test "$ac_cv_pthread_is_default" = yes
8606then
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008608
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008609 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008611
8612 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008613 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008614elif test "$ac_cv_kpthread" = "yes"
8615then
8616 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008617 if test "$ac_cv_cxx_thread" = "yes"; then
8618 CXX="$CXX -Kpthread"
8619 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008621
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008622 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008623 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008624elif test "$ac_cv_kthread" = "yes"
8625then
8626 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008627 if test "$ac_cv_cxx_thread" = "yes"; then
8628 CXX="$CXX -Kthread"
8629 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008631
8632 posix_threads=yes
8633 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008634elif test "$ac_cv_pthread" = "yes"
8635then
8636 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008637 if test "$ac_cv_cxx_thread" = "yes"; then
8638 CXX="$CXX -pthread"
8639 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008641
8642 posix_threads=yes
8643 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008644else
8645 if test ! -z "$with_threads" -a -d "$with_threads"
8646 then LDFLAGS="$LDFLAGS -L$with_threads"
8647 fi
8648 if test ! -z "$withval" -a -d "$withval"
8649 then LDFLAGS="$LDFLAGS -L$withval"
8650 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008651
8652 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008653 # define _POSIX_THREADS in unistd.h. Some apparently don't
8654 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8656$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008658/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008659
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008660#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008661#ifdef _POSIX_THREADS
8662yes
8663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008664
8665_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008666if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008668 unistd_defines_pthreads=yes
8669else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008670 unistd_defines_pthreads=no
8671fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008672rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008673
Matthias Kloseb9621712010-04-24 17:59:49 +00008674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8675$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008676
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008678
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008679 # Just looking for pthread_create in libpthread is not enough:
8680 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8681 # So we really have to include pthread.h, and then link.
8682 _libs=$LIBS
8683 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8685$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008687/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008688#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008689
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008690void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008691int
8692main ()
8693{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008694
8695pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 ;
8697 return 0;
8698}
8699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008700if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008701
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8703$as_echo "yes" >&6; }
8704 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008705
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008706 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008707 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008708else
Martin v. Löwis11437992002-04-12 09:54:03 +00008709
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008710 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02008712if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008714
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008715 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008716 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008717else
Guido van Rossumad678af1998-10-02 14:42:15 +00008718
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8720$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008721if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008723else
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008725LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729/* Override any GCC internal prototype to avoid an error.
8730 Use char because int might match the return type of a GCC
8731 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008732#ifdef __cplusplus
8733extern "C"
8734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008735char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008736int
8737main ()
8738{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008739return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008740 ;
8741 return 0;
8742}
8743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008744if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008746else
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008749rm -f core conftest.err conftest.$ac_objext \
8750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008751LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8754$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008755if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008757
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008758 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008759 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008760 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008761else
Greg Steinadf63d62000-07-05 10:38:09 +00008762
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8764$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008765if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008767else
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008769LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773/* Override any GCC internal prototype to avoid an error.
8774 Use char because int might match the return type of a GCC
8775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008776#ifdef __cplusplus
8777extern "C"
8778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008779char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008780int
8781main ()
8782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 ;
8785 return 0;
8786}
8787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793rm -f core conftest.err conftest.$ac_objext \
8794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008795LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8798$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008799if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008801
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008802 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008803 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008804 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008805else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008806
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8808$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008809if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008811else
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008813LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817/* Override any GCC internal prototype to avoid an error.
8818 Use char because int might match the return type of a GCC
8819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008820#ifdef __cplusplus
8821extern "C"
8822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008823char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008824int
8825main ()
8826{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ;
8829 return 0;
8830}
8831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008832if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008834else
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008837rm -f core conftest.err conftest.$ac_objext \
8838 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008839LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8842$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008843if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008845
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008846 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008847 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008848 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008849else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008850
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8852$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008853if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008855else
Martin v. Löwis11437992002-04-12 09:54:03 +00008856 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008857LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008861/* Override any GCC internal prototype to avoid an error.
8862 Use char because int might match the return type of a GCC
8863 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008864#ifdef __cplusplus
8865extern "C"
8866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008867char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008868int
8869main ()
8870{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008872 ;
8873 return 0;
8874}
8875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008877 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008878else
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008881rm -f core conftest.err conftest.$ac_objext \
8882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008883LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8886$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008887if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008888 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008889
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008890 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008891 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008892 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008893else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008894
Martin v. Löwis130fb172001-07-19 11:00:41 +00008895 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008896fi
8897
Guido van Rossum627b2d71993-12-24 10:39:16 +00008898
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008899fi
8900
Guido van Rossum0be3e491997-05-22 20:33:33 +00008901fi
8902
Guido van Rossum49545951997-12-02 19:28:29 +00008903fi
8904
Guido van Rossumb93a8621998-05-07 13:27:32 +00008905fi
8906
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008908rm -f core conftest.err conftest.$ac_objext \
8909 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008910
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8912$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008913if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008914 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008915else
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008917LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008921/* Override any GCC internal prototype to avoid an error.
8922 Use char because int might match the return type of a GCC
8923 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008924#ifdef __cplusplus
8925extern "C"
8926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008927char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008928int
8929main ()
8930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008932 ;
8933 return 0;
8934}
8935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008936if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008937 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008938else
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008941rm -f core conftest.err conftest.$ac_objext \
8942 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008943LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8946$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008947if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008949
Martin v. Löwis130fb172001-07-19 11:00:41 +00008950 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008951 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008952 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008953fi
8954
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008955
Neal Norwitza978ab02002-11-02 16:58:05 +00008956 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8958$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008959if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008961else
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008963LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967/* Override any GCC internal prototype to avoid an error.
8968 Use char because int might match the return type of a GCC
8969 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008970#ifdef __cplusplus
8971extern "C"
8972#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008973char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008974int
8975main ()
8976{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008978 ;
8979 return 0;
8980}
8981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008982if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008984else
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008987rm -f core conftest.err conftest.$ac_objext \
8988 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008989LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8992$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008993if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008995
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008996 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008997 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008998 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008999fi
9000
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009001 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009002fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009003
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009004if test "$posix_threads" = "yes"; then
9005 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009006
Matthias Kloseb9621712010-04-24 17:59:49 +00009007$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009008
9009 fi
9010
9011 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9012 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009013 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009014$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009015
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009016 ;;
9017 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009018$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009019
9020 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009021 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009022$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009023
9024 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009025 esac
9026
Matthias Kloseb9621712010-04-24 17:59:49 +00009027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9028$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009029 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009030 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009033 ac_cv_pthread_system_supported=no
9034else
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009036/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009037#include <pthread.h>
9038 void *foo(void *parm) {
9039 return NULL;
9040 }
9041 main() {
9042 pthread_attr_t attr;
9043 pthread_t id;
9044 if (pthread_attr_init(&attr)) exit(-1);
9045 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9046 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9047 exit(0);
9048 }
9049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009050if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009051 ac_cv_pthread_system_supported=yes
9052else
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9056 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009057fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009059
Guido van Rossum627b2d71993-12-24 10:39:16 +00009060fi
9061
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9063$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009064 if test "$ac_cv_pthread_system_supported" = "yes"; then
9065
Matthias Kloseb9621712010-04-24 17:59:49 +00009066$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009067
9068 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 for ac_func in pthread_sigmask
9070do :
9071 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009072if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009073 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009074#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009075_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009076 case $ac_sys_system in
9077 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009078
Matthias Kloseb9621712010-04-24 17:59:49 +00009079$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009080
9081 ;;
9082 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009083fi
9084done
9085
9086fi
9087
9088
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009089# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009090
Matthias Kloseb9621712010-04-24 17:59:49 +00009091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9092$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009093# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009094if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009095 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009096 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9098$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099 ipv6=no
9100 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9102$as_echo "yes" >&6; }
9103 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104
9105 ipv6=yes
9106 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009107 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009108else
Martin v. Löwis11437992002-04-12 09:54:03 +00009109
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 if test "$cross_compiling" = yes; 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: no" >&5
9113$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009114 ipv6=no
9115
9116else
Matthias Kloseb9621712010-04-24 17:59:49 +00009117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009118/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009119 /* AF_INET6 available check */
9120#include <sys/types.h>
9121#include <sys/socket.h>
9122main()
9123{
9124 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9125 exit(1);
9126 else
9127 exit(0);
9128}
9129
Martin v. Löwis11437992002-04-12 09:54:03 +00009130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009131if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009132
Matthias Kloseb9621712010-04-24 17:59:49 +00009133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9134$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009135 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009136
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009137else
Matthias Kloseb159a552010-04-25 21:00:44 +00009138
Matthias Kloseb9621712010-04-24 17:59:49 +00009139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9140$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009141 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009142
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009146fi
9147
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009148
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009149if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9151$as_echo_n "checking if RFC2553 API is available... " >&6; }
9152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009153/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009154
9155 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009156#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009157int
9158main ()
9159{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009160struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009161 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 ;
9163 return 0;
9164}
Matthias Kloseb159a552010-04-25 21:00:44 +00009165
Martin v. Löwis11437992002-04-12 09:54:03 +00009166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009167if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009168
9169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009170$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009171 ipv6=yes
9172
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009173else
Matthias Kloseb159a552010-04-25 21:00:44 +00009174
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009176$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009177 ipv6=no
9178
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009181fi
9182
9183if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009184 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009185
9186fi
9187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009188fi
9189
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009190
9191ipv6type=unknown
9192ipv6lib=none
9193ipv6trylibc=no
9194
9195if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9197$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009198 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9199 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009200 case $i in
9201 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009203/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009204
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009205#include <netinet/in.h>
9206#ifdef IPV6_INRIA_VERSION
9207yes
9208#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009209_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009210if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009211 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009212 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009213fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009214rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009215
9216 ;;
9217 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009219/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009220
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009221#include <netinet/in.h>
9222#ifdef __KAME__
9223yes
9224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009225_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009226if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009227 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009228 ipv6type=$i;
9229 ipv6lib=inet6
9230 ipv6libdir=/usr/local/v6/lib
9231 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009232fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009233rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009234
9235 ;;
9236 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009238/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009239
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009240#include <features.h>
9241#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9242yes
9243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009244_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009245if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009246 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009247 ipv6type=$i;
9248 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009249fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009250rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009251
9252 ;;
9253 linux-inet6)
9254 if test -d /usr/inet6; then
9255 ipv6type=$i
9256 ipv6lib=inet6
9257 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009258 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009259 fi
9260 ;;
9261 solaris)
9262 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009263 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009264 ipv6type=$i
9265 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009266 fi
9267 fi
9268 ;;
9269 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009271/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009272
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009273#include <sys/param.h>
9274#ifdef _TOSHIBA_INET6
9275yes
9276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009277_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009279 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009280 ipv6type=$i;
9281 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009282 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009283fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009284rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009285
9286 ;;
9287 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009289/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009290
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009291#include </usr/local/v6/include/sys/v6config.h>
9292#ifdef __V6D__
9293yes
9294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009295_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009296if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009297 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009298 ipv6type=$i;
9299 ipv6lib=v6;
9300 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009301 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009302fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009303rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009304
9305 ;;
9306 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009308/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009309
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009310#include <sys/param.h>
9311#ifdef _ZETA_MINAMI_INET6
9312yes
9313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009314_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009316 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009317 ipv6type=$i;
9318 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009319 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009320fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009321rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009322
9323 ;;
9324 esac
9325 if test "$ipv6type" != "unknown"; then
9326 break
9327 fi
9328 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9330$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009331fi
9332
9333if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9334 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9335 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9336 echo "using lib$ipv6lib"
9337 else
9338 if test $ipv6trylibc = "yes"; then
9339 echo "using libc"
9340 else
9341 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9342 echo "You need to fetch lib$ipv6lib.a from appropriate"
9343 echo 'ipv6 kit and compile beforehand.'
9344 exit 1
9345 fi
9346 fi
9347fi
9348
Matthias Kloseb9621712010-04-24 17:59:49 +00009349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9350$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009352/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009353
9354 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009355int
9356main ()
9357{
9358FSIORefNum fRef = 0
9359 ;
9360 return 0;
9361}
Matthias Kloseb159a552010-04-25 21:00:44 +00009362
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009364if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009365
Matthias Kloseb159a552010-04-25 21:00:44 +00009366
Matthias Kloseb9621712010-04-24 17:59:49 +00009367$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009368
Matthias Kloseb9621712010-04-24 17:59:49 +00009369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9370$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009371
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009372else
Matthias Kloseb159a552010-04-25 21:00:44 +00009373
Matthias Kloseb9621712010-04-24 17:59:49 +00009374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9375$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009376
9377fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9379
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009380# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9382$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009384# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009385if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009386 withval=$with_doc_strings;
9387fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009388
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009389
9390if test -z "$with_doc_strings"
9391then with_doc_strings="yes"
9392fi
9393if test "$with_doc_strings" != "no"
9394then
9395
Matthias Kloseb9621712010-04-24 17:59:49 +00009396$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009397
9398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9400$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009401
Antoine Pitrou042b1282010-08-13 21:15:58 +00009402# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9404$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009405
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009407if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009409if test "$withval" != no
9410then
9411
Matthias Kloseb9621712010-04-24 17:59:49 +00009412$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009413
Matthias Kloseb9621712010-04-24 17:59:49 +00009414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9415$as_echo "yes" >&6; }
9416else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9417$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009418fi
9419else
Matthias Kloseb9621712010-04-24 17:59:49 +00009420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422fi
9423
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009424
9425# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9427$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009429# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009430if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009431 withval=$with_pymalloc;
9432fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009433
Neil Schemenauera35c6882001-02-27 04:45:05 +00009434
Neil Schemenauer16c22972002-03-22 15:34:49 +00009435if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009436then
9437 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009438 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009439fi
9440if test "$with_pymalloc" != "no"
9441then
Martin v. Löwis11437992002-04-12 09:54:03 +00009442
Matthias Kloseb9621712010-04-24 17:59:49 +00009443$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009444
9445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9447$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009448
Benjamin Peterson05159c42009-12-03 03:01:27 +00009449# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9451$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009452
9453# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009454if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009455 withval=$with_valgrind;
9456else
9457 with_valgrind=no
9458fi
9459
Matthias Kloseb9621712010-04-24 17:59:49 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9461$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009462if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009463 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 +02009464if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009465
Matthias Kloseb9621712010-04-24 17:59:49 +00009466$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009467
9468else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009469 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009470
9471fi
9472
9473
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009474 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009475fi
9476
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009477# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009478
Guido van Rossum98935bf2001-09-05 19:13:16 +00009479DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009480
Guido van Rossume97ee181999-12-20 21:27:22 +00009481# the dlopen() function means we might want to use dynload_shlib.o. some
9482# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009483for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009484do :
9485 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +02009486if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009488#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009489_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009490
Guido van Rossume97ee181999-12-20 21:27:22 +00009491fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009492done
Guido van Rossume97ee181999-12-20 21:27:22 +00009493
Michael W. Hudson54241132001-12-07 15:38:26 +00009494
Guido van Rossume97ee181999-12-20 21:27:22 +00009495# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9496# loading of modules.
9497
Matthias Kloseb9621712010-04-24 17:59:49 +00009498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9499$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009500if test -z "$DYNLOADFILE"
9501then
9502 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009503 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9504 if test "$ac_cv_func_dlopen" = yes
9505 then DYNLOADFILE="dynload_shlib.o"
9506 else DYNLOADFILE="dynload_aix.o"
9507 fi
9508 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009509 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009510 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9511 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009512 *)
9513 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9514 # out any dynamic loading
9515 if test "$ac_cv_func_dlopen" = yes
9516 then DYNLOADFILE="dynload_shlib.o"
9517 else DYNLOADFILE="dynload_stub.o"
9518 fi
9519 ;;
9520 esac
9521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9523$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009524if test "$DYNLOADFILE" != "dynload_stub.o"
9525then
Martin v. Löwis11437992002-04-12 09:54:03 +00009526
Matthias Kloseb9621712010-04-24 17:59:49 +00009527$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009528
9529fi
9530
Neil Schemenauer4e425612001-06-19 15:44:15 +00009531# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9532
Michael W. Hudson54241132001-12-07 15:38:26 +00009533
Matthias Kloseb9621712010-04-24 17:59:49 +00009534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9535$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009536if test -z "$MACHDEP_OBJS"
9537then
Jack Jansene578a632001-08-15 01:27:14 +00009538 MACHDEP_OBJS=$extra_machdep_objs
9539else
9540 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9543$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009544
Guido van Rossum627b2d71993-12-24 10:39:16 +00009545# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009546for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -08009547 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009548 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009549 futimens futimes gai_strerror \
9550 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009551 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009552 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +01009553 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
9554 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009555 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009556 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009557 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009558 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009559 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009560 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009561 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9562 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009563 sigaction sigaltstack siginterrupt sigpending sigrelse \
9564 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009565 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009566 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9567 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009568do :
9569 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9570ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009571if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009573#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009574_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009575
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009576fi
9577done
9578
Michael W. Hudson54241132001-12-07 15:38:26 +00009579
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009580ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9581 #include <dirent.h>
9582"
9583if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9584
9585$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9586
9587fi
9588
9589
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009590# For some functions, having a definition is not sufficient, since
9591# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9593$as_echo_n "checking for chroot... " >&6; }
9594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009595/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009596#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009597int
9598main ()
9599{
9600void *x=chroot
9601 ;
9602 return 0;
9603}
9604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009605if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009606
Matthias Kloseb9621712010-04-24 17:59:49 +00009607$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009608
Matthias Kloseb159a552010-04-25 21:00:44 +00009609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009610$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009611else
Matthias Kloseb9621712010-04-24 17:59:49 +00009612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9613$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009614
9615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9618$as_echo_n "checking for link... " >&6; }
9619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009620/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009621#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009622int
9623main ()
9624{
9625void *x=link
9626 ;
9627 return 0;
9628}
9629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009630if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009631
Matthias Kloseb9621712010-04-24 17:59:49 +00009632$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009633
Matthias Kloseb159a552010-04-25 21:00:44 +00009634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009635$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009636else
Matthias Kloseb9621712010-04-24 17:59:49 +00009637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9638$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009639
9640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9643$as_echo_n "checking for symlink... " >&6; }
9644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009645/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009646#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009647int
9648main ()
9649{
9650void *x=symlink
9651 ;
9652 return 0;
9653}
9654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009656
Matthias Kloseb9621712010-04-24 17:59:49 +00009657$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009658
Matthias Kloseb159a552010-04-25 21:00:44 +00009659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009660$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009661else
Matthias Kloseb9621712010-04-24 17:59:49 +00009662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9663$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009664
9665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9668$as_echo_n "checking for fchdir... " >&6; }
9669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009670/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009671#include <unistd.h>
9672int
9673main ()
9674{
9675void *x=fchdir
9676 ;
9677 return 0;
9678}
9679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009680if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009681
Matthias Kloseb9621712010-04-24 17:59:49 +00009682$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009683
Matthias Kloseb159a552010-04-25 21:00:44 +00009684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009685$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009686else
Matthias Kloseb9621712010-04-24 17:59:49 +00009687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9688$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009689
9690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9693$as_echo_n "checking for fsync... " >&6; }
9694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009695/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009696#include <unistd.h>
9697int
9698main ()
9699{
9700void *x=fsync
9701 ;
9702 return 0;
9703}
9704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009705if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009706
Matthias Kloseb9621712010-04-24 17:59:49 +00009707$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009708
Matthias Kloseb159a552010-04-25 21:00:44 +00009709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009710$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009711else
Matthias Kloseb9621712010-04-24 17:59:49 +00009712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9713$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009714
9715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9718$as_echo_n "checking for fdatasync... " >&6; }
9719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009720/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009721#include <unistd.h>
9722int
9723main ()
9724{
9725void *x=fdatasync
9726 ;
9727 return 0;
9728}
9729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009730if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009731
Matthias Kloseb9621712010-04-24 17:59:49 +00009732$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009733
Matthias Kloseb159a552010-04-25 21:00:44 +00009734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009735$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009736else
Matthias Kloseb9621712010-04-24 17:59:49 +00009737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9738$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009739
9740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9743$as_echo_n "checking for epoll... " >&6; }
9744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009745/* end confdefs.h. */
9746#include <sys/epoll.h>
9747int
9748main ()
9749{
9750void *x=epoll_create
9751 ;
9752 return 0;
9753}
9754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009755if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009756
Matthias Kloseb9621712010-04-24 17:59:49 +00009757$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009758
Matthias Kloseb159a552010-04-25 21:00:44 +00009759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009760$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009761else
Matthias Kloseb9621712010-04-24 17:59:49 +00009762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9763$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009764
9765fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -06009767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
9768$as_echo_n "checking for epoll_create1... " >&6; }
9769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9770/* end confdefs.h. */
9771#include <sys/epoll.h>
9772int
9773main ()
9774{
9775void *x=epoll_create1
9776 ;
9777 return 0;
9778}
9779_ACEOF
9780if ac_fn_c_try_compile "$LINENO"; then :
9781
9782$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
9783
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9785$as_echo "yes" >&6; }
9786else
9787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9788$as_echo "no" >&6; }
9789
9790fi
9791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9793$as_echo_n "checking for kqueue... " >&6; }
9794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009795/* end confdefs.h. */
9796
9797#include <sys/types.h>
9798#include <sys/event.h>
9799
9800int
9801main ()
9802{
9803int x=kqueue()
9804 ;
9805 return 0;
9806}
9807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009808if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009809
Matthias Kloseb9621712010-04-24 17:59:49 +00009810$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009811
Matthias Kloseb159a552010-04-25 21:00:44 +00009812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009813$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009814else
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9816$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009817
9818fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009820# On some systems (eg. FreeBSD 5), we would find a definition of the
9821# functions ctermid_r, setgroups in the library, but no prototype
9822# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9823# address to avoid compiler warnings and potential miscompilations
9824# because of the missing prototypes.
9825
Matthias Kloseb9621712010-04-24 17:59:49 +00009826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9827$as_echo_n "checking for ctermid_r... " >&6; }
9828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009830
Martin v. Löwisd5843682002-11-21 20:41:28 +00009831#include <stdio.h>
9832
Martin v. Löwisd5843682002-11-21 20:41:28 +00009833int
9834main ()
9835{
9836void* p = ctermid_r
9837 ;
9838 return 0;
9839}
9840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009841if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009842
Matthias Kloseb9621712010-04-24 17:59:49 +00009843$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009844
Matthias Kloseb159a552010-04-25 21:00:44 +00009845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009846$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009847else
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9849$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009850
9851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9853
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9855$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009856if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009857 $as_echo_n "(cached) " >&6
9858else
9859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009860/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009861#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009862int
9863main ()
9864{
9865void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009866
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009867 ;
9868 return 0;
9869}
9870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009871if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009872 ac_cv_flock_decl=yes
9873else
9874 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009875
9876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009878
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009879fi
9880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9881$as_echo "$ac_cv_flock_decl" >&6; }
9882if test "x${ac_cv_flock_decl}" = xyes; then
9883 for ac_func in flock
9884do :
9885 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +02009886if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009887 cat >>confdefs.h <<_ACEOF
9888#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009889_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009890
Antoine Pitroua3000072010-09-07 14:52:42 +00009891else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009893$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009894if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009895 $as_echo_n "(cached) " >&6
9896else
9897 ac_check_lib_save_LIBS=$LIBS
9898LIBS="-lbsd $LIBS"
9899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9900/* end confdefs.h. */
9901
9902/* Override any GCC internal prototype to avoid an error.
9903 Use char because int might match the return type of a GCC
9904 builtin and then its argument prototype would still apply. */
9905#ifdef __cplusplus
9906extern "C"
9907#endif
9908char flock ();
9909int
9910main ()
9911{
9912return flock ();
9913 ;
9914 return 0;
9915}
9916_ACEOF
9917if ac_fn_c_try_link "$LINENO"; then :
9918 ac_cv_lib_bsd_flock=yes
9919else
9920 ac_cv_lib_bsd_flock=no
9921fi
9922rm -f core conftest.err conftest.$ac_objext \
9923 conftest$ac_exeext conftest.$ac_ext
9924LIBS=$ac_check_lib_save_LIBS
9925fi
9926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9927$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009928if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009929 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009930
9931
9932$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9933
9934
9935fi
9936
9937
9938fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009939done
9940
Antoine Pitroua3000072010-09-07 14:52:42 +00009941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009942
Matthias Kloseb9621712010-04-24 17:59:49 +00009943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9944$as_echo_n "checking for getpagesize... " >&6; }
9945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009946/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009947
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009948#include <unistd.h>
9949
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009950int
9951main ()
9952{
9953void* p = getpagesize
9954 ;
9955 return 0;
9956}
9957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009959
Matthias Kloseb9621712010-04-24 17:59:49 +00009960$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009961
Matthias Kloseb159a552010-04-25 21:00:44 +00009962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009963$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009964else
Matthias Kloseb9621712010-04-24 17:59:49 +00009965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9966$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009967
9968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009970
Victor Stinner984890f2011-11-24 13:53:38 +01009971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9972$as_echo_n "checking for broken unsetenv... " >&6; }
9973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9974/* end confdefs.h. */
9975
9976#include <stdlib.h>
9977
9978int
9979main ()
9980{
9981int res = unsetenv("DUMMY")
9982 ;
9983 return 0;
9984}
9985_ACEOF
9986if ac_fn_c_try_compile "$LINENO"; then :
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9988$as_echo "no" >&6; }
9989else
9990
9991$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9992
9993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9994$as_echo "yes" >&6; }
9995
9996fi
9997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9998
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009999for ac_prog in true
10000do
10001 # Extract the first word of "$ac_prog", so it can be a program name with args.
10002set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10004$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010005if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010006 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010007else
10008 if test -n "$TRUE"; then
10009 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10010else
10011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10012for as_dir in $PATH
10013do
10014 IFS=$as_save_IFS
10015 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010016 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017 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 +000010018 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010019 $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 +000010020 break 2
10021 fi
10022done
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010024IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010025
10026fi
10027fi
10028TRUE=$ac_cv_prog_TRUE
10029if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10031$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010032else
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10034$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010035fi
10036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010038 test -n "$TRUE" && break
10039done
10040test -n "$TRUE" || TRUE="/bin/true"
10041
10042
Matthias Kloseb9621712010-04-24 17:59:49 +000010043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10044$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010045if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010046 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010047else
10048 ac_check_lib_save_LIBS=$LIBS
10049LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010053/* Override any GCC internal prototype to avoid an error.
10054 Use char because int might match the return type of a GCC
10055 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010056#ifdef __cplusplus
10057extern "C"
10058#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010059char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010060int
10061main ()
10062{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010064 ;
10065 return 0;
10066}
10067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010068if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010069 ac_cv_lib_c_inet_aton=yes
10070else
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010073rm -f core conftest.err conftest.$ac_objext \
10074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010075LIBS=$ac_check_lib_save_LIBS
10076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10078$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010079if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010080 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010081else
Matthias Kloseb9621712010-04-24 17:59:49 +000010082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10083$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010084if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010085 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010086else
10087 ac_check_lib_save_LIBS=$LIBS
10088LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010090/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092/* Override any GCC internal prototype to avoid an error.
10093 Use char because int might match the return type of a GCC
10094 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010095#ifdef __cplusplus
10096extern "C"
10097#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010098char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010099int
10100main ()
10101{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010103 ;
10104 return 0;
10105}
10106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010107if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010108 ac_cv_lib_resolv_inet_aton=yes
10109else
Matthias Kloseb9621712010-04-24 17:59:49 +000010110 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010112rm -f core conftest.err conftest.$ac_objext \
10113 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010114LIBS=$ac_check_lib_save_LIBS
10115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10117$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010118if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010119 cat >>confdefs.h <<_ACEOF
10120#define HAVE_LIBRESOLV 1
10121_ACEOF
10122
10123 LIBS="-lresolv $LIBS"
10124
10125fi
10126
10127
10128fi
10129
10130
Christian Heimesd0764e22007-12-04 15:00:33 +000010131# On Tru64, chflags seems to be present, but calling it will
10132# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10134$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010135if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010136 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010137else
Matthias Kloseb9621712010-04-24 17:59:49 +000010138 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010139 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010140else
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010142/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010143
Christian Heimesd0764e22007-12-04 15:00:33 +000010144#include <sys/stat.h>
10145#include <unistd.h>
10146int main(int argc, char*argv[])
10147{
10148 if(chflags(argv[0], 0) != 0)
10149 return 1;
10150 return 0;
10151}
Ned Deily3eb67d52011-06-28 00:00:28 -070010152
Christian Heimesd0764e22007-12-04 15:00:33 +000010153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010154if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010155 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010156else
Matthias Kloseb9621712010-04-24 17:59:49 +000010157 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10160 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010161fi
10162
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010163
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10166$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010167if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010168 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010169if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010170 ac_cv_have_chflags="yes"
10171else
10172 ac_cv_have_chflags="no"
10173fi
10174
10175fi
10176if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010177
Matthias Kloseb9621712010-04-24 17:59:49 +000010178$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010179
10180fi
10181
Matthias Kloseb9621712010-04-24 17:59:49 +000010182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10183$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010184if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010185 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010186else
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010188 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010189else
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010191/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010192
Christian Heimesd0764e22007-12-04 15:00:33 +000010193#include <sys/stat.h>
10194#include <unistd.h>
10195int main(int argc, char*argv[])
10196{
10197 if(lchflags(argv[0], 0) != 0)
10198 return 1;
10199 return 0;
10200}
Ned Deily3eb67d52011-06-28 00:00:28 -070010201
Christian Heimesd0764e22007-12-04 15:00:33 +000010202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010203if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010204 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010205else
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10209 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010210fi
10211
10212
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10215$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010216if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010217 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010218if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010219 ac_cv_have_lchflags="yes"
10220else
10221 ac_cv_have_lchflags="no"
10222fi
10223
10224fi
10225if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010226
Matthias Kloseb9621712010-04-24 17:59:49 +000010227$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010228
10229fi
10230
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010231case $ac_sys_system/$ac_sys_release in
10232Darwin/*)
10233 _CUR_CFLAGS="${CFLAGS}"
10234 _CUR_LDFLAGS="${LDFLAGS}"
10235 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10236 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10237 ;;
10238esac
10239
Matthias Kloseb9621712010-04-24 17:59:49 +000010240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10241$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010242if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010244else
10245 ac_check_lib_save_LIBS=$LIBS
10246LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010248/* end confdefs.h. */
10249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010250/* Override any GCC internal prototype to avoid an error.
10251 Use char because int might match the return type of a GCC
10252 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010253#ifdef __cplusplus
10254extern "C"
10255#endif
10256char inflateCopy ();
10257int
10258main ()
10259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010261 ;
10262 return 0;
10263}
10264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010265if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010266 ac_cv_lib_z_inflateCopy=yes
10267else
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010270rm -f core conftest.err conftest.$ac_objext \
10271 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010272LIBS=$ac_check_lib_save_LIBS
10273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10275$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010276if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010277
Matthias Kloseb9621712010-04-24 17:59:49 +000010278$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010279
10280fi
10281
10282
10283case $ac_sys_system/$ac_sys_release in
10284Darwin/*)
10285 CFLAGS="${_CUR_CFLAGS}"
10286 LDFLAGS="${_CUR_LDFLAGS}"
10287 ;;
10288esac
10289
Matthias Kloseb9621712010-04-24 17:59:49 +000010290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10291$as_echo_n "checking for hstrerror... " >&6; }
10292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010293/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010294
Martin v. Löwise9416172003-05-03 10:12:45 +000010295#include <netdb.h>
10296
Martin v. Löwise9416172003-05-03 10:12:45 +000010297int
10298main ()
10299{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010300void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010301 ;
10302 return 0;
10303}
10304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010305if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010306
Matthias Kloseb9621712010-04-24 17:59:49 +000010307$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010308
Matthias Kloseb159a552010-04-25 21:00:44 +000010309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010310$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010311else
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010314
10315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010316rm -f core conftest.err conftest.$ac_objext \
10317 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318
Matthias Kloseb9621712010-04-24 17:59:49 +000010319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10320$as_echo_n "checking for inet_aton... " >&6; }
10321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010322/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010323
Martin v. Löwis86d66262006-02-17 08:40:11 +000010324#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010325#include <sys/socket.h>
10326#include <netinet/in.h>
10327#include <arpa/inet.h>
10328
Martin v. Löwise9416172003-05-03 10:12:45 +000010329int
10330main ()
10331{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010332void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010333 ;
10334 return 0;
10335}
10336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010337if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010338
Matthias Kloseb9621712010-04-24 17:59:49 +000010339$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010340
Matthias Kloseb159a552010-04-25 21:00:44 +000010341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010342$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010343else
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10345$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010346
10347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010348rm -f core conftest.err conftest.$ac_objext \
10349 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350
Matthias Kloseb9621712010-04-24 17:59:49 +000010351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10352$as_echo_n "checking for inet_pton... " >&6; }
10353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010354/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010355
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010356#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010357#include <sys/socket.h>
10358#include <netinet/in.h>
10359#include <arpa/inet.h>
10360
Martin v. Löwise9416172003-05-03 10:12:45 +000010361int
10362main ()
10363{
10364void* p = inet_pton
10365 ;
10366 return 0;
10367}
10368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010370
Matthias Kloseb9621712010-04-24 17:59:49 +000010371$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010372
Matthias Kloseb159a552010-04-25 21:00:44 +000010373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010374$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010375else
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10377$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010378
10379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010381
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010382# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10384$as_echo_n "checking for setgroups... " >&6; }
10385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010386/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010387
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010388#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010389#ifdef HAVE_GRP_H
10390#include <grp.h>
10391#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010392
Martin v. Löwisd5843682002-11-21 20:41:28 +000010393int
10394main ()
10395{
10396void* p = setgroups
10397 ;
10398 return 0;
10399}
10400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010402
Matthias Kloseb9621712010-04-24 17:59:49 +000010403$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010404
Matthias Kloseb159a552010-04-25 21:00:44 +000010405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010406$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010407else
Matthias Kloseb9621712010-04-24 17:59:49 +000010408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10409$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010410
10411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010413
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010414# check for openpty and forkpty
10415
10416for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010417do :
10418 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010419if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010420 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010421#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010422_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010423
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010424else
Matthias Kloseb9621712010-04-24 17:59:49 +000010425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10426$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010427if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010429else
Martin v. Löwis11437992002-04-12 09:54:03 +000010430 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010431LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010435/* Override any GCC internal prototype to avoid an error.
10436 Use char because int might match the return type of a GCC
10437 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010438#ifdef __cplusplus
10439extern "C"
10440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010441char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010442int
10443main ()
10444{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010445return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 ;
10447 return 0;
10448}
10449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010450if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010451 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010452else
Matthias Kloseb9621712010-04-24 17:59:49 +000010453 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010455rm -f core conftest.err conftest.$ac_objext \
10456 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010457LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10460$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010461if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010463 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010464else
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10466$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010467if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010469else
10470 ac_check_lib_save_LIBS=$LIBS
10471LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010473/* end confdefs.h. */
10474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010475/* Override any GCC internal prototype to avoid an error.
10476 Use char because int might match the return type of a GCC
10477 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010478#ifdef __cplusplus
10479extern "C"
10480#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010481char openpty ();
10482int
10483main ()
10484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010485return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010486 ;
10487 return 0;
10488}
10489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010490if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010491 ac_cv_lib_bsd_openpty=yes
10492else
Matthias Kloseb9621712010-04-24 17:59:49 +000010493 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010495rm -f core conftest.err conftest.$ac_objext \
10496 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010497LIBS=$ac_check_lib_save_LIBS
10498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10500$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010501if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010502 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010503 LIBS="$LIBS -lbsd"
10504fi
10505
10506
10507fi
10508
Fred Drake8cef4cf2000-06-28 16:40:38 +000010509
10510fi
10511done
10512
10513for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010514do :
10515 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010516if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010517 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010518#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010519_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010520
Fred Drake8cef4cf2000-06-28 16:40:38 +000010521else
Matthias Kloseb9621712010-04-24 17:59:49 +000010522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10523$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010524if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010526else
Martin v. Löwis11437992002-04-12 09:54:03 +000010527 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010528LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532/* Override any GCC internal prototype to avoid an error.
10533 Use char because int might match the return type of a GCC
10534 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010535#ifdef __cplusplus
10536extern "C"
10537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010538char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010539int
10540main ()
10541{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010542return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 ;
10544 return 0;
10545}
10546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010547if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010549else
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010551fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010552rm -f core conftest.err conftest.$ac_objext \
10553 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010554LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10557$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010558if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010559 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010560 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010561else
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10563$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010564if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010566else
10567 ac_check_lib_save_LIBS=$LIBS
10568LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010570/* end confdefs.h. */
10571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010572/* Override any GCC internal prototype to avoid an error.
10573 Use char because int might match the return type of a GCC
10574 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010575#ifdef __cplusplus
10576extern "C"
10577#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010578char forkpty ();
10579int
10580main ()
10581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010583 ;
10584 return 0;
10585}
10586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010587if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010588 ac_cv_lib_bsd_forkpty=yes
10589else
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010592rm -f core conftest.err conftest.$ac_objext \
10593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010594LIBS=$ac_check_lib_save_LIBS
10595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10597$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010598if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010600 LIBS="$LIBS -lbsd"
10601fi
10602
10603
10604fi
10605
Fred Drake8cef4cf2000-06-28 16:40:38 +000010606
10607fi
10608done
10609
Jack Jansendd19cf82001-12-06 22:36:17 +000010610
Christian Heimesb186d002008-03-18 15:15:01 +000010611# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010612for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010613do :
10614 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020010615if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010616 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010617#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010618_ACEOF
10619
10620fi
10621done
10622
10623
Michael W. Hudson54241132001-12-07 15:38:26 +000010624# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010625for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010626do :
10627 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10628ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010629if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010630 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010631#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010632_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010634fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010635done
10636
Michael W. Hudson54241132001-12-07 15:38:26 +000010637
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010638ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020010639if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010640 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010641
Martin v. Löwis1142de32002-03-29 16:28:31 +000010642else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010644 *" dup2.$ac_objext "* ) ;;
10645 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010646 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010647esac
10648
Martin v. Löwis1142de32002-03-29 16:28:31 +000010649fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010650
10651ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020010652if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010653 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10654
10655else
10656 case " $LIBOBJS " in
10657 *" getcwd.$ac_objext "* ) ;;
10658 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10659 ;;
10660esac
10661
10662fi
10663
10664ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020010665if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010666 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10667
10668else
10669 case " $LIBOBJS " in
10670 *" strdup.$ac_objext "* ) ;;
10671 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10672 ;;
10673esac
10674
10675fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010676
10677
10678for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010679do :
10680 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010681if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010683#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010686/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010687#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010688int
10689main ()
10690{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010691getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 ;
10693 return 0;
10694}
10695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010696if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010697
Matthias Kloseb9621712010-04-24 17:59:49 +000010698$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010699
Guido van Rossum627b2d71993-12-24 10:39:16 +000010700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010702
Guido van Rossum627b2d71993-12-24 10:39:16 +000010703fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010704done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010705
Jack Jansen150753c2003-03-29 22:07:47 +000010706for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010707do :
10708 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010709if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010710 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010711#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010714/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010715#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010716int
10717main ()
10718{
10719setpgrp(0,0);
10720 ;
10721 return 0;
10722}
10723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010724if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010725
Matthias Kloseb9621712010-04-24 17:59:49 +000010726$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010727
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010730
10731fi
10732done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010733
Thomas Wouters3a584202000-08-05 23:28:51 +000010734for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010735do :
10736 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020010737if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010738 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010739#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010742/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010743#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010744int
10745main ()
10746{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010747gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010748 ;
10749 return 0;
10750}
10751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010752if ac_fn_c_try_compile "$LINENO"; then :
10753
Guido van Rossum627b2d71993-12-24 10:39:16 +000010754else
Skip Montanaro6dead952003-09-25 14:50:04 +000010755
Matthias Kloseb9621712010-04-24 17:59:49 +000010756$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010757
Martin v. Löwis11437992002-04-12 09:54:03 +000010758
Guido van Rossum627b2d71993-12-24 10:39:16 +000010759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010761
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010762fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010763done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010764
Michael W. Hudson54241132001-12-07 15:38:26 +000010765
Victor Stinnere0be4232011-10-25 13:06:09 +020010766for ac_func in clock_gettime
10767do :
10768 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
10769if test "x$ac_cv_func_clock_gettime" = xyes; then :
10770 cat >>confdefs.h <<_ACEOF
10771#define HAVE_CLOCK_GETTIME 1
10772_ACEOF
10773
10774else
10775
10776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
10777$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
10778if ${ac_cv_lib_rt_clock_gettime+:} false; then :
10779 $as_echo_n "(cached) " >&6
10780else
10781 ac_check_lib_save_LIBS=$LIBS
10782LIBS="-lrt $LIBS"
10783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10784/* end confdefs.h. */
10785
10786/* Override any GCC internal prototype to avoid an error.
10787 Use char because int might match the return type of a GCC
10788 builtin and then its argument prototype would still apply. */
10789#ifdef __cplusplus
10790extern "C"
10791#endif
10792char clock_gettime ();
10793int
10794main ()
10795{
10796return clock_gettime ();
10797 ;
10798 return 0;
10799}
10800_ACEOF
10801if ac_fn_c_try_link "$LINENO"; then :
10802 ac_cv_lib_rt_clock_gettime=yes
10803else
10804 ac_cv_lib_rt_clock_gettime=no
10805fi
10806rm -f core conftest.err conftest.$ac_objext \
10807 conftest$ac_exeext conftest.$ac_ext
10808LIBS=$ac_check_lib_save_LIBS
10809fi
10810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
10811$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
10812if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
10813
10814 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
10815
10816
10817$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
10818
10819
10820fi
10821
10822
10823fi
10824done
10825
10826
10827for ac_func in clock_getres
10828do :
10829 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
10830if test "x$ac_cv_func_clock_getres" = xyes; then :
10831 cat >>confdefs.h <<_ACEOF
10832#define HAVE_CLOCK_GETRES 1
10833_ACEOF
10834
10835else
10836
10837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
10838$as_echo_n "checking for clock_getres in -lrt... " >&6; }
10839if ${ac_cv_lib_rt_clock_getres+:} false; then :
10840 $as_echo_n "(cached) " >&6
10841else
10842 ac_check_lib_save_LIBS=$LIBS
10843LIBS="-lrt $LIBS"
10844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10845/* end confdefs.h. */
10846
10847/* Override any GCC internal prototype to avoid an error.
10848 Use char because int might match the return type of a GCC
10849 builtin and then its argument prototype would still apply. */
10850#ifdef __cplusplus
10851extern "C"
10852#endif
10853char clock_getres ();
10854int
10855main ()
10856{
10857return clock_getres ();
10858 ;
10859 return 0;
10860}
10861_ACEOF
10862if ac_fn_c_try_link "$LINENO"; then :
10863 ac_cv_lib_rt_clock_getres=yes
10864else
10865 ac_cv_lib_rt_clock_getres=no
10866fi
10867rm -f core conftest.err conftest.$ac_objext \
10868 conftest$ac_exeext conftest.$ac_ext
10869LIBS=$ac_check_lib_save_LIBS
10870fi
10871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
10872$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
10873if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
10874
10875 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
10876
10877
10878fi
10879
10880
10881fi
10882done
10883
10884
Matthias Kloseb9621712010-04-24 17:59:49 +000010885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10886$as_echo_n "checking for major... " >&6; }
10887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010888/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010889
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010890#if defined(MAJOR_IN_MKDEV)
10891#include <sys/mkdev.h>
10892#elif defined(MAJOR_IN_SYSMACROS)
10893#include <sys/sysmacros.h>
10894#else
10895#include <sys/types.h>
10896#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010897
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010898int
10899main ()
10900{
10901
10902 makedev(major(0),minor(0));
10903
10904 ;
10905 return 0;
10906}
10907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010908if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010909
10910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010912
Matthias Kloseb9621712010-04-24 17:59:49 +000010913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10914$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010915
10916else
Skip Montanaro6dead952003-09-25 14:50:04 +000010917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10919$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010920
10921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010922rm -f core conftest.err conftest.$ac_objext \
10923 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010924
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010925# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010926# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10928$as_echo_n "checking for getaddrinfo... " >&6; }
10929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010930/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010931
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010932#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010933#include <sys/socket.h>
10934#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010935#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010936
Martin v. Löwis11437992002-04-12 09:54:03 +000010937int
10938main ()
10939{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010940getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 ;
10942 return 0;
10943}
10944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010945if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010946 have_getaddrinfo=yes
10947else
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010950rm -f core conftest.err conftest.$ac_objext \
10951 conftest$ac_exeext conftest.$ac_ext
10952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10953$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010954if test $have_getaddrinfo = yes
10955then
Matthias Kloseb9621712010-04-24 17:59:49 +000010956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10957$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010958 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010960else
Matthias Kloseb9621712010-04-24 17:59:49 +000010961 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010010962
10963if test "${enable_ipv6+set}" = set; then
10964 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
10965else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010966 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010010967fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010968else
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010970/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010971
10972#include <sys/types.h>
10973#include <netdb.h>
10974#include <string.h>
10975#include <sys/socket.h>
10976#include <netinet/in.h>
10977
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010978int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010979{
10980 int passive, gaierr, inet4 = 0, inet6 = 0;
10981 struct addrinfo hints, *ai, *aitop;
10982 char straddr[INET6_ADDRSTRLEN], strport[16];
10983
10984 for (passive = 0; passive <= 1; passive++) {
10985 memset(&hints, 0, sizeof(hints));
10986 hints.ai_family = AF_UNSPEC;
10987 hints.ai_flags = passive ? AI_PASSIVE : 0;
10988 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010989 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010990 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10991 (void)gai_strerror(gaierr);
10992 goto bad;
10993 }
10994 for (ai = aitop; ai; ai = ai->ai_next) {
10995 if (ai->ai_addr == NULL ||
10996 ai->ai_addrlen == 0 ||
10997 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10998 straddr, sizeof(straddr), strport, sizeof(strport),
10999 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11000 goto bad;
11001 }
11002 switch (ai->ai_family) {
11003 case AF_INET:
11004 if (strcmp(strport, "54321") != 0) {
11005 goto bad;
11006 }
11007 if (passive) {
11008 if (strcmp(straddr, "0.0.0.0") != 0) {
11009 goto bad;
11010 }
11011 } else {
11012 if (strcmp(straddr, "127.0.0.1") != 0) {
11013 goto bad;
11014 }
11015 }
11016 inet4++;
11017 break;
11018 case AF_INET6:
11019 if (strcmp(strport, "54321") != 0) {
11020 goto bad;
11021 }
11022 if (passive) {
11023 if (strcmp(straddr, "::") != 0) {
11024 goto bad;
11025 }
11026 } else {
11027 if (strcmp(straddr, "::1") != 0) {
11028 goto bad;
11029 }
11030 }
11031 inet6++;
11032 break;
11033 case AF_UNSPEC:
11034 goto bad;
11035 break;
11036 default:
11037 /* another family support? */
11038 break;
11039 }
11040 }
11041 }
11042
11043 if (!(inet4 == 0 || inet4 == 2))
11044 goto bad;
11045 if (!(inet6 == 0 || inet6 == 2))
11046 goto bad;
11047
11048 if (aitop)
11049 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011050 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011051
11052 bad:
11053 if (aitop)
11054 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011055 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011056}
11057
Martin v. Löwis11437992002-04-12 09:54:03 +000011058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011059if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011060 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011061else
Matthias Kloseb9621712010-04-24 17:59:49 +000011062 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11065 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011067
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011068fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011069
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011071
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11073$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11074
Mark Dickinson2df5d282009-12-31 21:22:50 +000011075if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011076then
11077 if test $ipv6 = yes
11078 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011079 echo 'Fatal: You must get working getaddrinfo() function.'
11080 echo ' or you can specify "--disable-ipv6"'.
11081 exit 1
11082 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011083else
Martin v. Löwis11437992002-04-12 09:54:03 +000011084
Matthias Kloseb9621712010-04-24 17:59:49 +000011085$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011086
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011087fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011088
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011089for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011090do :
11091 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011092if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011093 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011094#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011095_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011096
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011097fi
11098done
11099
Michael W. Hudson54241132001-12-07 15:38:26 +000011100
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011101# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11103$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011104if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011105 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011106else
Matthias Kloseb9621712010-04-24 17:59:49 +000011107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011108/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011109#include <sys/types.h>
11110#include <sys/time.h>
11111#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011112
Martin v. Löwis11437992002-04-12 09:54:03 +000011113int
11114main ()
11115{
11116if ((struct tm *) 0)
11117return 0;
11118 ;
11119 return 0;
11120}
11121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011122if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011123 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011124else
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11130$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011131if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011132
Matthias Kloseb9621712010-04-24 17:59:49 +000011133$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011134
11135fi
11136
Matthias Kloseb9621712010-04-24 17:59:49 +000011137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11138$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011139if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011140 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011141else
Matthias Kloseb9621712010-04-24 17:59:49 +000011142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011143/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011144#include <sys/types.h>
11145#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011146
Martin v. Löwis11437992002-04-12 09:54:03 +000011147int
11148main ()
11149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011150struct tm tm;
11151 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 ;
11154 return 0;
11155}
11156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011157if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011158 ac_cv_struct_tm=time.h
11159else
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11165$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011166if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011167
Matthias Kloseb9621712010-04-24 17:59:49 +000011168$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011169
11170fi
11171
Matthias Kloseb9621712010-04-24 17:59:49 +000011172ac_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 +000011173#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011174
Matthias Kloseb9621712010-04-24 17:59:49 +000011175"
Victor Stinnere0be4232011-10-25 13:06:09 +020011176if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011177
11178cat >>confdefs.h <<_ACEOF
11179#define HAVE_STRUCT_TM_TM_ZONE 1
11180_ACEOF
11181
11182
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011183fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011184
Martin v. Löwis11437992002-04-12 09:54:03 +000011185if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11186
Matthias Kloseb9621712010-04-24 17:59:49 +000011187$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011188
11189else
Matthias Kloseb9621712010-04-24 17:59:49 +000011190 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11191"
Victor Stinnere0be4232011-10-25 13:06:09 +020011192if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011193 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011194else
Matthias Kloseb9621712010-04-24 17:59:49 +000011195 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011196fi
11197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011199#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011200_ACEOF
11201
Matthias Kloseb9621712010-04-24 17:59:49 +000011202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11203$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011204if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011205 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206else
Matthias Kloseb9621712010-04-24 17:59:49 +000011207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011208/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011209#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011210#if !HAVE_DECL_TZNAME
11211extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011213
Martin v. Löwis11437992002-04-12 09:54:03 +000011214int
11215main ()
11216{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 ;
11219 return 0;
11220}
11221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011222if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011223 ac_cv_var_tzname=yes
11224else
Matthias Kloseb9621712010-04-24 17:59:49 +000011225 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011227rm -f core conftest.err conftest.$ac_objext \
11228 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11231$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011232 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011233
Matthias Kloseb9621712010-04-24 17:59:49 +000011234$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011235
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011236 fi
11237fi
11238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239ac_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 +020011240if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011241
11242cat >>confdefs.h <<_ACEOF
11243#define HAVE_STRUCT_STAT_ST_RDEV 1
11244_ACEOF
11245
11246
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011247fi
11248
Matthias Kloseb9621712010-04-24 17:59:49 +000011249ac_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 +020011250if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011251
Martin v. Löwis11437992002-04-12 09:54:03 +000011252cat >>confdefs.h <<_ACEOF
11253#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11254_ACEOF
11255
11256
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011257fi
11258
Matthias Kloseb9621712010-04-24 17:59:49 +000011259ac_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 +020011260if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011261
11262cat >>confdefs.h <<_ACEOF
11263#define HAVE_STRUCT_STAT_ST_FLAGS 1
11264_ACEOF
11265
11266
11267fi
11268
Matthias Kloseb9621712010-04-24 17:59:49 +000011269ac_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 +020011270if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011271
11272cat >>confdefs.h <<_ACEOF
11273#define HAVE_STRUCT_STAT_ST_GEN 1
11274_ACEOF
11275
11276
11277fi
11278
Matthias Kloseb9621712010-04-24 17:59:49 +000011279ac_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 +020011280if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011281
11282cat >>confdefs.h <<_ACEOF
11283#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11284_ACEOF
11285
11286
11287fi
11288
Matthias Kloseb9621712010-04-24 17:59:49 +000011289ac_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 +020011290if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011291
Martin v. Löwis11437992002-04-12 09:54:03 +000011292cat >>confdefs.h <<_ACEOF
11293#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11294_ACEOF
11295
11296
Matthias Kloseb9621712010-04-24 17:59:49 +000011297$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011298
11299else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011300 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011301 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011302 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11303 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011304esac
11305
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011306fi
11307
Michael W. Hudson54241132001-12-07 15:38:26 +000011308
Martin v. Löwis11437992002-04-12 09:54:03 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11311$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011312if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011313 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011314else
Matthias Kloseb159a552010-04-25 21:00:44 +000011315
Matthias Kloseb9621712010-04-24 17:59:49 +000011316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011318#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011319int
11320main ()
11321{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011322return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 ;
11324 return 0;
11325}
11326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011327if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011328 ac_cv_header_time_altzone=yes
11329else
Matthias Kloseb9621712010-04-24 17:59:49 +000011330 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011334fi
11335
Matthias Kloseb9621712010-04-24 17:59:49 +000011336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11337$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011338if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011339
Matthias Kloseb9621712010-04-24 17:59:49 +000011340$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011341
11342fi
11343
Guido van Rossumda88dad1995-01-26 00:46:29 +000011344was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11346$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011348/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011349
11350#include <sys/types.h>
11351#include <sys/select.h>
11352#include <sys/time.h>
11353
Martin v. Löwis11437992002-04-12 09:54:03 +000011354int
11355main ()
11356{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011357;
Martin v. Löwis11437992002-04-12 09:54:03 +000011358 ;
11359 return 0;
11360}
11361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011362if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011363
11364
Matthias Kloseb9621712010-04-24 17:59:49 +000011365$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011366
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011367 was_it_defined=yes
11368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11372$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373
Matthias Kloseb9621712010-04-24 17:59:49 +000011374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11375$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011376if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011377 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011378else
Matthias Kloseb9621712010-04-24 17:59:49 +000011379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011380/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011381#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011382int
11383main ()
11384{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011385struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 ;
11387 return 0;
11388}
11389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011391 ac_cv_struct_addrinfo=yes
11392else
Matthias Kloseb9621712010-04-24 17:59:49 +000011393 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11396fi
11397
Matthias Kloseb9621712010-04-24 17:59:49 +000011398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11399$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011400if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011401
Matthias Kloseb9621712010-04-24 17:59:49 +000011402$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011403
11404fi
11405
Matthias Kloseb9621712010-04-24 17:59:49 +000011406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11407$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011408if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011409 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011410else
Matthias Kloseb9621712010-04-24 17:59:49 +000011411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011412/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011413
11414# include <sys/types.h>
11415# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011416int
11417main ()
11418{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011419struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011420 ;
11421 return 0;
11422}
11423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011425 ac_cv_struct_sockaddr_storage=yes
11426else
Matthias Kloseb9621712010-04-24 17:59:49 +000011427 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11430fi
11431
Matthias Kloseb9621712010-04-24 17:59:49 +000011432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11433$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011434if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011435
Matthias Kloseb9621712010-04-24 17:59:49 +000011436$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011437
11438fi
11439
Guido van Rossum627b2d71993-12-24 10:39:16 +000011440# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011441
Matthias Kloseb9621712010-04-24 17:59:49 +000011442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11443$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011444if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011446else
Matthias Kloseb9621712010-04-24 17:59:49 +000011447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011449$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011450int
11451main ()
11452{
11453static int test_array [1 - 2 * !(((char) -1) < 0)];
11454test_array [0] = 0
11455
11456 ;
11457 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011458}
Martin v. Löwis11437992002-04-12 09:54:03 +000011459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011460if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011461 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011462else
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11468$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011469if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011470 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011471
11472fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011473
Matthias Kloseb9621712010-04-24 17:59:49 +000011474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11475$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011476if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011478else
Matthias Kloseb9621712010-04-24 17:59:49 +000011479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011481
Martin v. Löwis11437992002-04-12 09:54:03 +000011482int
11483main ()
11484{
11485/* FIXME: Include the comments suggested by Paul. */
11486#ifndef __cplusplus
11487 /* Ultrix mips cc rejects this. */
11488 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011491 char const *const *pcpcc;
11492 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 /* NEC SVR4.0.2 mips cc rejects this. */
11494 struct point {int x, y;};
11495 static struct point const zero = {0,0};
11496 /* AIX XL C 1.02.0.0 rejects this.
11497 It does not let you subtract one const X* pointer from another in
11498 an arm of an if-expression whose if-part is not a constant
11499 expression */
11500 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011503 ++pcpcc;
11504 ppc = (char**) pcpcc;
11505 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011506 { /* SCO 3.2v4 cc rejects this. */
11507 char *t;
11508 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011509
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 }
11513 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11514 int x[] = {25, 17};
11515 const int *foo = &x[0];
11516 ++foo;
11517 }
11518 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11519 typedef const int *iptr;
11520 iptr p = 0;
11521 ++p;
11522 }
11523 { /* AIX XL C 1.02.0.0 rejects this saying
11524 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11525 struct s { int j; const int *ap[3]; };
11526 struct s *b; b->j = 5;
11527 }
11528 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11529 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011531 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011533#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011534
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 ;
11536 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011537}
Martin v. Löwis11437992002-04-12 09:54:03 +000011538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011539if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011540 ac_cv_c_const=yes
11541else
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11547$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011548if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011549
Matthias Kloseb9621712010-04-24 17:59:49 +000011550$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011551
11552fi
11553
Michael W. Hudson54241132001-12-07 15:38:26 +000011554
Guido van Rossumda88dad1995-01-26 00:46:29 +000011555works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11557$as_echo_n "checking for working volatile... " >&6; }
11558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011559/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011560
Martin v. Löwis11437992002-04-12 09:54:03 +000011561int
11562main ()
11563{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011564volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011565 ;
11566 return 0;
11567}
11568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011569if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011570 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011571else
Skip Montanaro6dead952003-09-25 14:50:04 +000011572
Matthias Kloseb9621712010-04-24 17:59:49 +000011573$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011574
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011575
Guido van Rossum627b2d71993-12-24 10:39:16 +000011576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11579$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011580
Guido van Rossumda88dad1995-01-26 00:46:29 +000011581works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11583$as_echo_n "checking for working signed char... " >&6; }
11584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011585/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011586
Martin v. Löwis11437992002-04-12 09:54:03 +000011587int
11588main ()
11589{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011590signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 ;
11592 return 0;
11593}
11594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011595if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011596 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011597else
Skip Montanaro6dead952003-09-25 14:50:04 +000011598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011600
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011601
Guido van Rossum7f43da71994-08-01 12:15:30 +000011602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11605$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011606
Guido van Rossumda88dad1995-01-26 00:46:29 +000011607have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11609$as_echo_n "checking for prototypes... " >&6; }
11610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011611/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011612int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011613int
11614main ()
11615{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011616return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011617 ;
11618 return 0;
11619}
11620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011621if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011622
Matthias Kloseb9621712010-04-24 17:59:49 +000011623$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011624
Matthias Kloseb159a552010-04-25 21:00:44 +000011625 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11629$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011630
Guido van Rossumda88dad1995-01-26 00:46:29 +000011631works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11633$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011635/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011636
11637#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011638int foo(int x, ...) {
11639 va_list va;
11640 va_start(va, x);
11641 va_arg(va, int);
11642 va_arg(va, char *);
11643 va_arg(va, double);
11644 return 0;
11645}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011646
Martin v. Löwis11437992002-04-12 09:54:03 +000011647int
11648main ()
11649{
Guido van Rossum90eea071996-08-30 20:58:57 +000011650return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 ;
11652 return 0;
11653}
11654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011656
11657
Matthias Kloseb9621712010-04-24 17:59:49 +000011658$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011659
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011660 works=yes
11661
Guido van Rossum627b2d71993-12-24 10:39:16 +000011662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11665$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011666
Martin v. Löwisd6320502004-08-12 13:45:08 +000011667# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11669$as_echo_n "checking for socketpair... " >&6; }
11670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011671/* end confdefs.h. */
11672
11673#include <sys/types.h>
11674#include <sys/socket.h>
11675
11676int
11677main ()
11678{
11679void *x=socketpair
11680 ;
11681 return 0;
11682}
11683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011687
Matthias Kloseb159a552010-04-25 21:00:44 +000011688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011689$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011690else
Matthias Kloseb9621712010-04-24 17:59:49 +000011691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11692$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011693
11694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011696
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011697# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11699$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011701/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011702#include <sys/types.h>
11703#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011704int
11705main ()
11706{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011707struct sockaddr x;
11708x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011709 ;
11710 return 0;
11711}
11712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011713if ac_fn_c_try_compile "$LINENO"; then :
11714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11715$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011718
11719else
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11721$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011722
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011725
Guido van Rossumda88dad1995-01-26 00:46:29 +000011726va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11728$as_echo_n "checking whether va_list is an array... " >&6; }
11729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011730/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011731
11732#ifdef HAVE_STDARG_PROTOTYPES
11733#include <stdarg.h>
11734#else
11735#include <varargs.h>
11736#endif
11737
Martin v. Löwis11437992002-04-12 09:54:03 +000011738int
11739main ()
11740{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011741va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 ;
11743 return 0;
11744}
11745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011746if ac_fn_c_try_compile "$LINENO"; then :
11747
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011748else
Skip Montanaro6dead952003-09-25 14:50:04 +000011749
Martin v. Löwis11437992002-04-12 09:54:03 +000011750
Matthias Kloseb9621712010-04-24 17:59:49 +000011751$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011752
Guido van Rossumda88dad1995-01-26 00:46:29 +000011753 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011754
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11758$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011759
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011760# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011761
11762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020011764if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011765
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011767
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11769$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011770 OLD_CFLAGS=$CFLAGS
11771 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011773/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011774
11775# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011776
Martin v. Löwis11437992002-04-12 09:54:03 +000011777int
11778main ()
11779{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011780
11781 char *name;
11782 struct hostent *he, *res;
11783 char buffer[2048];
11784 int buflen = 2048;
11785 int h_errnop;
11786
11787 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011788
11789 ;
11790 return 0;
11791}
11792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011793if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011794
Matthias Kloseb9621712010-04-24 17:59:49 +000011795 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011796
Martin v. Löwis11437992002-04-12 09:54:03 +000011797
Matthias Kloseb9621712010-04-24 17:59:49 +000011798$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011799
Matthias Kloseb9621712010-04-24 17:59:49 +000011800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11801$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011802
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011803else
Skip Montanaro6dead952003-09-25 14:50:04 +000011804
Matthias Kloseb9621712010-04-24 17:59:49 +000011805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11806$as_echo "no" >&6; }
11807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11808$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011810/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011811
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011812# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011813
Martin v. Löwis11437992002-04-12 09:54:03 +000011814int
11815main ()
11816{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011817
11818 char *name;
11819 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011820 char buffer[2048];
11821 int buflen = 2048;
11822 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011823
Matthias Kloseb159a552010-04-25 21:00:44 +000011824 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011825
11826 ;
11827 return 0;
11828}
11829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011830if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011833
Martin v. Löwis11437992002-04-12 09:54:03 +000011834
Matthias Kloseb159a552010-04-25 21:00:44 +000011835$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011836
Matthias Kloseb9621712010-04-24 17:59:49 +000011837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11838$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011839
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011840else
Skip Montanaro6dead952003-09-25 14:50:04 +000011841
Matthias Kloseb9621712010-04-24 17:59:49 +000011842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11843$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11845$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11847/* end confdefs.h. */
11848
11849# include <netdb.h>
11850
11851int
11852main ()
11853{
11854
11855 char *name;
11856 struct hostent *he;
11857 struct hostent_data data;
11858
11859 (void) gethostbyname_r(name, he, &data);
11860
11861 ;
11862 return 0;
11863}
11864_ACEOF
11865if ac_fn_c_try_compile "$LINENO"; then :
11866
11867 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11868
11869
11870$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11871
11872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11873$as_echo "yes" >&6; }
11874
11875else
11876
11877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11878$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011879
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011882
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011885
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011888 CFLAGS=$OLD_CFLAGS
11889
11890else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011891
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 for ac_func in gethostbyname
11893do :
11894 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020011895if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011896 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011897#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011898_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011899
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011900fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011901done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011902
Michael W. Hudson54241132001-12-07 15:38:26 +000011903
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011904fi
11905
Michael W. Hudson54241132001-12-07 15:38:26 +000011906
11907
11908
11909
11910
11911
Guido van Rossum627b2d71993-12-24 10:39:16 +000011912# checks for system services
11913# (none yet)
11914
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011915# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011916ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020011917if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011918
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011919else
Matthias Kloseb9621712010-04-24 17:59:49 +000011920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11921$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011922if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011924else
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011926LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011930/* Override any GCC internal prototype to avoid an error.
11931 Use char because int might match the return type of a GCC
11932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011933#ifdef __cplusplus
11934extern "C"
11935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011936char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011937int
11938main ()
11939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011940return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011941 ;
11942 return 0;
11943}
11944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011945if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011946 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011947else
Matthias Kloseb9621712010-04-24 17:59:49 +000011948 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011950rm -f core conftest.err conftest.$ac_objext \
11951 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011952LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11955$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011956if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011957 cat >>confdefs.h <<_ACEOF
11958#define HAVE_LIBIEEE 1
11959_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011960
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011961 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011962
Guido van Rossum627b2d71993-12-24 10:39:16 +000011963fi
11964
Michael W. Hudson54241132001-12-07 15:38:26 +000011965
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011966fi
11967
Michael W. Hudson54241132001-12-07 15:38:26 +000011968
Guido van Rossum7f253911997-05-09 02:42:48 +000011969# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11971$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011973# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011974if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011975 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011976if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011977then
11978
Matthias Kloseb9621712010-04-24 17:59:49 +000011979$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011980
Matthias Kloseb9621712010-04-24 17:59:49 +000011981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11982$as_echo "yes" >&6; }
11983else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11984$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011985fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011986else
Matthias Kloseb9621712010-04-24 17:59:49 +000011987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11988$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011989fi
11990
Guido van Rossum7f253911997-05-09 02:42:48 +000011991
Guido van Rossum7f43da71994-08-01 12:15:30 +000011992# check for --with-libm=...
11993
Guido van Rossum563e7081996-09-10 18:20:48 +000011994case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011995Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011996*) LIBM=-lm
11997esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11999$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012001# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012002if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012003 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012004if test "$withval" = no
12005then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12007$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012008elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012009then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12011$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012012else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012013fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012014else
Matthias Kloseb9621712010-04-24 17:59:49 +000012015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12016$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012017fi
12018
Guido van Rossum7f43da71994-08-01 12:15:30 +000012019
12020# check for --with-libc=...
12021
Matthias Kloseb9621712010-04-24 17:59:49 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12023$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012025# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012026if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012027 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012028if test "$withval" = no
12029then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12031$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012032elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012033then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12035$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012036else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012037fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012038else
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12040$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012041fi
12042
Guido van Rossum7f43da71994-08-01 12:15:30 +000012043
Stefan Krah1919b7e2012-03-21 18:25:23 +010012044# **************************************
12045# * Check for gcc x64 inline assembler *
12046# **************************************
12047
12048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12049$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12051/* end confdefs.h. */
12052
12053int
12054main ()
12055{
12056
12057 __asm__ __volatile__ ("movq %rcx, %rax");
12058
12059 ;
12060 return 0;
12061}
12062_ACEOF
12063if ac_fn_c_try_compile "$LINENO"; then :
12064 have_gcc_asm_for_x64=yes
12065else
12066 have_gcc_asm_for_x64=no
12067fi
12068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12070$as_echo "$have_gcc_asm_for_x64" >&6; }
12071if test "$have_gcc_asm_for_x64" = yes
12072then
12073
12074$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12075
12076fi
12077
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012078# **************************************************
12079# * Check for various properties of floating point *
12080# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012081
Matthias Kloseb9621712010-04-24 17:59:49 +000012082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12083$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012084if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012086else
12087
Matthias Kloseb9621712010-04-24 17:59:49 +000012088if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012089 ac_cv_little_endian_double=no
12090else
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012092/* end confdefs.h. */
12093
12094#include <string.h>
12095int main() {
12096 double x = 9006104071832581.0;
12097 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12098 return 0;
12099 else
12100 return 1;
12101}
12102
12103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012104if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012105 ac_cv_little_endian_double=yes
12106else
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12110 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012111fi
12112
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012113fi
12114
Matthias Kloseb9621712010-04-24 17:59:49 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12116$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012117if test "$ac_cv_little_endian_double" = yes
12118then
12119
Matthias Kloseb9621712010-04-24 17:59:49 +000012120$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012121
12122fi
12123
Matthias Kloseb9621712010-04-24 17:59:49 +000012124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12125$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012126if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012128else
12129
Matthias Kloseb9621712010-04-24 17:59:49 +000012130if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012131 ac_cv_big_endian_double=no
12132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012134/* end confdefs.h. */
12135
12136#include <string.h>
12137int main() {
12138 double x = 9006104071832581.0;
12139 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12140 return 0;
12141 else
12142 return 1;
12143}
12144
12145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012146if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012147 ac_cv_big_endian_double=yes
12148else
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12152 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012153fi
12154
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012155fi
12156
Matthias Kloseb9621712010-04-24 17:59:49 +000012157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12158$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012159if test "$ac_cv_big_endian_double" = yes
12160then
12161
Matthias Kloseb9621712010-04-24 17:59:49 +000012162$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012163
12164fi
12165
12166# Some ARM platforms use a mixed-endian representation for doubles.
12167# While Python doesn't currently have full support for these platforms
12168# (see e.g., issue 1762561), we can at least make sure that float <-> string
12169# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12171$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012172if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012174else
12175
Matthias Kloseb9621712010-04-24 17:59:49 +000012176if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012177 ac_cv_mixed_endian_double=no
12178else
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012180/* end confdefs.h. */
12181
12182#include <string.h>
12183int main() {
12184 double x = 9006104071832581.0;
12185 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12186 return 0;
12187 else
12188 return 1;
12189}
12190
12191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012192if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012193 ac_cv_mixed_endian_double=yes
12194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12198 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012199fi
12200
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012201fi
12202
Matthias Kloseb9621712010-04-24 17:59:49 +000012203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12204$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012205if test "$ac_cv_mixed_endian_double" = yes
12206then
12207
Matthias Kloseb9621712010-04-24 17:59:49 +000012208$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012209
12210fi
12211
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012212# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012213# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012214# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012215# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012216# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012217# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012218
12219# This inline assembler syntax may also work for suncc and icc,
12220# so we try it on all platforms.
12221
Matthias Kloseb9621712010-04-24 17:59:49 +000012222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12223$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012225/* end confdefs.h. */
12226
12227int
12228main ()
12229{
12230
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012231 unsigned short cw;
12232 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12233 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012234
12235 ;
12236 return 0;
12237}
12238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012239if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012240 have_gcc_asm_for_x87=yes
12241else
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012243fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12246$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012247if test "$have_gcc_asm_for_x87" = yes
12248then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012249
Matthias Kloseb9621712010-04-24 17:59:49 +000012250$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012251
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012252fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012253
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012254# Detect whether system arithmetic is subject to x87-style double
12255# rounding issues. The result of this test has little meaning on non
12256# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12257# mode is round-to-nearest and double rounding issues are present, and
12258# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12260$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012261# $BASECFLAGS may affect the result
12262ac_save_cc="$CC"
12263CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012264if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012265 ac_cv_x87_double_rounding=no
12266else
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012268/* end confdefs.h. */
12269
12270#include <stdlib.h>
12271#include <math.h>
12272int main() {
12273 volatile double x, y, z;
12274 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12275 x = 0.99999999999999989; /* 1-2**-53 */
12276 y = 1./x;
12277 if (y != 1.)
12278 exit(0);
12279 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12280 x = 1e16;
12281 y = 2.99999;
12282 z = x + y;
12283 if (z != 1e16+4.)
12284 exit(0);
12285 /* both tests show evidence of double rounding */
12286 exit(1);
12287}
12288
12289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012290if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012291 ac_cv_x87_double_rounding=no
12292else
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12296 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012297fi
12298
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012299CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12301$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012302if test "$ac_cv_x87_double_rounding" = yes
12303then
12304
Matthias Kloseb9621712010-04-24 17:59:49 +000012305$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012306
12307fi
12308
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012309# ************************************
12310# * Check for mathematical functions *
12311# ************************************
12312
12313LIBS_SAVE=$LIBS
12314LIBS="$LIBS $LIBM"
12315
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012316for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12317do :
12318 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12319ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012320if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012321 cat >>confdefs.h <<_ACEOF
12322#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12323_ACEOF
12324
12325fi
12326done
12327
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012328for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012329do :
12330 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12331ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012332if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012333 cat >>confdefs.h <<_ACEOF
12334#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12335_ACEOF
12336
12337fi
12338done
12339
12340ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12341"
Victor Stinnere0be4232011-10-25 13:06:09 +020012342if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012343 ac_have_decl=1
12344else
12345 ac_have_decl=0
12346fi
12347
12348cat >>confdefs.h <<_ACEOF
12349#define HAVE_DECL_ISINF $ac_have_decl
12350_ACEOF
12351ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12352"
Victor Stinnere0be4232011-10-25 13:06:09 +020012353if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012354 ac_have_decl=1
12355else
12356 ac_have_decl=0
12357fi
12358
12359cat >>confdefs.h <<_ACEOF
12360#define HAVE_DECL_ISNAN $ac_have_decl
12361_ACEOF
12362ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12363"
Victor Stinnere0be4232011-10-25 13:06:09 +020012364if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012365 ac_have_decl=1
12366else
12367 ac_have_decl=0
12368fi
12369
12370cat >>confdefs.h <<_ACEOF
12371#define HAVE_DECL_ISFINITE $ac_have_decl
12372_ACEOF
12373
12374
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012375# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12376# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12378$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012379if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012381else
12382
Matthias Kloseb9621712010-04-24 17:59:49 +000012383if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012384 ac_cv_tanh_preserves_zero_sign=no
12385else
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012387/* end confdefs.h. */
12388
12389#include <math.h>
12390#include <stdlib.h>
12391int main() {
12392 /* return 0 if either negative zeros don't exist
12393 on this platform or if negative zeros exist
12394 and tanh(-0.) == -0. */
12395 if (atan2(0., -1.) == atan2(-0., -1.) ||
12396 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12397 else exit(1);
12398}
12399
12400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012401if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012402 ac_cv_tanh_preserves_zero_sign=yes
12403else
Matthias Kloseb9621712010-04-24 17:59:49 +000012404 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12407 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012408fi
12409
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012410fi
12411
Matthias Kloseb9621712010-04-24 17:59:49 +000012412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12413$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012414if test "$ac_cv_tanh_preserves_zero_sign" = yes
12415then
12416
Matthias Kloseb9621712010-04-24 17:59:49 +000012417$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012418
12419fi
12420
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012421if test "$ac_cv_func_log1p" = yes
12422then
12423 # On some versions of AIX, log1p(-0.) returns 0. instead of
12424 # -0. See issue #9920.
12425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12426$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012427 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012428 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012429else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012430
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012431 if test "$cross_compiling" = yes; then :
12432 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012433else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12435/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012436
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012437 #include <math.h>
12438 #include <stdlib.h>
12439 int main() {
12440 /* Fail if the signs of log1p(-0.) and -0. can be
12441 distinguished. */
12442 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12443 return 0;
12444 else
12445 return 1;
12446 }
12447
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012448_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012449if ac_fn_c_try_run "$LINENO"; then :
12450 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012451else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012452 ac_cv_log1p_drops_zero_sign=yes
12453fi
12454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12455 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012456fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012457
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012458fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012459
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12461$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12462fi
12463if test "$ac_cv_log1p_drops_zero_sign" = yes
12464then
12465
12466$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12467
12468fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012469
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012470LIBS=$LIBS_SAVE
12471
Mark Dickinsona614f042009-11-28 12:48:43 +000012472# For multiprocessing module, check that sem_open
12473# actually works. For FreeBSD versions <= 7.2,
12474# the kernel module that provides POSIX semaphores
12475# isn't loaded by default, so an attempt to call
12476# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12478$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012479if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012480 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012481else
Matthias Kloseb9621712010-04-24 17:59:49 +000012482 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012483 ac_cv_posix_semaphores_enabled=yes
12484else
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012486/* end confdefs.h. */
12487
12488#include <unistd.h>
12489#include <fcntl.h>
12490#include <stdio.h>
12491#include <semaphore.h>
12492#include <sys/stat.h>
12493
12494int main(void) {
12495 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12496 if (a == SEM_FAILED) {
12497 perror("sem_open");
12498 return 1;
12499 }
12500 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012501 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012502 return 0;
12503}
12504
12505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012506if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012507 ac_cv_posix_semaphores_enabled=yes
12508else
Matthias Kloseb9621712010-04-24 17:59:49 +000012509 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +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
Mark Dickinsona614f042009-11-28 12:48:43 +000012513fi
12514
12515
Mark Dickinsona614f042009-11-28 12:48:43 +000012516fi
12517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12519$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012520if test $ac_cv_posix_semaphores_enabled = no
12521then
12522
Matthias Kloseb9621712010-04-24 17:59:49 +000012523$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012524
12525fi
12526
Mark Dickinson10683072009-04-18 21:18:19 +000012527# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12529$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012530if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012532else
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012534 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012535else
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012537/* end confdefs.h. */
12538
12539#include <unistd.h>
12540#include <fcntl.h>
12541#include <stdio.h>
12542#include <semaphore.h>
12543#include <sys/stat.h>
12544
12545int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012546 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012547 int count;
12548 int res;
12549 if(a==SEM_FAILED){
12550 perror("sem_open");
12551 return 1;
12552
12553 }
12554 res = sem_getvalue(a, &count);
12555 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012556 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012557 return res==-1 ? 1 : 0;
12558}
12559
Mark Dickinson10683072009-04-18 21:18:19 +000012560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012561if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012562 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012563else
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12567 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012568fi
12569
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012570
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012571fi
12572
Matthias Kloseb9621712010-04-24 17:59:49 +000012573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12574$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012575if test $ac_cv_broken_sem_getvalue = yes
12576then
12577
Matthias Kloseb9621712010-04-24 17:59:49 +000012578$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012579
12580fi
12581
Mark Dickinsonbd792642009-03-18 20:06:12 +000012582# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12584$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012585# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012586if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012587 enableval=$enable_big_digits; case $enable_big_digits in
12588yes)
12589 enable_big_digits=30 ;;
12590no)
12591 enable_big_digits=15 ;;
1259215|30)
12593 ;;
12594*)
Victor Stinnere0be4232011-10-25 13:06:09 +020012595 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 +000012596esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12598$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012599
12600cat >>confdefs.h <<_ACEOF
12601#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12602_ACEOF
12603
12604
12605else
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12607$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012608fi
12609
12610
Guido van Rossumef2255b2000-03-10 22:30:29 +000012611# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012612ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012613if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012614
12615
Matthias Kloseb9621712010-04-24 17:59:49 +000012616$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012617
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012618 wchar_h="yes"
12619
Guido van Rossumef2255b2000-03-10 22:30:29 +000012620else
Martin v. Löwis11437992002-04-12 09:54:03 +000012621 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012622
12623fi
12624
Michael W. Hudson54241132001-12-07 15:38:26 +000012625
Martin v. Löwis11437992002-04-12 09:54:03 +000012626
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012627# determine wchar_t size
12628if test "$wchar_h" = yes
12629then
Matthias Kloseb9621712010-04-24 17:59:49 +000012630 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012631# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12632# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12633# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12635$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012636if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012637 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012638else
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12640"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012641
Martin v. Löwis11437992002-04-12 09:54:03 +000012642else
Matthias Kloseb9621712010-04-24 17:59:49 +000012643 if test "$ac_cv_type_wchar_t" = yes; then
12644 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012646as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020012647See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648 else
12649 ac_cv_sizeof_wchar_t=0
12650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012652
Martin v. Löwis11437992002-04-12 09:54:03 +000012653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12655$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012656
12657
12658
Martin v. Löwis11437992002-04-12 09:54:03 +000012659cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012660#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012661_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012662
Michael W. Hudson54241132001-12-07 15:38:26 +000012663
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012664fi
12665
Matthias Kloseb9621712010-04-24 17:59:49 +000012666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12667$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012668have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012670/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012671
12672#include <tcl.h>
12673#if TCL_UTF_MAX != 6
12674# error "NOT UCS4_TCL"
12675#endif
12676int
12677main ()
12678{
12679
12680 ;
12681 return 0;
12682}
12683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012685
12686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012688
12689 have_ucs4_tcl=yes
12690
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12694$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012695
Skip Montanaro6dead952003-09-25 14:50:04 +000012696# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012697if test "$wchar_h" = yes
12698then
12699 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12701$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012702 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012704else
12705
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012707 ac_cv_wchar_t_signed=yes
12708else
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012710/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012711
12712 #include <wchar.h>
12713 int main()
12714 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012715 /* Success: exit code 0 */
12716 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012717 }
12718
12719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012720if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012721 ac_cv_wchar_t_signed=yes
12722else
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12726 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012727fi
12728
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012729fi
12730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12732$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733fi
12734
Georg Brandl52d168a2008-01-07 18:10:24 +000012735# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012736if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012737 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012738then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012739 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012742
Georg Brandl52d168a2008-01-07 18:10:24 +000012743else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012744 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012745fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
12747$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012748
12749# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12751$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012752if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012754else
Matthias Kloseb9621712010-04-24 17:59:49 +000012755 ac_cv_c_bigendian=unknown
12756 # See if we're dealing with a universal compiler.
12757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12758/* end confdefs.h. */
12759#ifndef __APPLE_CC__
12760 not a universal capable compiler
12761 #endif
12762 typedef int dummy;
12763
Skip Montanaro6dead952003-09-25 14:50:04 +000012764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012765if ac_fn_c_try_compile "$LINENO"; then :
12766
12767 # Check for potential -arch flags. It is not universal unless
12768 # there are at least two -arch flags with different values.
12769 ac_arch=
12770 ac_prev=
12771 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12772 if test -n "$ac_prev"; then
12773 case $ac_word in
12774 i?86 | x86_64 | ppc | ppc64)
12775 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12776 ac_arch=$ac_word
12777 else
12778 ac_cv_c_bigendian=universal
12779 break
12780 fi
12781 ;;
12782 esac
12783 ac_prev=
12784 elif test "x$ac_word" = "x-arch"; then
12785 ac_prev=arch
12786 fi
12787 done
12788fi
12789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12790 if test $ac_cv_c_bigendian = unknown; then
12791 # See if sys/param.h defines the BYTE_ORDER macro.
12792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012793/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012794#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012796
Martin v. Löwis11437992002-04-12 09:54:03 +000012797int
12798main ()
12799{
Matthias Kloseb9621712010-04-24 17:59:49 +000012800#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12801 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12802 && LITTLE_ENDIAN)
12803 bogus endian macros
12804 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012805
12806 ;
12807 return 0;
12808}
12809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012810if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012811 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012813/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012814#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012816
Martin v. Löwis11437992002-04-12 09:54:03 +000012817int
12818main ()
12819{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012820#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 not big endian
12822 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012823
12824 ;
12825 return 0;
12826}
12827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012828if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012829 ac_cv_c_bigendian=yes
12830else
Matthias Kloseb9621712010-04-24 17:59:49 +000012831 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012834fi
12835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12836 fi
12837 if test $ac_cv_c_bigendian = unknown; then
12838 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012840/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012841#include <limits.h>
12842
Martin v. Löwis11437992002-04-12 09:54:03 +000012843int
12844main ()
12845{
Matthias Kloseb9621712010-04-24 17:59:49 +000012846#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12847 bogus endian macros
12848 #endif
12849
Martin v. Löwis11437992002-04-12 09:54:03 +000012850 ;
12851 return 0;
12852}
12853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012854if ac_fn_c_try_compile "$LINENO"; then :
12855 # It does; now see whether it defined to _BIG_ENDIAN or not.
12856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12857/* end confdefs.h. */
12858#include <limits.h>
12859
12860int
12861main ()
12862{
12863#ifndef _BIG_ENDIAN
12864 not big endian
12865 #endif
12866
12867 ;
12868 return 0;
12869}
12870_ACEOF
12871if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012872 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012873else
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12877fi
12878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12879 fi
12880 if test $ac_cv_c_bigendian = unknown; then
12881 # Compile a test program.
12882 if test "$cross_compiling" = yes; then :
12883 # Try to guess by grepping values from an object file.
12884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12885/* end confdefs.h. */
12886short int ascii_mm[] =
12887 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12888 short int ascii_ii[] =
12889 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12890 int use_ascii (int i) {
12891 return ascii_mm[i] + ascii_ii[i];
12892 }
12893 short int ebcdic_ii[] =
12894 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12895 short int ebcdic_mm[] =
12896 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12897 int use_ebcdic (int i) {
12898 return ebcdic_mm[i] + ebcdic_ii[i];
12899 }
12900 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902int
12903main ()
12904{
12905return use_ascii (foo) == use_ebcdic (foo);
12906 ;
12907 return 0;
12908}
12909_ACEOF
12910if ac_fn_c_try_compile "$LINENO"; then :
12911 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12912 ac_cv_c_bigendian=yes
12913 fi
12914 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12915 if test "$ac_cv_c_bigendian" = unknown; then
12916 ac_cv_c_bigendian=no
12917 else
12918 # finding both strings is unlikely to happen, but who knows?
12919 ac_cv_c_bigendian=unknown
12920 fi
12921 fi
12922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012924else
Matthias Kloseb9621712010-04-24 17:59:49 +000012925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012926/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012927$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012928int
12929main ()
12930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 /* Are we little or big endian? From Harbison&Steele. */
12933 union
12934 {
12935 long int l;
12936 char c[sizeof (long int)];
12937 } u;
12938 u.l = 1;
12939 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940
12941 ;
12942 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012943}
Martin v. Löwis11437992002-04-12 09:54:03 +000012944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012945if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012946 ac_cv_c_bigendian=no
12947else
Matthias Kloseb9621712010-04-24 17:59:49 +000012948 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12951 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953
Matthias Kloseb9621712010-04-24 17:59:49 +000012954 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12957$as_echo "$ac_cv_c_bigendian" >&6; }
12958 case $ac_cv_c_bigendian in #(
12959 yes)
12960 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12961;; #(
12962 no)
12963 ;; #(
12964 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012965
Matthias Kloseb9621712010-04-24 17:59:49 +000012966$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012967
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 ;; #(
12969 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012970 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020012971 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012972 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012973
Michael W. Hudson54241132001-12-07 15:38:26 +000012974
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012975# ABI version string for Python extension modules. This appears between the
12976# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12977# from the following attributes which affect the ABI of this Python build (in
12978# this order):
12979#
12980# * The Python implementation (always 'cpython-' for us)
12981# * The major and minor version numbers
12982# * --with-pydebug (adds a 'd')
12983# * --with-pymalloc (adds a 'm')
12984# * --with-wide-unicode (adds a 'u')
12985#
12986# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012987# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12988# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012989
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12991$as_echo_n "checking ABIFLAGS... " >&6; }
12992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12993$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12995$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012996SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12998$as_echo "$SOABI" >&6; }
12999
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13001$as_echo_n "checking LDVERSION... " >&6; }
13002LDVERSION='$(VERSION)$(ABIFLAGS)'
13003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13004$as_echo "$LDVERSION" >&6; }
13005
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013006# SO is the extension of shared libraries `(including the dot!)
13007# -- usually .so, .sl on HP-UX, .dll on Cygwin
13008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13009$as_echo_n "checking SO... " >&6; }
13010if test -z "$SO"
13011then
13012 case $ac_sys_system in
13013 hp*|HP*)
13014 case `uname -m` in
13015 ia64) SO=.so;;
13016 *) SO=.sl;;
13017 esac
13018 ;;
13019 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013020 Linux*|GNU*)
13021 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013022 *) SO=.so;;
13023 esac
13024else
13025 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013026 echo
13027 echo '====================================================================='
13028 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013029 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013030 echo '+ Do you really mean to change the extension for shared libraries? +'
13031 echo '+ Continuing in 10 seconds to let you to ponder. +'
13032 echo '+ +'
13033 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013034 sleep 10
13035fi
13036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13037$as_echo "$SO" >&6; }
13038
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013039# Check whether right shifting a negative integer extends the sign bit
13040# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13042$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013043if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013045else
Martin v. Löwis11437992002-04-12 09:54:03 +000013046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013048 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013049else
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013051/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013052
13053int main()
13054{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013055 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013056}
13057
Martin v. Löwis11437992002-04-12 09:54:03 +000013058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013059if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013060 ac_cv_rshift_extends_sign=yes
13061else
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13065 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013066fi
13067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068fi
13069
Matthias Kloseb9621712010-04-24 17:59:49 +000013070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13071$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013072if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013073then
Martin v. Löwis11437992002-04-12 09:54:03 +000013074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013076
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013077fi
13078
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013079# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13081$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013082if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013083 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013084else
Martin v. Löwis11437992002-04-12 09:54:03 +000013085
Matthias Kloseb9621712010-04-24 17:59:49 +000013086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013087/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013088#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013089int
13090main ()
13091{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013092
13093 FILE *f = fopen("/dev/null", "r");
13094 flockfile(f);
13095 getc_unlocked(f);
13096 funlockfile(f);
13097
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 ;
13099 return 0;
13100}
13101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013102if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013103 ac_cv_have_getc_unlocked=yes
13104else
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 ac_cv_have_getc_unlocked=no
13106fi
13107rm -f core conftest.err conftest.$ac_objext \
13108 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13112$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013113if test "$ac_cv_have_getc_unlocked" = yes
13114then
Martin v. Löwis11437992002-04-12 09:54:03 +000013115
Matthias Kloseb9621712010-04-24 17:59:49 +000013116$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013117
13118fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013119
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013120# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013121# save the value of LIBS so we don't actually link Python with readline
13122LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013123
Gregory P. Smith18820942008-09-07 06:24:49 +000013124# On some systems we need to link readline to a termcap compatible
13125# library. NOTE: Keep the precedence of listed libraries synchronised
13126# with setup.py.
13127py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13129$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013130for py_libtermcap in "" ncursesw ncurses curses termcap; do
13131 if test -z "$py_libtermcap"; then
13132 READLINE_LIBS="-lreadline"
13133 else
13134 READLINE_LIBS="-lreadline -l$py_libtermcap"
13135 fi
13136 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013138/* end confdefs.h. */
13139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013140/* Override any GCC internal prototype to avoid an error.
13141 Use char because int might match the return type of a GCC
13142 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013143#ifdef __cplusplus
13144extern "C"
13145#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013146char readline ();
13147int
13148main ()
13149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013150return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013151 ;
13152 return 0;
13153}
13154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013155if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013156 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013158rm -f core conftest.err conftest.$ac_objext \
13159 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013160 if test $py_cv_lib_readline = yes; then
13161 break
13162 fi
13163done
13164# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13165#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013166if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13168$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013169else
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13171$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013174
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013175fi
13176
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013177# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13179$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013180if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013182else
13183 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013184LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013186/* end confdefs.h. */
13187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013188/* Override any GCC internal prototype to avoid an error.
13189 Use char because int might match the return type of a GCC
13190 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013191#ifdef __cplusplus
13192extern "C"
13193#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013194char rl_callback_handler_install ();
13195int
13196main ()
13197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013198return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013199 ;
13200 return 0;
13201}
13202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013203if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013204 ac_cv_lib_readline_rl_callback_handler_install=yes
13205else
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013208rm -f core conftest.err conftest.$ac_objext \
13209 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013210LIBS=$ac_check_lib_save_LIBS
13211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13213$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013214if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013215
Matthias Kloseb9621712010-04-24 17:59:49 +000013216$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013217
13218fi
13219
13220
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013221# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013223/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013224#include <readline/readline.h>
13225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013226if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013227 have_readline=yes
13228else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013229 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013230
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013231fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013232rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013233if test $have_readline = yes
13234then
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013236/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013237#include <readline/readline.h>
13238
13239_ACEOF
13240if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013244
13245fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013246rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013247
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013249/* end confdefs.h. */
13250#include <readline/readline.h>
13251
13252_ACEOF
13253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013257
13258fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013259rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013260
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013261fi
13262
Martin v. Löwis0daad592001-09-30 21:09:59 +000013263# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13265$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013266if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013267 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013268else
Martin v. Löwis11437992002-04-12 09:54:03 +000013269 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013270LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013274/* Override any GCC internal prototype to avoid an error.
13275 Use char because int might match the return type of a GCC
13276 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013277#ifdef __cplusplus
13278extern "C"
13279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013280char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013281int
13282main ()
13283{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013284return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013285 ;
13286 return 0;
13287}
13288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013289if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013290 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013291else
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013294rm -f core conftest.err conftest.$ac_objext \
13295 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013296LIBS=$ac_check_lib_save_LIBS
13297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13299$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013300if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013301
Matthias Kloseb9621712010-04-24 17:59:49 +000013302$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013303
Martin v. Löwis0daad592001-09-30 21:09:59 +000013304fi
13305
Michael W. Hudson54241132001-12-07 15:38:26 +000013306
Thomas Wouters89d996e2007-09-08 17:39:28 +000013307# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13309$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013310if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013312else
13313 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013314LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013316/* end confdefs.h. */
13317
13318/* Override any GCC internal prototype to avoid an error.
13319 Use char because int might match the return type of a GCC
13320 builtin and then its argument prototype would still apply. */
13321#ifdef __cplusplus
13322extern "C"
13323#endif
13324char rl_completion_display_matches_hook ();
13325int
13326main ()
13327{
13328return rl_completion_display_matches_hook ();
13329 ;
13330 return 0;
13331}
13332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013333if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013334 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13335else
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013338rm -f core conftest.err conftest.$ac_objext \
13339 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013340LIBS=$ac_check_lib_save_LIBS
13341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13343$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013344if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013345
Matthias Kloseb9621712010-04-24 17:59:49 +000013346$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013347
13348fi
13349
13350
Martin v. Löwis0daad592001-09-30 21:09:59 +000013351# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13353$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013354if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013356else
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013358LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013362/* Override any GCC internal prototype to avoid an error.
13363 Use char because int might match the return type of a GCC
13364 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013365#ifdef __cplusplus
13366extern "C"
13367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013368char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013369int
13370main ()
13371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013372return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 ;
13374 return 0;
13375}
13376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013377if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013378 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013382rm -f core conftest.err conftest.$ac_objext \
13383 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013384LIBS=$ac_check_lib_save_LIBS
13385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13387$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013388if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013391
Guido van Rossum353ae582001-07-10 16:45:32 +000013392fi
13393
Jack Jansendd19cf82001-12-06 22:36:17 +000013394
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013395# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013397/* end confdefs.h. */
13398#include <readline/readline.h>
13399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013400if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013401 have_readline=yes
13402else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013403 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013404
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013405fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013406rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013407if test $have_readline = yes
13408then
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013410/* end confdefs.h. */
13411#include <readline/readline.h>
13412
13413_ACEOF
13414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013418
13419fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013420rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013421
13422fi
13423
Martin v. Löwis82bca632006-02-10 20:49:30 +000013424# End of readline checks: restore LIBS
13425LIBS=$LIBS_no_readline
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13428$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013429if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013431else
Martin v. Löwis11437992002-04-12 09:54:03 +000013432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013434 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013435else
Matthias Kloseb9621712010-04-24 17:59:49 +000013436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013437/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013438
13439int main()
13440{
13441 int val1 = nice(1);
13442 if (val1 != -1 && val1 == nice(2))
13443 exit(0);
13444 exit(1);
13445}
13446
Martin v. Löwis11437992002-04-12 09:54:03 +000013447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013448if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013449 ac_cv_broken_nice=yes
13450else
Matthias Kloseb9621712010-04-24 17:59:49 +000013451 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13454 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013455fi
13456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013457fi
13458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13460$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013461if test "$ac_cv_broken_nice" = yes
13462then
Martin v. Löwis11437992002-04-12 09:54:03 +000013463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013465
13466fi
13467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13469$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013470if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013472else
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013474 ac_cv_broken_poll=no
13475else
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013477/* end confdefs.h. */
13478
13479#include <poll.h>
13480
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013481int main()
13482{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013483 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013484 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013485
13486 close (42);
13487
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013488 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013489 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013490 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013491 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013492 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013493 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013494 return 1;
13495}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013496
13497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013498if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013499 ac_cv_broken_poll=yes
13500else
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13504 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013506
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013507fi
13508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13510$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013511if test "$ac_cv_broken_poll" = yes
13512then
13513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013515
13516fi
13517
Brett Cannon43802422005-02-10 20:48:03 +000013518# 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 +000013519# (which is not required by ISO C or UNIX spec) and/or if we support
13520# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013521ac_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 +000013522#include <$ac_cv_struct_tm>
13523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524"
Victor Stinnere0be4232011-10-25 13:06:09 +020013525if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013526
13527cat >>confdefs.h <<_ACEOF
13528#define HAVE_STRUCT_TM_TM_ZONE 1
13529_ACEOF
13530
13531
13532fi
13533
13534if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013537
13538else
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13540"
Victor Stinnere0be4232011-10-25 13:06:09 +020013541if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543else
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545fi
13546
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013547cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013548#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549_ACEOF
13550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13552$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013553if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013554 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013555else
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013557/* end confdefs.h. */
13558#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013559#if !HAVE_DECL_TZNAME
13560extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013561#endif
13562
13563int
13564main ()
13565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013566return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013567 ;
13568 return 0;
13569}
13570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013571if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013572 ac_cv_var_tzname=yes
13573else
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013576rm -f core conftest.err conftest.$ac_objext \
13577 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13580$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013581 if test $ac_cv_var_tzname = yes; then
13582
Matthias Kloseb9621712010-04-24 17:59:49 +000013583$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013584
13585 fi
13586fi
13587
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013588
Martin v. Löwis1d459062005-03-14 21:23:33 +000013589# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13591$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013592if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013594else
13595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013597 ac_cv_working_tzset=no
13598else
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013600/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013601
13602#include <stdlib.h>
13603#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013604#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013605
13606#if HAVE_TZNAME
13607extern char *tzname[];
13608#endif
13609
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013610int main()
13611{
Brett Cannon18367812003-09-19 00:59:16 +000013612 /* Note that we need to ensure that not only does tzset(3)
13613 do 'something' with localtime, but it works as documented
13614 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013615 This includes making sure that tzname is set properly if
13616 tm->tm_zone does not exist since it is the alternative way
13617 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013618
13619 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013620 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013621 */
13622
Martin v. Löwis1d459062005-03-14 21:23:33 +000013623 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013624 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13625
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013626 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013627 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013628 if (localtime(&groundhogday)->tm_hour != 0)
13629 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013630#if HAVE_TZNAME
13631 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13632 if (strcmp(tzname[0], "UTC") ||
13633 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13634 exit(1);
13635#endif
Brett Cannon18367812003-09-19 00:59:16 +000013636
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013637 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013638 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013639 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013640 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013641#if HAVE_TZNAME
13642 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13643 exit(1);
13644#endif
Brett Cannon18367812003-09-19 00:59:16 +000013645
13646 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13647 tzset();
13648 if (localtime(&groundhogday)->tm_hour != 11)
13649 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013650#if HAVE_TZNAME
13651 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13652 exit(1);
13653#endif
13654
13655#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013656 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13657 exit(1);
13658 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13659 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013660#endif
Brett Cannon18367812003-09-19 00:59:16 +000013661
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013662 exit(0);
13663}
13664
13665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013666if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013667 ac_cv_working_tzset=yes
13668else
Matthias Kloseb9621712010-04-24 17:59:49 +000013669 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13672 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013673fi
13674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013675fi
13676
Matthias Kloseb9621712010-04-24 17:59:49 +000013677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13678$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013679if test "$ac_cv_working_tzset" = yes
13680then
13681
Matthias Kloseb9621712010-04-24 17:59:49 +000013682$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013683
13684fi
13685
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013686# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13688$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013689if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013691else
Matthias Kloseb9621712010-04-24 17:59:49 +000013692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013693/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013694#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013695int
13696main ()
13697{
13698
13699struct stat st;
13700st.st_mtim.tv_nsec = 1;
13701
13702 ;
13703 return 0;
13704}
13705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013707 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013708else
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13712fi
13713
Matthias Kloseb9621712010-04-24 17:59:49 +000013714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13715$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013716if test "$ac_cv_stat_tv_nsec" = yes
13717then
13718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013720
13721fi
13722
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013723# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13725$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013726if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013728else
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013730/* end confdefs.h. */
13731#include <sys/stat.h>
13732int
13733main ()
13734{
13735
13736struct stat st;
13737st.st_mtimespec.tv_nsec = 1;
13738
13739 ;
13740 return 0;
13741}
13742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013743if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013744 ac_cv_stat_tv_nsec2=yes
13745else
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13749fi
13750
Matthias Kloseb9621712010-04-24 17:59:49 +000013751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13752$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013753if test "$ac_cv_stat_tv_nsec2" = yes
13754then
13755
Matthias Kloseb9621712010-04-24 17:59:49 +000013756$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013757
13758fi
13759
Jack Jansen666b1e72001-10-31 12:11:48 +000013760# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13762$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013763if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013765else
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013767/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013768#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013769int
13770main ()
13771{
Jack Jansen666b1e72001-10-31 12:11:48 +000013772
13773 int rtn;
13774 rtn = mvwdelch(0,0,0);
13775
Martin v. Löwis11437992002-04-12 09:54:03 +000013776 ;
13777 return 0;
13778}
13779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013780if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013781 ac_cv_mvwdelch_is_expression=yes
13782else
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13786fi
13787
Matthias Kloseb9621712010-04-24 17:59:49 +000013788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13789$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013790
13791if test "$ac_cv_mvwdelch_is_expression" = yes
13792then
Martin v. Löwis11437992002-04-12 09:54:03 +000013793
Matthias Kloseb9621712010-04-24 17:59:49 +000013794$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013795
13796fi
13797
Matthias Kloseb9621712010-04-24 17:59:49 +000013798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13799$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013800if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013802else
Matthias Kloseb9621712010-04-24 17:59:49 +000013803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013804/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013805#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013806int
13807main ()
13808{
Jack Jansen666b1e72001-10-31 12:11:48 +000013809
13810 WINDOW *w;
13811 w->_flags = 0;
13812
Martin v. Löwis11437992002-04-12 09:54:03 +000013813 ;
13814 return 0;
13815}
13816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013817if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013818 ac_cv_window_has_flags=yes
13819else
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13823fi
13824
Matthias Kloseb9621712010-04-24 17:59:49 +000013825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13826$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013827
Jack Jansen666b1e72001-10-31 12:11:48 +000013828
13829if test "$ac_cv_window_has_flags" = yes
13830then
Martin v. Löwis11437992002-04-12 09:54:03 +000013831
Matthias Kloseb9621712010-04-24 17:59:49 +000013832$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013833
13834fi
13835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13837$as_echo_n "checking for is_term_resized... " >&6; }
13838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013839/* end confdefs.h. */
13840#include <curses.h>
13841int
13842main ()
13843{
13844void *x=is_term_resized
13845 ;
13846 return 0;
13847}
13848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013849if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013850
Matthias Kloseb9621712010-04-24 17:59:49 +000013851$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013852
Matthias Kloseb159a552010-04-25 21:00:44 +000013853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013854$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013855else
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13857$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013858
13859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13861
Matthias Kloseb9621712010-04-24 17:59:49 +000013862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13863$as_echo_n "checking for resize_term... " >&6; }
13864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013865/* end confdefs.h. */
13866#include <curses.h>
13867int
13868main ()
13869{
13870void *x=resize_term
13871 ;
13872 return 0;
13873}
13874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013875if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013876
Matthias Kloseb9621712010-04-24 17:59:49 +000013877$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013878
Matthias Kloseb159a552010-04-25 21:00:44 +000013879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013880$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013881else
Matthias Kloseb9621712010-04-24 17:59:49 +000013882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13883$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013884
13885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13887
Matthias Kloseb9621712010-04-24 17:59:49 +000013888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13889$as_echo_n "checking for resizeterm... " >&6; }
13890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013891/* end confdefs.h. */
13892#include <curses.h>
13893int
13894main ()
13895{
13896void *x=resizeterm
13897 ;
13898 return 0;
13899}
13900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013904
Matthias Kloseb159a552010-04-25 21:00:44 +000013905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013906$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013907else
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13909$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013910
13911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13913
Matthias Kloseb9621712010-04-24 17:59:49 +000013914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13915$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013916
13917if test -r /dev/ptmx
13918then
Matthias Kloseb9621712010-04-24 17:59:49 +000013919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13920$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013921
Matthias Kloseb9621712010-04-24 17:59:49 +000013922$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013923
Thomas Wouters89f507f2006-12-13 04:49:30 +000013924else
Matthias Kloseb9621712010-04-24 17:59:49 +000013925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13926$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013927fi
13928
Matthias Kloseb9621712010-04-24 17:59:49 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13930$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013931
13932if test -r /dev/ptc
13933then
Matthias Kloseb9621712010-04-24 17:59:49 +000013934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13935$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013936
Matthias Kloseb9621712010-04-24 17:59:49 +000013937$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013938
Thomas Wouters89f507f2006-12-13 04:49:30 +000013939else
Matthias Kloseb9621712010-04-24 17:59:49 +000013940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13941$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013942fi
13943
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013944if test "$have_long_long" = yes
13945then
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13947$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013948 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013950else
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010013952 ac_cv_have_long_long_format="cross -- assuming no"
13953 if test x$GCC = xyes; then
13954 save_CFLAGS=$CFLAGS
13955 CFLAGS="$CFLAGS -Werror -Wformat"
13956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13957/* end confdefs.h. */
13958
13959 #include <stdio.h>
13960 #include <stddef.h>
13961
13962int
13963main ()
13964{
13965
13966 char *buffer;
13967 sprintf(buffer, "%lld", (long long)123);
13968 sprintf(buffer, "%lld", (long long)-123);
13969 sprintf(buffer, "%llu", (unsigned long long)123);
13970
13971 ;
13972 return 0;
13973}
13974_ACEOF
13975if ac_fn_c_try_compile "$LINENO"; then :
13976 ac_cv_have_long_long_format=yes
13977
13978fi
13979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13980 CFLAGS=$save_CFLAGS
13981 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013982else
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013984/* end confdefs.h. */
13985
13986 #include <stdio.h>
13987 #include <stddef.h>
13988 #include <string.h>
13989
13990 #ifdef HAVE_SYS_TYPES_H
13991 #include <sys/types.h>
13992 #endif
13993
13994 int main()
13995 {
13996 char buffer[256];
13997
13998 if (sprintf(buffer, "%lld", (long long)123) < 0)
13999 return 1;
14000 if (strcmp(buffer, "123"))
14001 return 1;
14002
14003 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14004 return 1;
14005 if (strcmp(buffer, "-123"))
14006 return 1;
14007
14008 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14009 return 1;
14010 if (strcmp(buffer, "123"))
14011 return 1;
14012
14013 return 0;
14014 }
14015
14016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014017if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014018 ac_cv_have_long_long_format=yes
14019else
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14023 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014024fi
14025
14026
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014027fi
14028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14030$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014031fi
14032
Mark Dickinson89d7d412009-12-31 20:50:59 +000014033if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014034then
14035
Matthias Kloseb9621712010-04-24 17:59:49 +000014036$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014037
14038fi
14039
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014040if test $ac_sys_system = Darwin
14041then
14042 LIBS="$LIBS -framework CoreFoundation"
14043fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14046$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014047if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014049else
Matthias Kloseb9621712010-04-24 17:59:49 +000014050 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014051 ac_cv_have_size_t_format="cross -- assuming yes"
14052
Thomas Wouters477c8d52006-05-27 19:21:47 +000014053else
Matthias Kloseb9621712010-04-24 17:59:49 +000014054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014055/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014056
Thomas Wouters477c8d52006-05-27 19:21:47 +000014057#include <stdio.h>
14058#include <stddef.h>
14059#include <string.h>
14060
Christian Heimes2c181612007-12-17 20:04:13 +000014061#ifdef HAVE_SYS_TYPES_H
14062#include <sys/types.h>
14063#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014064
14065#ifdef HAVE_SSIZE_T
14066typedef ssize_t Py_ssize_t;
14067#elif SIZEOF_VOID_P == SIZEOF_LONG
14068typedef long Py_ssize_t;
14069#else
14070typedef int Py_ssize_t;
14071#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014072
Christian Heimes2c181612007-12-17 20:04:13 +000014073int main()
14074{
14075 char buffer[256];
14076
Thomas Wouters477c8d52006-05-27 19:21:47 +000014077 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14078 return 1;
14079
Thomas Wouters89f507f2006-12-13 04:49:30 +000014080 if (strcmp(buffer, "123"))
14081 return 1;
14082
14083 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14084 return 1;
14085
14086 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014087 return 1;
14088
14089 return 0;
14090}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014091
Thomas Wouters477c8d52006-05-27 19:21:47 +000014092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014093if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014094 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014095else
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14099 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014100fi
14101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14104$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014105if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014106
Matthias Kloseb9621712010-04-24 17:59:49 +000014107$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014108
14109fi
14110
Matthias Kloseb9621712010-04-24 17:59:49 +000014111ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014112#ifdef HAVE_SYS_TYPES_H
14113#include <sys/types.h>
14114#endif
14115#ifdef HAVE_SYS_SOCKET_H
14116#include <sys/socket.h>
14117#endif
14118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119"
Victor Stinnere0be4232011-10-25 13:06:09 +020014120if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014121
Martin v. Löwis11437992002-04-12 09:54:03 +000014122else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014123
Matthias Kloseb9621712010-04-24 17:59:49 +000014124$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014125
14126fi
14127
Michael W. Hudson54241132001-12-07 15:38:26 +000014128
Matthias Kloseb9621712010-04-24 17:59:49 +000014129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14130$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014131if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014132 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014133else
Matthias Kloseb9621712010-04-24 17:59:49 +000014134 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014135 ac_cv_broken_mbstowcs=no
14136else
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014138/* end confdefs.h. */
14139
14140#include<stdlib.h>
14141int main() {
14142 size_t len = -1;
14143 const char *str = "text";
14144 len = mbstowcs(NULL, str, 0);
14145 return (len != 4);
14146}
14147
14148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014149if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014150 ac_cv_broken_mbstowcs=no
14151else
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14155 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014156fi
14157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014158fi
14159
Matthias Kloseb9621712010-04-24 17:59:49 +000014160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14161$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014162if test "$ac_cv_broken_mbstowcs" = yes
14163then
14164
Matthias Kloseb9621712010-04-24 17:59:49 +000014165$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014166
14167fi
14168
Antoine Pitroub52ec782009-01-25 16:34:23 +000014169# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14171$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014172
14173# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014174if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014175 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014176if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014177then
14178
Matthias Kloseb9621712010-04-24 17:59:49 +000014179$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014180
Matthias Kloseb9621712010-04-24 17:59:49 +000014181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14182$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014183fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014184if test "$withval" = no
14185then
14186
14187$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14188
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14190$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014191fi
14192
Antoine Pitrou042b1282010-08-13 21:15:58 +000014193else
14194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14195$as_echo "no value specified" >&6; }
14196fi
14197
Antoine Pitroub52ec782009-01-25 16:34:23 +000014198
Matthias Kloseb17289e2012-03-15 19:51:34 +010014199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14200$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14201if ${ac_cv_computed_gotos+:} false; then :
14202 $as_echo_n "(cached) " >&6
14203else
14204 if test "$cross_compiling" = yes; then :
14205 if test "${with_computed_gotos+set}" = set; then
14206 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14207 else
14208 ac_cv_computed_gotos=no
14209 fi
14210else
14211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14212/* end confdefs.h. */
14213
14214int main(int argc, char **argv)
14215{
14216 static void *targets[1] = { &&LABEL1 };
14217 goto LABEL2;
14218LABEL1:
14219 return 0;
14220LABEL2:
14221 goto *targets[0];
14222 return 1;
14223}
14224
14225_ACEOF
14226if ac_fn_c_try_run "$LINENO"; then :
14227 ac_cv_computed_gotos=yes
14228else
14229 ac_cv_computed_gotos=no
14230fi
14231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14232 conftest.$ac_objext conftest.beam conftest.$ac_ext
14233fi
14234
14235fi
14236
14237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14238$as_echo "$ac_cv_computed_gotos" >&6; }
14239case "$ac_cv_computed_gotos" in yes*)
14240
14241$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14242
14243esac
14244
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014245case $ac_sys_system in
14246AIX*)
14247
14248$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14249 ;;
14250esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014251
Michael W. Hudson54241132001-12-07 15:38:26 +000014252
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014253
14254
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014255for h in `(cd $srcdir;echo Python/thread_*.h)`
14256do
14257 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14258done
14259
Michael W. Hudson54241132001-12-07 15:38:26 +000014260
Neal Norwitzd24499d2005-12-18 21:36:39 +000014261SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14263$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014264for dir in $SRCDIRS; do
14265 if test ! -d $dir; then
14266 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014267 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014268done
Matthias Kloseb9621712010-04-24 17:59:49 +000014269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14270$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014271
Stefan Krah1919b7e2012-03-21 18:25:23 +010014272# Availability of -O2:
14273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14274$as_echo_n "checking for -O2... " >&6; }
14275saved_cflags="$CFLAGS"
14276CFLAGS="-O2"
14277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14278/* end confdefs.h. */
14279
14280int
14281main ()
14282{
14283
14284
14285 ;
14286 return 0;
14287}
14288_ACEOF
14289if ac_fn_c_try_compile "$LINENO"; then :
14290 have_O2=yes
14291else
14292 have_O2=no
14293fi
14294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14296$as_echo "$have_O2" >&6; }
14297CFLAGS="$saved_cflags"
14298
14299# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14300# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14302$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14303saved_cflags="$CFLAGS"
14304CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14305if test "$have_O2" = no; then
14306 CFLAGS=""
14307fi
14308if test "$cross_compiling" = yes; then :
14309 have_glibc_memmove_bug=undefined
14310else
14311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14312/* end confdefs.h. */
14313
14314#include <stdio.h>
14315#include <stdlib.h>
14316#include <string.h>
14317void foo(void *p, void *q) { memmove(p, q, 19); }
14318int main() {
14319 char a[32] = "123456789000000000";
14320 foo(&a[9], a);
14321 if (strcmp(a, "123456789123456789000000000") != 0)
14322 return 1;
14323 foo(a, &a[9]);
14324 if (strcmp(a, "123456789000000000") != 0)
14325 return 1;
14326 return 0;
14327}
14328
14329_ACEOF
14330if ac_fn_c_try_run "$LINENO"; then :
14331 have_glibc_memmove_bug=no
14332else
14333 have_glibc_memmove_bug=yes
14334fi
14335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14336 conftest.$ac_objext conftest.beam conftest.$ac_ext
14337fi
14338
14339CFLAGS="$saved_cflags"
14340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
14341$as_echo "$have_glibc_memmove_bug" >&6; }
14342if test "$have_glibc_memmove_bug" = yes; then
14343
14344$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
14345
14346fi
14347
14348if test "$have_gcc_asm_for_x87" = yes; then
14349 # Some versions of gcc miscompile inline asm:
14350 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
14351 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
14352 case $CC in
14353 *gcc*)
14354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
14355$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
14356 saved_cflags="$CFLAGS"
14357 CFLAGS="-O2"
14358 if test "$cross_compiling" = yes; then :
14359 have_ipa_pure_const_bug=undefined
14360else
14361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14362/* end confdefs.h. */
14363
14364 __attribute__((noinline)) int
14365 foo(int *p) {
14366 int r;
14367 asm ( "movl \$6, (%1)\n\t"
14368 "xorl %0, %0\n\t"
14369 : "=r" (r) : "r" (p) : "memory"
14370 );
14371 return r;
14372 }
14373 int main() {
14374 int p = 8;
14375 if ((foo(&p) ? : p) != 6)
14376 return 1;
14377 return 0;
14378 }
14379
14380_ACEOF
14381if ac_fn_c_try_run "$LINENO"; then :
14382 have_ipa_pure_const_bug=no
14383else
14384 have_ipa_pure_const_bug=yes
14385fi
14386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14387 conftest.$ac_objext conftest.beam conftest.$ac_ext
14388fi
14389
14390 CFLAGS="$saved_cflags"
14391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
14392$as_echo "$have_ipa_pure_const_bug" >&6; }
14393 if test "$have_ipa_pure_const_bug" = yes; then
14394
14395$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
14396
14397 fi
14398 ;;
14399 esac
14400fi
14401
Guido van Rossum627b2d71993-12-24 10:39:16 +000014402# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014403ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014404
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014405ac_config_files="$ac_config_files Modules/ld_so_aix"
14406
Martin v. Löwis11437992002-04-12 09:54:03 +000014407cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014408# This file is a shell script that caches the results of configure
14409# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014410# scripts and configure runs, see configure's option --config-cache.
14411# It is not useful on other systems. If it contains results you don't
14412# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014413#
Martin v. Löwis11437992002-04-12 09:54:03 +000014414# config.status only pays attention to the cache file if you give it
14415# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014416#
Skip Montanaro6dead952003-09-25 14:50:04 +000014417# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014418# loading this file, other *unset* `ac_cv_foo' will be assigned the
14419# following values.
14420
14421_ACEOF
14422
Guido van Rossumf78abae1997-01-21 22:02:36 +000014423# The following way of writing the cache mishandles newlines in values,
14424# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014426# Ultrix sh set writes to stderr and can't be redirected directly,
14427# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428(
14429 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14430 eval ac_val=\$$ac_var
14431 case $ac_val in #(
14432 *${as_nl}*)
14433 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014434 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14435$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436 esac
14437 case $ac_var in #(
14438 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014439 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14440 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441 esac ;;
14442 esac
14443 done
14444
Martin v. Löwis11437992002-04-12 09:54:03 +000014445 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014446 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14447 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 # `set' does not quote correctly, so add quotes: double-quote
14449 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014450 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014451 "s/'/'\\\\''/g;
14452 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014454 *)
14455 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458 esac |
14459 sort
14460) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014463 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14466 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14468 :end' >>confcache
14469if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14470 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014471 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014472 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14473$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020014474 if test ! -f "$cache_file" || test -h "$cache_file"; then
14475 cat confcache >"$cache_file"
14476 else
14477 case $cache_file in #(
14478 */* | ?:*)
14479 mv -f confcache "$cache_file"$$ &&
14480 mv -f "$cache_file"$$ "$cache_file" ;; #(
14481 *)
14482 mv -f confcache "$cache_file" ;;
14483 esac
14484 fi
14485 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014486 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14488$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014489 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014490fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014491rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014492
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014493test "x$prefix" = xNONE && prefix=$ac_default_prefix
14494# Let make expand exec_prefix.
14495test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014496
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014497DEFS=-DHAVE_CONFIG_H
14498
Skip Montanaro6dead952003-09-25 14:50:04 +000014499ac_libobjs=
14500ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014501U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014502for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14503 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14507 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14509 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014510done
14511LIBOBJS=$ac_libobjs
14512
14513LTLIBOBJS=$ac_ltlibobjs
14514
14515
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
Matthias Kloseb9621712010-04-24 17:59:49 +000014517
Victor Stinnere0be4232011-10-25 13:06:09 +020014518: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014519ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014520ac_clean_files_save=$ac_clean_files
14521ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014522{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14523$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14524as_write_fail=0
14525cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014526#! $SHELL
14527# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014528# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014529# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014530# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014531
Martin v. Löwis11437992002-04-12 09:54:03 +000014532debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014533ac_cs_recheck=false
14534ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014535
Matthias Kloseb9621712010-04-24 17:59:49 +000014536SHELL=\${CONFIG_SHELL-$SHELL}
14537export SHELL
14538_ASEOF
14539cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14540## -------------------- ##
14541## M4sh Initialization. ##
14542## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544# Be more Bourne compatible
14545DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014546if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014547 emulate sh
14548 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014549 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014550 # is contrary to our usage. Disable this feature.
14551 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014553else
Matthias Kloseb9621712010-04-24 17:59:49 +000014554 case `(set -o) 2>/dev/null` in #(
14555 *posix*) :
14556 set -o posix ;; #(
14557 *) :
14558 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014560fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014561
14562
Matthias Kloseb9621712010-04-24 17:59:49 +000014563as_nl='
14564'
14565export as_nl
14566# Printing a long string crashes Solaris 7 /usr/bin/printf.
14567as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14568as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14569as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14570# Prefer a ksh shell builtin over an external printf program on Solaris,
14571# but without wasting forks for bash or zsh.
14572if test -z "$BASH_VERSION$ZSH_VERSION" \
14573 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14574 as_echo='print -r --'
14575 as_echo_n='print -rn --'
14576elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14577 as_echo='printf %s\n'
14578 as_echo_n='printf %s'
14579else
14580 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14581 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14582 as_echo_n='/usr/ucb/echo -n'
14583 else
14584 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14585 as_echo_n_body='eval
14586 arg=$1;
14587 case $arg in #(
14588 *"$as_nl"*)
14589 expr "X$arg" : "X\\(.*\\)$as_nl";
14590 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14591 esac;
14592 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14593 '
14594 export as_echo_n_body
14595 as_echo_n='sh -c $as_echo_n_body as_echo'
14596 fi
14597 export as_echo_body
14598 as_echo='sh -c $as_echo_body as_echo'
14599fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014600
14601# The user is always right.
14602if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 PATH_SEPARATOR=:
14604 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14605 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14606 PATH_SEPARATOR=';'
14607 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610
14611# IFS
14612# We need space, tab and new line, in precisely that order. Quoting is
14613# there to prevent editors from complaining about space-tab.
14614# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14615# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616IFS=" "" $as_nl"
14617
14618# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020014619as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014620case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621 *[\\/]* ) as_myself=$0 ;;
14622 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014623for as_dir in $PATH
14624do
14625 IFS=$as_save_IFS
14626 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014627 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14628 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631 ;;
14632esac
14633# We did not find ourselves, most probably we were run as `sh COMMAND'
14634# in which case we are not to be found in the path.
14635if test "x$as_myself" = x; then
14636 as_myself=$0
14637fi
14638if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14640 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641fi
14642
Matthias Kloseb9621712010-04-24 17:59:49 +000014643# Unset variables that we do not need and which cause bugs (e.g. in
14644# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14645# suppresses any "Segmentation fault" message there. '((' could
14646# trigger a bug in pdksh 5.2.14.
14647for as_var in BASH_ENV ENV MAIL MAILPATH
14648do eval test x\${$as_var+set} = xset \
14649 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650done
14651PS1='$ '
14652PS2='> '
14653PS4='+ '
14654
14655# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014656LC_ALL=C
14657export LC_ALL
14658LANGUAGE=C
14659export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014660
Matthias Kloseb9621712010-04-24 17:59:49 +000014661# CDPATH.
14662(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14663
14664
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014665# as_fn_error STATUS ERROR [LINENO LOG_FD]
14666# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014667# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14668# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014669# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014670as_fn_error ()
14671{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014672 as_status=$1; test $as_status -eq 0 && as_status=1
14673 if test "$4"; then
14674 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14675 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014676 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014677 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014678 as_fn_exit $as_status
14679} # as_fn_error
14680
14681
14682# as_fn_set_status STATUS
14683# -----------------------
14684# Set $? to STATUS, without forking.
14685as_fn_set_status ()
14686{
14687 return $1
14688} # as_fn_set_status
14689
14690# as_fn_exit STATUS
14691# -----------------
14692# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14693as_fn_exit ()
14694{
14695 set +e
14696 as_fn_set_status $1
14697 exit $1
14698} # as_fn_exit
14699
14700# as_fn_unset VAR
14701# ---------------
14702# Portably unset VAR.
14703as_fn_unset ()
14704{
14705 { eval $1=; unset $1;}
14706}
14707as_unset=as_fn_unset
14708# as_fn_append VAR VALUE
14709# ----------------------
14710# Append the text in VALUE to the end of the definition contained in VAR. Take
14711# advantage of any shell optimizations that allow amortized linear growth over
14712# repeated appends, instead of the typical quadratic growth present in naive
14713# implementations.
14714if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14715 eval 'as_fn_append ()
14716 {
14717 eval $1+=\$2
14718 }'
14719else
14720 as_fn_append ()
14721 {
14722 eval $1=\$$1\$2
14723 }
14724fi # as_fn_append
14725
14726# as_fn_arith ARG...
14727# ------------------
14728# Perform arithmetic evaluation on the ARGs, and store the result in the
14729# global $as_val. Take advantage of shells that can avoid forks. The arguments
14730# must be portable across $(()) and expr.
14731if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14732 eval 'as_fn_arith ()
14733 {
14734 as_val=$(( $* ))
14735 }'
14736else
14737 as_fn_arith ()
14738 {
14739 as_val=`expr "$@" || test $? -eq 1`
14740 }
14741fi # as_fn_arith
14742
14743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014744if expr a : '\(a\)' >/dev/null 2>&1 &&
14745 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14746 as_expr=expr
14747else
14748 as_expr=false
14749fi
14750
14751if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14752 as_basename=basename
14753else
14754 as_basename=false
14755fi
14756
Matthias Kloseb9621712010-04-24 17:59:49 +000014757if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14758 as_dirname=dirname
14759else
14760 as_dirname=false
14761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014762
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763as_me=`$as_basename -- "$0" ||
14764$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14765 X"$0" : 'X\(//\)$' \| \
14766 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014767$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014768 sed '/^.*\/\([^/][^/]*\)\/*$/{
14769 s//\1/
14770 q
14771 }
14772 /^X\/\(\/\/\)$/{
14773 s//\1/
14774 q
14775 }
14776 /^X\/\(\/\).*/{
14777 s//\1/
14778 q
14779 }
14780 s/.*/./; q'`
14781
Matthias Kloseb9621712010-04-24 17:59:49 +000014782# Avoid depending upon Character Ranges.
14783as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14784as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14785as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14786as_cr_digits='0123456789'
14787as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014788
14789ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014790case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014791-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 xy) ECHO_C='\c';;
14795 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14796 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797 esac;;
14798*)
14799 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014800esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014801
Martin v. Löwis11437992002-04-12 09:54:03 +000014802rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803if test -d conf$$.dir; then
14804 rm -f conf$$.dir/conf$$.file
14805else
14806 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014807 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014809if (echo >conf$$.file) 2>/dev/null; then
14810 if ln -s conf$$.file conf$$ 2>/dev/null; then
14811 as_ln_s='ln -s'
14812 # ... but there are two gotchas:
14813 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14814 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14815 # In both cases, we have to default to `cp -p'.
14816 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14817 as_ln_s='cp -p'
14818 elif ln conf$$.file conf$$ 2>/dev/null; then
14819 as_ln_s=ln
14820 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014823else
14824 as_ln_s='cp -p'
14825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14827rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014828
Matthias Kloseb9621712010-04-24 17:59:49 +000014829
14830# as_fn_mkdir_p
14831# -------------
14832# Create "$as_dir" as a directory, including parents if necessary.
14833as_fn_mkdir_p ()
14834{
14835
14836 case $as_dir in #(
14837 -*) as_dir=./$as_dir;;
14838 esac
14839 test -d "$as_dir" || eval $as_mkdir_p || {
14840 as_dirs=
14841 while :; do
14842 case $as_dir in #(
14843 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14844 *) as_qdir=$as_dir;;
14845 esac
14846 as_dirs="'$as_qdir' $as_dirs"
14847 as_dir=`$as_dirname -- "$as_dir" ||
14848$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14849 X"$as_dir" : 'X\(//\)[^/]' \| \
14850 X"$as_dir" : 'X\(//\)$' \| \
14851 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14852$as_echo X"$as_dir" |
14853 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14854 s//\1/
14855 q
14856 }
14857 /^X\(\/\/\)[^/].*/{
14858 s//\1/
14859 q
14860 }
14861 /^X\(\/\/\)$/{
14862 s//\1/
14863 q
14864 }
14865 /^X\(\/\).*/{
14866 s//\1/
14867 q
14868 }
14869 s/.*/./; q'`
14870 test -d "$as_dir" && break
14871 done
14872 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014873 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014874
14875
14876} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014877if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014878 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014879else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014880 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014881 as_mkdir_p=false
14882fi
14883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884if test -x / >/dev/null 2>&1; then
14885 as_test_x='test -x'
14886else
14887 if ls -dL / >/dev/null 2>&1; then
14888 as_ls_L_option=L
14889 else
14890 as_ls_L_option=
14891 fi
14892 as_test_x='
14893 eval sh -c '\''
14894 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014895 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014896 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 case $1 in #(
14898 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014900 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901 ???[sx]*):;;*)false;;esac;fi
14902 '\'' sh
14903 '
14904fi
14905as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014906
14907# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014908as_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 +000014909
14910# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014911as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014912
14913
Martin v. Löwis11437992002-04-12 09:54:03 +000014914exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014915## ----------------------------------- ##
14916## Main body of $CONFIG_STATUS script. ##
14917## ----------------------------------- ##
14918_ASEOF
14919test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014920
Matthias Kloseb9621712010-04-24 17:59:49 +000014921cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14922# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014923# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924# values after options handling.
14925ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014926This file was extended by python $as_me 3.3, which was
Victor Stinnere0be4232011-10-25 13:06:09 +020014927generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014928
14929 CONFIG_FILES = $CONFIG_FILES
14930 CONFIG_HEADERS = $CONFIG_HEADERS
14931 CONFIG_LINKS = $CONFIG_LINKS
14932 CONFIG_COMMANDS = $CONFIG_COMMANDS
14933 $ $0 $@
14934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935on `(hostname || uname -n) 2>/dev/null | sed 1q`
14936"
14937
Martin v. Löwis11437992002-04-12 09:54:03 +000014938_ACEOF
14939
Matthias Kloseb9621712010-04-24 17:59:49 +000014940case $ac_config_files in *"
14941"*) set x $ac_config_files; shift; ac_config_files=$*;;
14942esac
14943
14944case $ac_config_headers in *"
14945"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14946esac
14947
14948
14949cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014950# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014951config_files="$ac_config_files"
14952config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014955
Matthias Kloseb9621712010-04-24 17:59:49 +000014956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014957ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014958\`$as_me' instantiates files and other configuration actions
14959from templates according to the current configuration. Unless the files
14960and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014961
Matthias Kloseb9621712010-04-24 17:59:49 +000014962Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014963
14964 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014966 --config print configuration, then exit
14967 -q, --quiet, --silent
14968 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 -d, --debug don't remove temporary files
14970 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014971 --file=FILE[:TEMPLATE]
14972 instantiate the configuration file FILE
14973 --header=FILE[:TEMPLATE]
14974 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014975
14976Configuration files:
14977$config_files
14978
14979Configuration headers:
14980$config_headers
14981
Matthias Kloseb9621712010-04-24 17:59:49 +000014982Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014985cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14986ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014987ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014988python config.status 3.3
Victor Stinnere0be4232011-10-25 13:06:09 +020014989configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014991
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014992Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014993This config.status script is free software; the Free Software Foundation
14994gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995
14996ac_pwd='$ac_pwd'
14997srcdir='$srcdir'
14998INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010014999MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015000test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015001_ACEOF
15002
Matthias Kloseb9621712010-04-24 17:59:49 +000015003cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15004# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015005ac_need_defaults=:
15006while test $# != 0
15007do
15008 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015009 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15011 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015012 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015014 --*=)
15015 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15016 ac_optarg=
15017 ac_shift=:
15018 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015020 ac_option=$1
15021 ac_optarg=$2
15022 ac_shift=shift
15023 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 esac
15025
Skip Montanaro6dead952003-09-25 14:50:04 +000015026 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015028 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15029 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015031 $as_echo "$ac_cs_version"; exit ;;
15032 --config | --confi | --conf | --con | --co | --c )
15033 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 debug=: ;;
15036 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015037 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 case $ac_optarg in
15039 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015040 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015041 esac
15042 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 ac_need_defaults=false;;
15044 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015045 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015046 case $ac_optarg in
15047 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15048 esac
15049 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015051 --he | --h)
15052 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015053 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015054Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015055 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015057 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15058 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15059 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015060
15061 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015062 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015063Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015064
Matthias Kloseb9621712010-04-24 17:59:49 +000015065 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015066 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015067
15068 esac
15069 shift
15070done
15071
Skip Montanaro6dead952003-09-25 14:50:04 +000015072ac_configure_extra_args=
15073
15074if $ac_cs_silent; then
15075 exec 6>/dev/null
15076 ac_configure_extra_args="$ac_configure_extra_args --silent"
15077fi
15078
15079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015080cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015081if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15083 shift
15084 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15085 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015087 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015088fi
15089
Martin v. Löwis11437992002-04-12 09:54:03 +000015090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015091cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092exec 5>>config.log
15093{
15094 echo
15095 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15096## Running $as_me. ##
15097_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015102cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015104
Matthias Kloseb9621712010-04-24 17:59:49 +000015105cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015106
15107# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015108for ac_config_target in $ac_config_targets
15109do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015110 case $ac_config_target in
15111 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15112 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15113 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015114 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15115 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15117 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015118 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015119 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015120
Victor Stinnere0be4232011-10-25 13:06:09 +020015121 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 esac
15123done
15124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125
Martin v. Löwis11437992002-04-12 09:54:03 +000015126# If the user did not use the arguments to specify the items to instantiate,
15127# then the envvar interface is used. Set only those that are not.
15128# We use the long form for the default assignment because of an extremely
15129# bizarre bug on SunOS 4.1.3.
15130if $ac_need_defaults; then
15131 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15132 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15133fi
15134
Skip Montanaro6dead952003-09-25 14:50:04 +000015135# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015137# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138# Hook for its removal unless debugging.
15139# Note that there is a small window in which the directory will not be cleaned:
15140# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015141$debug ||
15142{
Victor Stinnere0be4232011-10-25 13:06:09 +020015143 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015145 : "${ac_tmp:=$tmp}"
15146 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015148 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015149}
Martin v. Löwis11437992002-04-12 09:54:03 +000015150# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015151
Martin v. Löwis11437992002-04-12 09:54:03 +000015152{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015154 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015155} ||
15156{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157 tmp=./conf$$-$RANDOM
15158 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015159} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015160ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015161
Matthias Kloseb9621712010-04-24 17:59:49 +000015162# Set up the scripts for CONFIG_FILES section.
15163# No need to generate them if there are no CONFIG_FILES.
15164# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015166
Matthias Kloseb9621712010-04-24 17:59:49 +000015167
15168ac_cr=`echo X | tr X '\015'`
15169# On cygwin, bash can eat \r inside `` if the user requested igncr.
15170# But we know of no other shell where ac_cr would be empty at this
15171# point, so we can use a bashism as a fallback.
15172if test "x$ac_cr" = x; then
15173 eval ac_cr=\$\'\\r\'
15174fi
15175ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15176if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015177 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015178else
15179 ac_cs_awk_cr=$ac_cr
15180fi
15181
Victor Stinnere0be4232011-10-25 13:06:09 +020015182echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015183_ACEOF
15184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185
Matthias Kloseb9621712010-04-24 17:59:49 +000015186{
15187 echo "cat >conf$$subs.awk <<_ACEOF" &&
15188 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15189 echo "_ACEOF"
15190} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015191 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15192ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193ac_delim='%!_!# '
15194for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015196 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015197
Matthias Kloseb9621712010-04-24 17:59:49 +000015198 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15199 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200 break
15201 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015202 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203 else
15204 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015206done
Matthias Kloseb9621712010-04-24 17:59:49 +000015207rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208
Matthias Kloseb9621712010-04-24 17:59:49 +000015209cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015210cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015212sed -n '
15213h
15214s/^/S["/; s/!.*/"]=/
15215p
15216g
15217s/^[^!]*!//
15218:repl
15219t repl
15220s/'"$ac_delim"'$//
15221t delim
15222:nl
15223h
15224s/\(.\{148\}\)..*/\1/
15225t more1
15226s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15227p
15228n
15229b repl
15230:more1
15231s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15232p
15233g
15234s/.\{148\}//
15235t nl
15236:delim
15237h
15238s/\(.\{148\}\)..*/\1/
15239t more2
15240s/["\\]/\\&/g; s/^/"/; s/$/"/
15241p
15242b
15243:more2
15244s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15245p
15246g
15247s/.\{148\}//
15248t delim
15249' <conf$$subs.awk | sed '
15250/^[^""]/{
15251 N
15252 s/\n//
15253}
15254' >>$CONFIG_STATUS || ac_write_fail=1
15255rm -f conf$$subs.awk
15256cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15257_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015258cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 for (key in S) S_is_set[key] = 1
15260 FS = ""
15261
15262}
15263{
15264 line = $ 0
15265 nfields = split(line, field, "@")
15266 substed = 0
15267 len = length(field[1])
15268 for (i = 2; i < nfields; i++) {
15269 key = field[i]
15270 keylen = length(key)
15271 if (S_is_set[key]) {
15272 value = S[key]
15273 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15274 len += length(value) + length(field[++i])
15275 substed = 1
15276 } else
15277 len += 1 + keylen
15278 }
15279
15280 print line
15281}
15282
15283_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015285cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15286if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15287 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15288else
15289 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015290fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015291 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015292_ACEOF
15293
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015294# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15295# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296# trailing colons and then remove the whole line if VPATH becomes empty
15297# (actually we leave an empty line to preserve line numbers).
15298if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015299 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15300h
15301s///
15302s/^/:/
15303s/[ ]*$/:/
15304s/:\$(srcdir):/:/g
15305s/:\${srcdir}:/:/g
15306s/:@srcdir@:/:/g
15307s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015309x
15310s/\(=[ ]*\).*/\1/
15311G
15312s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015313s/^[^=]*=[ ]*$//
15314}'
15315fi
15316
Matthias Kloseb9621712010-04-24 17:59:49 +000015317cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015318fi # test -n "$CONFIG_FILES"
15319
Matthias Kloseb9621712010-04-24 17:59:49 +000015320# Set up the scripts for CONFIG_HEADERS section.
15321# No need to generate them if there are no CONFIG_HEADERS.
15322# This happens for instance with `./config.status Makefile'.
15323if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015324cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015325BEGIN {
15326_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015327
Matthias Kloseb9621712010-04-24 17:59:49 +000015328# Transform confdefs.h into an awk script `defines.awk', embedded as
15329# here-document in config.status, that substitutes the proper values into
15330# config.h.in to produce config.h.
15331
15332# Create a delimiter string that does not exist in confdefs.h, to ease
15333# handling of long lines.
15334ac_delim='%!_!# '
15335for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015336 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15337 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015338 break
15339 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015340 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 else
15342 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15343 fi
15344done
15345
15346# For the awk script, D is an array of macro values keyed by name,
15347# likewise P contains macro parameters if any. Preserve backslash
15348# newline sequences.
15349
15350ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15351sed -n '
15352s/.\{148\}/&'"$ac_delim"'/g
15353t rset
15354:rset
15355s/^[ ]*#[ ]*define[ ][ ]*/ /
15356t def
15357d
15358:def
15359s/\\$//
15360t bsnl
15361s/["\\]/\\&/g
15362s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15363D["\1"]=" \3"/p
15364s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15365d
15366:bsnl
15367s/["\\]/\\&/g
15368s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15369D["\1"]=" \3\\\\\\n"\\/p
15370t cont
15371s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15372t cont
15373d
15374:cont
15375n
15376s/.\{148\}/&'"$ac_delim"'/g
15377t clear
15378:clear
15379s/\\$//
15380t bsnlc
15381s/["\\]/\\&/g; s/^/"/; s/$/"/p
15382d
15383:bsnlc
15384s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15385b cont
15386' <confdefs.h | sed '
15387s/'"$ac_delim"'/"\\\
15388"/g' >>$CONFIG_STATUS || ac_write_fail=1
15389
15390cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15391 for (key in D) D_is_set[key] = 1
15392 FS = ""
15393}
15394/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15395 line = \$ 0
15396 split(line, arg, " ")
15397 if (arg[1] == "#") {
15398 defundef = arg[2]
15399 mac1 = arg[3]
15400 } else {
15401 defundef = substr(arg[1], 2)
15402 mac1 = arg[2]
15403 }
15404 split(mac1, mac2, "(") #)
15405 macro = mac2[1]
15406 prefix = substr(line, 1, index(line, defundef) - 1)
15407 if (D_is_set[macro]) {
15408 # Preserve the white space surrounding the "#".
15409 print prefix "define", macro P[macro] D[macro]
15410 next
15411 } else {
15412 # Replace #undef with comments. This is necessary, for example,
15413 # in the case of _POSIX_SOURCE, which is predefined and required
15414 # on some systems where configure will not decide to define it.
15415 if (defundef == "undef") {
15416 print "/*", prefix defundef, macro, "*/"
15417 next
15418 }
15419 }
15420}
15421{ print }
15422_ACAWK
15423_ACEOF
15424cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015425 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015426fi # test -n "$CONFIG_HEADERS"
15427
15428
15429eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15430shift
15431for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015432do
15433 case $ac_tag in
15434 :[FHLC]) ac_mode=$ac_tag; continue;;
15435 esac
15436 case $ac_mode$ac_tag in
15437 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015438 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015439 :[FH]-) ac_tag=-:-;;
15440 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15441 esac
15442 ac_save_IFS=$IFS
15443 IFS=:
15444 set x $ac_tag
15445 IFS=$ac_save_IFS
15446 shift
15447 ac_file=$1
15448 shift
15449
15450 case $ac_mode in
15451 :L) ac_source=$1;;
15452 :[FH])
15453 ac_file_inputs=
15454 for ac_f
15455 do
15456 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015457 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015458 *) # Look for the file first in the build tree, then in the source tree
15459 # (if the path is not absolute). The absolute path cannot be DOS-style,
15460 # because $ac_f cannot contain `:'.
15461 test -f "$ac_f" ||
15462 case $ac_f in
15463 [\\/$]*) false;;
15464 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15465 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020015466 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015467 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015468 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15469 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015470 done
15471
15472 # Let's still pretend it is `configure' which instantiates (i.e., don't
15473 # use $as_me), people would be surprised to read:
15474 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 configure_input='Generated from '`
15476 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15477 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015478 if test x"$ac_file" != x-; then
15479 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015480 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15481$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015483 # Neutralize special characters interpreted by sed in replacement strings.
15484 case $configure_input in #(
15485 *\&* | *\|* | *\\* )
15486 ac_sed_conf_input=`$as_echo "$configure_input" |
15487 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15488 *) ac_sed_conf_input=$configure_input;;
15489 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015490
15491 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020015492 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15493 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015494 esac
15495 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 esac
15497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015498 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015499$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015500 X"$ac_file" : 'X\(//\)[^/]' \| \
15501 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015502 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015503$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015504 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15505 s//\1/
15506 q
15507 }
15508 /^X\(\/\/\)[^/].*/{
15509 s//\1/
15510 q
15511 }
15512 /^X\(\/\/\)$/{
15513 s//\1/
15514 q
15515 }
15516 /^X\(\/\).*/{
15517 s//\1/
15518 q
15519 }
15520 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015522 ac_builddir=.
15523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015524case "$ac_dir" in
15525.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15526*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015527 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015528 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015529 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015530 case $ac_top_builddir_sub in
15531 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15532 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15533 esac ;;
15534esac
15535ac_abs_top_builddir=$ac_pwd
15536ac_abs_builddir=$ac_pwd$ac_dir_suffix
15537# for backward compatibility:
15538ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015539
15540case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015541 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015542 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015543 ac_top_srcdir=$ac_top_builddir_sub
15544 ac_abs_top_srcdir=$ac_pwd ;;
15545 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015546 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547 ac_top_srcdir=$srcdir
15548 ac_abs_top_srcdir=$srcdir ;;
15549 *) # Relative name.
15550 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15551 ac_top_srcdir=$ac_top_build_prefix$srcdir
15552 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015553esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015554ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015555
Martin v. Löwis11437992002-04-12 09:54:03 +000015556
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015557 case $ac_mode in
15558 :F)
15559 #
15560 # CONFIG_FILE
15561 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015562
15563 case $INSTALL in
15564 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015566 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010015567 ac_MKDIR_P=$MKDIR_P
15568 case $MKDIR_P in
15569 [\\/$]* | ?:[\\/]* ) ;;
15570 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15571 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015573
Matthias Kloseb9621712010-04-24 17:59:49 +000015574cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575# If the template does not know about datarootdir, expand it.
15576# FIXME: This hack should be removed a few years after 2.60.
15577ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015578ac_sed_dataroot='
15579/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015580 p
15581 q
15582}
15583/@datadir@/p
15584/@docdir@/p
15585/@infodir@/p
15586/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015587/@mandir@/p'
15588case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015589*datarootdir*) ac_datarootdir_seen=yes;;
15590*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015591 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15592$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015594cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595 ac_datarootdir_hack='
15596 s&@datadir@&$datadir&g
15597 s&@docdir@&$docdir&g
15598 s&@infodir@&$infodir&g
15599 s&@localedir@&$localedir&g
15600 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015601 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015602esac
15603_ACEOF
15604
15605# Neutralize VPATH when `$srcdir' = `.'.
15606# Shell code in configure.ac might set extrasub.
15607# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015608cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15609ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015610$extrasub
15611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015612cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015613:t
15614/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015615s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015616s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015617s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015618s&@srcdir@&$ac_srcdir&;t t
15619s&@abs_srcdir@&$ac_abs_srcdir&;t t
15620s&@top_srcdir@&$ac_top_srcdir&;t t
15621s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15622s&@builddir@&$ac_builddir&;t t
15623s&@abs_builddir@&$ac_abs_builddir&;t t
15624s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15625s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010015626s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015627$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015628"
Victor Stinnere0be4232011-10-25 13:06:09 +020015629eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15630 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015632test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015633 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15634 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15635 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015636 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015637which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015638$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015639which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015640
Victor Stinnere0be4232011-10-25 13:06:09 +020015641 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015642 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020015643 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15644 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015646 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647 ;;
15648 :H)
15649 #
15650 # CONFIG_HEADER
15651 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015652 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015653 {
15654 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015655 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15656 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015657 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015658 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015659 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15660$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015661 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015662 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020015663 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015664 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 fi
15666 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015668 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015669 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015670 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015671 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015673
15674 esac
15675
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015676
15677 case $ac_file$ac_mode in
15678 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15679
15680 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015681done # for ac_tag
15682
Guido van Rossum627b2d71993-12-24 10:39:16 +000015683
Matthias Kloseb9621712010-04-24 17:59:49 +000015684as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015685_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015686ac_clean_files=$ac_clean_files_save
15687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015689 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015690
Martin v. Löwis11437992002-04-12 09:54:03 +000015691
15692# configure is writing to config.log, and then calls config.status.
15693# config.status does its own redirection, appending to config.log.
15694# Unfortunately, on DOS this fails, as config.log is still kept open
15695# by configure, so config.status won't be able to write to it; its
15696# output is simply discarded. So we exec the FD to /dev/null,
15697# effectively closing config.log, so it can be properly (re)opened and
15698# appended to by config.status. When coming back to configure, we
15699# need to make the FD available again.
15700if test "$no_create" != yes; then
15701 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015702 ac_config_status_args=
15703 test "$silent" = yes &&
15704 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015705 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015706 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 exec 5>>config.log
15708 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15709 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015710 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015711fi
15712if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15714$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015715fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015716
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015717
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015718echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015719if test ! -f Modules/Setup
15720then
15721 cp $srcdir/Modules/Setup.dist Modules/Setup
15722fi
15723
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015724echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015725if test ! -f Modules/Setup.local
15726then
15727 echo "# Edit this file for local setup changes" >Modules/Setup.local
15728fi
15729
15730echo "creating Makefile"
15731$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15732 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015733 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015734mv config.c Modules