blob: be7684a89dcf3e8aaf6057f445ecfed1f61b0074 [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
Jack Jansendd19cf82001-12-06 22:36:17 +00006866
Michael W. Hudson54241132001-12-07 15:38:26 +00006867# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006868# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006869# The cast to long int works around a bug in the HP C Compiler
6870# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6871# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6872# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6874$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006875if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006876 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006877else
Matthias Kloseb9621712010-04-24 17:59:49 +00006878 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 +00006879
Martin v. Löwis11437992002-04-12 09:54:03 +00006880else
Matthias Kloseb9621712010-04-24 17:59:49 +00006881 if test "$ac_cv_type_int" = yes; then
6882 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006884as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02006885See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006886 else
6887 ac_cv_sizeof_int=0
6888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006890
Martin v. Löwis11437992002-04-12 09:54:03 +00006891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6893$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006894
6895
6896
Martin v. Löwis11437992002-04-12 09:54:03 +00006897cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006898#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006899_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006900
6901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006902# The cast to long int works around a bug in the HP C Compiler
6903# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6904# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6905# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6907$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006908if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006909 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006910else
Matthias Kloseb9621712010-04-24 17:59:49 +00006911 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 +00006912
Martin v. Löwis11437992002-04-12 09:54:03 +00006913else
Matthias Kloseb9621712010-04-24 17:59:49 +00006914 if test "$ac_cv_type_long" = yes; then
6915 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006917as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02006918See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006919 else
6920 ac_cv_sizeof_long=0
6921 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006923
Martin v. Löwis11437992002-04-12 09:54:03 +00006924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6926$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006927
6928
6929
Martin v. Löwis11437992002-04-12 09:54:03 +00006930cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006931#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006932_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006933
6934
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006935# The cast to long int works around a bug in the HP C Compiler
6936# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6937# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6938# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6940$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006941if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006942 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006943else
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 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 +00006945
Martin v. Löwis11437992002-04-12 09:54:03 +00006946else
Matthias Kloseb9621712010-04-24 17:59:49 +00006947 if test "$ac_cv_type_void_p" = yes; then
6948 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6949$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006950as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02006951See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952 else
6953 ac_cv_sizeof_void_p=0
6954 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006956
Martin v. Löwis11437992002-04-12 09:54:03 +00006957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6959$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006960
6961
6962
Martin v. Löwis11437992002-04-12 09:54:03 +00006963cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006964#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006965_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006966
6967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006968# The cast to long int works around a bug in the HP C Compiler
6969# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6970# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6971# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6973$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006974if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006975 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006976else
Matthias Kloseb9621712010-04-24 17:59:49 +00006977 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 +00006978
Martin v. Löwis11437992002-04-12 09:54:03 +00006979else
Matthias Kloseb9621712010-04-24 17:59:49 +00006980 if test "$ac_cv_type_short" = yes; then
6981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006983as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02006984See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006985 else
6986 ac_cv_sizeof_short=0
6987 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006989
Martin v. Löwis11437992002-04-12 09:54:03 +00006990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6992$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006993
6994
6995
Martin v. Löwis11437992002-04-12 09:54:03 +00006996cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006997#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006998_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006999
7000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007001# The cast to long int works around a bug in the HP C Compiler
7002# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7003# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7004# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7006$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007007if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007008 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007009else
Matthias Kloseb9621712010-04-24 17:59:49 +00007010 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 +00007011
Martin v. Löwis11437992002-04-12 09:54:03 +00007012else
Matthias Kloseb9621712010-04-24 17:59:49 +00007013 if test "$ac_cv_type_float" = yes; then
7014 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007016as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007017See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018 else
7019 ac_cv_sizeof_float=0
7020 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007022
Martin v. Löwis11437992002-04-12 09:54:03 +00007023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7025$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007026
7027
7028
Martin v. Löwis11437992002-04-12 09:54:03 +00007029cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007030#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007031_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007032
7033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007034# The cast to long int works around a bug in the HP C Compiler
7035# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7036# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7037# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7039$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007040if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007041 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007042else
Matthias Kloseb9621712010-04-24 17:59:49 +00007043 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 +00007044
Martin v. Löwis11437992002-04-12 09:54:03 +00007045else
Matthias Kloseb9621712010-04-24 17:59:49 +00007046 if test "$ac_cv_type_double" = yes; then
7047 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7048$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007049as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007050See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007051 else
7052 ac_cv_sizeof_double=0
7053 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007055
Martin v. Löwis11437992002-04-12 09:54:03 +00007056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7058$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007059
7060
7061
Martin v. Löwis11437992002-04-12 09:54:03 +00007062cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007063#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007064_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007065
7066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007067# The cast to long int works around a bug in the HP C Compiler
7068# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7069# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7070# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7072$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007073if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007074 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007075else
Matthias Kloseb9621712010-04-24 17:59:49 +00007076 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 +00007077
Martin v. Löwis11437992002-04-12 09:54:03 +00007078else
Matthias Kloseb9621712010-04-24 17:59:49 +00007079 if test "$ac_cv_type_fpos_t" = yes; then
7080 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007082as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007083See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007084 else
7085 ac_cv_sizeof_fpos_t=0
7086 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007088
Martin v. Löwis11437992002-04-12 09:54:03 +00007089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7091$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092
7093
7094
Martin v. Löwis11437992002-04-12 09:54:03 +00007095cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007096#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007097_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007098
Michael W. Hudson54241132001-12-07 15:38:26 +00007099
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007100# The cast to long int works around a bug in the HP C Compiler
7101# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7102# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7103# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7105$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007106if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007107 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007108else
Matthias Kloseb9621712010-04-24 17:59:49 +00007109 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 +00007110
Martin v. Löwis18e16552006-02-15 17:27:45 +00007111else
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 if test "$ac_cv_type_size_t" = yes; then
7113 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7114$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007115as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007116See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007117 else
7118 ac_cv_sizeof_size_t=0
7119 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007121
Martin v. Löwis18e16552006-02-15 17:27:45 +00007122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7124$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007125
7126
7127
Martin v. Löwis18e16552006-02-15 17:27:45 +00007128cat >>confdefs.h <<_ACEOF
7129#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7130_ACEOF
7131
7132
Christian Heimes400adb02008-02-01 08:12:03 +00007133# The cast to long int works around a bug in the HP C Compiler
7134# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7135# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7136# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7138$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007139if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007140 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007141else
Matthias Kloseb9621712010-04-24 17:59:49 +00007142 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 +00007143
Christian Heimes400adb02008-02-01 08:12:03 +00007144else
Matthias Kloseb9621712010-04-24 17:59:49 +00007145 if test "$ac_cv_type_pid_t" = yes; then
7146 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007148as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007149See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007150 else
7151 ac_cv_sizeof_pid_t=0
7152 fi
7153fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007154
Christian Heimes400adb02008-02-01 08:12:03 +00007155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7157$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007158
7159
7160
7161cat >>confdefs.h <<_ACEOF
7162#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7163_ACEOF
7164
7165
Michael W. Hudson54241132001-12-07 15:38:26 +00007166
Matthias Kloseb9621712010-04-24 17:59:49 +00007167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7168$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007169have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007171/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007172
Martin v. Löwis11437992002-04-12 09:54:03 +00007173int
7174main ()
7175{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007176long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007177 ;
7178 return 0;
7179}
7180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007181if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007182
7183
Matthias Kloseb9621712010-04-24 17:59:49 +00007184$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007185
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007186 have_long_long=yes
7187
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7191$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007192if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007193# The cast to long int works around a bug in the HP C Compiler
7194# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7195# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7196# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7198$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007199if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007200 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007201else
Matthias Kloseb9621712010-04-24 17:59:49 +00007202 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 +00007203
Martin v. Löwis11437992002-04-12 09:54:03 +00007204else
Matthias Kloseb9621712010-04-24 17:59:49 +00007205 if test "$ac_cv_type_long_long" = yes; then
7206 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7207$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007208as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007209See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007210 else
7211 ac_cv_sizeof_long_long=0
7212 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007214
Martin v. Löwis11437992002-04-12 09:54:03 +00007215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7217$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007218
7219
7220
Martin v. Löwis11437992002-04-12 09:54:03 +00007221cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007222#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007223_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007224
Michael W. Hudson54241132001-12-07 15:38:26 +00007225
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007226fi
7227
Matthias Kloseb9621712010-04-24 17:59:49 +00007228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7229$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007230have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007232/* end confdefs.h. */
7233
7234int
7235main ()
7236{
7237long double x; x = (long double)0;
7238 ;
7239 return 0;
7240}
7241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007242if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007243
7244
Matthias Kloseb9621712010-04-24 17:59:49 +00007245$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007246
7247 have_long_double=yes
7248
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007249fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7252$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007253if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007254# The cast to long int works around a bug in the HP C Compiler
7255# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7256# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7257# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7259$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007260if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007261 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007262else
Matthias Kloseb9621712010-04-24 17:59:49 +00007263 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 +00007264
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007265else
Matthias Kloseb9621712010-04-24 17:59:49 +00007266 if test "$ac_cv_type_long_double" = yes; then
7267 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7268$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007269as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007270See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007271 else
7272 ac_cv_sizeof_long_double=0
7273 fi
7274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007275
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7278$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007279
7280
7281
7282cat >>confdefs.h <<_ACEOF
7283#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7284_ACEOF
7285
7286
7287fi
7288
7289
Matthias Kloseb9621712010-04-24 17:59:49 +00007290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7291$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007292have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007294/* end confdefs.h. */
7295
7296int
7297main ()
7298{
7299_Bool x; x = (_Bool)0;
7300 ;
7301 return 0;
7302}
7303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007304if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007305
7306
Matthias Kloseb9621712010-04-24 17:59:49 +00007307$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007308
7309 have_c99_bool=yes
7310
Thomas Woutersb2137042007-02-01 18:02:27 +00007311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7314$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007315if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007316# The cast to long int works around a bug in the HP C Compiler
7317# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7318# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7319# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7321$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007322if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007323 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007324else
Matthias Kloseb9621712010-04-24 17:59:49 +00007325 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 +00007326
Thomas Woutersb2137042007-02-01 18:02:27 +00007327else
Matthias Kloseb9621712010-04-24 17:59:49 +00007328 if test "$ac_cv_type__Bool" = yes; then
7329 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007331as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007332See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007333 else
7334 ac_cv_sizeof__Bool=0
7335 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007337
Thomas Woutersb2137042007-02-01 18:02:27 +00007338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7340$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007341
7342
7343
Thomas Woutersb2137042007-02-01 18:02:27 +00007344cat >>confdefs.h <<_ACEOF
7345#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7346_ACEOF
7347
7348
7349fi
7350
Matthias Kloseb9621712010-04-24 17:59:49 +00007351ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007352 #include <stdint.h>
7353 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007354 #ifdef HAVE_INTTYPES_H
7355 #include <inttypes.h>
7356 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007357"
Victor Stinnere0be4232011-10-25 13:06:09 +02007358if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007359
7360cat >>confdefs.h <<_ACEOF
7361#define HAVE_UINTPTR_T 1
7362_ACEOF
7363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007364# The cast to long int works around a bug in the HP C Compiler
7365# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7366# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7367# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7369$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007370if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007371 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007372else
Matthias Kloseb9621712010-04-24 17:59:49 +00007373 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 +00007374
Martin v. Löwis11437992002-04-12 09:54:03 +00007375else
Matthias Kloseb9621712010-04-24 17:59:49 +00007376 if test "$ac_cv_type_uintptr_t" = yes; then
7377 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7378$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007379as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007380See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007381 else
7382 ac_cv_sizeof_uintptr_t=0
7383 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007385
Martin v. Löwis11437992002-04-12 09:54:03 +00007386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7388$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007389
7390
7391
Martin v. Löwis11437992002-04-12 09:54:03 +00007392cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007393#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007394_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007395
Michael W. Hudson54241132001-12-07 15:38:26 +00007396
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007397fi
7398
Thomas Wouters89f507f2006-12-13 04:49:30 +00007399
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007400# The cast to long int works around a bug in the HP C Compiler
7401# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7402# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7403# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7405$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007406if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007407 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007408else
Matthias Kloseb9621712010-04-24 17:59:49 +00007409 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007410#ifdef HAVE_SYS_TYPES_H
7411#include <sys/types.h>
7412#endif
7413
Matthias Kloseb9621712010-04-24 17:59:49 +00007414"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007415
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007416else
Matthias Kloseb9621712010-04-24 17:59:49 +00007417 if test "$ac_cv_type_off_t" = yes; then
7418 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7419$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007420as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007421See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007422 else
7423 ac_cv_sizeof_off_t=0
7424 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007426
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7429$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007430
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007431
7432
Martin v. Löwis11437992002-04-12 09:54:03 +00007433cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007434#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007435_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007436
Michael W. Hudson54241132001-12-07 15:38:26 +00007437
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007438
Matthias Kloseb9621712010-04-24 17:59:49 +00007439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7440$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007441if test "$have_long_long" = yes
7442then
7443if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007444 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007445
Matthias Kloseb9621712010-04-24 17:59:49 +00007446$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007447
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7449$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007450else
Matthias Kloseb9621712010-04-24 17:59:49 +00007451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7452$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007453fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007454else
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7456$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007457fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007458
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007459# The cast to long int works around a bug in the HP C Compiler
7460# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7461# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7462# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7464$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007465if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007467else
Matthias Kloseb9621712010-04-24 17:59:49 +00007468 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007469#ifdef HAVE_SYS_TYPES_H
7470#include <sys/types.h>
7471#endif
7472#ifdef HAVE_TIME_H
7473#include <time.h>
7474#endif
7475
Matthias Kloseb9621712010-04-24 17:59:49 +00007476"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007477
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007478else
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 if test "$ac_cv_type_time_t" = yes; then
7480 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7481$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007482as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007483See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007484 else
7485 ac_cv_sizeof_time_t=0
7486 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007488
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7491$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007492
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007493
7494
Martin v. Löwis11437992002-04-12 09:54:03 +00007495cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007496#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007497_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007498
Michael W. Hudson54241132001-12-07 15:38:26 +00007499
7500
Trent Mick635f6fb2000-08-23 21:33:05 +00007501# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007502ac_save_cc="$CC"
7503if test "$ac_cv_kpthread" = "yes"
7504then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007505elif test "$ac_cv_kthread" = "yes"
7506then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007507elif test "$ac_cv_pthread" = "yes"
7508then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007509fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007510
Matthias Kloseb9621712010-04-24 17:59:49 +00007511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7512$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007513have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007515/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007516
7517 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007518int
7519main ()
7520{
Guido van Rossum12580492000-09-24 16:47:19 +00007521pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 ;
7523 return 0;
7524}
Matthias Kloseb159a552010-04-25 21:00:44 +00007525
Martin v. Löwis11437992002-04-12 09:54:03 +00007526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007527if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007528 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7532$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007533if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007535# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7536# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7537# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7539$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007540if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007541 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007542else
Matthias Kloseb9621712010-04-24 17:59:49 +00007543 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007544#ifdef HAVE_PTHREAD_H
7545#include <pthread.h>
7546#endif
7547
Matthias Kloseb9621712010-04-24 17:59:49 +00007548"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007549
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007550else
Matthias Kloseb9621712010-04-24 17:59:49 +00007551 if test "$ac_cv_type_pthread_t" = yes; then
7552 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7553$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007554as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007555See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007556 else
7557 ac_cv_sizeof_pthread_t=0
7558 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007560
Trent Mick635f6fb2000-08-23 21:33:05 +00007561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7563$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007564
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007565
7566
Martin v. Löwis11437992002-04-12 09:54:03 +00007567cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007568#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007569_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007570
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007571
Trent Mick635f6fb2000-08-23 21:33:05 +00007572fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007573CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007574
Michael W. Hudson54241132001-12-07 15:38:26 +00007575
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007576case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007577 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007578 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7579 ;;
7580 Darwin/*)
7581 OTHER_LIBTOOL_OPT=""
7582 ;;
7583esac
7584
7585
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007586ARCH_RUN_32BIT=""
7587
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007588case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007589 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007590 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7591 if test "${enable_universalsdk}"; then
7592 :
7593 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007594 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007595 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007596 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007597 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007598 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007599 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007600 if test ${gcc_version} '<' 4.0
7601 then
7602 LIBTOOL_CRUFT="-lcc_dynamic"
7603 else
7604 LIBTOOL_CRUFT=""
7605 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007606 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007607 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007608else
Matthias Kloseb9621712010-04-24 17:59:49 +00007609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007610/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007611
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007612 #include <unistd.h>
7613 int main(int argc, char*argv[])
7614 {
7615 if (sizeof(long) == 4) {
7616 return 0;
7617 } else {
7618 return 1;
7619 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007620 }
7621
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007623if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007624 ac_osx_32bit=yes
7625else
Matthias Kloseb9621712010-04-24 17:59:49 +00007626 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007628rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7629 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007630fi
7631
7632
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007633 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007634 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007635 i386)
7636 MACOSX_DEFAULT_ARCH="i386"
7637 ;;
7638 ppc)
7639 MACOSX_DEFAULT_ARCH="ppc"
7640 ;;
7641 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007642 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007643 ;;
7644 esac
7645 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007646 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007647 i386)
7648 MACOSX_DEFAULT_ARCH="x86_64"
7649 ;;
7650 ppc)
7651 MACOSX_DEFAULT_ARCH="ppc64"
7652 ;;
7653 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007654 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007655 ;;
7656 esac
7657
7658 #ARCH_RUN_32BIT="true"
7659 fi
7660
7661 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007662 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007663 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007664esac
7665
Matthias Kloseb9621712010-04-24 17:59:49 +00007666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7667$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007668if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007669then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007670 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007671 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007672 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007673
Matthias Kloseb9621712010-04-24 17:59:49 +00007674$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007675
Matthias Kloseb9621712010-04-24 17:59:49 +00007676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7677$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007678 if test $enable_shared = "yes"
7679 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007680 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 +00007681 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007682else
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7684$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007685fi
7686
Matthias Kloseb9621712010-04-24 17:59:49 +00007687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7688$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007689case $ac_sys_system/$ac_sys_release in
7690 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007691
Matthias Kloseb9621712010-04-24 17:59:49 +00007692$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007693
Matthias Kloseb9621712010-04-24 17:59:49 +00007694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7695$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007696 ;;
7697 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7699$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007700 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007701esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007702
Guido van Rossum0a516c91994-09-12 10:58:40 +00007703# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007704
Michael W. Hudson54241132001-12-07 15:38:26 +00007705
7706
7707
7708
Benjamin Peterson99f03762010-04-11 22:15:28 +00007709
Thomas Wouters477c8d52006-05-27 19:21:47 +00007710
Georg Brandlb1441c72009-01-03 22:33:39 +00007711
Thomas Wouters477c8d52006-05-27 19:21:47 +00007712cat >>confdefs.h <<_ACEOF
7713#define SHLIB_EXT "$SO"
7714_ACEOF
7715
Guido van Rossum0a516c91994-09-12 10:58:40 +00007716# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007717# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007718# (Shared libraries in this instance are shared modules to be loaded into
7719# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7721$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007722if test -z "$LDSHARED"
7723then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007724 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007725 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007726 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007727 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007728 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007729 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007730 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007731 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007732 if test "$GCC" = "yes" ; then
7733 LDSHARED='$(CC) -shared'
7734 LDCXXSHARED='$(CXX) -shared'
7735 else
7736 LDSHARED='$(CC) -G'
7737 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007738 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007739 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007740 if test "$GCC" = "yes" ; then
7741 LDSHARED='$(CC) -shared'
7742 LDCXXSHARED='$(CXX) -shared'
7743 else
7744 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007745 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007746 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007747 LDSHARED='$(CC) -bundle'
7748 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007749 if test "$enable_framework" ; then
7750 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007751 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7752 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007753 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007754 else
7755 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007756 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007757 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007758 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007759 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007760 LDSHARED='$(CC) -bundle'
7761 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007762 if test "$enable_framework" ; then
7763 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007764 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7765 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007766 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007767 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007768 # No framework, use the Python app as bundle-loader
7769 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007770 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007771 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007772 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007773 Darwin/*)
7774 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7775 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007776
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007777 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007778 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007779 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007780 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007781 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007782 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7783 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007784 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007785 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007786 LDSHARED='$(CC) -bundle'
7787 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007788 if test "$enable_framework" ; then
7789 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007790 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7791 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007792 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007793 else
7794 # No framework, use the Python app as bundle-loader
7795 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7796 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007797 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007798 fi
7799 fi
7800 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007801 Linux*|GNU*|QNX*)
7802 LDSHARED='$(CC) -shared'
7803 LDCXXSHARED='$(CXX) -shared';;
7804 BSD/OS*/4*)
7805 LDSHARED="gcc -shared"
7806 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007807 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007808 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007809 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007810 LDSHARED='$(CC) -shared'
7811 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007812 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007813 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007814 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007815 OpenBSD*)
7816 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7817 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007818 LDSHARED='$(CC) -shared $(CCSHARED)'
7819 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007820 else
7821 case `uname -r` in
7822 [01].* | 2.[0-7] | 2.[0-7].*)
7823 LDSHARED="ld -Bshareable ${LDFLAGS}"
7824 ;;
7825 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007826 LDSHARED='$(CC) -shared $(CCSHARED)'
7827 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007828 ;;
7829 esac
7830 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007831 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007832 LDSHARED='$(CC) -shared'
7833 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007834 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007835 if test "$GCC" = "yes" ; then
7836 LDSHARED='$(CC) -shared'
7837 LDCXXSHARED='$(CXX) -shared'
7838 else
7839 LDSHARED='$(CC) -G'
7840 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007841 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007842 SCO_SV*)
7843 LDSHARED='$(CC) -Wl,-G,-Bexport'
7844 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7845 CYGWIN*)
7846 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7847 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007848 *) LDSHARED="ld";;
7849 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7852$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007853LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007854BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007855# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007856# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7858$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007859if test -z "$CCSHARED"
7860then
Guido van Rossum07397971997-04-29 21:49:50 +00007861 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007862 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007863 then CCSHARED="-fPIC";
7864 elif test `uname -p` = sparc;
7865 then CCSHARED="-xcode=pic32";
7866 else CCSHARED="-Kpic";
7867 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007868 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007869 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007870 else CCSHARED="+z";
7871 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007872 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007873 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007874 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007875 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007876 if test "$GCC" = "yes"
7877 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007878 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007879 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007880 SCO_SV*)
7881 if test "$GCC" = "yes"
7882 then CCSHARED="-fPIC"
7883 else CCSHARED="-Kpic -belf"
7884 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007885 IRIX*/6*) case $CC in
7886 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007887 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007888 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007889 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7892$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007893# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007894# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7896$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007897if test -z "$LINKFORSHARED"
7898then
Guido van Rossum07397971997-04-29 21:49:50 +00007899 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007900 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007901 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007902 LINKFORSHARED="-Wl,-E -Wl,+s";;
7903# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007904 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007905 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007906 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007907 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007908 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007909 if test "$enable_framework"
7910 then
Jack Jansenda49e192005-01-07 13:08:22 +00007911 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007912 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007913 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007914 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007915 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007916 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007917 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007918 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7919 then
7920 LINKFORSHARED="-Wl,--export-dynamic"
7921 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007922 SunOS/5*) case $CC in
7923 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007924 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007925 then
7926 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007927 fi;;
7928 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007929 CYGWIN*)
7930 if test $enable_shared = "no"
7931 then
7932 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7933 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007934 QNX*)
7935 # -Wl,-E causes the symbols to be added to the dynamic
7936 # symbol table so that they can be found when a module
7937 # is loaded. -N 2048K causes the stack size to be set
7938 # to 2048 kilobytes so that the stack doesn't overflow
7939 # when running test_compile.py.
7940 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007941 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7944$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007945
Michael W. Hudson54241132001-12-07 15:38:26 +00007946
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007947
Matthias Kloseb9621712010-04-24 17:59:49 +00007948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7949$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007950if test ! "$LIBRARY" = "$LDLIBRARY"
7951then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007952 case $ac_sys_system in
7953 CYGWIN*)
7954 # Cygwin needs CCSHARED when building extension DLLs
7955 # but not when building the interpreter DLL.
7956 CFLAGSFORSHARED='';;
7957 *)
7958 CFLAGSFORSHARED='$(CCSHARED)'
7959 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7962$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007963
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007964# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7965# library (with --enable-shared).
7966# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007967# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7968# if it is not required, since it creates a dependency of the shared library
7969# to LIBS. This, in turn, means that applications linking the shared libpython
7970# don't need to link LIBS explicitly. The default should be only changed
7971# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007972
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7974$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007975case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007976 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007977 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007978esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7980$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007981
7982
Guido van Rossum627b2d71993-12-24 10:39:16 +00007983# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7985$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007986if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007987 $as_echo_n "(cached) " >&6
7988else
7989 ac_check_lib_save_LIBS=$LIBS
7990LIBS="-lsendfile $LIBS"
7991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7992/* end confdefs.h. */
7993
7994/* Override any GCC internal prototype to avoid an error.
7995 Use char because int might match the return type of a GCC
7996 builtin and then its argument prototype would still apply. */
7997#ifdef __cplusplus
7998extern "C"
7999#endif
8000char sendfile ();
8001int
8002main ()
8003{
8004return sendfile ();
8005 ;
8006 return 0;
8007}
8008_ACEOF
8009if ac_fn_c_try_link "$LINENO"; then :
8010 ac_cv_lib_sendfile_sendfile=yes
8011else
8012 ac_cv_lib_sendfile_sendfile=no
8013fi
8014rm -f core conftest.err conftest.$ac_objext \
8015 conftest$ac_exeext conftest.$ac_ext
8016LIBS=$ac_check_lib_save_LIBS
8017fi
8018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8019$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008020if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008021 cat >>confdefs.h <<_ACEOF
8022#define HAVE_LIBSENDFILE 1
8023_ACEOF
8024
8025 LIBS="-lsendfile $LIBS"
8026
8027fi
8028
Matthias Kloseb9621712010-04-24 17:59:49 +00008029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8030$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008031if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008033else
Martin v. Löwis11437992002-04-12 09:54:03 +00008034 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008035LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008037/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039/* Override any GCC internal prototype to avoid an error.
8040 Use char because int might match the return type of a GCC
8041 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008042#ifdef __cplusplus
8043extern "C"
8044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008045char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008046int
8047main ()
8048{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008050 ;
8051 return 0;
8052}
8053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008054if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008056else
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008059rm -f core conftest.err conftest.$ac_objext \
8060 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008061LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8064$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008065if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008066 cat >>confdefs.h <<_ACEOF
8067#define HAVE_LIBDL 1
8068_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008069
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008070 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008072fi
8073 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8075$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008076if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008078else
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008080LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008083
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008084/* Override any GCC internal prototype to avoid an error.
8085 Use char because int might match the return type of a GCC
8086 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008087#ifdef __cplusplus
8088extern "C"
8089#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008090char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008091int
8092main ()
8093{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008094return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 ;
8096 return 0;
8097}
8098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008099if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008101else
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008104rm -f core conftest.err conftest.$ac_objext \
8105 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008106LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8109$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008110if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 cat >>confdefs.h <<_ACEOF
8112#define HAVE_LIBDLD 1
8113_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008114
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008115 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008116
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008117fi
8118 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008119
Georg Brandlb1441c72009-01-03 22:33:39 +00008120# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008121if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8123$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008124if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008125 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008126else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008127 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008130
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131/* Override any GCC internal prototype to avoid an error.
8132 Use char because int might match the return type of a GCC
8133 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008134#ifdef __cplusplus
8135extern "C"
8136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008137char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008138int
8139main ()
8140{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008141return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008142 ;
8143 return 0;
8144}
8145_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008146for ac_lib in '' pthread rt posix4; do
8147 if test -z "$ac_lib"; then
8148 ac_res="none required"
8149 else
8150 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008151 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008152 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008154 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008156rm -f core conftest.err conftest.$ac_objext \
8157 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008158 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008159 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008161done
Victor Stinnere0be4232011-10-25 13:06:09 +02008162if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164else
8165 ac_cv_search_sem_init=no
8166fi
8167rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008168LIBS=$ac_func_search_save_LIBS
8169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8171$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008173if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008174 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008175
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008176fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008177 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008178 # posix4 on Solaris 2.6
8179 # pthread (first!) on Linux
8180fi
8181
Martin v. Löwis19d17342003-06-14 21:03:05 +00008182# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8184$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008185if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008187else
8188 ac_check_lib_save_LIBS=$LIBS
8189LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008191/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008193/* Override any GCC internal prototype to avoid an error.
8194 Use char because int might match the return type of a GCC
8195 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008196#ifdef __cplusplus
8197extern "C"
8198#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008199char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008200int
8201main ()
8202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008204 ;
8205 return 0;
8206}
8207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008208if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008209 ac_cv_lib_intl_textdomain=yes
8210else
Matthias Kloseb9621712010-04-24 17:59:49 +00008211 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008213rm -f core conftest.err conftest.$ac_objext \
8214 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008215LIBS=$ac_check_lib_save_LIBS
8216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8218$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008219if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008220
Matthias Kloseb9621712010-04-24 17:59:49 +00008221$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008222
Brett Cannonc6d936e2009-06-07 20:09:53 +00008223 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008224fi
8225
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008226
8227# checks for system dependent C++ extensions support
8228case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8230$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008232/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008233
Georg Brandl59e87bd2011-02-15 19:48:59 +00008234 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008235int
8236main ()
8237{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008238loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008239 ;
8240 return 0;
8241}
Matthias Kloseb159a552010-04-25 21:00:44 +00008242
Martin v. Löwis11437992002-04-12 09:54:03 +00008243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008244if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008245
Matthias Kloseb159a552010-04-25 21:00:44 +00008246
Matthias Kloseb9621712010-04-24 17:59:49 +00008247$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008248
Matthias Kloseb159a552010-04-25 21:00:44 +00008249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008250$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008251
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008252else
Matthias Kloseb159a552010-04-25 21:00:44 +00008253
8254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008255$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008256
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008258rm -f core conftest.err conftest.$ac_objext \
8259 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008260 *) ;;
8261esac
8262
Guido van Rossum70c7f481998-03-26 18:44:10 +00008263# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8265$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008266if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008267 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008268else
Martin v. Löwis11437992002-04-12 09:54:03 +00008269 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008270LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274/* Override any GCC internal prototype to avoid an error.
8275 Use char because int might match the return type of a GCC
8276 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008277#ifdef __cplusplus
8278extern "C"
8279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008280char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008281int
8282main ()
8283{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008285 ;
8286 return 0;
8287}
8288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008289if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008290 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008291else
Matthias Kloseb9621712010-04-24 17:59:49 +00008292 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008294rm -f core conftest.err conftest.$ac_objext \
8295 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008296LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8299$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008300if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008301 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008302fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008303 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8305$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008306if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008307 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008308else
Martin v. Löwis11437992002-04-12 09:54:03 +00008309 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008310LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008313
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314/* Override any GCC internal prototype to avoid an error.
8315 Use char because int might match the return type of a GCC
8316 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008317#ifdef __cplusplus
8318extern "C"
8319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008320char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008321int
8322main ()
8323{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008325 ;
8326 return 0;
8327}
8328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008329if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008330 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008331else
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008334rm -f core conftest.err conftest.$ac_objext \
8335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008336LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8339$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008340if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008341 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008342fi
8343 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008344
Matthias Kloseb9621712010-04-24 17:59:49 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8346$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008347
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008348# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008349if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008350 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8352$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008353LIBS="$withval $LIBS"
8354
8355else
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8357$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358fi
8359
Guido van Rossum7f43da71994-08-01 12:15:30 +00008360
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008361if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008362 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8363set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8365$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008366if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008368else
8369 case $PKG_CONFIG in
8370 [\\/]* | ?:[\\/]*)
8371 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8372 ;;
8373 *)
8374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8375for as_dir in $PATH
8376do
8377 IFS=$as_save_IFS
8378 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008380 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8381 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008383 break 2
8384 fi
8385done
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008387IFS=$as_save_IFS
8388
8389 ;;
8390esac
8391fi
8392PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8393if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8395$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008396else
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8398$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008399fi
8400
8401
8402fi
8403if test -z "$ac_cv_path_PKG_CONFIG"; then
8404 ac_pt_PKG_CONFIG=$PKG_CONFIG
8405 # Extract the first word of "pkg-config", so it can be a program name with args.
8406set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8408$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008409if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008411else
8412 case $ac_pt_PKG_CONFIG in
8413 [\\/]* | ?:[\\/]*)
8414 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8415 ;;
8416 *)
8417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8418for as_dir in $PATH
8419do
8420 IFS=$as_save_IFS
8421 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008423 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8424 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008426 break 2
8427 fi
8428done
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008430IFS=$as_save_IFS
8431
8432 ;;
8433esac
8434fi
8435ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8436if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8438$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008439else
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8441$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008442fi
8443
8444 if test "x$ac_pt_PKG_CONFIG" = x; then
8445 PKG_CONFIG=""
8446 else
8447 case $cross_compiling:$ac_tool_warned in
8448yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8450$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008451ac_tool_warned=yes ;;
8452esac
8453 PKG_CONFIG=$ac_pt_PKG_CONFIG
8454 fi
8455else
8456 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8457fi
8458
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008459
8460# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8462$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008463
8464# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008465if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008466 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008467else
8468 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008469fi
8470
8471
Matthias Kloseb9621712010-04-24 17:59:49 +00008472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8473$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008474
8475# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8477$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008478
8479# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008480if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008481 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008482else
8483 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008484fi
8485
8486
8487if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008488 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8489else
8490 LIBFFI_INCLUDEDIR=""
8491fi
8492
8493
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8495$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008496
Benjamin Peterson076ed002010-10-31 17:11:02 +00008497# Check for support for loadable sqlite extensions
8498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8499$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8500# Check whether --enable-loadable-sqlite-extensions was given.
8501if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8502 enableval=$enable_loadable_sqlite_extensions;
8503else
8504 enable_loadable_sqlite_extensions="no"
8505fi
8506
8507
8508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8509$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8510
Matthias Klose55708cc2009-04-30 08:06:49 +00008511# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8513$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008514
8515# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008516if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008517 withval=$with_dbmliborder;
8518if test x$with_dbmliborder = xyes
8519then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008520as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008521else
8522 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8523 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8524 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008525 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008526 fi
8527 done
8528fi
8529fi
8530
Matthias Kloseb9621712010-04-24 17:59:49 +00008531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8532$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008533
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008534# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008535
8536
Matthias Kloseb9621712010-04-24 17:59:49 +00008537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8538$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008539
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008541if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542 withval=$with_signal_module;
8543fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008544
8545
8546if test -z "$with_signal_module"
8547then with_signal_module="yes"
8548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8550$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008551
8552if test "${with_signal_module}" = "yes"; then
8553 USE_SIGNAL_MODULE=""
8554 SIGNAL_OBJS=""
8555else
8556 USE_SIGNAL_MODULE="#"
8557 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8558fi
8559
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008560# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008561
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008562USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565
8566# Templates for things AC_DEFINEd more than once.
8567# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008568
8569
Martin v. Löwis11437992002-04-12 09:54:03 +00008570
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8572$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008575if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576 withval=$with_threads;
8577fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008578
8579
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008580# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008582# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008583if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584 withval=$with_thread; with_threads=$with_thread
8585fi
8586
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008587
8588if test -z "$with_threads"
8589then with_threads="yes"
8590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8592$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008593
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008594
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008595if test "$with_threads" = "no"
8596then
8597 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008598elif test "$ac_cv_pthread_is_default" = yes
8599then
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008601
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008602 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008604
8605 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008607elif test "$ac_cv_kpthread" = "yes"
8608then
8609 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008610 if test "$ac_cv_cxx_thread" = "yes"; then
8611 CXX="$CXX -Kpthread"
8612 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008614
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008615 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008616 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008617elif test "$ac_cv_kthread" = "yes"
8618then
8619 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008620 if test "$ac_cv_cxx_thread" = "yes"; then
8621 CXX="$CXX -Kthread"
8622 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008624
8625 posix_threads=yes
8626 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008627elif test "$ac_cv_pthread" = "yes"
8628then
8629 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008630 if test "$ac_cv_cxx_thread" = "yes"; then
8631 CXX="$CXX -pthread"
8632 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008634
8635 posix_threads=yes
8636 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008637else
8638 if test ! -z "$with_threads" -a -d "$with_threads"
8639 then LDFLAGS="$LDFLAGS -L$with_threads"
8640 fi
8641 if test ! -z "$withval" -a -d "$withval"
8642 then LDFLAGS="$LDFLAGS -L$withval"
8643 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008644
8645 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008646 # define _POSIX_THREADS in unistd.h. Some apparently don't
8647 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8649$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008651/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008652
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008653#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008654#ifdef _POSIX_THREADS
8655yes
8656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008657
8658_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008661 unistd_defines_pthreads=yes
8662else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008663 unistd_defines_pthreads=no
8664fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008665rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008666
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8668$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008669
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008671
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008672 # Just looking for pthread_create in libpthread is not enough:
8673 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8674 # So we really have to include pthread.h, and then link.
8675 _libs=$LIBS
8676 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8678$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008680/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008681#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008682
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008683void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008684int
8685main ()
8686{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008687
8688pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 ;
8690 return 0;
8691}
8692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008694
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8696$as_echo "yes" >&6; }
8697 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008698
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008699 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008700 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008701else
Martin v. Löwis11437992002-04-12 09:54:03 +00008702
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008703 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02008705if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008706 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008707
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008708 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008709 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008710else
Guido van Rossumad678af1998-10-02 14:42:15 +00008711
Matthias Kloseb9621712010-04-24 17:59:49 +00008712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8713$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008714if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008716else
Martin v. Löwis11437992002-04-12 09:54:03 +00008717 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008718LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722/* Override any GCC internal prototype to avoid an error.
8723 Use char because int might match the return type of a GCC
8724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008725#ifdef __cplusplus
8726extern "C"
8727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008728char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008729int
8730main ()
8731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 ;
8734 return 0;
8735}
8736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008737if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742rm -f core conftest.err conftest.$ac_objext \
8743 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008744LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8747$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008748if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008750
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008751 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008752 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008753 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008754else
Greg Steinadf63d62000-07-05 10:38:09 +00008755
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8757$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008758if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008760else
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008762LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766/* Override any GCC internal prototype to avoid an error.
8767 Use char because int might match the return type of a GCC
8768 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008769#ifdef __cplusplus
8770extern "C"
8771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008772char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008773int
8774main ()
8775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008776return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 ;
8778 return 0;
8779}
8780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008781if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008783else
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786rm -f core conftest.err conftest.$ac_objext \
8787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008788LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8791$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008792if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008794
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008795 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008796 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008797 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008798else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008799
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8801$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008802if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008804else
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008806LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810/* Override any GCC internal prototype to avoid an error.
8811 Use char because int might match the return type of a GCC
8812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008813#ifdef __cplusplus
8814extern "C"
8815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008816char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008817int
8818main ()
8819{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008820return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 ;
8822 return 0;
8823}
8824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008825if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008827else
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008830rm -f core conftest.err conftest.$ac_objext \
8831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008832LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8835$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008836if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008838
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008839 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008840 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008841 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008842else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8845$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008846if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008848else
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008850LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854/* Override any GCC internal prototype to avoid an error.
8855 Use char because int might match the return type of a GCC
8856 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008857#ifdef __cplusplus
8858extern "C"
8859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008860char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008861int
8862main ()
8863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 ;
8866 return 0;
8867}
8868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008869if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008871else
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008874rm -f core conftest.err conftest.$ac_objext \
8875 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008876LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8879$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008880if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008881 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008882
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008883 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008884 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008885 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008886else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008887
Martin v. Löwis130fb172001-07-19 11:00:41 +00008888 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008889fi
8890
Guido van Rossum627b2d71993-12-24 10:39:16 +00008891
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008892fi
8893
Guido van Rossum0be3e491997-05-22 20:33:33 +00008894fi
8895
Guido van Rossum49545951997-12-02 19:28:29 +00008896fi
8897
Guido van Rossumb93a8621998-05-07 13:27:32 +00008898fi
8899
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901rm -f core conftest.err conftest.$ac_objext \
8902 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008903
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8905$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008906if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008908else
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008910LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914/* Override any GCC internal prototype to avoid an error.
8915 Use char because int might match the return type of a GCC
8916 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008917#ifdef __cplusplus
8918extern "C"
8919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008920char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008921int
8922main ()
8923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 ;
8926 return 0;
8927}
8928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008929if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008931else
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008934rm -f core conftest.err conftest.$ac_objext \
8935 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008936LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8939$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008940if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008942
Martin v. Löwis130fb172001-07-19 11:00:41 +00008943 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008944 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008945 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008946fi
8947
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008948
Neal Norwitza978ab02002-11-02 16:58:05 +00008949 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8951$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008952if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008953 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008954else
Martin v. Löwis11437992002-04-12 09:54:03 +00008955 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008956LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008960/* Override any GCC internal prototype to avoid an error.
8961 Use char because int might match the return type of a GCC
8962 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008963#ifdef __cplusplus
8964extern "C"
8965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008966char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008967int
8968main ()
8969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008970return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 ;
8972 return 0;
8973}
8974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008975if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008977else
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008980rm -f core conftest.err conftest.$ac_objext \
8981 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008982LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8985$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008986if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008988
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008989 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008990 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008991 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008992fi
8993
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008994 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008995fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008996
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008997if test "$posix_threads" = "yes"; then
8998 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008999
Matthias Kloseb9621712010-04-24 17:59:49 +00009000$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009001
9002 fi
9003
9004 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9005 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009006 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009007$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009008
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009009 ;;
9010 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009011$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009012
9013 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009014 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009015$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009016
9017 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009018 esac
9019
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9021$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009022 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009024else
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009026 ac_cv_pthread_system_supported=no
9027else
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009029/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009030#include <pthread.h>
9031 void *foo(void *parm) {
9032 return NULL;
9033 }
9034 main() {
9035 pthread_attr_t attr;
9036 pthread_t id;
9037 if (pthread_attr_init(&attr)) exit(-1);
9038 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9039 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9040 exit(0);
9041 }
9042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009043if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009044 ac_cv_pthread_system_supported=yes
9045else
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9049 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009050fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009052
Guido van Rossum627b2d71993-12-24 10:39:16 +00009053fi
9054
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9056$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009057 if test "$ac_cv_pthread_system_supported" = "yes"; then
9058
Matthias Kloseb9621712010-04-24 17:59:49 +00009059$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009060
9061 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 for ac_func in pthread_sigmask
9063do :
9064 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009065if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009066 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009067#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009068_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009069 case $ac_sys_system in
9070 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009071
Matthias Kloseb9621712010-04-24 17:59:49 +00009072$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009073
9074 ;;
9075 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009076fi
9077done
9078
9079fi
9080
9081
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009082# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009083
Matthias Kloseb9621712010-04-24 17:59:49 +00009084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9085$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009086# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009087if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009088 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009089 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092 ipv6=no
9093 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009094 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9095$as_echo "yes" >&6; }
9096 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097
9098 ipv6=yes
9099 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009101else
Martin v. Löwis11437992002-04-12 09:54:03 +00009102
Matthias Kloseb9621712010-04-24 17:59:49 +00009103 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009104
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9106$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009107 ipv6=no
9108
9109else
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009111/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009112 /* AF_INET6 available check */
9113#include <sys/types.h>
9114#include <sys/socket.h>
9115main()
9116{
9117 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9118 exit(1);
9119 else
9120 exit(0);
9121}
9122
Martin v. Löwis11437992002-04-12 09:54:03 +00009123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009124if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009125
Matthias Kloseb9621712010-04-24 17:59:49 +00009126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9127$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009128 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009129
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009130else
Matthias Kloseb159a552010-04-25 21:00:44 +00009131
Matthias Kloseb9621712010-04-24 17:59:49 +00009132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9133$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009134 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009135
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009139fi
9140
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009141
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009142if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9144$as_echo_n "checking if RFC2553 API is available... " >&6; }
9145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009146/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009147
9148 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009149#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009150int
9151main ()
9152{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009153struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009154 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 ;
9156 return 0;
9157}
Matthias Kloseb159a552010-04-25 21:00:44 +00009158
Martin v. Löwis11437992002-04-12 09:54:03 +00009159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009160if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009161
9162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009163$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009164 ipv6=yes
9165
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009166else
Matthias Kloseb159a552010-04-25 21:00:44 +00009167
9168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009169$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009170 ipv6=no
9171
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009174fi
9175
9176if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009177 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009178
9179fi
9180
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009181fi
9182
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009183
9184ipv6type=unknown
9185ipv6lib=none
9186ipv6trylibc=no
9187
9188if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9190$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009191 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9192 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009193 case $i in
9194 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009196/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009197
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009198#include <netinet/in.h>
9199#ifdef IPV6_INRIA_VERSION
9200yes
9201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009202_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009203if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009204 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009205 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009206fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009207rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009208
9209 ;;
9210 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009212/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009213
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009214#include <netinet/in.h>
9215#ifdef __KAME__
9216yes
9217#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009218_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009219if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009220 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009221 ipv6type=$i;
9222 ipv6lib=inet6
9223 ipv6libdir=/usr/local/v6/lib
9224 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009225fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009226rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009227
9228 ;;
9229 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009231/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009232
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009233#include <features.h>
9234#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9235yes
9236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009237_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009238if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009239 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009240 ipv6type=$i;
9241 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009242fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009243rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009244
9245 ;;
9246 linux-inet6)
9247 if test -d /usr/inet6; then
9248 ipv6type=$i
9249 ipv6lib=inet6
9250 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009251 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009252 fi
9253 ;;
9254 solaris)
9255 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009256 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009257 ipv6type=$i
9258 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009259 fi
9260 fi
9261 ;;
9262 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009264/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009265
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009266#include <sys/param.h>
9267#ifdef _TOSHIBA_INET6
9268yes
9269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009270_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009272 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009273 ipv6type=$i;
9274 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009275 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009276fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009277rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009278
9279 ;;
9280 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009282/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009283
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009284#include </usr/local/v6/include/sys/v6config.h>
9285#ifdef __V6D__
9286yes
9287#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009288_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009289if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009290 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009291 ipv6type=$i;
9292 ipv6lib=v6;
9293 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009294 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009295fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009296rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009297
9298 ;;
9299 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009301/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009302
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009303#include <sys/param.h>
9304#ifdef _ZETA_MINAMI_INET6
9305yes
9306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009307_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009309 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009310 ipv6type=$i;
9311 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009312 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009313fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009314rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009315
9316 ;;
9317 esac
9318 if test "$ipv6type" != "unknown"; then
9319 break
9320 fi
9321 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9323$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009324fi
9325
9326if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9327 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9328 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9329 echo "using lib$ipv6lib"
9330 else
9331 if test $ipv6trylibc = "yes"; then
9332 echo "using libc"
9333 else
9334 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9335 echo "You need to fetch lib$ipv6lib.a from appropriate"
9336 echo 'ipv6 kit and compile beforehand.'
9337 exit 1
9338 fi
9339 fi
9340fi
9341
Matthias Kloseb9621712010-04-24 17:59:49 +00009342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9343$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009345/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009346
9347 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009348int
9349main ()
9350{
9351FSIORefNum fRef = 0
9352 ;
9353 return 0;
9354}
Matthias Kloseb159a552010-04-25 21:00:44 +00009355
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009357if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009358
Matthias Kloseb159a552010-04-25 21:00:44 +00009359
Matthias Kloseb9621712010-04-24 17:59:49 +00009360$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009361
Matthias Kloseb9621712010-04-24 17:59:49 +00009362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9363$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009364
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009365else
Matthias Kloseb159a552010-04-25 21:00:44 +00009366
Matthias Kloseb9621712010-04-24 17:59:49 +00009367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9368$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009369
9370fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9372
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009373# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9375$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009376
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009377# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009378if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009379 withval=$with_doc_strings;
9380fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009381
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009382
9383if test -z "$with_doc_strings"
9384then with_doc_strings="yes"
9385fi
9386if test "$with_doc_strings" != "no"
9387then
9388
Matthias Kloseb9621712010-04-24 17:59:49 +00009389$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009390
9391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9393$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009394
Antoine Pitrou042b1282010-08-13 21:15:58 +00009395# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9397$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009398
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009399# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009400if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009401 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009402if test "$withval" != no
9403then
9404
Matthias Kloseb9621712010-04-24 17:59:49 +00009405$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009406
Matthias Kloseb9621712010-04-24 17:59:49 +00009407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9408$as_echo "yes" >&6; }
9409else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9410$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009411fi
9412else
Matthias Kloseb9621712010-04-24 17:59:49 +00009413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9414$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415fi
9416
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009417
9418# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9420$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009423if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424 withval=$with_pymalloc;
9425fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009426
Neil Schemenauera35c6882001-02-27 04:45:05 +00009427
Neil Schemenauer16c22972002-03-22 15:34:49 +00009428if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009429then
9430 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009431 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009432fi
9433if test "$with_pymalloc" != "no"
9434then
Martin v. Löwis11437992002-04-12 09:54:03 +00009435
Matthias Kloseb9621712010-04-24 17:59:49 +00009436$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009437
9438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9440$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009441
Benjamin Peterson05159c42009-12-03 03:01:27 +00009442# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9444$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009445
9446# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009447if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009448 withval=$with_valgrind;
9449else
9450 with_valgrind=no
9451fi
9452
Matthias Kloseb9621712010-04-24 17:59:49 +00009453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9454$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009455if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009456 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 +02009457if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009458
Matthias Kloseb9621712010-04-24 17:59:49 +00009459$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009460
9461else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009462 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009463
9464fi
9465
9466
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009467 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009468fi
9469
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009470# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009471
Guido van Rossum98935bf2001-09-05 19:13:16 +00009472DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009473
Guido van Rossume97ee181999-12-20 21:27:22 +00009474# the dlopen() function means we might want to use dynload_shlib.o. some
9475# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009476for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009477do :
9478 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +02009479if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009481#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009482_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009483
Guido van Rossume97ee181999-12-20 21:27:22 +00009484fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009485done
Guido van Rossume97ee181999-12-20 21:27:22 +00009486
Michael W. Hudson54241132001-12-07 15:38:26 +00009487
Guido van Rossume97ee181999-12-20 21:27:22 +00009488# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9489# loading of modules.
9490
Matthias Kloseb9621712010-04-24 17:59:49 +00009491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9492$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009493if test -z "$DYNLOADFILE"
9494then
9495 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009496 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9497 if test "$ac_cv_func_dlopen" = yes
9498 then DYNLOADFILE="dynload_shlib.o"
9499 else DYNLOADFILE="dynload_aix.o"
9500 fi
9501 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009502 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009503 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9504 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009505 *)
9506 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9507 # out any dynamic loading
9508 if test "$ac_cv_func_dlopen" = yes
9509 then DYNLOADFILE="dynload_shlib.o"
9510 else DYNLOADFILE="dynload_stub.o"
9511 fi
9512 ;;
9513 esac
9514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9516$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009517if test "$DYNLOADFILE" != "dynload_stub.o"
9518then
Martin v. Löwis11437992002-04-12 09:54:03 +00009519
Matthias Kloseb9621712010-04-24 17:59:49 +00009520$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009521
9522fi
9523
Neil Schemenauer4e425612001-06-19 15:44:15 +00009524# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9525
Michael W. Hudson54241132001-12-07 15:38:26 +00009526
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9528$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009529if test -z "$MACHDEP_OBJS"
9530then
Jack Jansene578a632001-08-15 01:27:14 +00009531 MACHDEP_OBJS=$extra_machdep_objs
9532else
9533 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9536$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009537
Guido van Rossum627b2d71993-12-24 10:39:16 +00009538# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009539for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -08009540 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009541 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009542 futimens futimes gai_strerror \
9543 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009544 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009545 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +01009546 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
9547 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009548 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009549 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009550 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009551 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009552 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009553 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009554 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9555 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009556 sigaction sigaltstack siginterrupt sigpending sigrelse \
9557 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009558 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009559 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9560 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009561do :
9562 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9563ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009564if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009565 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009566#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009567_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009568
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009569fi
9570done
9571
Michael W. Hudson54241132001-12-07 15:38:26 +00009572
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009573ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9574 #include <dirent.h>
9575"
9576if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9577
9578$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9579
9580fi
9581
9582
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009583# For some functions, having a definition is not sufficient, since
9584# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9586$as_echo_n "checking for chroot... " >&6; }
9587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009588/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009589#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009590int
9591main ()
9592{
9593void *x=chroot
9594 ;
9595 return 0;
9596}
9597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009598if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009599
Matthias Kloseb9621712010-04-24 17:59:49 +00009600$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009601
Matthias Kloseb159a552010-04-25 21:00:44 +00009602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009603$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009604else
Matthias Kloseb9621712010-04-24 17:59:49 +00009605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9606$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009607
9608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9611$as_echo_n "checking for link... " >&6; }
9612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009613/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009614#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009615int
9616main ()
9617{
9618void *x=link
9619 ;
9620 return 0;
9621}
9622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009624
Matthias Kloseb9621712010-04-24 17:59:49 +00009625$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009626
Matthias Kloseb159a552010-04-25 21:00:44 +00009627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009628$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009629else
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9631$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009632
9633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9636$as_echo_n "checking for symlink... " >&6; }
9637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009638/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009639#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009640int
9641main ()
9642{
9643void *x=symlink
9644 ;
9645 return 0;
9646}
9647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009649
Matthias Kloseb9621712010-04-24 17:59:49 +00009650$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009651
Matthias Kloseb159a552010-04-25 21:00:44 +00009652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009653$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009654else
Matthias Kloseb9621712010-04-24 17:59:49 +00009655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9656$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009657
9658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9661$as_echo_n "checking for fchdir... " >&6; }
9662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009664#include <unistd.h>
9665int
9666main ()
9667{
9668void *x=fchdir
9669 ;
9670 return 0;
9671}
9672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009673if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009674
Matthias Kloseb9621712010-04-24 17:59:49 +00009675$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009676
Matthias Kloseb159a552010-04-25 21:00:44 +00009677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009678$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009679else
Matthias Kloseb9621712010-04-24 17:59:49 +00009680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9681$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009682
9683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9686$as_echo_n "checking for fsync... " >&6; }
9687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009688/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009689#include <unistd.h>
9690int
9691main ()
9692{
9693void *x=fsync
9694 ;
9695 return 0;
9696}
9697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009698if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009699
Matthias Kloseb9621712010-04-24 17:59:49 +00009700$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009701
Matthias Kloseb159a552010-04-25 21:00:44 +00009702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009703$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009704else
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9706$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009707
9708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9711$as_echo_n "checking for fdatasync... " >&6; }
9712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009713/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009714#include <unistd.h>
9715int
9716main ()
9717{
9718void *x=fdatasync
9719 ;
9720 return 0;
9721}
9722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009723if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009724
Matthias Kloseb9621712010-04-24 17:59:49 +00009725$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009726
Matthias Kloseb159a552010-04-25 21:00:44 +00009727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009728$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009729else
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009732
9733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9736$as_echo_n "checking for epoll... " >&6; }
9737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009738/* end confdefs.h. */
9739#include <sys/epoll.h>
9740int
9741main ()
9742{
9743void *x=epoll_create
9744 ;
9745 return 0;
9746}
9747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009748if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009749
Matthias Kloseb9621712010-04-24 17:59:49 +00009750$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009751
Matthias Kloseb159a552010-04-25 21:00:44 +00009752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009753$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009754else
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009757
9758fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -06009760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
9761$as_echo_n "checking for epoll_create1... " >&6; }
9762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9763/* end confdefs.h. */
9764#include <sys/epoll.h>
9765int
9766main ()
9767{
9768void *x=epoll_create1
9769 ;
9770 return 0;
9771}
9772_ACEOF
9773if ac_fn_c_try_compile "$LINENO"; then :
9774
9775$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
9776
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9778$as_echo "yes" >&6; }
9779else
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9781$as_echo "no" >&6; }
9782
9783fi
9784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9786$as_echo_n "checking for kqueue... " >&6; }
9787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009788/* end confdefs.h. */
9789
9790#include <sys/types.h>
9791#include <sys/event.h>
9792
9793int
9794main ()
9795{
9796int x=kqueue()
9797 ;
9798 return 0;
9799}
9800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009801if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009802
Matthias Kloseb9621712010-04-24 17:59:49 +00009803$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009804
Matthias Kloseb159a552010-04-25 21:00:44 +00009805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009806$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009807else
Matthias Kloseb9621712010-04-24 17:59:49 +00009808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9809$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009810
9811fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009813# On some systems (eg. FreeBSD 5), we would find a definition of the
9814# functions ctermid_r, setgroups in the library, but no prototype
9815# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9816# address to avoid compiler warnings and potential miscompilations
9817# because of the missing prototypes.
9818
Matthias Kloseb9621712010-04-24 17:59:49 +00009819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9820$as_echo_n "checking for ctermid_r... " >&6; }
9821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009822/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009823
Martin v. Löwisd5843682002-11-21 20:41:28 +00009824#include <stdio.h>
9825
Martin v. Löwisd5843682002-11-21 20:41:28 +00009826int
9827main ()
9828{
9829void* p = ctermid_r
9830 ;
9831 return 0;
9832}
9833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009834if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009835
Matthias Kloseb9621712010-04-24 17:59:49 +00009836$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009837
Matthias Kloseb159a552010-04-25 21:00:44 +00009838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009839$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009840else
Matthias Kloseb9621712010-04-24 17:59:49 +00009841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9842$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009843
9844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9846
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9848$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009849if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009850 $as_echo_n "(cached) " >&6
9851else
9852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009853/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009854#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009855int
9856main ()
9857{
9858void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009859
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009860 ;
9861 return 0;
9862}
9863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009864if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009865 ac_cv_flock_decl=yes
9866else
9867 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009868
9869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009871
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009872fi
9873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9874$as_echo "$ac_cv_flock_decl" >&6; }
9875if test "x${ac_cv_flock_decl}" = xyes; then
9876 for ac_func in flock
9877do :
9878 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +02009879if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009880 cat >>confdefs.h <<_ACEOF
9881#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009882_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009883
Antoine Pitroua3000072010-09-07 14:52:42 +00009884else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009886$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009887if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009888 $as_echo_n "(cached) " >&6
9889else
9890 ac_check_lib_save_LIBS=$LIBS
9891LIBS="-lbsd $LIBS"
9892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9893/* end confdefs.h. */
9894
9895/* Override any GCC internal prototype to avoid an error.
9896 Use char because int might match the return type of a GCC
9897 builtin and then its argument prototype would still apply. */
9898#ifdef __cplusplus
9899extern "C"
9900#endif
9901char flock ();
9902int
9903main ()
9904{
9905return flock ();
9906 ;
9907 return 0;
9908}
9909_ACEOF
9910if ac_fn_c_try_link "$LINENO"; then :
9911 ac_cv_lib_bsd_flock=yes
9912else
9913 ac_cv_lib_bsd_flock=no
9914fi
9915rm -f core conftest.err conftest.$ac_objext \
9916 conftest$ac_exeext conftest.$ac_ext
9917LIBS=$ac_check_lib_save_LIBS
9918fi
9919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9920$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009921if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009922 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009923
9924
9925$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9926
9927
9928fi
9929
9930
9931fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009932done
9933
Antoine Pitroua3000072010-09-07 14:52:42 +00009934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935
Matthias Kloseb9621712010-04-24 17:59:49 +00009936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9937$as_echo_n "checking for getpagesize... " >&6; }
9938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009939/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009940
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009941#include <unistd.h>
9942
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009943int
9944main ()
9945{
9946void* p = getpagesize
9947 ;
9948 return 0;
9949}
9950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009951if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009952
Matthias Kloseb9621712010-04-24 17:59:49 +00009953$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009954
Matthias Kloseb159a552010-04-25 21:00:44 +00009955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009956$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009957else
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9959$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009960
9961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009963
Victor Stinner984890f2011-11-24 13:53:38 +01009964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9965$as_echo_n "checking for broken unsetenv... " >&6; }
9966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9967/* end confdefs.h. */
9968
9969#include <stdlib.h>
9970
9971int
9972main ()
9973{
9974int res = unsetenv("DUMMY")
9975 ;
9976 return 0;
9977}
9978_ACEOF
9979if ac_fn_c_try_compile "$LINENO"; then :
9980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9981$as_echo "no" >&6; }
9982else
9983
9984$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9985
9986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9987$as_echo "yes" >&6; }
9988
9989fi
9990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9991
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009992for ac_prog in true
9993do
9994 # Extract the first word of "$ac_prog", so it can be a program name with args.
9995set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9997$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009998if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010000else
10001 if test -n "$TRUE"; then
10002 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10003else
10004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10005for as_dir in $PATH
10006do
10007 IFS=$as_save_IFS
10008 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010009 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010010 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 +000010011 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 $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 +000010013 break 2
10014 fi
10015done
Matthias Kloseb9621712010-04-24 17:59:49 +000010016 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010018
10019fi
10020fi
10021TRUE=$ac_cv_prog_TRUE
10022if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10024$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010025else
Matthias Kloseb9621712010-04-24 17:59:49 +000010026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010028fi
10029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010031 test -n "$TRUE" && break
10032done
10033test -n "$TRUE" || TRUE="/bin/true"
10034
10035
Matthias Kloseb9621712010-04-24 17:59:49 +000010036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10037$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010038if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010039 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010040else
10041 ac_check_lib_save_LIBS=$LIBS
10042LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010044/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046/* Override any GCC internal prototype to avoid an error.
10047 Use char because int might match the return type of a GCC
10048 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010049#ifdef __cplusplus
10050extern "C"
10051#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010052char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010053int
10054main ()
10055{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010057 ;
10058 return 0;
10059}
10060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010061if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010062 ac_cv_lib_c_inet_aton=yes
10063else
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010066rm -f core conftest.err conftest.$ac_objext \
10067 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010068LIBS=$ac_check_lib_save_LIBS
10069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10071$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010072if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010073 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010074else
Matthias Kloseb9621712010-04-24 17:59:49 +000010075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10076$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010077if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010078 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010079else
10080 ac_check_lib_save_LIBS=$LIBS
10081LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010083/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085/* Override any GCC internal prototype to avoid an error.
10086 Use char because int might match the return type of a GCC
10087 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010088#ifdef __cplusplus
10089extern "C"
10090#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010091char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010092int
10093main ()
10094{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010095return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010096 ;
10097 return 0;
10098}
10099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010100if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010101 ac_cv_lib_resolv_inet_aton=yes
10102else
Matthias Kloseb9621712010-04-24 17:59:49 +000010103 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010105rm -f core conftest.err conftest.$ac_objext \
10106 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010107LIBS=$ac_check_lib_save_LIBS
10108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10110$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010111if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010112 cat >>confdefs.h <<_ACEOF
10113#define HAVE_LIBRESOLV 1
10114_ACEOF
10115
10116 LIBS="-lresolv $LIBS"
10117
10118fi
10119
10120
10121fi
10122
10123
Christian Heimesd0764e22007-12-04 15:00:33 +000010124# On Tru64, chflags seems to be present, but calling it will
10125# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10127$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010128if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010130else
Matthias Kloseb9621712010-04-24 17:59:49 +000010131 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010132 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010133else
Matthias Kloseb9621712010-04-24 17:59:49 +000010134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010135/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010136
Christian Heimesd0764e22007-12-04 15:00:33 +000010137#include <sys/stat.h>
10138#include <unistd.h>
10139int main(int argc, char*argv[])
10140{
10141 if(chflags(argv[0], 0) != 0)
10142 return 1;
10143 return 0;
10144}
Ned Deily3eb67d52011-06-28 00:00:28 -070010145
Christian Heimesd0764e22007-12-04 15:00:33 +000010146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010147if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010148 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010149else
Matthias Kloseb9621712010-04-24 17:59:49 +000010150 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010152rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10153 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010154fi
10155
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010156
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10159$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010160if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010161 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010162if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010163 ac_cv_have_chflags="yes"
10164else
10165 ac_cv_have_chflags="no"
10166fi
10167
10168fi
10169if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010170
Matthias Kloseb9621712010-04-24 17:59:49 +000010171$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010172
10173fi
10174
Matthias Kloseb9621712010-04-24 17:59:49 +000010175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10176$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010177if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010178 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010179else
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010181 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010182else
Matthias Kloseb9621712010-04-24 17:59:49 +000010183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010184/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010185
Christian Heimesd0764e22007-12-04 15:00:33 +000010186#include <sys/stat.h>
10187#include <unistd.h>
10188int main(int argc, char*argv[])
10189{
10190 if(lchflags(argv[0], 0) != 0)
10191 return 1;
10192 return 0;
10193}
Ned Deily3eb67d52011-06-28 00:00:28 -070010194
Christian Heimesd0764e22007-12-04 15:00:33 +000010195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010196if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010197 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010198else
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10202 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010203fi
10204
10205
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10208$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010209if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010211if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010212 ac_cv_have_lchflags="yes"
10213else
10214 ac_cv_have_lchflags="no"
10215fi
10216
10217fi
10218if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010219
Matthias Kloseb9621712010-04-24 17:59:49 +000010220$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010221
10222fi
10223
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010224case $ac_sys_system/$ac_sys_release in
10225Darwin/*)
10226 _CUR_CFLAGS="${CFLAGS}"
10227 _CUR_LDFLAGS="${LDFLAGS}"
10228 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10229 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10230 ;;
10231esac
10232
Matthias Kloseb9621712010-04-24 17:59:49 +000010233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10234$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010235if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010237else
10238 ac_check_lib_save_LIBS=$LIBS
10239LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010241/* end confdefs.h. */
10242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010243/* Override any GCC internal prototype to avoid an error.
10244 Use char because int might match the return type of a GCC
10245 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010246#ifdef __cplusplus
10247extern "C"
10248#endif
10249char inflateCopy ();
10250int
10251main ()
10252{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010254 ;
10255 return 0;
10256}
10257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010258if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010259 ac_cv_lib_z_inflateCopy=yes
10260else
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010263rm -f core conftest.err conftest.$ac_objext \
10264 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010265LIBS=$ac_check_lib_save_LIBS
10266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10268$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010269if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010270
Matthias Kloseb9621712010-04-24 17:59:49 +000010271$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010272
10273fi
10274
10275
10276case $ac_sys_system/$ac_sys_release in
10277Darwin/*)
10278 CFLAGS="${_CUR_CFLAGS}"
10279 LDFLAGS="${_CUR_LDFLAGS}"
10280 ;;
10281esac
10282
Matthias Kloseb9621712010-04-24 17:59:49 +000010283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10284$as_echo_n "checking for hstrerror... " >&6; }
10285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010286/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010287
Martin v. Löwise9416172003-05-03 10:12:45 +000010288#include <netdb.h>
10289
Martin v. Löwise9416172003-05-03 10:12:45 +000010290int
10291main ()
10292{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010293void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010294 ;
10295 return 0;
10296}
10297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010298if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010299
Matthias Kloseb9621712010-04-24 17:59:49 +000010300$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010301
Matthias Kloseb159a552010-04-25 21:00:44 +000010302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010303$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010304else
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10306$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010307
10308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010309rm -f core conftest.err conftest.$ac_objext \
10310 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010311
Matthias Kloseb9621712010-04-24 17:59:49 +000010312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10313$as_echo_n "checking for inet_aton... " >&6; }
10314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010315/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010316
Martin v. Löwis86d66262006-02-17 08:40:11 +000010317#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010318#include <sys/socket.h>
10319#include <netinet/in.h>
10320#include <arpa/inet.h>
10321
Martin v. Löwise9416172003-05-03 10:12:45 +000010322int
10323main ()
10324{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010325void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010326 ;
10327 return 0;
10328}
10329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010330if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010331
Matthias Kloseb9621712010-04-24 17:59:49 +000010332$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010333
Matthias Kloseb159a552010-04-25 21:00:44 +000010334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010335$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010336else
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10338$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010339
10340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010341rm -f core conftest.err conftest.$ac_objext \
10342 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343
Matthias Kloseb9621712010-04-24 17:59:49 +000010344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10345$as_echo_n "checking for inet_pton... " >&6; }
10346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010347/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010348
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010349#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010350#include <sys/socket.h>
10351#include <netinet/in.h>
10352#include <arpa/inet.h>
10353
Martin v. Löwise9416172003-05-03 10:12:45 +000010354int
10355main ()
10356{
10357void* p = inet_pton
10358 ;
10359 return 0;
10360}
10361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010362if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010363
Matthias Kloseb9621712010-04-24 17:59:49 +000010364$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010365
Matthias Kloseb159a552010-04-25 21:00:44 +000010366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010367$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010368else
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10370$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010371
10372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010374
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010375# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10377$as_echo_n "checking for setgroups... " >&6; }
10378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010379/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010380
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010381#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010382#ifdef HAVE_GRP_H
10383#include <grp.h>
10384#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010385
Martin v. Löwisd5843682002-11-21 20:41:28 +000010386int
10387main ()
10388{
10389void* p = setgroups
10390 ;
10391 return 0;
10392}
10393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010394if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010395
Matthias Kloseb9621712010-04-24 17:59:49 +000010396$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010397
Matthias Kloseb159a552010-04-25 21:00:44 +000010398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010399$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010400else
Matthias Kloseb9621712010-04-24 17:59:49 +000010401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10402$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010403
10404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010406
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010407# check for openpty and forkpty
10408
10409for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010410do :
10411 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010412if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010415_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010416
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010417else
Matthias Kloseb9621712010-04-24 17:59:49 +000010418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10419$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010420if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010422else
Martin v. Löwis11437992002-04-12 09:54:03 +000010423 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010424LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010428/* Override any GCC internal prototype to avoid an error.
10429 Use char because int might match the return type of a GCC
10430 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010431#ifdef __cplusplus
10432extern "C"
10433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010434char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010435int
10436main ()
10437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 ;
10440 return 0;
10441}
10442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010445else
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010448rm -f core conftest.err conftest.$ac_objext \
10449 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010450LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10453$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010454if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010455 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010456 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010457else
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10459$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010460if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010461 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010462else
10463 ac_check_lib_save_LIBS=$LIBS
10464LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010466/* end confdefs.h. */
10467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010468/* Override any GCC internal prototype to avoid an error.
10469 Use char because int might match the return type of a GCC
10470 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010471#ifdef __cplusplus
10472extern "C"
10473#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010474char openpty ();
10475int
10476main ()
10477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010479 ;
10480 return 0;
10481}
10482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010483if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010484 ac_cv_lib_bsd_openpty=yes
10485else
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010488rm -f core conftest.err conftest.$ac_objext \
10489 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010490LIBS=$ac_check_lib_save_LIBS
10491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10493$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010494if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010495 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010496 LIBS="$LIBS -lbsd"
10497fi
10498
10499
10500fi
10501
Fred Drake8cef4cf2000-06-28 16:40:38 +000010502
10503fi
10504done
10505
10506for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010507do :
10508 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010509if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010510 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010511#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010512_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010513
Fred Drake8cef4cf2000-06-28 16:40:38 +000010514else
Matthias Kloseb9621712010-04-24 17:59:49 +000010515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10516$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010517if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010519else
Martin v. Löwis11437992002-04-12 09:54:03 +000010520 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010521LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010525/* Override any GCC internal prototype to avoid an error.
10526 Use char because int might match the return type of a GCC
10527 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010528#ifdef __cplusplus
10529extern "C"
10530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010531char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010532int
10533main ()
10534{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 ;
10537 return 0;
10538}
10539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010540if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010541 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010542else
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010545rm -f core conftest.err conftest.$ac_objext \
10546 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010547LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10550$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010551if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010553 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010554else
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10556$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010557if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010558 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010559else
10560 ac_check_lib_save_LIBS=$LIBS
10561LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010563/* end confdefs.h. */
10564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010565/* Override any GCC internal prototype to avoid an error.
10566 Use char because int might match the return type of a GCC
10567 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010568#ifdef __cplusplus
10569extern "C"
10570#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010571char forkpty ();
10572int
10573main ()
10574{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010576 ;
10577 return 0;
10578}
10579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010580if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010581 ac_cv_lib_bsd_forkpty=yes
10582else
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010585rm -f core conftest.err conftest.$ac_objext \
10586 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010587LIBS=$ac_check_lib_save_LIBS
10588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10590$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010591if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010592 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010593 LIBS="$LIBS -lbsd"
10594fi
10595
10596
10597fi
10598
Fred Drake8cef4cf2000-06-28 16:40:38 +000010599
10600fi
10601done
10602
Jack Jansendd19cf82001-12-06 22:36:17 +000010603
Christian Heimesb186d002008-03-18 15:15:01 +000010604# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010605for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010606do :
10607 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020010608if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010609 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010610#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010611_ACEOF
10612
10613fi
10614done
10615
10616
Michael W. Hudson54241132001-12-07 15:38:26 +000010617# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010618for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010619do :
10620 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10621ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010622if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010623 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010624#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010625_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010626
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010627fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010628done
10629
Michael W. Hudson54241132001-12-07 15:38:26 +000010630
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010631ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020010632if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010633 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010634
Martin v. Löwis1142de32002-03-29 16:28:31 +000010635else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010637 *" dup2.$ac_objext "* ) ;;
10638 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010640esac
10641
Martin v. Löwis1142de32002-03-29 16:28:31 +000010642fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010643
10644ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020010645if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010646 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10647
10648else
10649 case " $LIBOBJS " in
10650 *" getcwd.$ac_objext "* ) ;;
10651 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10652 ;;
10653esac
10654
10655fi
10656
10657ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020010658if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010659 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10660
10661else
10662 case " $LIBOBJS " in
10663 *" strdup.$ac_objext "* ) ;;
10664 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10665 ;;
10666esac
10667
10668fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010669
10670
10671for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010672do :
10673 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010674if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010675 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010676#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010679/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010680#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010681int
10682main ()
10683{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010684getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010685 ;
10686 return 0;
10687}
10688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010689if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010690
Matthias Kloseb9621712010-04-24 17:59:49 +000010691$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010692
Guido van Rossum627b2d71993-12-24 10:39:16 +000010693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010695
Guido van Rossum627b2d71993-12-24 10:39:16 +000010696fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010697done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010698
Jack Jansen150753c2003-03-29 22:07:47 +000010699for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010700do :
10701 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010702if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010703 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010704#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010707/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010708#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010709int
10710main ()
10711{
10712setpgrp(0,0);
10713 ;
10714 return 0;
10715}
10716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010717if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010718
Matthias Kloseb9621712010-04-24 17:59:49 +000010719$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010720
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010723
10724fi
10725done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010726
Thomas Wouters3a584202000-08-05 23:28:51 +000010727for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010728do :
10729 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020010730if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010732#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010735/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010736#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010737int
10738main ()
10739{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010740gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010741 ;
10742 return 0;
10743}
10744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010745if ac_fn_c_try_compile "$LINENO"; then :
10746
Guido van Rossum627b2d71993-12-24 10:39:16 +000010747else
Skip Montanaro6dead952003-09-25 14:50:04 +000010748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010750
Martin v. Löwis11437992002-04-12 09:54:03 +000010751
Guido van Rossum627b2d71993-12-24 10:39:16 +000010752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010754
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010755fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010756done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010757
Michael W. Hudson54241132001-12-07 15:38:26 +000010758
Victor Stinnere0be4232011-10-25 13:06:09 +020010759for ac_func in clock_gettime
10760do :
10761 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
10762if test "x$ac_cv_func_clock_gettime" = xyes; then :
10763 cat >>confdefs.h <<_ACEOF
10764#define HAVE_CLOCK_GETTIME 1
10765_ACEOF
10766
10767else
10768
10769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
10770$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
10771if ${ac_cv_lib_rt_clock_gettime+:} false; then :
10772 $as_echo_n "(cached) " >&6
10773else
10774 ac_check_lib_save_LIBS=$LIBS
10775LIBS="-lrt $LIBS"
10776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10777/* end confdefs.h. */
10778
10779/* Override any GCC internal prototype to avoid an error.
10780 Use char because int might match the return type of a GCC
10781 builtin and then its argument prototype would still apply. */
10782#ifdef __cplusplus
10783extern "C"
10784#endif
10785char clock_gettime ();
10786int
10787main ()
10788{
10789return clock_gettime ();
10790 ;
10791 return 0;
10792}
10793_ACEOF
10794if ac_fn_c_try_link "$LINENO"; then :
10795 ac_cv_lib_rt_clock_gettime=yes
10796else
10797 ac_cv_lib_rt_clock_gettime=no
10798fi
10799rm -f core conftest.err conftest.$ac_objext \
10800 conftest$ac_exeext conftest.$ac_ext
10801LIBS=$ac_check_lib_save_LIBS
10802fi
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
10804$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
10805if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
10806
10807 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
10808
10809
10810$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
10811
10812
10813fi
10814
10815
10816fi
10817done
10818
10819
10820for ac_func in clock_getres
10821do :
10822 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
10823if test "x$ac_cv_func_clock_getres" = xyes; then :
10824 cat >>confdefs.h <<_ACEOF
10825#define HAVE_CLOCK_GETRES 1
10826_ACEOF
10827
10828else
10829
10830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
10831$as_echo_n "checking for clock_getres in -lrt... " >&6; }
10832if ${ac_cv_lib_rt_clock_getres+:} false; then :
10833 $as_echo_n "(cached) " >&6
10834else
10835 ac_check_lib_save_LIBS=$LIBS
10836LIBS="-lrt $LIBS"
10837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10838/* end confdefs.h. */
10839
10840/* Override any GCC internal prototype to avoid an error.
10841 Use char because int might match the return type of a GCC
10842 builtin and then its argument prototype would still apply. */
10843#ifdef __cplusplus
10844extern "C"
10845#endif
10846char clock_getres ();
10847int
10848main ()
10849{
10850return clock_getres ();
10851 ;
10852 return 0;
10853}
10854_ACEOF
10855if ac_fn_c_try_link "$LINENO"; then :
10856 ac_cv_lib_rt_clock_getres=yes
10857else
10858 ac_cv_lib_rt_clock_getres=no
10859fi
10860rm -f core conftest.err conftest.$ac_objext \
10861 conftest$ac_exeext conftest.$ac_ext
10862LIBS=$ac_check_lib_save_LIBS
10863fi
10864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
10865$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
10866if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
10867
10868 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
10869
10870
10871fi
10872
10873
10874fi
10875done
10876
10877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10879$as_echo_n "checking for major... " >&6; }
10880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010881/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010882
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010883#if defined(MAJOR_IN_MKDEV)
10884#include <sys/mkdev.h>
10885#elif defined(MAJOR_IN_SYSMACROS)
10886#include <sys/sysmacros.h>
10887#else
10888#include <sys/types.h>
10889#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010890
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010891int
10892main ()
10893{
10894
10895 makedev(major(0),minor(0));
10896
10897 ;
10898 return 0;
10899}
10900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010901if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010902
10903
Matthias Kloseb9621712010-04-24 17:59:49 +000010904$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010905
Matthias Kloseb9621712010-04-24 17:59:49 +000010906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10907$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010908
10909else
Skip Montanaro6dead952003-09-25 14:50:04 +000010910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10912$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010913
10914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010915rm -f core conftest.err conftest.$ac_objext \
10916 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010917
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010918# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010919# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10921$as_echo_n "checking for getaddrinfo... " >&6; }
10922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010923/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010924
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010925#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010926#include <sys/socket.h>
10927#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010928#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010929
Martin v. Löwis11437992002-04-12 09:54:03 +000010930int
10931main ()
10932{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010933getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010934 ;
10935 return 0;
10936}
10937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010938if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010939 have_getaddrinfo=yes
10940else
Matthias Kloseb9621712010-04-24 17:59:49 +000010941 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010943rm -f core conftest.err conftest.$ac_objext \
10944 conftest$ac_exeext conftest.$ac_ext
10945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10946$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010947if test $have_getaddrinfo = yes
10948then
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10950$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010951 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010953else
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010010955
10956if test "${enable_ipv6+set}" = set; then
10957 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
10958else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010959 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010010960fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010961else
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010963/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010964
10965#include <sys/types.h>
10966#include <netdb.h>
10967#include <string.h>
10968#include <sys/socket.h>
10969#include <netinet/in.h>
10970
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010971int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010972{
10973 int passive, gaierr, inet4 = 0, inet6 = 0;
10974 struct addrinfo hints, *ai, *aitop;
10975 char straddr[INET6_ADDRSTRLEN], strport[16];
10976
10977 for (passive = 0; passive <= 1; passive++) {
10978 memset(&hints, 0, sizeof(hints));
10979 hints.ai_family = AF_UNSPEC;
10980 hints.ai_flags = passive ? AI_PASSIVE : 0;
10981 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010982 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010983 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10984 (void)gai_strerror(gaierr);
10985 goto bad;
10986 }
10987 for (ai = aitop; ai; ai = ai->ai_next) {
10988 if (ai->ai_addr == NULL ||
10989 ai->ai_addrlen == 0 ||
10990 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10991 straddr, sizeof(straddr), strport, sizeof(strport),
10992 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10993 goto bad;
10994 }
10995 switch (ai->ai_family) {
10996 case AF_INET:
10997 if (strcmp(strport, "54321") != 0) {
10998 goto bad;
10999 }
11000 if (passive) {
11001 if (strcmp(straddr, "0.0.0.0") != 0) {
11002 goto bad;
11003 }
11004 } else {
11005 if (strcmp(straddr, "127.0.0.1") != 0) {
11006 goto bad;
11007 }
11008 }
11009 inet4++;
11010 break;
11011 case AF_INET6:
11012 if (strcmp(strport, "54321") != 0) {
11013 goto bad;
11014 }
11015 if (passive) {
11016 if (strcmp(straddr, "::") != 0) {
11017 goto bad;
11018 }
11019 } else {
11020 if (strcmp(straddr, "::1") != 0) {
11021 goto bad;
11022 }
11023 }
11024 inet6++;
11025 break;
11026 case AF_UNSPEC:
11027 goto bad;
11028 break;
11029 default:
11030 /* another family support? */
11031 break;
11032 }
11033 }
11034 }
11035
11036 if (!(inet4 == 0 || inet4 == 2))
11037 goto bad;
11038 if (!(inet6 == 0 || inet6 == 2))
11039 goto bad;
11040
11041 if (aitop)
11042 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011043 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011044
11045 bad:
11046 if (aitop)
11047 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011048 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011049}
11050
Martin v. Löwis11437992002-04-12 09:54:03 +000011051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011052if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011053 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011054else
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11058 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011060
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011061fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011062
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011064
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11066$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11067
Mark Dickinson2df5d282009-12-31 21:22:50 +000011068if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011069then
11070 if test $ipv6 = yes
11071 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011072 echo 'Fatal: You must get working getaddrinfo() function.'
11073 echo ' or you can specify "--disable-ipv6"'.
11074 exit 1
11075 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011076else
Martin v. Löwis11437992002-04-12 09:54:03 +000011077
Matthias Kloseb9621712010-04-24 17:59:49 +000011078$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011079
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011080fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011081
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011082for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011083do :
11084 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011085if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011086 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011087#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011088_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011089
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011090fi
11091done
11092
Michael W. Hudson54241132001-12-07 15:38:26 +000011093
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011094# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11096$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011097if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011099else
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011102#include <sys/types.h>
11103#include <sys/time.h>
11104#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011105
Martin v. Löwis11437992002-04-12 09:54:03 +000011106int
11107main ()
11108{
11109if ((struct tm *) 0)
11110return 0;
11111 ;
11112 return 0;
11113}
11114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011115if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011116 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011117else
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11123$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011124if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
Matthias Kloseb9621712010-04-24 17:59:49 +000011126$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011127
11128fi
11129
Matthias Kloseb9621712010-04-24 17:59:49 +000011130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11131$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011132if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011133 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011134else
Matthias Kloseb9621712010-04-24 17:59:49 +000011135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011136/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011137#include <sys/types.h>
11138#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011139
Martin v. Löwis11437992002-04-12 09:54:03 +000011140int
11141main ()
11142{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143struct tm tm;
11144 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011145 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 ;
11147 return 0;
11148}
11149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011150if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011151 ac_cv_struct_tm=time.h
11152else
Matthias Kloseb9621712010-04-24 17:59:49 +000011153 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11158$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011159if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011160
Matthias Kloseb9621712010-04-24 17:59:49 +000011161$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011162
11163fi
11164
Matthias Kloseb9621712010-04-24 17:59:49 +000011165ac_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 +000011166#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011167
Matthias Kloseb9621712010-04-24 17:59:49 +000011168"
Victor Stinnere0be4232011-10-25 13:06:09 +020011169if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011170
11171cat >>confdefs.h <<_ACEOF
11172#define HAVE_STRUCT_TM_TM_ZONE 1
11173_ACEOF
11174
11175
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011176fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011177
Martin v. Löwis11437992002-04-12 09:54:03 +000011178if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11179
Matthias Kloseb9621712010-04-24 17:59:49 +000011180$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011181
11182else
Matthias Kloseb9621712010-04-24 17:59:49 +000011183 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11184"
Victor Stinnere0be4232011-10-25 13:06:09 +020011185if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011187else
Matthias Kloseb9621712010-04-24 17:59:49 +000011188 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011189fi
11190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011191cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011192#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193_ACEOF
11194
Matthias Kloseb9621712010-04-24 17:59:49 +000011195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11196$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011197if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011198 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011199else
Matthias Kloseb9621712010-04-24 17:59:49 +000011200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011201/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011202#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011203#if !HAVE_DECL_TZNAME
11204extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011206
Martin v. Löwis11437992002-04-12 09:54:03 +000011207int
11208main ()
11209{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011210return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011211 ;
11212 return 0;
11213}
11214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011215if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011216 ac_cv_var_tzname=yes
11217else
Matthias Kloseb9621712010-04-24 17:59:49 +000011218 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011220rm -f core conftest.err conftest.$ac_objext \
11221 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11224$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011225 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011226
Matthias Kloseb9621712010-04-24 17:59:49 +000011227$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011228
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011229 fi
11230fi
11231
Matthias Kloseb9621712010-04-24 17:59:49 +000011232ac_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 +020011233if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011234
11235cat >>confdefs.h <<_ACEOF
11236#define HAVE_STRUCT_STAT_ST_RDEV 1
11237_ACEOF
11238
11239
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011240fi
11241
Matthias Kloseb9621712010-04-24 17:59:49 +000011242ac_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 +020011243if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011244
Martin v. Löwis11437992002-04-12 09:54:03 +000011245cat >>confdefs.h <<_ACEOF
11246#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11247_ACEOF
11248
11249
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011250fi
11251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252ac_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 +020011253if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011254
11255cat >>confdefs.h <<_ACEOF
11256#define HAVE_STRUCT_STAT_ST_FLAGS 1
11257_ACEOF
11258
11259
11260fi
11261
Matthias Kloseb9621712010-04-24 17:59:49 +000011262ac_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 +020011263if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011264
11265cat >>confdefs.h <<_ACEOF
11266#define HAVE_STRUCT_STAT_ST_GEN 1
11267_ACEOF
11268
11269
11270fi
11271
Matthias Kloseb9621712010-04-24 17:59:49 +000011272ac_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 +020011273if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011274
11275cat >>confdefs.h <<_ACEOF
11276#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11277_ACEOF
11278
11279
11280fi
11281
Matthias Kloseb9621712010-04-24 17:59:49 +000011282ac_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 +020011283if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011284
Martin v. Löwis11437992002-04-12 09:54:03 +000011285cat >>confdefs.h <<_ACEOF
11286#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11287_ACEOF
11288
11289
Matthias Kloseb9621712010-04-24 17:59:49 +000011290$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011291
11292else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011293 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011294 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11296 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011297esac
11298
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011299fi
11300
Michael W. Hudson54241132001-12-07 15:38:26 +000011301
Martin v. Löwis11437992002-04-12 09:54:03 +000011302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11304$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011305if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011307else
Matthias Kloseb159a552010-04-25 21:00:44 +000011308
Matthias Kloseb9621712010-04-24 17:59:49 +000011309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011310/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011311#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011312int
11313main ()
11314{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011315return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011316 ;
11317 return 0;
11318}
11319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011320if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321 ac_cv_header_time_altzone=yes
11322else
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011327fi
11328
Matthias Kloseb9621712010-04-24 17:59:49 +000011329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11330$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011331if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011334
11335fi
11336
Guido van Rossumda88dad1995-01-26 00:46:29 +000011337was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11339$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011341/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011342
11343#include <sys/types.h>
11344#include <sys/select.h>
11345#include <sys/time.h>
11346
Martin v. Löwis11437992002-04-12 09:54:03 +000011347int
11348main ()
11349{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011350;
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 ;
11352 return 0;
11353}
11354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011355if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011356
11357
Matthias Kloseb9621712010-04-24 17:59:49 +000011358$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011359
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011360 was_it_defined=yes
11361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11365$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366
Matthias Kloseb9621712010-04-24 17:59:49 +000011367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11368$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011369if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011370 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011371else
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011373/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011374#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011375int
11376main ()
11377{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011378struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 ;
11380 return 0;
11381}
11382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011384 ac_cv_struct_addrinfo=yes
11385else
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11389fi
11390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11392$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011393if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011394
Matthias Kloseb9621712010-04-24 17:59:49 +000011395$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011396
11397fi
11398
Matthias Kloseb9621712010-04-24 17:59:49 +000011399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11400$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011401if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011402 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011403else
Matthias Kloseb9621712010-04-24 17:59:49 +000011404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011405/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011406
11407# include <sys/types.h>
11408# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011409int
11410main ()
11411{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011412struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 ;
11414 return 0;
11415}
11416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011417if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011418 ac_cv_struct_sockaddr_storage=yes
11419else
Matthias Kloseb9621712010-04-24 17:59:49 +000011420 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11423fi
11424
Matthias Kloseb9621712010-04-24 17:59:49 +000011425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11426$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011427if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011428
Matthias Kloseb9621712010-04-24 17:59:49 +000011429$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011430
11431fi
11432
Guido van Rossum627b2d71993-12-24 10:39:16 +000011433# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011434
Matthias Kloseb9621712010-04-24 17:59:49 +000011435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11436$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011437if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011438 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011439else
Matthias Kloseb9621712010-04-24 17:59:49 +000011440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011442$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011443int
11444main ()
11445{
11446static int test_array [1 - 2 * !(((char) -1) < 0)];
11447test_array [0] = 0
11448
11449 ;
11450 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011451}
Martin v. Löwis11437992002-04-12 09:54:03 +000011452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011453if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011454 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011455else
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11461$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011462if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011464
11465fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011466
Matthias Kloseb9621712010-04-24 17:59:49 +000011467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11468$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011469if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011470 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011471else
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011473/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011474
Martin v. Löwis11437992002-04-12 09:54:03 +000011475int
11476main ()
11477{
11478/* FIXME: Include the comments suggested by Paul. */
11479#ifndef __cplusplus
11480 /* Ultrix mips cc rejects this. */
11481 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011482 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011483 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011484 char const *const *pcpcc;
11485 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 /* NEC SVR4.0.2 mips cc rejects this. */
11487 struct point {int x, y;};
11488 static struct point const zero = {0,0};
11489 /* AIX XL C 1.02.0.0 rejects this.
11490 It does not let you subtract one const X* pointer from another in
11491 an arm of an if-expression whose if-part is not a constant
11492 expression */
11493 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496 ++pcpcc;
11497 ppc = (char**) pcpcc;
11498 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 { /* SCO 3.2v4 cc rejects this. */
11500 char *t;
11501 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011502
Martin v. Löwis11437992002-04-12 09:54:03 +000011503 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 }
11506 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11507 int x[] = {25, 17};
11508 const int *foo = &x[0];
11509 ++foo;
11510 }
11511 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11512 typedef const int *iptr;
11513 iptr p = 0;
11514 ++p;
11515 }
11516 { /* AIX XL C 1.02.0.0 rejects this saying
11517 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11518 struct s { int j; const int *ap[3]; };
11519 struct s *b; b->j = 5;
11520 }
11521 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11522 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011523 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011526#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011527
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 ;
11529 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011530}
Martin v. Löwis11437992002-04-12 09:54:03 +000011531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011532if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011533 ac_cv_c_const=yes
11534else
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11540$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011541if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011542
Matthias Kloseb9621712010-04-24 17:59:49 +000011543$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011544
11545fi
11546
Michael W. Hudson54241132001-12-07 15:38:26 +000011547
Guido van Rossumda88dad1995-01-26 00:46:29 +000011548works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11550$as_echo_n "checking for working volatile... " >&6; }
11551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011552/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011553
Martin v. Löwis11437992002-04-12 09:54:03 +000011554int
11555main ()
11556{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011557volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011558 ;
11559 return 0;
11560}
11561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011562if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011563 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011564else
Skip Montanaro6dead952003-09-25 14:50:04 +000011565
Matthias Kloseb9621712010-04-24 17:59:49 +000011566$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011567
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011568
Guido van Rossum627b2d71993-12-24 10:39:16 +000011569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11572$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011573
Guido van Rossumda88dad1995-01-26 00:46:29 +000011574works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11576$as_echo_n "checking for working signed char... " >&6; }
11577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011578/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011579
Martin v. Löwis11437992002-04-12 09:54:03 +000011580int
11581main ()
11582{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011583signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 ;
11585 return 0;
11586}
11587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011588if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011589 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011590else
Skip Montanaro6dead952003-09-25 14:50:04 +000011591
Matthias Kloseb9621712010-04-24 17:59:49 +000011592$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011593
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011594
Guido van Rossum7f43da71994-08-01 12:15:30 +000011595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11598$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011599
Guido van Rossumda88dad1995-01-26 00:46:29 +000011600have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11602$as_echo_n "checking for prototypes... " >&6; }
11603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011604/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011605int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011606int
11607main ()
11608{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011609return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 ;
11611 return 0;
11612}
11613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011614if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011615
Matthias Kloseb9621712010-04-24 17:59:49 +000011616$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011617
Matthias Kloseb159a552010-04-25 21:00:44 +000011618 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11622$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011623
Guido van Rossumda88dad1995-01-26 00:46:29 +000011624works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11626$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011628/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011629
11630#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011631int foo(int x, ...) {
11632 va_list va;
11633 va_start(va, x);
11634 va_arg(va, int);
11635 va_arg(va, char *);
11636 va_arg(va, double);
11637 return 0;
11638}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011639
Martin v. Löwis11437992002-04-12 09:54:03 +000011640int
11641main ()
11642{
Guido van Rossum90eea071996-08-30 20:58:57 +000011643return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011644 ;
11645 return 0;
11646}
11647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011649
11650
Matthias Kloseb9621712010-04-24 17:59:49 +000011651$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011652
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011653 works=yes
11654
Guido van Rossum627b2d71993-12-24 10:39:16 +000011655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11658$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011659
Martin v. Löwisd6320502004-08-12 13:45:08 +000011660# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11662$as_echo_n "checking for socketpair... " >&6; }
11663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011664/* end confdefs.h. */
11665
11666#include <sys/types.h>
11667#include <sys/socket.h>
11668
11669int
11670main ()
11671{
11672void *x=socketpair
11673 ;
11674 return 0;
11675}
11676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011677if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011680
Matthias Kloseb159a552010-04-25 21:00:44 +000011681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011682$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011683else
Matthias Kloseb9621712010-04-24 17:59:49 +000011684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11685$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011686
11687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011689
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011690# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11692$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011694/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011695#include <sys/types.h>
11696#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011697int
11698main ()
11699{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011700struct sockaddr x;
11701x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011702 ;
11703 return 0;
11704}
11705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011706if ac_fn_c_try_compile "$LINENO"; then :
11707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11708$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011709
Matthias Kloseb9621712010-04-24 17:59:49 +000011710$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011711
11712else
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11714$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011715
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011718
Guido van Rossumda88dad1995-01-26 00:46:29 +000011719va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11721$as_echo_n "checking whether va_list is an array... " >&6; }
11722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011723/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011724
11725#ifdef HAVE_STDARG_PROTOTYPES
11726#include <stdarg.h>
11727#else
11728#include <varargs.h>
11729#endif
11730
Martin v. Löwis11437992002-04-12 09:54:03 +000011731int
11732main ()
11733{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011734va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011735 ;
11736 return 0;
11737}
11738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011739if ac_fn_c_try_compile "$LINENO"; then :
11740
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011741else
Skip Montanaro6dead952003-09-25 14:50:04 +000011742
Martin v. Löwis11437992002-04-12 09:54:03 +000011743
Matthias Kloseb9621712010-04-24 17:59:49 +000011744$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011745
Guido van Rossumda88dad1995-01-26 00:46:29 +000011746 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011747
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11751$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011752
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011753# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011754
11755
Matthias Kloseb9621712010-04-24 17:59:49 +000011756ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020011757if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011758
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011760
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11762$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011763 OLD_CFLAGS=$CFLAGS
11764 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011766/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011767
11768# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011769
Martin v. Löwis11437992002-04-12 09:54:03 +000011770int
11771main ()
11772{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011773
11774 char *name;
11775 struct hostent *he, *res;
11776 char buffer[2048];
11777 int buflen = 2048;
11778 int h_errnop;
11779
11780 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011781
11782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011787
Matthias Kloseb9621712010-04-24 17:59:49 +000011788 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011789
Martin v. Löwis11437992002-04-12 09:54:03 +000011790
Matthias Kloseb9621712010-04-24 17:59:49 +000011791$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011792
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11794$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011795
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011796else
Skip Montanaro6dead952003-09-25 14:50:04 +000011797
Matthias Kloseb9621712010-04-24 17:59:49 +000011798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11799$as_echo "no" >&6; }
11800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11801$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011803/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011804
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011805# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011806
Martin v. Löwis11437992002-04-12 09:54:03 +000011807int
11808main ()
11809{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011810
11811 char *name;
11812 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011813 char buffer[2048];
11814 int buflen = 2048;
11815 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011816
Matthias Kloseb159a552010-04-25 21:00:44 +000011817 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011818
11819 ;
11820 return 0;
11821}
11822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011823if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011824
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011826
Martin v. Löwis11437992002-04-12 09:54:03 +000011827
Matthias Kloseb159a552010-04-25 21:00:44 +000011828$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011829
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11831$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011832
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011833else
Skip Montanaro6dead952003-09-25 14:50:04 +000011834
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11836$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11838$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11840/* end confdefs.h. */
11841
11842# include <netdb.h>
11843
11844int
11845main ()
11846{
11847
11848 char *name;
11849 struct hostent *he;
11850 struct hostent_data data;
11851
11852 (void) gethostbyname_r(name, he, &data);
11853
11854 ;
11855 return 0;
11856}
11857_ACEOF
11858if ac_fn_c_try_compile "$LINENO"; then :
11859
11860 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11861
11862
11863$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11864
11865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11866$as_echo "yes" >&6; }
11867
11868else
11869
11870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11871$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011872
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011875
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011878
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011881 CFLAGS=$OLD_CFLAGS
11882
11883else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 for ac_func in gethostbyname
11886do :
11887 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020011888if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011889 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011890#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011891_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011892
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011893fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011894done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011895
Michael W. Hudson54241132001-12-07 15:38:26 +000011896
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011897fi
11898
Michael W. Hudson54241132001-12-07 15:38:26 +000011899
11900
11901
11902
11903
11904
Guido van Rossum627b2d71993-12-24 10:39:16 +000011905# checks for system services
11906# (none yet)
11907
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011908# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011909ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020011910if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011911
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011912else
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11914$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011915if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011916 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011917else
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011919LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011921/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011923/* Override any GCC internal prototype to avoid an error.
11924 Use char because int might match the return type of a GCC
11925 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011926#ifdef __cplusplus
11927extern "C"
11928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011929char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011930int
11931main ()
11932{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011933return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011934 ;
11935 return 0;
11936}
11937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011938if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011939 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011940else
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011943rm -f core conftest.err conftest.$ac_objext \
11944 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011945LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11948$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011949if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011950 cat >>confdefs.h <<_ACEOF
11951#define HAVE_LIBIEEE 1
11952_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011953
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011954 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011955
Guido van Rossum627b2d71993-12-24 10:39:16 +000011956fi
11957
Michael W. Hudson54241132001-12-07 15:38:26 +000011958
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011959fi
11960
Michael W. Hudson54241132001-12-07 15:38:26 +000011961
Guido van Rossum7f253911997-05-09 02:42:48 +000011962# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11964$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011966# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011967if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011968 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011969if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011970then
11971
Matthias Kloseb9621712010-04-24 17:59:49 +000011972$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011973
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11975$as_echo "yes" >&6; }
11976else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11977$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011978fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011979else
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11981$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982fi
11983
Guido van Rossum7f253911997-05-09 02:42:48 +000011984
Guido van Rossum7f43da71994-08-01 12:15:30 +000011985# check for --with-libm=...
11986
Guido van Rossum563e7081996-09-10 18:20:48 +000011987case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011988Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011989*) LIBM=-lm
11990esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11992$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011994# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011995if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011996 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011997if test "$withval" = no
11998then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12000$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012001elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012002then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12004$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012005else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012006fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012007else
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12009$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012010fi
12011
Guido van Rossum7f43da71994-08-01 12:15:30 +000012012
12013# check for --with-libc=...
12014
Matthias Kloseb9621712010-04-24 17:59:49 +000012015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12016$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012018# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012019if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012020 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012021if test "$withval" = no
12022then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12024$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012025elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012026then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12028$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012029else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012030fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012031else
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12033$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012034fi
12035
Guido van Rossum7f43da71994-08-01 12:15:30 +000012036
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012037# **************************************************
12038# * Check for various properties of floating point *
12039# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012040
Matthias Kloseb9621712010-04-24 17:59:49 +000012041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12042$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012043if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012044 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012045else
12046
Matthias Kloseb9621712010-04-24 17:59:49 +000012047if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012048 ac_cv_little_endian_double=no
12049else
Matthias Kloseb9621712010-04-24 17:59:49 +000012050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012051/* end confdefs.h. */
12052
12053#include <string.h>
12054int main() {
12055 double x = 9006104071832581.0;
12056 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12057 return 0;
12058 else
12059 return 1;
12060}
12061
12062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012063if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012064 ac_cv_little_endian_double=yes
12065else
Matthias Kloseb9621712010-04-24 17:59:49 +000012066 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12069 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012070fi
12071
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012072fi
12073
Matthias Kloseb9621712010-04-24 17:59:49 +000012074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12075$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012076if test "$ac_cv_little_endian_double" = yes
12077then
12078
Matthias Kloseb9621712010-04-24 17:59:49 +000012079$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012080
12081fi
12082
Matthias Kloseb9621712010-04-24 17:59:49 +000012083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12084$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012085if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012087else
12088
Matthias Kloseb9621712010-04-24 17:59:49 +000012089if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012090 ac_cv_big_endian_double=no
12091else
Matthias Kloseb9621712010-04-24 17:59:49 +000012092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012093/* end confdefs.h. */
12094
12095#include <string.h>
12096int main() {
12097 double x = 9006104071832581.0;
12098 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12099 return 0;
12100 else
12101 return 1;
12102}
12103
12104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012105if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012106 ac_cv_big_endian_double=yes
12107else
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12111 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012112fi
12113
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012114fi
12115
Matthias Kloseb9621712010-04-24 17:59:49 +000012116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12117$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012118if test "$ac_cv_big_endian_double" = yes
12119then
12120
Matthias Kloseb9621712010-04-24 17:59:49 +000012121$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012122
12123fi
12124
12125# Some ARM platforms use a mixed-endian representation for doubles.
12126# While Python doesn't currently have full support for these platforms
12127# (see e.g., issue 1762561), we can at least make sure that float <-> string
12128# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12130$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012131if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012133else
12134
Matthias Kloseb9621712010-04-24 17:59:49 +000012135if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012136 ac_cv_mixed_endian_double=no
12137else
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012139/* end confdefs.h. */
12140
12141#include <string.h>
12142int main() {
12143 double x = 9006104071832581.0;
12144 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12145 return 0;
12146 else
12147 return 1;
12148}
12149
12150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012152 ac_cv_mixed_endian_double=yes
12153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012158fi
12159
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012160fi
12161
Matthias Kloseb9621712010-04-24 17:59:49 +000012162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12163$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012164if test "$ac_cv_mixed_endian_double" = yes
12165then
12166
Matthias Kloseb9621712010-04-24 17:59:49 +000012167$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012168
12169fi
12170
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012171# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012172# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012173# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012174# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012175# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012176# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012177
12178# This inline assembler syntax may also work for suncc and icc,
12179# so we try it on all platforms.
12180
Matthias Kloseb9621712010-04-24 17:59:49 +000012181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12182$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012184/* end confdefs.h. */
12185
12186int
12187main ()
12188{
12189
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012190 unsigned short cw;
12191 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12192 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012193
12194 ;
12195 return 0;
12196}
12197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012198if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012199 have_gcc_asm_for_x87=yes
12200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012202fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12205$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012206if test "$have_gcc_asm_for_x87" = yes
12207then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012208
Matthias Kloseb9621712010-04-24 17:59:49 +000012209$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012210
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012211fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012212
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012213# Detect whether system arithmetic is subject to x87-style double
12214# rounding issues. The result of this test has little meaning on non
12215# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12216# mode is round-to-nearest and double rounding issues are present, and
12217# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12219$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012220# $BASECFLAGS may affect the result
12221ac_save_cc="$CC"
12222CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012223if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012224 ac_cv_x87_double_rounding=no
12225else
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012227/* end confdefs.h. */
12228
12229#include <stdlib.h>
12230#include <math.h>
12231int main() {
12232 volatile double x, y, z;
12233 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12234 x = 0.99999999999999989; /* 1-2**-53 */
12235 y = 1./x;
12236 if (y != 1.)
12237 exit(0);
12238 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12239 x = 1e16;
12240 y = 2.99999;
12241 z = x + y;
12242 if (z != 1e16+4.)
12243 exit(0);
12244 /* both tests show evidence of double rounding */
12245 exit(1);
12246}
12247
12248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012249if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012250 ac_cv_x87_double_rounding=no
12251else
Matthias Kloseb9621712010-04-24 17:59:49 +000012252 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12255 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012256fi
12257
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012258CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12260$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012261if test "$ac_cv_x87_double_rounding" = yes
12262then
12263
Matthias Kloseb9621712010-04-24 17:59:49 +000012264$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012265
12266fi
12267
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012268# ************************************
12269# * Check for mathematical functions *
12270# ************************************
12271
12272LIBS_SAVE=$LIBS
12273LIBS="$LIBS $LIBM"
12274
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012275for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12276do :
12277 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12278ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012279if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012280 cat >>confdefs.h <<_ACEOF
12281#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12282_ACEOF
12283
12284fi
12285done
12286
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012287for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012288do :
12289 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12290ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012291if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012292 cat >>confdefs.h <<_ACEOF
12293#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12294_ACEOF
12295
12296fi
12297done
12298
12299ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12300"
Victor Stinnere0be4232011-10-25 13:06:09 +020012301if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012302 ac_have_decl=1
12303else
12304 ac_have_decl=0
12305fi
12306
12307cat >>confdefs.h <<_ACEOF
12308#define HAVE_DECL_ISINF $ac_have_decl
12309_ACEOF
12310ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12311"
Victor Stinnere0be4232011-10-25 13:06:09 +020012312if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012313 ac_have_decl=1
12314else
12315 ac_have_decl=0
12316fi
12317
12318cat >>confdefs.h <<_ACEOF
12319#define HAVE_DECL_ISNAN $ac_have_decl
12320_ACEOF
12321ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12322"
Victor Stinnere0be4232011-10-25 13:06:09 +020012323if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012324 ac_have_decl=1
12325else
12326 ac_have_decl=0
12327fi
12328
12329cat >>confdefs.h <<_ACEOF
12330#define HAVE_DECL_ISFINITE $ac_have_decl
12331_ACEOF
12332
12333
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012334# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12335# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12337$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012338if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012339 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012340else
12341
Matthias Kloseb9621712010-04-24 17:59:49 +000012342if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012343 ac_cv_tanh_preserves_zero_sign=no
12344else
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012346/* end confdefs.h. */
12347
12348#include <math.h>
12349#include <stdlib.h>
12350int main() {
12351 /* return 0 if either negative zeros don't exist
12352 on this platform or if negative zeros exist
12353 and tanh(-0.) == -0. */
12354 if (atan2(0., -1.) == atan2(-0., -1.) ||
12355 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12356 else exit(1);
12357}
12358
12359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012360if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012361 ac_cv_tanh_preserves_zero_sign=yes
12362else
Matthias Kloseb9621712010-04-24 17:59:49 +000012363 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12366 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012367fi
12368
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012369fi
12370
Matthias Kloseb9621712010-04-24 17:59:49 +000012371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12372$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012373if test "$ac_cv_tanh_preserves_zero_sign" = yes
12374then
12375
Matthias Kloseb9621712010-04-24 17:59:49 +000012376$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012377
12378fi
12379
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012380if test "$ac_cv_func_log1p" = yes
12381then
12382 # On some versions of AIX, log1p(-0.) returns 0. instead of
12383 # -0. See issue #9920.
12384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12385$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012386 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012387 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012388else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012389
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012390 if test "$cross_compiling" = yes; then :
12391 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012392else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12394/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012395
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012396 #include <math.h>
12397 #include <stdlib.h>
12398 int main() {
12399 /* Fail if the signs of log1p(-0.) and -0. can be
12400 distinguished. */
12401 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12402 return 0;
12403 else
12404 return 1;
12405 }
12406
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012407_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012408if ac_fn_c_try_run "$LINENO"; then :
12409 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012410else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012411 ac_cv_log1p_drops_zero_sign=yes
12412fi
12413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12414 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012415fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012416
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012417fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012418
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12420$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12421fi
12422if test "$ac_cv_log1p_drops_zero_sign" = yes
12423then
12424
12425$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12426
12427fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012428
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012429LIBS=$LIBS_SAVE
12430
Mark Dickinsona614f042009-11-28 12:48:43 +000012431# For multiprocessing module, check that sem_open
12432# actually works. For FreeBSD versions <= 7.2,
12433# the kernel module that provides POSIX semaphores
12434# isn't loaded by default, so an attempt to call
12435# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12437$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012438if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012440else
Matthias Kloseb9621712010-04-24 17:59:49 +000012441 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012442 ac_cv_posix_semaphores_enabled=yes
12443else
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012445/* end confdefs.h. */
12446
12447#include <unistd.h>
12448#include <fcntl.h>
12449#include <stdio.h>
12450#include <semaphore.h>
12451#include <sys/stat.h>
12452
12453int main(void) {
12454 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12455 if (a == SEM_FAILED) {
12456 perror("sem_open");
12457 return 1;
12458 }
12459 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012460 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012461 return 0;
12462}
12463
12464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012465if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012466 ac_cv_posix_semaphores_enabled=yes
12467else
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012470rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12471 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012472fi
12473
12474
Mark Dickinsona614f042009-11-28 12:48:43 +000012475fi
12476
Matthias Kloseb9621712010-04-24 17:59:49 +000012477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12478$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012479if test $ac_cv_posix_semaphores_enabled = no
12480then
12481
Matthias Kloseb9621712010-04-24 17:59:49 +000012482$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012483
12484fi
12485
Mark Dickinson10683072009-04-18 21:18:19 +000012486# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12488$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012489if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012491else
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012493 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012494else
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012496/* end confdefs.h. */
12497
12498#include <unistd.h>
12499#include <fcntl.h>
12500#include <stdio.h>
12501#include <semaphore.h>
12502#include <sys/stat.h>
12503
12504int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012505 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012506 int count;
12507 int res;
12508 if(a==SEM_FAILED){
12509 perror("sem_open");
12510 return 1;
12511
12512 }
12513 res = sem_getvalue(a, &count);
12514 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012515 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012516 return res==-1 ? 1 : 0;
12517}
12518
Mark Dickinson10683072009-04-18 21:18:19 +000012519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012520if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012521 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012522else
Matthias Kloseb9621712010-04-24 17:59:49 +000012523 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12526 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012527fi
12528
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012529
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012530fi
12531
Matthias Kloseb9621712010-04-24 17:59:49 +000012532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12533$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012534if test $ac_cv_broken_sem_getvalue = yes
12535then
12536
Matthias Kloseb9621712010-04-24 17:59:49 +000012537$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012538
12539fi
12540
Mark Dickinsonbd792642009-03-18 20:06:12 +000012541# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12543$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012544# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012545if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012546 enableval=$enable_big_digits; case $enable_big_digits in
12547yes)
12548 enable_big_digits=30 ;;
12549no)
12550 enable_big_digits=15 ;;
1255115|30)
12552 ;;
12553*)
Victor Stinnere0be4232011-10-25 13:06:09 +020012554 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 +000012555esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12557$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012558
12559cat >>confdefs.h <<_ACEOF
12560#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12561_ACEOF
12562
12563
12564else
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12566$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012567fi
12568
12569
Guido van Rossumef2255b2000-03-10 22:30:29 +000012570# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012571ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012572if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012573
12574
Matthias Kloseb9621712010-04-24 17:59:49 +000012575$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012576
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012577 wchar_h="yes"
12578
Guido van Rossumef2255b2000-03-10 22:30:29 +000012579else
Martin v. Löwis11437992002-04-12 09:54:03 +000012580 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012581
12582fi
12583
Michael W. Hudson54241132001-12-07 15:38:26 +000012584
Martin v. Löwis11437992002-04-12 09:54:03 +000012585
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012586# determine wchar_t size
12587if test "$wchar_h" = yes
12588then
Matthias Kloseb9621712010-04-24 17:59:49 +000012589 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12592# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12594$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012595if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012597else
Matthias Kloseb9621712010-04-24 17:59:49 +000012598 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12599"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012600
Martin v. Löwis11437992002-04-12 09:54:03 +000012601else
Matthias Kloseb9621712010-04-24 17:59:49 +000012602 if test "$ac_cv_type_wchar_t" = yes; then
12603 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12604$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012605as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020012606See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012607 else
12608 ac_cv_sizeof_wchar_t=0
12609 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012611
Martin v. Löwis11437992002-04-12 09:54:03 +000012612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12614$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012615
12616
12617
Martin v. Löwis11437992002-04-12 09:54:03 +000012618cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012619#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012620_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012621
Michael W. Hudson54241132001-12-07 15:38:26 +000012622
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012623fi
12624
Matthias Kloseb9621712010-04-24 17:59:49 +000012625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12626$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012627have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012629/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012630
12631#include <tcl.h>
12632#if TCL_UTF_MAX != 6
12633# error "NOT UCS4_TCL"
12634#endif
12635int
12636main ()
12637{
12638
12639 ;
12640 return 0;
12641}
12642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012643if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012644
12645
Matthias Kloseb9621712010-04-24 17:59:49 +000012646$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012647
12648 have_ucs4_tcl=yes
12649
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12653$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012654
Skip Montanaro6dead952003-09-25 14:50:04 +000012655# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012656if test "$wchar_h" = yes
12657then
12658 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12660$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012661 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012662 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012663else
12664
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012666 ac_cv_wchar_t_signed=yes
12667else
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012669/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012670
12671 #include <wchar.h>
12672 int main()
12673 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012674 /* Success: exit code 0 */
12675 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012676 }
12677
12678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012679if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012680 ac_cv_wchar_t_signed=yes
12681else
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12685 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012686fi
12687
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012688fi
12689
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12691$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012692fi
12693
Georg Brandl52d168a2008-01-07 18:10:24 +000012694# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012695if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012696 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012697then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012698 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012699
Matthias Kloseb9621712010-04-24 17:59:49 +000012700$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012701
Georg Brandl52d168a2008-01-07 18:10:24 +000012702else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012703 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012704fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
12706$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012707
12708# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12710$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012711if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012713else
Matthias Kloseb9621712010-04-24 17:59:49 +000012714 ac_cv_c_bigendian=unknown
12715 # See if we're dealing with a universal compiler.
12716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12717/* end confdefs.h. */
12718#ifndef __APPLE_CC__
12719 not a universal capable compiler
12720 #endif
12721 typedef int dummy;
12722
Skip Montanaro6dead952003-09-25 14:50:04 +000012723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012724if ac_fn_c_try_compile "$LINENO"; then :
12725
12726 # Check for potential -arch flags. It is not universal unless
12727 # there are at least two -arch flags with different values.
12728 ac_arch=
12729 ac_prev=
12730 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12731 if test -n "$ac_prev"; then
12732 case $ac_word in
12733 i?86 | x86_64 | ppc | ppc64)
12734 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12735 ac_arch=$ac_word
12736 else
12737 ac_cv_c_bigendian=universal
12738 break
12739 fi
12740 ;;
12741 esac
12742 ac_prev=
12743 elif test "x$ac_word" = "x-arch"; then
12744 ac_prev=arch
12745 fi
12746 done
12747fi
12748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12749 if test $ac_cv_c_bigendian = unknown; then
12750 # See if sys/param.h defines the BYTE_ORDER macro.
12751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012752/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012753#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012754 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012755
Martin v. Löwis11437992002-04-12 09:54:03 +000012756int
12757main ()
12758{
Matthias Kloseb9621712010-04-24 17:59:49 +000012759#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12760 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12761 && LITTLE_ENDIAN)
12762 bogus endian macros
12763 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012764
12765 ;
12766 return 0;
12767}
12768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012769if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012770 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012772/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012773#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012775
Martin v. Löwis11437992002-04-12 09:54:03 +000012776int
12777main ()
12778{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012779#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 not big endian
12781 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012782
12783 ;
12784 return 0;
12785}
12786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012787if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012788 ac_cv_c_bigendian=yes
12789else
Matthias Kloseb9621712010-04-24 17:59:49 +000012790 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012793fi
12794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12795 fi
12796 if test $ac_cv_c_bigendian = unknown; then
12797 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012799/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012800#include <limits.h>
12801
Martin v. Löwis11437992002-04-12 09:54:03 +000012802int
12803main ()
12804{
Matthias Kloseb9621712010-04-24 17:59:49 +000012805#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12806 bogus endian macros
12807 #endif
12808
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 ;
12810 return 0;
12811}
12812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012813if ac_fn_c_try_compile "$LINENO"; then :
12814 # It does; now see whether it defined to _BIG_ENDIAN or not.
12815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12816/* end confdefs.h. */
12817#include <limits.h>
12818
12819int
12820main ()
12821{
12822#ifndef _BIG_ENDIAN
12823 not big endian
12824 #endif
12825
12826 ;
12827 return 0;
12828}
12829_ACEOF
12830if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012831 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012832else
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12836fi
12837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12838 fi
12839 if test $ac_cv_c_bigendian = unknown; then
12840 # Compile a test program.
12841 if test "$cross_compiling" = yes; then :
12842 # Try to guess by grepping values from an object file.
12843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12844/* end confdefs.h. */
12845short int ascii_mm[] =
12846 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12847 short int ascii_ii[] =
12848 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12849 int use_ascii (int i) {
12850 return ascii_mm[i] + ascii_ii[i];
12851 }
12852 short int ebcdic_ii[] =
12853 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12854 short int ebcdic_mm[] =
12855 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12856 int use_ebcdic (int i) {
12857 return ebcdic_mm[i] + ebcdic_ii[i];
12858 }
12859 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012860
Matthias Kloseb9621712010-04-24 17:59:49 +000012861int
12862main ()
12863{
12864return use_ascii (foo) == use_ebcdic (foo);
12865 ;
12866 return 0;
12867}
12868_ACEOF
12869if ac_fn_c_try_compile "$LINENO"; then :
12870 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12871 ac_cv_c_bigendian=yes
12872 fi
12873 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12874 if test "$ac_cv_c_bigendian" = unknown; then
12875 ac_cv_c_bigendian=no
12876 else
12877 # finding both strings is unlikely to happen, but who knows?
12878 ac_cv_c_bigendian=unknown
12879 fi
12880 fi
12881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012883else
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012885/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012887int
12888main ()
12889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 /* Are we little or big endian? From Harbison&Steele. */
12892 union
12893 {
12894 long int l;
12895 char c[sizeof (long int)];
12896 } u;
12897 u.l = 1;
12898 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899
12900 ;
12901 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012902}
Martin v. Löwis11437992002-04-12 09:54:03 +000012903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012904if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012905 ac_cv_c_bigendian=no
12906else
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012912
Matthias Kloseb9621712010-04-24 17:59:49 +000012913 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12916$as_echo "$ac_cv_c_bigendian" >&6; }
12917 case $ac_cv_c_bigendian in #(
12918 yes)
12919 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12920;; #(
12921 no)
12922 ;; #(
12923 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012924
Matthias Kloseb9621712010-04-24 17:59:49 +000012925$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 ;; #(
12928 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012929 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020012930 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012932
Michael W. Hudson54241132001-12-07 15:38:26 +000012933
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012934# ABI version string for Python extension modules. This appears between the
12935# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12936# from the following attributes which affect the ABI of this Python build (in
12937# this order):
12938#
12939# * The Python implementation (always 'cpython-' for us)
12940# * The major and minor version numbers
12941# * --with-pydebug (adds a 'd')
12942# * --with-pymalloc (adds a 'm')
12943# * --with-wide-unicode (adds a 'u')
12944#
12945# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012946# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12947# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012948
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12950$as_echo_n "checking ABIFLAGS... " >&6; }
12951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12952$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12954$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012955SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12957$as_echo "$SOABI" >&6; }
12958
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12960$as_echo_n "checking LDVERSION... " >&6; }
12961LDVERSION='$(VERSION)$(ABIFLAGS)'
12962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12963$as_echo "$LDVERSION" >&6; }
12964
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012965# SO is the extension of shared libraries `(including the dot!)
12966# -- usually .so, .sl on HP-UX, .dll on Cygwin
12967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12968$as_echo_n "checking SO... " >&6; }
12969if test -z "$SO"
12970then
12971 case $ac_sys_system in
12972 hp*|HP*)
12973 case `uname -m` in
12974 ia64) SO=.so;;
12975 *) SO=.sl;;
12976 esac
12977 ;;
12978 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012979 Linux*|GNU*)
12980 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012981 *) SO=.so;;
12982 esac
12983else
12984 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012985 echo
12986 echo '====================================================================='
12987 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012988 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012989 echo '+ Do you really mean to change the extension for shared libraries? +'
12990 echo '+ Continuing in 10 seconds to let you to ponder. +'
12991 echo '+ +'
12992 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012993 sleep 10
12994fi
12995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12996$as_echo "$SO" >&6; }
12997
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012998# Check whether right shifting a negative integer extends the sign bit
12999# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13001$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013002if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013003 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013004else
Martin v. Löwis11437992002-04-12 09:54:03 +000013005
Matthias Kloseb9621712010-04-24 17:59:49 +000013006if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013007 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013008else
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013010/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013011
13012int main()
13013{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013014 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013015}
13016
Martin v. Löwis11437992002-04-12 09:54:03 +000013017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013018if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013019 ac_cv_rshift_extends_sign=yes
13020else
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13024 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013025fi
13026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013027fi
13028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13030$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013031if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013032then
Martin v. Löwis11437992002-04-12 09:54:03 +000013033
Matthias Kloseb9621712010-04-24 17:59:49 +000013034$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013035
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013036fi
13037
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013038# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13040$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013041if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013043else
Martin v. Löwis11437992002-04-12 09:54:03 +000013044
Matthias Kloseb9621712010-04-24 17:59:49 +000013045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013046/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013047#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013048int
13049main ()
13050{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013051
13052 FILE *f = fopen("/dev/null", "r");
13053 flockfile(f);
13054 getc_unlocked(f);
13055 funlockfile(f);
13056
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 ;
13058 return 0;
13059}
13060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013061if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013062 ac_cv_have_getc_unlocked=yes
13063else
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 ac_cv_have_getc_unlocked=no
13065fi
13066rm -f core conftest.err conftest.$ac_objext \
13067 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069
Matthias Kloseb9621712010-04-24 17:59:49 +000013070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13071$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013072if test "$ac_cv_have_getc_unlocked" = yes
13073then
Martin v. Löwis11437992002-04-12 09:54:03 +000013074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013076
13077fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013078
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013079# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013080# save the value of LIBS so we don't actually link Python with readline
13081LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013082
Gregory P. Smith18820942008-09-07 06:24:49 +000013083# On some systems we need to link readline to a termcap compatible
13084# library. NOTE: Keep the precedence of listed libraries synchronised
13085# with setup.py.
13086py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13088$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013089for py_libtermcap in "" ncursesw ncurses curses termcap; do
13090 if test -z "$py_libtermcap"; then
13091 READLINE_LIBS="-lreadline"
13092 else
13093 READLINE_LIBS="-lreadline -l$py_libtermcap"
13094 fi
13095 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013097/* end confdefs.h. */
13098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013099/* Override any GCC internal prototype to avoid an error.
13100 Use char because int might match the return type of a GCC
13101 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013102#ifdef __cplusplus
13103extern "C"
13104#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013105char readline ();
13106int
13107main ()
13108{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013109return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013110 ;
13111 return 0;
13112}
13113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013114if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013115 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013117rm -f core conftest.err conftest.$ac_objext \
13118 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013119 if test $py_cv_lib_readline = yes; then
13120 break
13121 fi
13122done
13123# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13124#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013125if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13127$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013128else
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13130$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013133
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013134fi
13135
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013136# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13138$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013139if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013140 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013141else
13142 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013143LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013145/* end confdefs.h. */
13146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013147/* Override any GCC internal prototype to avoid an error.
13148 Use char because int might match the return type of a GCC
13149 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013150#ifdef __cplusplus
13151extern "C"
13152#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013153char rl_callback_handler_install ();
13154int
13155main ()
13156{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013157return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013158 ;
13159 return 0;
13160}
13161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013162if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013163 ac_cv_lib_readline_rl_callback_handler_install=yes
13164else
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013167rm -f core conftest.err conftest.$ac_objext \
13168 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013169LIBS=$ac_check_lib_save_LIBS
13170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13172$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013173if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013174
Matthias Kloseb9621712010-04-24 17:59:49 +000013175$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013176
13177fi
13178
13179
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013180# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013182/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013183#include <readline/readline.h>
13184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013185if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013186 have_readline=yes
13187else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013188 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013189
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013190fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013191rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013192if test $have_readline = yes
13193then
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013195/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013196#include <readline/readline.h>
13197
13198_ACEOF
13199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013200 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013203
13204fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013205rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013208/* end confdefs.h. */
13209#include <readline/readline.h>
13210
13211_ACEOF
13212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013213 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013216
13217fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013218rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013219
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013220fi
13221
Martin v. Löwis0daad592001-09-30 21:09:59 +000013222# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13224$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013225if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013227else
Martin v. Löwis11437992002-04-12 09:54:03 +000013228 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013229LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013231/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013233/* Override any GCC internal prototype to avoid an error.
13234 Use char because int might match the return type of a GCC
13235 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013236#ifdef __cplusplus
13237extern "C"
13238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013239char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013240int
13241main ()
13242{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013243return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013244 ;
13245 return 0;
13246}
13247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013248if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013249 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013250else
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013253rm -f core conftest.err conftest.$ac_objext \
13254 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013255LIBS=$ac_check_lib_save_LIBS
13256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13258$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013259if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013260
Matthias Kloseb9621712010-04-24 17:59:49 +000013261$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013262
Martin v. Löwis0daad592001-09-30 21:09:59 +000013263fi
13264
Michael W. Hudson54241132001-12-07 15:38:26 +000013265
Thomas Wouters89d996e2007-09-08 17:39:28 +000013266# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13268$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013269if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013271else
13272 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013273LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013275/* end confdefs.h. */
13276
13277/* Override any GCC internal prototype to avoid an error.
13278 Use char because int might match the return type of a GCC
13279 builtin and then its argument prototype would still apply. */
13280#ifdef __cplusplus
13281extern "C"
13282#endif
13283char rl_completion_display_matches_hook ();
13284int
13285main ()
13286{
13287return rl_completion_display_matches_hook ();
13288 ;
13289 return 0;
13290}
13291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013292if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013293 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13294else
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013297rm -f core conftest.err conftest.$ac_objext \
13298 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013299LIBS=$ac_check_lib_save_LIBS
13300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13302$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013303if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013304
Matthias Kloseb9621712010-04-24 17:59:49 +000013305$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013306
13307fi
13308
13309
Martin v. Löwis0daad592001-09-30 21:09:59 +000013310# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13312$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013313if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013315else
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013317LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013321/* Override any GCC internal prototype to avoid an error.
13322 Use char because int might match the return type of a GCC
13323 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013324#ifdef __cplusplus
13325extern "C"
13326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013327char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013328int
13329main ()
13330{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013332 ;
13333 return 0;
13334}
13335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013336if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013337 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013338else
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013341rm -f core conftest.err conftest.$ac_objext \
13342 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013343LIBS=$ac_check_lib_save_LIBS
13344fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13346$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013347if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013350
Guido van Rossum353ae582001-07-10 16:45:32 +000013351fi
13352
Jack Jansendd19cf82001-12-06 22:36:17 +000013353
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013354# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013356/* end confdefs.h. */
13357#include <readline/readline.h>
13358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013359if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013360 have_readline=yes
13361else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013362 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013363
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013364fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013365rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013366if test $have_readline = yes
13367then
Matthias Kloseb9621712010-04-24 17:59:49 +000013368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013369/* end confdefs.h. */
13370#include <readline/readline.h>
13371
13372_ACEOF
13373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013377
13378fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013379rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013380
13381fi
13382
Martin v. Löwis82bca632006-02-10 20:49:30 +000013383# End of readline checks: restore LIBS
13384LIBS=$LIBS_no_readline
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13387$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013388if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013390else
Martin v. Löwis11437992002-04-12 09:54:03 +000013391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013393 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013396/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013397
13398int main()
13399{
13400 int val1 = nice(1);
13401 if (val1 != -1 && val1 == nice(2))
13402 exit(0);
13403 exit(1);
13404}
13405
Martin v. Löwis11437992002-04-12 09:54:03 +000013406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013407if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013408 ac_cv_broken_nice=yes
13409else
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13413 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013414fi
13415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013416fi
13417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13419$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013420if test "$ac_cv_broken_nice" = yes
13421then
Martin v. Löwis11437992002-04-12 09:54:03 +000013422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013424
13425fi
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13428$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013429if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013431else
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013433 ac_cv_broken_poll=no
13434else
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013436/* end confdefs.h. */
13437
13438#include <poll.h>
13439
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013440int main()
13441{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013442 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013443 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013444
13445 close (42);
13446
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013447 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013448 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013449 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013450 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013451 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013452 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013453 return 1;
13454}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013455
13456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013457if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013458 ac_cv_broken_poll=yes
13459else
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13463 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013465
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013466fi
13467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13469$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013470if test "$ac_cv_broken_poll" = yes
13471then
13472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013474
13475fi
13476
Brett Cannon43802422005-02-10 20:48:03 +000013477# 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 +000013478# (which is not required by ISO C or UNIX spec) and/or if we support
13479# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013480ac_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 +000013481#include <$ac_cv_struct_tm>
13482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483"
Victor Stinnere0be4232011-10-25 13:06:09 +020013484if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013485
13486cat >>confdefs.h <<_ACEOF
13487#define HAVE_STRUCT_TM_TM_ZONE 1
13488_ACEOF
13489
13490
13491fi
13492
13493if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013496
13497else
Matthias Kloseb9621712010-04-24 17:59:49 +000013498 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13499"
Victor Stinnere0be4232011-10-25 13:06:09 +020013500if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013502else
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013504fi
13505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013506cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013507#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013508_ACEOF
13509
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13511$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013512if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013514else
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013516/* end confdefs.h. */
13517#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013518#if !HAVE_DECL_TZNAME
13519extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013520#endif
13521
13522int
13523main ()
13524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013525return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013526 ;
13527 return 0;
13528}
13529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013531 ac_cv_var_tzname=yes
13532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013535rm -f core conftest.err conftest.$ac_objext \
13536 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13539$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013540 if test $ac_cv_var_tzname = yes; then
13541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013543
13544 fi
13545fi
13546
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013547
Martin v. Löwis1d459062005-03-14 21:23:33 +000013548# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13550$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013551if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013553else
13554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013556 ac_cv_working_tzset=no
13557else
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013559/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013560
13561#include <stdlib.h>
13562#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013563#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013564
13565#if HAVE_TZNAME
13566extern char *tzname[];
13567#endif
13568
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013569int main()
13570{
Brett Cannon18367812003-09-19 00:59:16 +000013571 /* Note that we need to ensure that not only does tzset(3)
13572 do 'something' with localtime, but it works as documented
13573 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013574 This includes making sure that tzname is set properly if
13575 tm->tm_zone does not exist since it is the alternative way
13576 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013577
13578 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013579 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013580 */
13581
Martin v. Löwis1d459062005-03-14 21:23:33 +000013582 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013583 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13584
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013585 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013586 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013587 if (localtime(&groundhogday)->tm_hour != 0)
13588 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013589#if HAVE_TZNAME
13590 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13591 if (strcmp(tzname[0], "UTC") ||
13592 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13593 exit(1);
13594#endif
Brett Cannon18367812003-09-19 00:59:16 +000013595
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013596 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013597 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013598 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013599 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013600#if HAVE_TZNAME
13601 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13602 exit(1);
13603#endif
Brett Cannon18367812003-09-19 00:59:16 +000013604
13605 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13606 tzset();
13607 if (localtime(&groundhogday)->tm_hour != 11)
13608 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013609#if HAVE_TZNAME
13610 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13611 exit(1);
13612#endif
13613
13614#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013615 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13616 exit(1);
13617 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13618 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013619#endif
Brett Cannon18367812003-09-19 00:59:16 +000013620
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013621 exit(0);
13622}
13623
13624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013625if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013626 ac_cv_working_tzset=yes
13627else
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13631 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013632fi
13633
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013634fi
13635
Matthias Kloseb9621712010-04-24 17:59:49 +000013636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13637$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013638if test "$ac_cv_working_tzset" = yes
13639then
13640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013642
13643fi
13644
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013645# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13647$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013648if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013650else
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013652/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013653#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013654int
13655main ()
13656{
13657
13658struct stat st;
13659st.st_mtim.tv_nsec = 1;
13660
13661 ;
13662 return 0;
13663}
13664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013665if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013666 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013667else
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13671fi
13672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13674$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013675if test "$ac_cv_stat_tv_nsec" = yes
13676then
13677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013679
13680fi
13681
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013682# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13684$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013685if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013687else
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013689/* end confdefs.h. */
13690#include <sys/stat.h>
13691int
13692main ()
13693{
13694
13695struct stat st;
13696st.st_mtimespec.tv_nsec = 1;
13697
13698 ;
13699 return 0;
13700}
13701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013703 ac_cv_stat_tv_nsec2=yes
13704else
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13708fi
13709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13711$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013712if test "$ac_cv_stat_tv_nsec2" = yes
13713then
13714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013716
13717fi
13718
Jack Jansen666b1e72001-10-31 12:11:48 +000013719# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13721$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013722if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013723 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013724else
Matthias Kloseb9621712010-04-24 17:59:49 +000013725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013726/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013727#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013728int
13729main ()
13730{
Jack Jansen666b1e72001-10-31 12:11:48 +000013731
13732 int rtn;
13733 rtn = mvwdelch(0,0,0);
13734
Martin v. Löwis11437992002-04-12 09:54:03 +000013735 ;
13736 return 0;
13737}
13738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013739if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013740 ac_cv_mvwdelch_is_expression=yes
13741else
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13745fi
13746
Matthias Kloseb9621712010-04-24 17:59:49 +000013747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13748$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013749
13750if test "$ac_cv_mvwdelch_is_expression" = yes
13751then
Martin v. Löwis11437992002-04-12 09:54:03 +000013752
Matthias Kloseb9621712010-04-24 17:59:49 +000013753$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013754
13755fi
13756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13758$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013759if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013760 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013761else
Matthias Kloseb9621712010-04-24 17:59:49 +000013762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013763/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013764#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013765int
13766main ()
13767{
Jack Jansen666b1e72001-10-31 12:11:48 +000013768
13769 WINDOW *w;
13770 w->_flags = 0;
13771
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 ;
13773 return 0;
13774}
13775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013776if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013777 ac_cv_window_has_flags=yes
13778else
Matthias Kloseb9621712010-04-24 17:59:49 +000013779 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13782fi
13783
Matthias Kloseb9621712010-04-24 17:59:49 +000013784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13785$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013786
Jack Jansen666b1e72001-10-31 12:11:48 +000013787
13788if test "$ac_cv_window_has_flags" = yes
13789then
Martin v. Löwis11437992002-04-12 09:54:03 +000013790
Matthias Kloseb9621712010-04-24 17:59:49 +000013791$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013792
13793fi
13794
Matthias Kloseb9621712010-04-24 17:59:49 +000013795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13796$as_echo_n "checking for is_term_resized... " >&6; }
13797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013798/* end confdefs.h. */
13799#include <curses.h>
13800int
13801main ()
13802{
13803void *x=is_term_resized
13804 ;
13805 return 0;
13806}
13807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013808if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013809
Matthias Kloseb9621712010-04-24 17:59:49 +000013810$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013811
Matthias Kloseb159a552010-04-25 21:00:44 +000013812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013813$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013814else
Matthias Kloseb9621712010-04-24 17:59:49 +000013815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13816$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013817
13818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13820
Matthias Kloseb9621712010-04-24 17:59:49 +000013821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13822$as_echo_n "checking for resize_term... " >&6; }
13823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013824/* end confdefs.h. */
13825#include <curses.h>
13826int
13827main ()
13828{
13829void *x=resize_term
13830 ;
13831 return 0;
13832}
13833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013834if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013837
Matthias Kloseb159a552010-04-25 21:00:44 +000013838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013839$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013840else
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13842$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013843
13844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13846
Matthias Kloseb9621712010-04-24 17:59:49 +000013847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13848$as_echo_n "checking for resizeterm... " >&6; }
13849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013850/* end confdefs.h. */
13851#include <curses.h>
13852int
13853main ()
13854{
13855void *x=resizeterm
13856 ;
13857 return 0;
13858}
13859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013860if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013861
Matthias Kloseb9621712010-04-24 17:59:49 +000013862$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013863
Matthias Kloseb159a552010-04-25 21:00:44 +000013864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013865$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013866else
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13868$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013869
13870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13872
Matthias Kloseb9621712010-04-24 17:59:49 +000013873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13874$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013875
13876if test -r /dev/ptmx
13877then
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13879$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013880
Matthias Kloseb9621712010-04-24 17:59:49 +000013881$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013882
Thomas Wouters89f507f2006-12-13 04:49:30 +000013883else
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13885$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013886fi
13887
Matthias Kloseb9621712010-04-24 17:59:49 +000013888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13889$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013890
13891if test -r /dev/ptc
13892then
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13894$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013895
Matthias Kloseb9621712010-04-24 17:59:49 +000013896$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013897
Thomas Wouters89f507f2006-12-13 04:49:30 +000013898else
Matthias Kloseb9621712010-04-24 17:59:49 +000013899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13900$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013901fi
13902
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013903if test "$have_long_long" = yes
13904then
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13906$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013907 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013909else
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010013911 ac_cv_have_long_long_format="cross -- assuming no"
13912 if test x$GCC = xyes; then
13913 save_CFLAGS=$CFLAGS
13914 CFLAGS="$CFLAGS -Werror -Wformat"
13915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13916/* end confdefs.h. */
13917
13918 #include <stdio.h>
13919 #include <stddef.h>
13920
13921int
13922main ()
13923{
13924
13925 char *buffer;
13926 sprintf(buffer, "%lld", (long long)123);
13927 sprintf(buffer, "%lld", (long long)-123);
13928 sprintf(buffer, "%llu", (unsigned long long)123);
13929
13930 ;
13931 return 0;
13932}
13933_ACEOF
13934if ac_fn_c_try_compile "$LINENO"; then :
13935 ac_cv_have_long_long_format=yes
13936
13937fi
13938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13939 CFLAGS=$save_CFLAGS
13940 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013941else
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013943/* end confdefs.h. */
13944
13945 #include <stdio.h>
13946 #include <stddef.h>
13947 #include <string.h>
13948
13949 #ifdef HAVE_SYS_TYPES_H
13950 #include <sys/types.h>
13951 #endif
13952
13953 int main()
13954 {
13955 char buffer[256];
13956
13957 if (sprintf(buffer, "%lld", (long long)123) < 0)
13958 return 1;
13959 if (strcmp(buffer, "123"))
13960 return 1;
13961
13962 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13963 return 1;
13964 if (strcmp(buffer, "-123"))
13965 return 1;
13966
13967 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13968 return 1;
13969 if (strcmp(buffer, "123"))
13970 return 1;
13971
13972 return 0;
13973 }
13974
13975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013976if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013977 ac_cv_have_long_long_format=yes
13978else
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13982 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013983fi
13984
13985
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013986fi
13987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13989$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013990fi
13991
Mark Dickinson89d7d412009-12-31 20:50:59 +000013992if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013993then
13994
Matthias Kloseb9621712010-04-24 17:59:49 +000013995$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013996
13997fi
13998
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013999if test $ac_sys_system = Darwin
14000then
14001 LIBS="$LIBS -framework CoreFoundation"
14002fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014003
Matthias Kloseb9621712010-04-24 17:59:49 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14005$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014006if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014007 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014008else
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014010 ac_cv_have_size_t_format="cross -- assuming yes"
14011
Thomas Wouters477c8d52006-05-27 19:21:47 +000014012else
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014014/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014015
Thomas Wouters477c8d52006-05-27 19:21:47 +000014016#include <stdio.h>
14017#include <stddef.h>
14018#include <string.h>
14019
Christian Heimes2c181612007-12-17 20:04:13 +000014020#ifdef HAVE_SYS_TYPES_H
14021#include <sys/types.h>
14022#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014023
14024#ifdef HAVE_SSIZE_T
14025typedef ssize_t Py_ssize_t;
14026#elif SIZEOF_VOID_P == SIZEOF_LONG
14027typedef long Py_ssize_t;
14028#else
14029typedef int Py_ssize_t;
14030#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014031
Christian Heimes2c181612007-12-17 20:04:13 +000014032int main()
14033{
14034 char buffer[256];
14035
Thomas Wouters477c8d52006-05-27 19:21:47 +000014036 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14037 return 1;
14038
Thomas Wouters89f507f2006-12-13 04:49:30 +000014039 if (strcmp(buffer, "123"))
14040 return 1;
14041
14042 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14043 return 1;
14044
14045 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014046 return 1;
14047
14048 return 0;
14049}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014050
Thomas Wouters477c8d52006-05-27 19:21:47 +000014051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014052if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014053 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014054else
Matthias Kloseb9621712010-04-24 17:59:49 +000014055 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14058 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014059fi
14060
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14063$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014064if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014065
Matthias Kloseb9621712010-04-24 17:59:49 +000014066$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014067
14068fi
14069
Matthias Kloseb9621712010-04-24 17:59:49 +000014070ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014071#ifdef HAVE_SYS_TYPES_H
14072#include <sys/types.h>
14073#endif
14074#ifdef HAVE_SYS_SOCKET_H
14075#include <sys/socket.h>
14076#endif
14077
Matthias Kloseb9621712010-04-24 17:59:49 +000014078"
Victor Stinnere0be4232011-10-25 13:06:09 +020014079if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014080
Martin v. Löwis11437992002-04-12 09:54:03 +000014081else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014082
Matthias Kloseb9621712010-04-24 17:59:49 +000014083$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014084
14085fi
14086
Michael W. Hudson54241132001-12-07 15:38:26 +000014087
Matthias Kloseb9621712010-04-24 17:59:49 +000014088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14089$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014090if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014092else
Matthias Kloseb9621712010-04-24 17:59:49 +000014093 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014094 ac_cv_broken_mbstowcs=no
14095else
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014097/* end confdefs.h. */
14098
14099#include<stdlib.h>
14100int main() {
14101 size_t len = -1;
14102 const char *str = "text";
14103 len = mbstowcs(NULL, str, 0);
14104 return (len != 4);
14105}
14106
14107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014108if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014109 ac_cv_broken_mbstowcs=no
14110else
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14114 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014115fi
14116
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014117fi
14118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14120$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014121if test "$ac_cv_broken_mbstowcs" = yes
14122then
14123
Matthias Kloseb9621712010-04-24 17:59:49 +000014124$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014125
14126fi
14127
Antoine Pitroub52ec782009-01-25 16:34:23 +000014128# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14130$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014131
14132# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014133if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014134 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014135if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014136then
14137
Matthias Kloseb9621712010-04-24 17:59:49 +000014138$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014139
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14141$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014142fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014143if test "$withval" = no
14144then
14145
14146$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14147
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14149$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014150fi
14151
Antoine Pitrou042b1282010-08-13 21:15:58 +000014152else
14153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14154$as_echo "no value specified" >&6; }
14155fi
14156
Antoine Pitroub52ec782009-01-25 16:34:23 +000014157
Matthias Kloseb17289e2012-03-15 19:51:34 +010014158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14159$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14160if ${ac_cv_computed_gotos+:} false; then :
14161 $as_echo_n "(cached) " >&6
14162else
14163 if test "$cross_compiling" = yes; then :
14164 if test "${with_computed_gotos+set}" = set; then
14165 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14166 else
14167 ac_cv_computed_gotos=no
14168 fi
14169else
14170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14171/* end confdefs.h. */
14172
14173int main(int argc, char **argv)
14174{
14175 static void *targets[1] = { &&LABEL1 };
14176 goto LABEL2;
14177LABEL1:
14178 return 0;
14179LABEL2:
14180 goto *targets[0];
14181 return 1;
14182}
14183
14184_ACEOF
14185if ac_fn_c_try_run "$LINENO"; then :
14186 ac_cv_computed_gotos=yes
14187else
14188 ac_cv_computed_gotos=no
14189fi
14190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14191 conftest.$ac_objext conftest.beam conftest.$ac_ext
14192fi
14193
14194fi
14195
14196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14197$as_echo "$ac_cv_computed_gotos" >&6; }
14198case "$ac_cv_computed_gotos" in yes*)
14199
14200$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14201
14202esac
14203
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014204case $ac_sys_system in
14205AIX*)
14206
14207$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14208 ;;
14209esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014210
Michael W. Hudson54241132001-12-07 15:38:26 +000014211
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014212
14213
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014214for h in `(cd $srcdir;echo Python/thread_*.h)`
14215do
14216 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14217done
14218
Michael W. Hudson54241132001-12-07 15:38:26 +000014219
Neal Norwitzd24499d2005-12-18 21:36:39 +000014220SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14222$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014223for dir in $SRCDIRS; do
14224 if test ! -d $dir; then
14225 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014226 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014227done
Matthias Kloseb9621712010-04-24 17:59:49 +000014228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14229$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014230
Guido van Rossum627b2d71993-12-24 10:39:16 +000014231# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014232ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014233
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014234ac_config_files="$ac_config_files Modules/ld_so_aix"
14235
Martin v. Löwis11437992002-04-12 09:54:03 +000014236cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014237# This file is a shell script that caches the results of configure
14238# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014239# scripts and configure runs, see configure's option --config-cache.
14240# It is not useful on other systems. If it contains results you don't
14241# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014242#
Martin v. Löwis11437992002-04-12 09:54:03 +000014243# config.status only pays attention to the cache file if you give it
14244# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014245#
Skip Montanaro6dead952003-09-25 14:50:04 +000014246# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014247# loading this file, other *unset* `ac_cv_foo' will be assigned the
14248# following values.
14249
14250_ACEOF
14251
Guido van Rossumf78abae1997-01-21 22:02:36 +000014252# The following way of writing the cache mishandles newlines in values,
14253# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014254# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014255# Ultrix sh set writes to stderr and can't be redirected directly,
14256# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014257(
14258 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14259 eval ac_val=\$$ac_var
14260 case $ac_val in #(
14261 *${as_nl}*)
14262 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014263 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14264$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014265 esac
14266 case $ac_var in #(
14267 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14269 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014270 esac ;;
14271 esac
14272 done
14273
Martin v. Löwis11437992002-04-12 09:54:03 +000014274 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014275 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14276 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014277 # `set' does not quote correctly, so add quotes: double-quote
14278 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014280 "s/'/'\\\\''/g;
14281 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014283 *)
14284 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014286 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287 esac |
14288 sort
14289) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014290 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014293 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014294 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14295 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14297 :end' >>confcache
14298if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14299 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014300 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14302$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020014303 if test ! -f "$cache_file" || test -h "$cache_file"; then
14304 cat confcache >"$cache_file"
14305 else
14306 case $cache_file in #(
14307 */* | ?:*)
14308 mv -f confcache "$cache_file"$$ &&
14309 mv -f "$cache_file"$$ "$cache_file" ;; #(
14310 *)
14311 mv -f confcache "$cache_file" ;;
14312 esac
14313 fi
14314 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014315 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014316 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14317$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014318 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014319fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014320rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014321
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014322test "x$prefix" = xNONE && prefix=$ac_default_prefix
14323# Let make expand exec_prefix.
14324test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014325
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014326DEFS=-DHAVE_CONFIG_H
14327
Skip Montanaro6dead952003-09-25 14:50:04 +000014328ac_libobjs=
14329ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014330U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014331for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14332 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014334 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14336 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14338 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014339done
14340LIBOBJS=$ac_libobjs
14341
14342LTLIBOBJS=$ac_ltlibobjs
14343
14344
Martin v. Löwis11437992002-04-12 09:54:03 +000014345
Matthias Kloseb9621712010-04-24 17:59:49 +000014346
Victor Stinnere0be4232011-10-25 13:06:09 +020014347: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014348ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014349ac_clean_files_save=$ac_clean_files
14350ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014351{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14352$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14353as_write_fail=0
14354cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014355#! $SHELL
14356# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014357# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014358# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014359# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014360
Martin v. Löwis11437992002-04-12 09:54:03 +000014361debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014362ac_cs_recheck=false
14363ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014364
Matthias Kloseb9621712010-04-24 17:59:49 +000014365SHELL=\${CONFIG_SHELL-$SHELL}
14366export SHELL
14367_ASEOF
14368cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14369## -------------------- ##
14370## M4sh Initialization. ##
14371## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373# Be more Bourne compatible
14374DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014375if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 emulate sh
14377 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014379 # is contrary to our usage. Disable this feature.
14380 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014381 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014382else
Matthias Kloseb9621712010-04-24 17:59:49 +000014383 case `(set -o) 2>/dev/null` in #(
14384 *posix*) :
14385 set -o posix ;; #(
14386 *) :
14387 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014388esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014389fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014390
14391
Matthias Kloseb9621712010-04-24 17:59:49 +000014392as_nl='
14393'
14394export as_nl
14395# Printing a long string crashes Solaris 7 /usr/bin/printf.
14396as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14397as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14398as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14399# Prefer a ksh shell builtin over an external printf program on Solaris,
14400# but without wasting forks for bash or zsh.
14401if test -z "$BASH_VERSION$ZSH_VERSION" \
14402 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14403 as_echo='print -r --'
14404 as_echo_n='print -rn --'
14405elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14406 as_echo='printf %s\n'
14407 as_echo_n='printf %s'
14408else
14409 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14410 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14411 as_echo_n='/usr/ucb/echo -n'
14412 else
14413 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14414 as_echo_n_body='eval
14415 arg=$1;
14416 case $arg in #(
14417 *"$as_nl"*)
14418 expr "X$arg" : "X\\(.*\\)$as_nl";
14419 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14420 esac;
14421 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14422 '
14423 export as_echo_n_body
14424 as_echo_n='sh -c $as_echo_n_body as_echo'
14425 fi
14426 export as_echo_body
14427 as_echo='sh -c $as_echo_body as_echo'
14428fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
14430# The user is always right.
14431if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014432 PATH_SEPARATOR=:
14433 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14434 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14435 PATH_SEPARATOR=';'
14436 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439
14440# IFS
14441# We need space, tab and new line, in precisely that order. Quoting is
14442# there to prevent editors from complaining about space-tab.
14443# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14444# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445IFS=" "" $as_nl"
14446
14447# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020014448as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014449case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014450 *[\\/]* ) as_myself=$0 ;;
14451 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014452for as_dir in $PATH
14453do
14454 IFS=$as_save_IFS
14455 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14457 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460 ;;
14461esac
14462# We did not find ourselves, most probably we were run as `sh COMMAND'
14463# in which case we are not to be found in the path.
14464if test "x$as_myself" = x; then
14465 as_myself=$0
14466fi
14467if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14469 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470fi
14471
Matthias Kloseb9621712010-04-24 17:59:49 +000014472# Unset variables that we do not need and which cause bugs (e.g. in
14473# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14474# suppresses any "Segmentation fault" message there. '((' could
14475# trigger a bug in pdksh 5.2.14.
14476for as_var in BASH_ENV ENV MAIL MAILPATH
14477do eval test x\${$as_var+set} = xset \
14478 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479done
14480PS1='$ '
14481PS2='> '
14482PS4='+ '
14483
14484# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014485LC_ALL=C
14486export LC_ALL
14487LANGUAGE=C
14488export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489
Matthias Kloseb9621712010-04-24 17:59:49 +000014490# CDPATH.
14491(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14492
14493
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014494# as_fn_error STATUS ERROR [LINENO LOG_FD]
14495# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014496# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14497# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014498# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014499as_fn_error ()
14500{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014501 as_status=$1; test $as_status -eq 0 && as_status=1
14502 if test "$4"; then
14503 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14504 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014506 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 as_fn_exit $as_status
14508} # as_fn_error
14509
14510
14511# as_fn_set_status STATUS
14512# -----------------------
14513# Set $? to STATUS, without forking.
14514as_fn_set_status ()
14515{
14516 return $1
14517} # as_fn_set_status
14518
14519# as_fn_exit STATUS
14520# -----------------
14521# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14522as_fn_exit ()
14523{
14524 set +e
14525 as_fn_set_status $1
14526 exit $1
14527} # as_fn_exit
14528
14529# as_fn_unset VAR
14530# ---------------
14531# Portably unset VAR.
14532as_fn_unset ()
14533{
14534 { eval $1=; unset $1;}
14535}
14536as_unset=as_fn_unset
14537# as_fn_append VAR VALUE
14538# ----------------------
14539# Append the text in VALUE to the end of the definition contained in VAR. Take
14540# advantage of any shell optimizations that allow amortized linear growth over
14541# repeated appends, instead of the typical quadratic growth present in naive
14542# implementations.
14543if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14544 eval 'as_fn_append ()
14545 {
14546 eval $1+=\$2
14547 }'
14548else
14549 as_fn_append ()
14550 {
14551 eval $1=\$$1\$2
14552 }
14553fi # as_fn_append
14554
14555# as_fn_arith ARG...
14556# ------------------
14557# Perform arithmetic evaluation on the ARGs, and store the result in the
14558# global $as_val. Take advantage of shells that can avoid forks. The arguments
14559# must be portable across $(()) and expr.
14560if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14561 eval 'as_fn_arith ()
14562 {
14563 as_val=$(( $* ))
14564 }'
14565else
14566 as_fn_arith ()
14567 {
14568 as_val=`expr "$@" || test $? -eq 1`
14569 }
14570fi # as_fn_arith
14571
14572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573if expr a : '\(a\)' >/dev/null 2>&1 &&
14574 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14575 as_expr=expr
14576else
14577 as_expr=false
14578fi
14579
14580if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14581 as_basename=basename
14582else
14583 as_basename=false
14584fi
14585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14587 as_dirname=dirname
14588else
14589 as_dirname=false
14590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014592as_me=`$as_basename -- "$0" ||
14593$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14594 X"$0" : 'X\(//\)$' \| \
14595 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014596$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014597 sed '/^.*\/\([^/][^/]*\)\/*$/{
14598 s//\1/
14599 q
14600 }
14601 /^X\/\(\/\/\)$/{
14602 s//\1/
14603 q
14604 }
14605 /^X\/\(\/\).*/{
14606 s//\1/
14607 q
14608 }
14609 s/.*/./; q'`
14610
Matthias Kloseb9621712010-04-24 17:59:49 +000014611# Avoid depending upon Character Ranges.
14612as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14613as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14614as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14615as_cr_digits='0123456789'
14616as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617
14618ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014619case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014620-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014622 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014623 xy) ECHO_C='\c';;
14624 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14625 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626 esac;;
14627*)
14628 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014629esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014630
Martin v. Löwis11437992002-04-12 09:54:03 +000014631rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014632if test -d conf$$.dir; then
14633 rm -f conf$$.dir/conf$$.file
14634else
14635 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014636 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014638if (echo >conf$$.file) 2>/dev/null; then
14639 if ln -s conf$$.file conf$$ 2>/dev/null; then
14640 as_ln_s='ln -s'
14641 # ... but there are two gotchas:
14642 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14643 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14644 # In both cases, we have to default to `cp -p'.
14645 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14646 as_ln_s='cp -p'
14647 elif ln conf$$.file conf$$ 2>/dev/null; then
14648 as_ln_s=ln
14649 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014651 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014652else
14653 as_ln_s='cp -p'
14654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14656rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658
14659# as_fn_mkdir_p
14660# -------------
14661# Create "$as_dir" as a directory, including parents if necessary.
14662as_fn_mkdir_p ()
14663{
14664
14665 case $as_dir in #(
14666 -*) as_dir=./$as_dir;;
14667 esac
14668 test -d "$as_dir" || eval $as_mkdir_p || {
14669 as_dirs=
14670 while :; do
14671 case $as_dir in #(
14672 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14673 *) as_qdir=$as_dir;;
14674 esac
14675 as_dirs="'$as_qdir' $as_dirs"
14676 as_dir=`$as_dirname -- "$as_dir" ||
14677$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14678 X"$as_dir" : 'X\(//\)[^/]' \| \
14679 X"$as_dir" : 'X\(//\)$' \| \
14680 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14681$as_echo X"$as_dir" |
14682 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14683 s//\1/
14684 q
14685 }
14686 /^X\(\/\/\)[^/].*/{
14687 s//\1/
14688 q
14689 }
14690 /^X\(\/\/\)$/{
14691 s//\1/
14692 q
14693 }
14694 /^X\(\/\).*/{
14695 s//\1/
14696 q
14697 }
14698 s/.*/./; q'`
14699 test -d "$as_dir" && break
14700 done
14701 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014702 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014703
14704
14705} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014706if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014708else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014709 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014710 as_mkdir_p=false
14711fi
14712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014713if test -x / >/dev/null 2>&1; then
14714 as_test_x='test -x'
14715else
14716 if ls -dL / >/dev/null 2>&1; then
14717 as_ls_L_option=L
14718 else
14719 as_ls_L_option=
14720 fi
14721 as_test_x='
14722 eval sh -c '\''
14723 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014724 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014725 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 case $1 in #(
14727 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014728 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014730 ???[sx]*):;;*)false;;esac;fi
14731 '\'' sh
14732 '
14733fi
14734as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014735
14736# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014737as_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 +000014738
14739# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014740as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014741
14742
Martin v. Löwis11437992002-04-12 09:54:03 +000014743exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014744## ----------------------------------- ##
14745## Main body of $CONFIG_STATUS script. ##
14746## ----------------------------------- ##
14747_ASEOF
14748test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014749
Matthias Kloseb9621712010-04-24 17:59:49 +000014750cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14751# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014752# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014753# values after options handling.
14754ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014755This file was extended by python $as_me 3.3, which was
Victor Stinnere0be4232011-10-25 13:06:09 +020014756generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014757
14758 CONFIG_FILES = $CONFIG_FILES
14759 CONFIG_HEADERS = $CONFIG_HEADERS
14760 CONFIG_LINKS = $CONFIG_LINKS
14761 CONFIG_COMMANDS = $CONFIG_COMMANDS
14762 $ $0 $@
14763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014764on `(hostname || uname -n) 2>/dev/null | sed 1q`
14765"
14766
Martin v. Löwis11437992002-04-12 09:54:03 +000014767_ACEOF
14768
Matthias Kloseb9621712010-04-24 17:59:49 +000014769case $ac_config_files in *"
14770"*) set x $ac_config_files; shift; ac_config_files=$*;;
14771esac
14772
14773case $ac_config_headers in *"
14774"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14775esac
14776
14777
14778cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014779# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014780config_files="$ac_config_files"
14781config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014784
Matthias Kloseb9621712010-04-24 17:59:49 +000014785cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014786ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014787\`$as_me' instantiates files and other configuration actions
14788from templates according to the current configuration. Unless the files
14789and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014790
Matthias Kloseb9621712010-04-24 17:59:49 +000014791Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014792
14793 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014794 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 --config print configuration, then exit
14796 -q, --quiet, --silent
14797 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014798 -d, --debug don't remove temporary files
14799 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014800 --file=FILE[:TEMPLATE]
14801 instantiate the configuration file FILE
14802 --header=FILE[:TEMPLATE]
14803 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014804
14805Configuration files:
14806$config_files
14807
14808Configuration headers:
14809$config_headers
14810
Matthias Kloseb9621712010-04-24 17:59:49 +000014811Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014814cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14815ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014816ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014817python config.status 3.3
Victor Stinnere0be4232011-10-25 13:06:09 +020014818configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014819 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014820
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014821Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014822This config.status script is free software; the Free Software Foundation
14823gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014824
14825ac_pwd='$ac_pwd'
14826srcdir='$srcdir'
14827INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010014828MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014829test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014830_ACEOF
14831
Matthias Kloseb9621712010-04-24 17:59:49 +000014832cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14833# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014834ac_need_defaults=:
14835while test $# != 0
14836do
14837 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014838 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14840 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014841 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014842 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014843 --*=)
14844 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14845 ac_optarg=
14846 ac_shift=:
14847 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014849 ac_option=$1
14850 ac_optarg=$2
14851 ac_shift=shift
14852 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014853 esac
14854
Skip Montanaro6dead952003-09-25 14:50:04 +000014855 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014857 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14858 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 $as_echo "$ac_cs_version"; exit ;;
14861 --config | --confi | --conf | --con | --co | --c )
14862 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 debug=: ;;
14865 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014866 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 case $ac_optarg in
14868 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014869 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 esac
14871 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014872 ac_need_defaults=false;;
14873 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014874 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 case $ac_optarg in
14876 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14877 esac
14878 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014879 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014880 --he | --h)
14881 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014882 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014883Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014886 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14887 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14888 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014889
14890 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014891 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014892Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014893
Matthias Kloseb9621712010-04-24 17:59:49 +000014894 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014896
14897 esac
14898 shift
14899done
14900
Skip Montanaro6dead952003-09-25 14:50:04 +000014901ac_configure_extra_args=
14902
14903if $ac_cs_silent; then
14904 exec 6>/dev/null
14905 ac_configure_extra_args="$ac_configure_extra_args --silent"
14906fi
14907
14908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014909cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014910if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14912 shift
14913 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14914 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014917fi
14918
Martin v. Löwis11437992002-04-12 09:54:03 +000014919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014920cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921exec 5>>config.log
14922{
14923 echo
14924 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14925## Running $as_me. ##
14926_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014928} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014933
Matthias Kloseb9621712010-04-24 17:59:49 +000014934cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935
14936# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014937for ac_config_target in $ac_config_targets
14938do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939 case $ac_config_target in
14940 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14941 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14942 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014943 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14944 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14946 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014947 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014948 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949
Victor Stinnere0be4232011-10-25 13:06:09 +020014950 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 esac
14952done
14953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954
Martin v. Löwis11437992002-04-12 09:54:03 +000014955# If the user did not use the arguments to specify the items to instantiate,
14956# then the envvar interface is used. Set only those that are not.
14957# We use the long form for the default assignment because of an extremely
14958# bizarre bug on SunOS 4.1.3.
14959if $ac_need_defaults; then
14960 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14961 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14962fi
14963
Skip Montanaro6dead952003-09-25 14:50:04 +000014964# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014966# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967# Hook for its removal unless debugging.
14968# Note that there is a small window in which the directory will not be cleaned:
14969# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014970$debug ||
14971{
Victor Stinnere0be4232011-10-25 13:06:09 +020014972 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020014974 : "${ac_tmp:=$tmp}"
14975 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014978}
Martin v. Löwis11437992002-04-12 09:54:03 +000014979# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014980
Martin v. Löwis11437992002-04-12 09:54:03 +000014981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020014983 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014984} ||
14985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014986 tmp=./conf$$-$RANDOM
14987 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014988} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020014989ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014990
Matthias Kloseb9621712010-04-24 17:59:49 +000014991# Set up the scripts for CONFIG_FILES section.
14992# No need to generate them if there are no CONFIG_FILES.
14993# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014995
Matthias Kloseb9621712010-04-24 17:59:49 +000014996
14997ac_cr=`echo X | tr X '\015'`
14998# On cygwin, bash can eat \r inside `` if the user requested igncr.
14999# But we know of no other shell where ac_cr would be empty at this
15000# point, so we can use a bashism as a fallback.
15001if test "x$ac_cr" = x; then
15002 eval ac_cr=\$\'\\r\'
15003fi
15004ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15005if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015006 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015007else
15008 ac_cs_awk_cr=$ac_cr
15009fi
15010
Victor Stinnere0be4232011-10-25 13:06:09 +020015011echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015012_ACEOF
15013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014
Matthias Kloseb9621712010-04-24 17:59:49 +000015015{
15016 echo "cat >conf$$subs.awk <<_ACEOF" &&
15017 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15018 echo "_ACEOF"
15019} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015020 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15021ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022ac_delim='%!_!# '
15023for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015024 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015025 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026
Matthias Kloseb9621712010-04-24 17:59:49 +000015027 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15028 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029 break
15030 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015031 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032 else
15033 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035done
Matthias Kloseb9621712010-04-24 17:59:49 +000015036rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037
Matthias Kloseb9621712010-04-24 17:59:49 +000015038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015039cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015041sed -n '
15042h
15043s/^/S["/; s/!.*/"]=/
15044p
15045g
15046s/^[^!]*!//
15047:repl
15048t repl
15049s/'"$ac_delim"'$//
15050t delim
15051:nl
15052h
15053s/\(.\{148\}\)..*/\1/
15054t more1
15055s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15056p
15057n
15058b repl
15059:more1
15060s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15061p
15062g
15063s/.\{148\}//
15064t nl
15065:delim
15066h
15067s/\(.\{148\}\)..*/\1/
15068t more2
15069s/["\\]/\\&/g; s/^/"/; s/$/"/
15070p
15071b
15072:more2
15073s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15074p
15075g
15076s/.\{148\}//
15077t delim
15078' <conf$$subs.awk | sed '
15079/^[^""]/{
15080 N
15081 s/\n//
15082}
15083' >>$CONFIG_STATUS || ac_write_fail=1
15084rm -f conf$$subs.awk
15085cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15086_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015087cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015088 for (key in S) S_is_set[key] = 1
15089 FS = ""
15090
15091}
15092{
15093 line = $ 0
15094 nfields = split(line, field, "@")
15095 substed = 0
15096 len = length(field[1])
15097 for (i = 2; i < nfields; i++) {
15098 key = field[i]
15099 keylen = length(key)
15100 if (S_is_set[key]) {
15101 value = S[key]
15102 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15103 len += length(value) + length(field[++i])
15104 substed = 1
15105 } else
15106 len += 1 + keylen
15107 }
15108
15109 print line
15110}
15111
15112_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015114cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15115if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15116 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15117else
15118 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015119fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015120 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015121_ACEOF
15122
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015123# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15124# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125# trailing colons and then remove the whole line if VPATH becomes empty
15126# (actually we leave an empty line to preserve line numbers).
15127if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015128 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15129h
15130s///
15131s/^/:/
15132s/[ ]*$/:/
15133s/:\$(srcdir):/:/g
15134s/:\${srcdir}:/:/g
15135s/:@srcdir@:/:/g
15136s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015138x
15139s/\(=[ ]*\).*/\1/
15140G
15141s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142s/^[^=]*=[ ]*$//
15143}'
15144fi
15145
Matthias Kloseb9621712010-04-24 17:59:49 +000015146cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015147fi # test -n "$CONFIG_FILES"
15148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149# Set up the scripts for CONFIG_HEADERS section.
15150# No need to generate them if there are no CONFIG_HEADERS.
15151# This happens for instance with `./config.status Makefile'.
15152if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015153cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015154BEGIN {
15155_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156
Matthias Kloseb9621712010-04-24 17:59:49 +000015157# Transform confdefs.h into an awk script `defines.awk', embedded as
15158# here-document in config.status, that substitutes the proper values into
15159# config.h.in to produce config.h.
15160
15161# Create a delimiter string that does not exist in confdefs.h, to ease
15162# handling of long lines.
15163ac_delim='%!_!# '
15164for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015165 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15166 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 break
15168 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015169 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 else
15171 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15172 fi
15173done
15174
15175# For the awk script, D is an array of macro values keyed by name,
15176# likewise P contains macro parameters if any. Preserve backslash
15177# newline sequences.
15178
15179ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15180sed -n '
15181s/.\{148\}/&'"$ac_delim"'/g
15182t rset
15183:rset
15184s/^[ ]*#[ ]*define[ ][ ]*/ /
15185t def
15186d
15187:def
15188s/\\$//
15189t bsnl
15190s/["\\]/\\&/g
15191s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15192D["\1"]=" \3"/p
15193s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15194d
15195:bsnl
15196s/["\\]/\\&/g
15197s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15198D["\1"]=" \3\\\\\\n"\\/p
15199t cont
15200s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15201t cont
15202d
15203:cont
15204n
15205s/.\{148\}/&'"$ac_delim"'/g
15206t clear
15207:clear
15208s/\\$//
15209t bsnlc
15210s/["\\]/\\&/g; s/^/"/; s/$/"/p
15211d
15212:bsnlc
15213s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15214b cont
15215' <confdefs.h | sed '
15216s/'"$ac_delim"'/"\\\
15217"/g' >>$CONFIG_STATUS || ac_write_fail=1
15218
15219cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15220 for (key in D) D_is_set[key] = 1
15221 FS = ""
15222}
15223/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15224 line = \$ 0
15225 split(line, arg, " ")
15226 if (arg[1] == "#") {
15227 defundef = arg[2]
15228 mac1 = arg[3]
15229 } else {
15230 defundef = substr(arg[1], 2)
15231 mac1 = arg[2]
15232 }
15233 split(mac1, mac2, "(") #)
15234 macro = mac2[1]
15235 prefix = substr(line, 1, index(line, defundef) - 1)
15236 if (D_is_set[macro]) {
15237 # Preserve the white space surrounding the "#".
15238 print prefix "define", macro P[macro] D[macro]
15239 next
15240 } else {
15241 # Replace #undef with comments. This is necessary, for example,
15242 # in the case of _POSIX_SOURCE, which is predefined and required
15243 # on some systems where configure will not decide to define it.
15244 if (defundef == "undef") {
15245 print "/*", prefix defundef, macro, "*/"
15246 next
15247 }
15248 }
15249}
15250{ print }
15251_ACAWK
15252_ACEOF
15253cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015254 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015255fi # test -n "$CONFIG_HEADERS"
15256
15257
15258eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15259shift
15260for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261do
15262 case $ac_tag in
15263 :[FHLC]) ac_mode=$ac_tag; continue;;
15264 esac
15265 case $ac_mode$ac_tag in
15266 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015267 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268 :[FH]-) ac_tag=-:-;;
15269 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15270 esac
15271 ac_save_IFS=$IFS
15272 IFS=:
15273 set x $ac_tag
15274 IFS=$ac_save_IFS
15275 shift
15276 ac_file=$1
15277 shift
15278
15279 case $ac_mode in
15280 :L) ac_source=$1;;
15281 :[FH])
15282 ac_file_inputs=
15283 for ac_f
15284 do
15285 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015286 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015287 *) # Look for the file first in the build tree, then in the source tree
15288 # (if the path is not absolute). The absolute path cannot be DOS-style,
15289 # because $ac_f cannot contain `:'.
15290 test -f "$ac_f" ||
15291 case $ac_f in
15292 [\\/$]*) false;;
15293 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15294 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020015295 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015297 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15298 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299 done
15300
15301 # Let's still pretend it is `configure' which instantiates (i.e., don't
15302 # use $as_me), people would be surprised to read:
15303 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015304 configure_input='Generated from '`
15305 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15306 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307 if test x"$ac_file" != x-; then
15308 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015309 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15310$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015311 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015312 # Neutralize special characters interpreted by sed in replacement strings.
15313 case $configure_input in #(
15314 *\&* | *\|* | *\\* )
15315 ac_sed_conf_input=`$as_echo "$configure_input" |
15316 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15317 *) ac_sed_conf_input=$configure_input;;
15318 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319
15320 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020015321 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15322 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323 esac
15324 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015325 esac
15326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015327 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015328$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015329 X"$ac_file" : 'X\(//\)[^/]' \| \
15330 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015331 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015332$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15334 s//\1/
15335 q
15336 }
15337 /^X\(\/\/\)[^/].*/{
15338 s//\1/
15339 q
15340 }
15341 /^X\(\/\/\)$/{
15342 s//\1/
15343 q
15344 }
15345 /^X\(\/\).*/{
15346 s//\1/
15347 q
15348 }
15349 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015350 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015351 ac_builddir=.
15352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353case "$ac_dir" in
15354.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15355*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015356 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015357 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015358 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015359 case $ac_top_builddir_sub in
15360 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15361 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15362 esac ;;
15363esac
15364ac_abs_top_builddir=$ac_pwd
15365ac_abs_builddir=$ac_pwd$ac_dir_suffix
15366# for backward compatibility:
15367ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015368
15369case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015371 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372 ac_top_srcdir=$ac_top_builddir_sub
15373 ac_abs_top_srcdir=$ac_pwd ;;
15374 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015375 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015376 ac_top_srcdir=$srcdir
15377 ac_abs_top_srcdir=$srcdir ;;
15378 *) # Relative name.
15379 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15380 ac_top_srcdir=$ac_top_build_prefix$srcdir
15381 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015382esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015383ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015384
Martin v. Löwis11437992002-04-12 09:54:03 +000015385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015386 case $ac_mode in
15387 :F)
15388 #
15389 # CONFIG_FILE
15390 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015391
15392 case $INSTALL in
15393 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015395 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010015396 ac_MKDIR_P=$MKDIR_P
15397 case $MKDIR_P in
15398 [\\/$]* | ?:[\\/]* ) ;;
15399 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15400 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015401_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402
Matthias Kloseb9621712010-04-24 17:59:49 +000015403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015404# If the template does not know about datarootdir, expand it.
15405# FIXME: This hack should be removed a few years after 2.60.
15406ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015407ac_sed_dataroot='
15408/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015409 p
15410 q
15411}
15412/@datadir@/p
15413/@docdir@/p
15414/@infodir@/p
15415/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015416/@mandir@/p'
15417case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015418*datarootdir*) ac_datarootdir_seen=yes;;
15419*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015420 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15421$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015423cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015424 ac_datarootdir_hack='
15425 s&@datadir@&$datadir&g
15426 s&@docdir@&$docdir&g
15427 s&@infodir@&$infodir&g
15428 s&@localedir@&$localedir&g
15429 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015430 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015431esac
15432_ACEOF
15433
15434# Neutralize VPATH when `$srcdir' = `.'.
15435# Shell code in configure.ac might set extrasub.
15436# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015437cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15438ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015439$extrasub
15440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015441cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015442:t
15443/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015444s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015445s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015446s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447s&@srcdir@&$ac_srcdir&;t t
15448s&@abs_srcdir@&$ac_abs_srcdir&;t t
15449s&@top_srcdir@&$ac_top_srcdir&;t t
15450s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15451s&@builddir@&$ac_builddir&;t t
15452s&@abs_builddir@&$ac_abs_builddir&;t t
15453s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15454s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010015455s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015456$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015457"
Victor Stinnere0be4232011-10-25 13:06:09 +020015458eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15459 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015462 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15463 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15464 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015465 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015466which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015467$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015468which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015469
Victor Stinnere0be4232011-10-25 13:06:09 +020015470 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015471 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020015472 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15473 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015474 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015475 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476 ;;
15477 :H)
15478 #
15479 # CONFIG_HEADER
15480 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015482 {
15483 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015484 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15485 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015486 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015487 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15489$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015490 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015491 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020015492 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015493 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015494 fi
15495 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015496 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015497 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015498 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015499 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015500 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015502
15503 esac
15504
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015505
15506 case $ac_file$ac_mode in
15507 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15508
15509 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015510done # for ac_tag
15511
Guido van Rossum627b2d71993-12-24 10:39:16 +000015512
Matthias Kloseb9621712010-04-24 17:59:49 +000015513as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015514_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015515ac_clean_files=$ac_clean_files_save
15516
Matthias Kloseb9621712010-04-24 17:59:49 +000015517test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015518 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015519
Martin v. Löwis11437992002-04-12 09:54:03 +000015520
15521# configure is writing to config.log, and then calls config.status.
15522# config.status does its own redirection, appending to config.log.
15523# Unfortunately, on DOS this fails, as config.log is still kept open
15524# by configure, so config.status won't be able to write to it; its
15525# output is simply discarded. So we exec the FD to /dev/null,
15526# effectively closing config.log, so it can be properly (re)opened and
15527# appended to by config.status. When coming back to configure, we
15528# need to make the FD available again.
15529if test "$no_create" != yes; then
15530 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015531 ac_config_status_args=
15532 test "$silent" = yes &&
15533 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015535 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015536 exec 5>>config.log
15537 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15538 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015539 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015540fi
15541if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15543$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015544fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015545
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015546
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015547echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015548if test ! -f Modules/Setup
15549then
15550 cp $srcdir/Modules/Setup.dist Modules/Setup
15551fi
15552
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015553echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015554if test ! -f Modules/Setup.local
15555then
15556 echo "# Edit this file for local setup changes" >Modules/Setup.local
15557fi
15558
15559echo "creating Makefile"
15560$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15561 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015562 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015563mv config.c Modules