blob: 9d247ae0c576627f9ded9dd4cccd78e22b3764ea [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.
doko@ubuntu.com51f65942012-06-30 14:42:46 +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#
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 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
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200172test x\$exitcode = x0 || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000173 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 :
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200217 # 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.
220 # Preserve -v and -x to the replacement shell.
221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
225 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.
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200489 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200491 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200498 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000499fi
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
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200510if 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
521 test -d "$1/.";
522 else
523 case $1 in #(
524 -*)set "./$1";;
525 esac;
526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527 ???[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
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200650ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000651AR
652RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000653USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000654GNULD
655LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000656LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000657RUNSHARED
658INSTSONAME
659LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000660PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000661BLDLIBRARY
662DLLLIBRARY
663LDLIBRARY
664LIBRARY
665BUILDEXEEXT
666EGREP
667GREP
668CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200669NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200670ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000671MAINCC
672CXX
673OBJEXT
674EXEEXT
675ac_ct_CC
676CPPFLAGS
677LDFLAGS
678CFLAGS
679CC
680EXPORT_MACOSX_DEPLOYMENT_TARGET
681CONFIGURE_MACOSX_DEPLOYMENT_TARGET
682SGI_ABI
683MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000684FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000685FRAMEWORKUNIXTOOLSPREFIX
686FRAMEWORKALTINSTALLLAST
687FRAMEWORKALTINSTALLFIRST
688FRAMEWORKINSTALLLAST
689FRAMEWORKINSTALLFIRST
690PYTHONFRAMEWORKINSTALLDIR
691PYTHONFRAMEWORKPREFIX
692PYTHONFRAMEWORKDIR
693PYTHONFRAMEWORKIDENTIFIER
694PYTHONFRAMEWORK
695LIPO_32BIT_FLAGS
696ARCH_RUN_32BIT
697UNIVERSALSDK
698CONFIG_ARGS
699SOVERSION
700VERSION
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100701host_os
702host_vendor
703host_cpu
704host
705build_os
706build_vendor
707build_cpu
708build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500709HAS_HG
710HGBRANCH
711HGTAG
712HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000713target_alias
714host_alias
715build_alias
716LIBS
717ECHO_T
718ECHO_N
719ECHO_C
720DEFS
721mandir
722localedir
723libdir
724psdir
725pdfdir
726dvidir
727htmldir
728infodir
729docdir
730oldincludedir
731includedir
732localstatedir
733sharedstatedir
734sysconfdir
735datadir
736datarootdir
737libexecdir
738sbindir
739bindir
740program_transform_name
741prefix
742exec_prefix
743PACKAGE_URL
744PACKAGE_BUGREPORT
745PACKAGE_STRING
746PACKAGE_VERSION
747PACKAGE_TARNAME
748PACKAGE_NAME
749PATH_SEPARATOR
750SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000751ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000752ac_user_opts='
753enable_option_checking
754enable_universalsdk
755with_universal_archs
756with_framework_name
757enable_framework
758with_gcc
759with_cxx_main
760with_suffix
761enable_shared
762enable_profiling
763with_pydebug
764with_libs
765with_system_expat
766with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100767with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000768enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000769with_dbmliborder
770with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000771with_threads
772with_thread
773enable_ipv6
774with_doc_strings
775with_tsc
776with_pymalloc
777with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000778with_fpectl
779with_libm
780with_libc
781enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000782with_computed_gotos
783'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000784 ac_precious_vars='build_alias
785host_alias
786target_alias
787CC
788CFLAGS
789LDFLAGS
790LIBS
791CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200792CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000793
Guido van Rossum627b2d71993-12-24 10:39:16 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000796ac_init_help=
797ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000798ac_unrecognized_opts=
799ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800# The variables have the same names as the options, with
801# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000802cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000805no_recursion=
806prefix=NONE
807program_prefix=NONE
808program_suffix=NONE
809program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814x_includes=NONE
815x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000816
817# Installation directory options.
818# These are left unexpanded so users can "make install exec_prefix=/foo"
819# and all the variables that are supposed to be based on exec_prefix
820# by default will actually change.
821# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823bindir='${exec_prefix}/bin'
824sbindir='${exec_prefix}/sbin'
825libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826datarootdir='${prefix}/share'
827datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828sysconfdir='${prefix}/etc'
829sharedstatedir='${prefix}/com'
830localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000831includedir='${prefix}/include'
832oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
834infodir='${datarootdir}/info'
835htmldir='${docdir}'
836dvidir='${docdir}'
837pdfdir='${docdir}'
838psdir='${docdir}'
839libdir='${exec_prefix}/lib'
840localedir='${datarootdir}/locale'
841mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000842
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000846do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847 # If the previous option needs an argument, assign it.
848 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 ac_prev=
851 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200855 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
856 *=) ac_optarg= ;;
857 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860 # Accept the important Cygnus configure options, so we can diagnose typos.
861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 case $ac_dashdash$ac_option in
863 --)
864 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866 -bindir | --bindir | --bindi | --bind | --bin | --bi)
867 ac_prev=bindir ;;
868 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870
871 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000872 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000873 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000874 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876 -cache-file | --cache-file | --cache-fil | --cache-fi \
877 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
878 ac_prev=cache_file ;;
879 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
880 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000881 cache_file=$ac_optarg ;;
882
883 --config-cache | -C)
884 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000889 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
892 | --dataroo | --dataro | --datar)
893 ac_prev=datarootdir ;;
894 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
895 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
896 datarootdir=$ac_optarg ;;
897
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000899 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200902 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000903 ac_useropt_orig=$ac_useropt
904 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
905 case $ac_user_opts in
906 *"
907"enable_$ac_useropt"
908"*) ;;
909 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
910 ac_unrecognized_sep=', ';;
911 esac
912 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913
914 -docdir | --docdir | --docdi | --doc | --do)
915 ac_prev=docdir ;;
916 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
917 docdir=$ac_optarg ;;
918
919 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
920 ac_prev=dvidir ;;
921 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
922 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
924 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000925 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000927 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200928 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000929 ac_useropt_orig=$ac_useropt
930 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
931 case $ac_user_opts in
932 *"
933"enable_$ac_useropt"
934"*) ;;
935 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
936 ac_unrecognized_sep=', ';;
937 esac
938 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
941 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
942 | --exec | --exe | --ex)
943 ac_prev=exec_prefix ;;
944 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
945 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
946 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --with-gas.
951 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 -help | --help | --hel | --he | -h)
954 ac_init_help=long ;;
955 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
956 ac_init_help=recursive ;;
957 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
958 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
960 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000965 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
966 ac_prev=htmldir ;;
967 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
968 | --ht=*)
969 htmldir=$ac_optarg ;;
970
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971 -includedir | --includedir | --includedi | --included | --include \
972 | --includ | --inclu | --incl | --inc)
973 ac_prev=includedir ;;
974 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
975 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977
978 -infodir | --infodir | --infodi | --infod | --info | --inf)
979 ac_prev=infodir ;;
980 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
983 -libdir | --libdir | --libdi | --libd)
984 ac_prev=libdir ;;
985 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
988 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
989 | --libexe | --libex | --libe)
990 ac_prev=libexecdir ;;
991 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
992 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000995 -localedir | --localedir | --localedi | --localed | --locale)
996 ac_prev=localedir ;;
997 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
998 localedir=$ac_optarg ;;
999
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001001 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002 ac_prev=localstatedir ;;
1003 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001004 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001006
1007 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1008 ac_prev=mandir ;;
1009 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 # Obsolete; use --without-fp.
1014 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018 no_create=yes ;;
1019
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1021 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1022 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1025 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1026 | --oldin | --oldi | --old | --ol | --o)
1027 ac_prev=oldincludedir ;;
1028 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1029 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1030 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1034 ac_prev=prefix ;;
1035 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037
1038 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1039 | --program-pre | --program-pr | --program-p)
1040 ac_prev=program_prefix ;;
1041 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1042 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
1045 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1046 | --program-suf | --program-su | --program-s)
1047 ac_prev=program_suffix ;;
1048 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1049 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051
1052 -program-transform-name | --program-transform-name \
1053 | --program-transform-nam | --program-transform-na \
1054 | --program-transform-n | --program-transform- \
1055 | --program-transform | --program-transfor \
1056 | --program-transfo | --program-transf \
1057 | --program-trans | --program-tran \
1058 | --progr-tra | --program-tr | --program-t)
1059 ac_prev=program_transform_name ;;
1060 -program-transform-name=* | --program-transform-name=* \
1061 | --program-transform-nam=* | --program-transform-na=* \
1062 | --program-transform-n=* | --program-transform-=* \
1063 | --program-transform=* | --program-transfor=* \
1064 | --program-transfo=* | --program-transf=* \
1065 | --program-trans=* | --program-tran=* \
1066 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1070 ac_prev=pdfdir ;;
1071 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1072 pdfdir=$ac_optarg ;;
1073
1074 -psdir | --psdir | --psdi | --psd | --ps)
1075 ac_prev=psdir ;;
1076 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1077 psdir=$ac_optarg ;;
1078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1080 | -silent | --silent | --silen | --sile | --sil)
1081 silent=yes ;;
1082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1084 ac_prev=sbindir ;;
1085 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1086 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
1089 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1090 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1091 | --sharedst | --shareds | --shared | --share | --shar \
1092 | --sha | --sh)
1093 ac_prev=sharedstatedir ;;
1094 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1095 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1096 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1097 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001100 -site | --site | --sit)
1101 ac_prev=site ;;
1102 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001104
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1106 ac_prev=srcdir ;;
1107 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001110 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1111 | --syscon | --sysco | --sysc | --sys | --sy)
1112 ac_prev=sysconfdir ;;
1113 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1114 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
1122 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1123 verbose=yes ;;
1124
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 -version | --version | --versio | --versi | --vers | -V)
1126 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
1128 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001129 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001131 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001132 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001133 ac_useropt_orig=$ac_useropt
1134 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1135 case $ac_user_opts in
1136 *"
1137"with_$ac_useropt"
1138"*) ;;
1139 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1140 ac_unrecognized_sep=', ';;
1141 esac
1142 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
1144 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001145 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001146 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001147 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001148 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001149 ac_useropt_orig=$ac_useropt
1150 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1151 case $ac_user_opts in
1152 *"
1153"with_$ac_useropt"
1154"*) ;;
1155 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1156 ac_unrecognized_sep=', ';;
1157 esac
1158 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001160 --x)
1161 # Obsolete; use --with-x.
1162 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163
1164 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1165 | --x-incl | --x-inc | --x-in | --x-i)
1166 ac_prev=x_includes ;;
1167 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1168 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
1171 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1172 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1173 ac_prev=x_libraries ;;
1174 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1175 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001178 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1179Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180 ;;
1181
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 *=*)
1183 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1184 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 case $ac_envvar in #(
1186 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001187 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001189 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 export $ac_envvar ;;
1191
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001192 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001197 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198 ;;
1199
1200 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001201done
1202
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206fi
1207
Matthias Kloseb9621712010-04-24 17:59:49 +00001208if test -n "$ac_unrecognized_opts"; then
1209 case $enable_option_checking in
1210 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001211 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1213 esac
1214fi
1215
1216# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001217for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1218 datadir sysconfdir sharedstatedir localstatedir includedir \
1219 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1220 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001221do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001222 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 # Remove trailing slashes.
1224 case $ac_val in
1225 */ )
1226 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1227 eval $ac_var=\$ac_val;;
1228 esac
1229 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001231 [\\/$]* | ?:[\\/]* ) continue;;
1232 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001234 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001235done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236
Martin v. Löwis11437992002-04-12 09:54:03 +00001237# There might be people who depend on the old broken behavior: `$host'
1238# used to hold the argument of --host etc.
1239# FIXME: To remove some day.
1240build=$build_alias
1241host=$host_alias
1242target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001243
Martin v. Löwis11437992002-04-12 09:54:03 +00001244# FIXME: To remove some day.
1245if test "x$host_alias" != x; then
1246 if test "x$build_alias" = x; then
1247 cross_compiling=maybe
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001248 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1249 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 elif test "x$build_alias" != "x$host_alias"; then
1251 cross_compiling=yes
1252 fi
1253fi
1254
1255ac_tool_prefix=
1256test -n "$host_alias" && ac_tool_prefix=$host_alias-
1257
1258test "$silent" = yes && exec 6>/dev/null
1259
Guido van Rossum627b2d71993-12-24 10:39:16 +00001260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261ac_pwd=`pwd` && test -n "$ac_pwd" &&
1262ac_ls_di=`ls -di .` &&
1263ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267
1268
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269# Find the source files, if location was not specified.
1270if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 ac_confdir=`$as_dirname -- "$as_myself" ||
1274$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1275 X"$as_myself" : 'X\(//\)[^/]' \| \
1276 X"$as_myself" : 'X\(//\)$' \| \
1277 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1278$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1280 s//\1/
1281 q
1282 }
1283 /^X\(\/\/\)[^/].*/{
1284 s//\1/
1285 q
1286 }
1287 /^X\(\/\/\)$/{
1288 s//\1/
1289 q
1290 }
1291 /^X\(\/\).*/{
1292 s//\1/
1293 q
1294 }
1295 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001296 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001298 srcdir=..
1299 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300else
1301 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303if test ! -r "$srcdir/$ac_unique_file"; then
1304 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001305 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1308ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001309 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 pwd)`
1311# When building in place, set srcdir=.
1312if test "$ac_abs_confdir" = "$ac_pwd"; then
1313 srcdir=.
1314fi
1315# Remove unnecessary trailing slashes from srcdir.
1316# Double slashes in file names in object file debugging info
1317# mess up M-x gdb in Emacs.
1318case $srcdir in
1319*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1320esac
1321for ac_var in $ac_precious_vars; do
1322 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1323 eval ac_env_${ac_var}_value=\$${ac_var}
1324 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1325 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1326done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001327
Martin v. Löwis11437992002-04-12 09:54:03 +00001328#
1329# Report the --help message.
1330#
1331if test "$ac_init_help" = "long"; then
1332 # Omit some internal or obsolete options to make the list less imposing.
1333 # This message is too long to be a string in the A/UX 3.1 sh.
1334 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001335\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
1337Usage: $0 [OPTION]... [VAR=VALUE]...
1338
1339To assign environment variables (e.g., CC, CFLAGS...), specify them as
1340VAR=VALUE. See below for descriptions of some of the useful variables.
1341
1342Defaults for the options are specified in brackets.
1343
1344Configuration:
1345 -h, --help display this help and exit
1346 --help=short display options specific to this package
1347 --help=recursive display the short help of all the included packages
1348 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001349 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001350 --cache-file=FILE cache test results in FILE [disabled]
1351 -C, --config-cache alias for \`--cache-file=config.cache'
1352 -n, --no-create do not create output files
1353 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1354
Martin v. Löwis11437992002-04-12 09:54:03 +00001355Installation directories:
1356 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001357 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001358 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001359 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001360
1361By default, \`make install' will install all the files in
1362\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1363an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1364for instance \`--prefix=\$HOME'.
1365
1366For better control, use the options below.
1367
1368Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001369 --bindir=DIR user executables [EPREFIX/bin]
1370 --sbindir=DIR system admin executables [EPREFIX/sbin]
1371 --libexecdir=DIR program executables [EPREFIX/libexec]
1372 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1373 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1374 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1375 --libdir=DIR object code libraries [EPREFIX/lib]
1376 --includedir=DIR C header files [PREFIX/include]
1377 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1378 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1379 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1380 --infodir=DIR info documentation [DATAROOTDIR/info]
1381 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1382 --mandir=DIR man documentation [DATAROOTDIR/man]
1383 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1384 --htmldir=DIR html documentation [DOCDIR]
1385 --dvidir=DIR dvi documentation [DOCDIR]
1386 --pdfdir=DIR pdf documentation [DOCDIR]
1387 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001388_ACEOF
1389
1390 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001391
1392System types:
1393 --build=BUILD configure for building on BUILD [guessed]
1394 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001395_ACEOF
1396fi
1397
1398if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001399 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001400 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001401 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001402 cat <<\_ACEOF
1403
1404Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001405 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1407 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001408 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001409 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001410 --enable-framework[=INSTALLDIR]
1411 Build (MacOSX|Darwin) framework
1412 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001413 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001414 --enable-loadable-sqlite-extensions
1415 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --enable-ipv6 Enable ipv6 (with ipv4) support
1417 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001418 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001419 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420
1421Optional Packages:
1422 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1423 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001424 --with-universal-archs=ARCH
1425 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001426 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001427 --with-framework-name=FRAMEWORK
1428 specify an alternate name of the framework built
1429 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001431 --with-cxx-main=<compiler>
1432 compile main() and link python executable with C++
1433 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with-suffix=.exe set executable suffix
1435 --with-pydebug build with Py_DEBUG defined
1436 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001437 --with-system-expat build pyexpat module using an installed expat
1438 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001439 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001440 --with-system-libmpdec build _decimal module using an installed libmpdec
1441 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001442 --with-dbmliborder=db1:db2:...
1443 order to check db backends for dbm. Valid value is a
1444 colon separated string with the backend names
1445 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001447 --with(out)-threads[=DIRECTORY]
1448 disable/enable thread support
1449 --with(out)-thread[=DIRECTORY]
1450 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001451 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001452 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001454 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --with-fpectl enable SIGFPE catching
1456 --with-libm=STRING math library
1457 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001458 --with(out)-computed-gotos
1459 Use computed gotos in evaluation loop (enabled by
1460 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001461
1462Some influential environment variables:
1463 CC C compiler command
1464 CFLAGS C compiler flags
1465 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1466 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001467 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001468 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001469 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 CPP C preprocessor
1471
1472Use these variables to override the choices made by `configure' or to help
1473it to find libraries and programs with nonstandard names/locations.
1474
Georg Brandle2e15612009-05-20 18:25:10 +00001475Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001476_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001478fi
1479
1480if test "$ac_init_help" = "recursive"; then
1481 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001483 test -d "$ac_dir" ||
1484 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1485 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 ac_builddir=.
1487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001488case "$ac_dir" in
1489.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1490*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001493 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 case $ac_top_builddir_sub in
1495 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1496 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1497 esac ;;
1498esac
1499ac_abs_top_builddir=$ac_pwd
1500ac_abs_builddir=$ac_pwd$ac_dir_suffix
1501# for backward compatibility:
1502ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001503
1504case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001505 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001507 ac_top_srcdir=$ac_top_builddir_sub
1508 ac_abs_top_srcdir=$ac_pwd ;;
1509 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 ac_top_srcdir=$srcdir
1512 ac_abs_top_srcdir=$srcdir ;;
1513 *) # Relative name.
1514 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1515 ac_top_srcdir=$ac_top_build_prefix$srcdir
1516 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001517esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 cd "$ac_dir" || { ac_status=$?; continue; }
1521 # Check for guested configure.
1522 if test -f "$ac_srcdir/configure.gnu"; then
1523 echo &&
1524 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1525 elif test -f "$ac_srcdir/configure"; then
1526 echo &&
1527 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001528 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001529 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 fi || ac_status=$?
1531 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 done
1533fi
1534
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001535test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001536if $ac_init_version; then
1537 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001538python configure 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001539generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001541Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001542This configure script is free software; the Free Software Foundation
1543gives unlimited permission to copy, distribute and modify it.
1544_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001545 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001547
1548## ------------------------ ##
1549## Autoconf initialization. ##
1550## ------------------------ ##
1551
1552# ac_fn_c_try_compile LINENO
1553# --------------------------
1554# Try to compile conftest.$ac_ext, and return whether this succeeded.
1555ac_fn_c_try_compile ()
1556{
1557 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1558 rm -f conftest.$ac_objext
1559 if { { ac_try="$ac_compile"
1560case "(($ac_try" in
1561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1562 *) ac_try_echo=$ac_try;;
1563esac
1564eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1565$as_echo "$ac_try_echo"; } >&5
1566 (eval "$ac_compile") 2>conftest.err
1567 ac_status=$?
1568 if test -s conftest.err; then
1569 grep -v '^ *+' conftest.err >conftest.er1
1570 cat conftest.er1 >&5
1571 mv -f conftest.er1 conftest.err
1572 fi
1573 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1574 test $ac_status = 0; } && {
1575 test -z "$ac_c_werror_flag" ||
1576 test ! -s conftest.err
1577 } && test -s conftest.$ac_objext; then :
1578 ac_retval=0
1579else
1580 $as_echo "$as_me: failed program was:" >&5
1581sed 's/^/| /' conftest.$ac_ext >&5
1582
1583 ac_retval=1
1584fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001585 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 as_fn_set_status $ac_retval
1587
1588} # ac_fn_c_try_compile
1589
Matthias Kloseb9621712010-04-24 17:59:49 +00001590# ac_fn_c_try_link LINENO
1591# -----------------------
1592# Try to link conftest.$ac_ext, and return whether this succeeded.
1593ac_fn_c_try_link ()
1594{
1595 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1596 rm -f conftest.$ac_objext conftest$ac_exeext
1597 if { { ac_try="$ac_link"
1598case "(($ac_try" in
1599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1600 *) ac_try_echo=$ac_try;;
1601esac
1602eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1603$as_echo "$ac_try_echo"; } >&5
1604 (eval "$ac_link") 2>conftest.err
1605 ac_status=$?
1606 if test -s conftest.err; then
1607 grep -v '^ *+' conftest.err >conftest.er1
1608 cat conftest.er1 >&5
1609 mv -f conftest.er1 conftest.err
1610 fi
1611 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1612 test $ac_status = 0; } && {
1613 test -z "$ac_c_werror_flag" ||
1614 test ! -s conftest.err
1615 } && test -s conftest$ac_exeext && {
1616 test "$cross_compiling" = yes ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001617 $as_test_x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001618 }; then :
1619 ac_retval=0
1620else
1621 $as_echo "$as_me: failed program was:" >&5
1622sed 's/^/| /' conftest.$ac_ext >&5
1623
1624 ac_retval=1
1625fi
1626 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1627 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1628 # interfere with the next link command; also delete a directory that is
1629 # left behind by Apple's compiler. We do this before executing the actions.
1630 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001631 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001632 as_fn_set_status $ac_retval
1633
1634} # ac_fn_c_try_link
1635
Matthias Kloseb9621712010-04-24 17:59:49 +00001636# ac_fn_c_try_cpp LINENO
1637# ----------------------
1638# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1639ac_fn_c_try_cpp ()
1640{
1641 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1642 if { { ac_try="$ac_cpp conftest.$ac_ext"
1643case "(($ac_try" in
1644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1645 *) ac_try_echo=$ac_try;;
1646esac
1647eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1648$as_echo "$ac_try_echo"; } >&5
1649 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1650 ac_status=$?
1651 if test -s conftest.err; then
1652 grep -v '^ *+' conftest.err >conftest.er1
1653 cat conftest.er1 >&5
1654 mv -f conftest.er1 conftest.err
1655 fi
1656 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001657 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1659 test ! -s conftest.err
1660 }; then :
1661 ac_retval=0
1662else
1663 $as_echo "$as_me: failed program was:" >&5
1664sed 's/^/| /' conftest.$ac_ext >&5
1665
1666 ac_retval=1
1667fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001668 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 as_fn_set_status $ac_retval
1670
1671} # ac_fn_c_try_cpp
1672
1673# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1674# -------------------------------------------------------
1675# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1676# the include files in INCLUDES and setting the cache variable VAR
1677# accordingly.
1678ac_fn_c_check_header_mongrel ()
1679{
1680 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1683$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001684if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001685 $as_echo_n "(cached) " >&6
1686fi
1687eval ac_res=\$$3
1688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1689$as_echo "$ac_res" >&6; }
1690else
1691 # Is the header compilable?
1692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1693$as_echo_n "checking $2 usability... " >&6; }
1694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1695/* end confdefs.h. */
1696$4
1697#include <$2>
1698_ACEOF
1699if ac_fn_c_try_compile "$LINENO"; then :
1700 ac_header_compiler=yes
1701else
1702 ac_header_compiler=no
1703fi
1704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1706$as_echo "$ac_header_compiler" >&6; }
1707
1708# Is the header present?
1709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1710$as_echo_n "checking $2 presence... " >&6; }
1711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1712/* end confdefs.h. */
1713#include <$2>
1714_ACEOF
1715if ac_fn_c_try_cpp "$LINENO"; then :
1716 ac_header_preproc=yes
1717else
1718 ac_header_preproc=no
1719fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001720rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1722$as_echo "$ac_header_preproc" >&6; }
1723
1724# So? What about this header?
1725case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1726 yes:no: )
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1728$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1730$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1731 ;;
1732 no:yes:* )
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1734$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1736$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1738$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1740$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1742$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001743( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001744## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001745## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001746 ) | sed "s/^/$as_me: WARNING: /" >&2
1747 ;;
1748esac
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1750$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001751if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 $as_echo_n "(cached) " >&6
1753else
1754 eval "$3=\$ac_header_compiler"
1755fi
1756eval ac_res=\$$3
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1758$as_echo "$ac_res" >&6; }
1759fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001760 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001761
1762} # ac_fn_c_check_header_mongrel
1763
1764# ac_fn_c_try_run LINENO
1765# ----------------------
1766# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1767# that executables *can* be run.
1768ac_fn_c_try_run ()
1769{
1770 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1771 if { { ac_try="$ac_link"
1772case "(($ac_try" in
1773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1774 *) ac_try_echo=$ac_try;;
1775esac
1776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1777$as_echo "$ac_try_echo"; } >&5
1778 (eval "$ac_link") 2>&5
1779 ac_status=$?
1780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1781 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1782 { { case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785esac
1786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787$as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_try") 2>&5
1789 ac_status=$?
1790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1791 test $ac_status = 0; }; }; then :
1792 ac_retval=0
1793else
1794 $as_echo "$as_me: program exited with status $ac_status" >&5
1795 $as_echo "$as_me: failed program was:" >&5
1796sed 's/^/| /' conftest.$ac_ext >&5
1797
1798 ac_retval=$ac_status
1799fi
1800 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001801 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001802 as_fn_set_status $ac_retval
1803
1804} # ac_fn_c_try_run
1805
1806# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1807# -------------------------------------------------------
1808# Tests whether HEADER exists and can be compiled using the include files in
1809# INCLUDES, setting the cache variable VAR accordingly.
1810ac_fn_c_check_header_compile ()
1811{
1812 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1814$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001815if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001816 $as_echo_n "(cached) " >&6
1817else
1818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820$4
1821#include <$2>
1822_ACEOF
1823if ac_fn_c_try_compile "$LINENO"; then :
1824 eval "$3=yes"
1825else
1826 eval "$3=no"
1827fi
1828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1829fi
1830eval ac_res=\$$3
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1832$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001833 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001834
1835} # ac_fn_c_check_header_compile
1836
Matthias Kloseb9621712010-04-24 17:59:49 +00001837# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1838# -------------------------------------------
1839# Tests whether TYPE exists after having included INCLUDES, setting cache
1840# variable VAR accordingly.
1841ac_fn_c_check_type ()
1842{
1843 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1845$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001846if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001847 $as_echo_n "(cached) " >&6
1848else
1849 eval "$3=no"
1850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1851/* end confdefs.h. */
1852$4
1853int
1854main ()
1855{
1856if (sizeof ($2))
1857 return 0;
1858 ;
1859 return 0;
1860}
1861_ACEOF
1862if ac_fn_c_try_compile "$LINENO"; then :
1863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1864/* end confdefs.h. */
1865$4
1866int
1867main ()
1868{
1869if (sizeof (($2)))
1870 return 0;
1871 ;
1872 return 0;
1873}
1874_ACEOF
1875if ac_fn_c_try_compile "$LINENO"; then :
1876
1877else
1878 eval "$3=yes"
1879fi
1880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1881fi
1882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1883fi
1884eval ac_res=\$$3
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1886$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888
1889} # ac_fn_c_check_type
1890
1891# ac_fn_c_find_uintX_t LINENO BITS VAR
1892# ------------------------------------
1893# Finds an unsigned integer type with width BITS, setting cache variable VAR
1894# accordingly.
1895ac_fn_c_find_uintX_t ()
1896{
1897 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1899$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001900if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001901 $as_echo_n "(cached) " >&6
1902else
1903 eval "$3=no"
1904 # Order is important - never check a type that is potentially smaller
1905 # than half of the expected target width.
1906 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1907 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1909/* end confdefs.h. */
1910$ac_includes_default
1911int
1912main ()
1913{
1914static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001915test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001916
1917 ;
1918 return 0;
1919}
1920_ACEOF
1921if ac_fn_c_try_compile "$LINENO"; then :
1922 case $ac_type in #(
1923 uint$2_t) :
1924 eval "$3=yes" ;; #(
1925 *) :
1926 eval "$3=\$ac_type" ;;
1927esac
1928fi
1929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001930 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001931
1932else
1933 break
1934fi
1935 done
1936fi
1937eval ac_res=\$$3
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1939$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001940 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001941
1942} # ac_fn_c_find_uintX_t
1943
1944# ac_fn_c_find_intX_t LINENO BITS VAR
1945# -----------------------------------
1946# Finds a signed integer type with width BITS, setting cache variable VAR
1947# accordingly.
1948ac_fn_c_find_intX_t ()
1949{
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1952$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001953if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001954 $as_echo_n "(cached) " >&6
1955else
1956 eval "$3=no"
1957 # Order is important - never check a type that is potentially smaller
1958 # than half of the expected target width.
1959 for ac_type in int$2_t 'int' 'long int' \
1960 'long long int' 'short int' 'signed char'; do
1961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962/* end confdefs.h. */
1963$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001964 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001965int
1966main ()
1967{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001968static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001969test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001970
1971 ;
1972 return 0;
1973}
1974_ACEOF
1975if ac_fn_c_try_compile "$LINENO"; then :
1976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1977/* end confdefs.h. */
1978$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001979 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001980int
1981main ()
1982{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001983static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001984 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001985test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001986
1987 ;
1988 return 0;
1989}
1990_ACEOF
1991if ac_fn_c_try_compile "$LINENO"; then :
1992
1993else
1994 case $ac_type in #(
1995 int$2_t) :
1996 eval "$3=yes" ;; #(
1997 *) :
1998 eval "$3=\$ac_type" ;;
1999esac
2000fi
2001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2002fi
2003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002004 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006else
2007 break
2008fi
2009 done
2010fi
2011eval ac_res=\$$3
2012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2013$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002014 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002015
2016} # ac_fn_c_find_intX_t
2017
2018# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2019# --------------------------------------------
2020# Tries to find the compile-time value of EXPR in a program that includes
2021# INCLUDES, setting VAR accordingly. Returns whether the value could be
2022# computed
2023ac_fn_c_compute_int ()
2024{
2025 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2026 if test "$cross_compiling" = yes; then
2027 # Depending upon the size, compute the lo and hi bounds.
2028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031int
2032main ()
2033{
2034static int test_array [1 - 2 * !(($2) >= 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002035test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002036
2037 ;
2038 return 0;
2039}
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"; then :
2042 ac_lo=0 ac_mid=0
2043 while :; do
2044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045/* end confdefs.h. */
2046$4
2047int
2048main ()
2049{
2050static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002051test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002052
2053 ;
2054 return 0;
2055}
2056_ACEOF
2057if ac_fn_c_try_compile "$LINENO"; then :
2058 ac_hi=$ac_mid; break
2059else
2060 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2061 if test $ac_lo -le $ac_mid; then
2062 ac_lo= ac_hi=
2063 break
2064 fi
2065 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2066fi
2067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2068 done
2069else
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002077test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_hi=-1 ac_mid=-1
2085 while :; do
2086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2087/* end confdefs.h. */
2088$4
2089int
2090main ()
2091{
2092static int test_array [1 - 2 * !(($2) >= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002093test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002094
2095 ;
2096 return 0;
2097}
2098_ACEOF
2099if ac_fn_c_try_compile "$LINENO"; then :
2100 ac_lo=$ac_mid; break
2101else
2102 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2103 if test $ac_mid -le $ac_hi; then
2104 ac_lo= ac_hi=
2105 break
2106 fi
2107 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110 done
2111else
2112 ac_lo= ac_hi=
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115fi
2116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117# Binary search between lo and hi bounds.
2118while test "x$ac_lo" != "x$ac_hi"; do
2119 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123int
2124main ()
2125{
2126static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002127test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002128
2129 ;
2130 return 0;
2131}
2132_ACEOF
2133if ac_fn_c_try_compile "$LINENO"; then :
2134 ac_hi=$ac_mid
2135else
2136 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2137fi
2138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2139done
2140case $ac_lo in #((
2141?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2142'') ac_retval=1 ;;
2143esac
2144 else
2145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146/* end confdefs.h. */
2147$4
2148static long int longval () { return $2; }
2149static unsigned long int ulongval () { return $2; }
2150#include <stdio.h>
2151#include <stdlib.h>
2152int
2153main ()
2154{
2155
2156 FILE *f = fopen ("conftest.val", "w");
2157 if (! f)
2158 return 1;
2159 if (($2) < 0)
2160 {
2161 long int i = longval ();
2162 if (i != ($2))
2163 return 1;
2164 fprintf (f, "%ld", i);
2165 }
2166 else
2167 {
2168 unsigned long int i = ulongval ();
2169 if (i != ($2))
2170 return 1;
2171 fprintf (f, "%lu", i);
2172 }
2173 /* Do not output a trailing newline, as this causes \r\n confusion
2174 on some platforms. */
2175 return ferror (f) || fclose (f) != 0;
2176
2177 ;
2178 return 0;
2179}
2180_ACEOF
2181if ac_fn_c_try_run "$LINENO"; then :
2182 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2183else
2184 ac_retval=1
2185fi
2186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2187 conftest.$ac_objext conftest.beam conftest.$ac_ext
2188rm -f conftest.val
2189
2190 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002191 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002192 as_fn_set_status $ac_retval
2193
2194} # ac_fn_c_compute_int
2195
2196# ac_fn_c_check_func LINENO FUNC VAR
2197# ----------------------------------
2198# Tests whether FUNC exists, setting the cache variable VAR accordingly
2199ac_fn_c_check_func ()
2200{
2201 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2203$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002204if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002205 $as_echo_n "(cached) " >&6
2206else
2207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2208/* end confdefs.h. */
2209/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2210 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2211#define $2 innocuous_$2
2212
2213/* System header to define __stub macros and hopefully few prototypes,
2214 which can conflict with char $2 (); below.
2215 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2216 <limits.h> exists even on freestanding compilers. */
2217
2218#ifdef __STDC__
2219# include <limits.h>
2220#else
2221# include <assert.h>
2222#endif
2223
2224#undef $2
2225
2226/* Override any GCC internal prototype to avoid an error.
2227 Use char because int might match the return type of a GCC
2228 builtin and then its argument prototype would still apply. */
2229#ifdef __cplusplus
2230extern "C"
2231#endif
2232char $2 ();
2233/* The GNU C library defines this for functions which it implements
2234 to always fail with ENOSYS. Some functions are actually named
2235 something starting with __ and the normal name is an alias. */
2236#if defined __stub_$2 || defined __stub___$2
2237choke me
2238#endif
2239
2240int
2241main ()
2242{
2243return $2 ();
2244 ;
2245 return 0;
2246}
2247_ACEOF
2248if ac_fn_c_try_link "$LINENO"; then :
2249 eval "$3=yes"
2250else
2251 eval "$3=no"
2252fi
2253rm -f core conftest.err conftest.$ac_objext \
2254 conftest$ac_exeext conftest.$ac_ext
2255fi
2256eval ac_res=\$$3
2257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2258$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002259 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002260
2261} # ac_fn_c_check_func
2262
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002263# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2264# ---------------------------------------------
2265# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2266# accordingly.
2267ac_fn_c_check_decl ()
2268{
2269 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270 as_decl_name=`echo $2|sed 's/ *(.*//'`
2271 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2273$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2274if eval \${$3+:} false; then :
2275 $as_echo_n "(cached) " >&6
2276else
2277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h. */
2279$4
2280int
2281main ()
2282{
2283#ifndef $as_decl_name
2284#ifdef __cplusplus
2285 (void) $as_decl_use;
2286#else
2287 (void) $as_decl_name;
2288#endif
2289#endif
2290
2291 ;
2292 return 0;
2293}
2294_ACEOF
2295if ac_fn_c_try_compile "$LINENO"; then :
2296 eval "$3=yes"
2297else
2298 eval "$3=no"
2299fi
2300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301fi
2302eval ac_res=\$$3
2303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2304$as_echo "$ac_res" >&6; }
2305 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2306
2307} # ac_fn_c_check_decl
2308
Matthias Kloseb9621712010-04-24 17:59:49 +00002309# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2310# ----------------------------------------------------
2311# Tries to find if the field MEMBER exists in type AGGR, after including
2312# INCLUDES, setting cache variable VAR accordingly.
2313ac_fn_c_check_member ()
2314{
2315 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2317$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002318if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002319 $as_echo_n "(cached) " >&6
2320else
2321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2322/* end confdefs.h. */
2323$5
2324int
2325main ()
2326{
2327static $2 ac_aggr;
2328if (ac_aggr.$3)
2329return 0;
2330 ;
2331 return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_compile "$LINENO"; then :
2335 eval "$4=yes"
2336else
2337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2338/* end confdefs.h. */
2339$5
2340int
2341main ()
2342{
2343static $2 ac_aggr;
2344if (sizeof ac_aggr.$3)
2345return 0;
2346 ;
2347 return 0;
2348}
2349_ACEOF
2350if ac_fn_c_try_compile "$LINENO"; then :
2351 eval "$4=yes"
2352else
2353 eval "$4=no"
2354fi
2355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356fi
2357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2358fi
2359eval ac_res=\$$4
2360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2361$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002362 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002363
2364} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002366This file contains any messages produced by compilers while
2367running configure, to aid debugging if configure makes a mistake.
2368
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002369It was created by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002370generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002371
2372 $ $0 $@
2373
2374_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002375exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002376{
2377cat <<_ASUNAME
2378## --------- ##
2379## Platform. ##
2380## --------- ##
2381
2382hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2383uname -m = `(uname -m) 2>/dev/null || echo unknown`
2384uname -r = `(uname -r) 2>/dev/null || echo unknown`
2385uname -s = `(uname -s) 2>/dev/null || echo unknown`
2386uname -v = `(uname -v) 2>/dev/null || echo unknown`
2387
2388/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2389/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2390
2391/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2392/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2393/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002394/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002395/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2396/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2397/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2398
2399_ASUNAME
2400
2401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2402for as_dir in $PATH
2403do
2404 IFS=$as_save_IFS
2405 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002406 $as_echo "PATH: $as_dir"
2407 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002408IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002409
2410} >&5
2411
2412cat >&5 <<_ACEOF
2413
2414
2415## ----------- ##
2416## Core tests. ##
2417## ----------- ##
2418
2419_ACEOF
2420
2421
2422# Keep a trace of the command line.
2423# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002425# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002426# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002427ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002428ac_configure_args0=
2429ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002430ac_must_keep_next=false
2431for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002432do
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 for ac_arg
2434 do
2435 case $ac_arg in
2436 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2437 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2438 | -silent | --silent | --silen | --sile | --sil)
2439 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002440 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002441 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002442 esac
2443 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002444 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002448 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002450 case $ac_arg in
2451 *=* | --config-cache | -C | -disable-* | --disable-* \
2452 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2453 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2454 | -with-* | --with-* | -without-* | --without-* | --x)
2455 case "$ac_configure_args0 " in
2456 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2457 esac
2458 ;;
2459 -* ) ac_must_keep_next=true ;;
2460 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002463 ;;
2464 esac
2465 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002466done
Matthias Kloseb9621712010-04-24 17:59:49 +00002467{ ac_configure_args0=; unset ac_configure_args0;}
2468{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002469
2470# When interrupted or exit'd, cleanup temporary files, and complete
2471# config.log. We remove comments because anyway the quotes in there
2472# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473# WARNING: Use '\'' to represent an apostrophe within the trap.
2474# 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 +00002475trap 'exit_status=$?
2476 # Save into config.log some information that might help in debugging.
2477 {
2478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002480 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002481## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002482## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo
2484 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485(
2486 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2487 eval ac_val=\$$ac_var
2488 case $ac_val in #(
2489 *${as_nl}*)
2490 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2492$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 esac
2494 case $ac_var in #(
2495 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2497 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac ;;
2499 esac
2500 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002501 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2503 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 "s/'\''/'\''\\\\'\'''\''/g;
2506 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2507 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002508 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002510 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac |
2512 sort
2513)
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002515
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002517## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 echo
2520 for ac_var in $ac_subst_vars
2521 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 eval ac_val=\$$ac_var
2523 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 done | sort
2528 echo
2529
2530 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002534 echo
2535 for ac_var in $ac_subst_files
2536 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 eval ac_val=\$$ac_var
2538 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002542 done | sort
2543 echo
2544 fi
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002547 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002548## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002549## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 echo
2553 fi
2554 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002555 $as_echo "$as_me: caught signal $ac_signal"
2556 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 rm -f core *.core core.conftest.* &&
2559 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002562for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002563 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002564done
2565ac_signal=0
2566
2567# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002569
Matthias Kloseb9621712010-04-24 17:59:49 +00002570$as_echo "/* confdefs.h */" > confdefs.h
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572# Predefined preprocessor variables.
2573
2574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_NAME "$PACKAGE_NAME"
2576_ACEOF
2577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582cat >>confdefs.h <<_ACEOF
2583#define PACKAGE_VERSION "$PACKAGE_VERSION"
2584_ACEOF
2585
Martin v. Löwis11437992002-04-12 09:54:03 +00002586cat >>confdefs.h <<_ACEOF
2587#define PACKAGE_STRING "$PACKAGE_STRING"
2588_ACEOF
2589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590cat >>confdefs.h <<_ACEOF
2591#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2592_ACEOF
2593
Matthias Kloseb9621712010-04-24 17:59:49 +00002594cat >>confdefs.h <<_ACEOF
2595#define PACKAGE_URL "$PACKAGE_URL"
2596_ACEOF
2597
Martin v. Löwis11437992002-04-12 09:54:03 +00002598
2599# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002600# Prefer an explicitly selected file to automatically selected ones.
2601ac_site_file1=NONE
2602ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002604 # We do not want a PATH search for config.site.
2605 case $CONFIG_SITE in #((
2606 -*) ac_site_file1=./$CONFIG_SITE;;
2607 */*) ac_site_file1=$CONFIG_SITE;;
2608 *) ac_site_file1=./$CONFIG_SITE;;
2609 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 ac_site_file1=$prefix/share/config.site
2612 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613else
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 ac_site_file1=$ac_default_prefix/share/config.site
2615 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002617for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618do
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 test "x$ac_site_file" = xNONE && continue
2620 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2621 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2622$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002624 . "$ac_site_file" \
2625 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2627as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002628See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002629 fi
2630done
2631
2632if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 # Some versions of bash will fail to source /dev/null (special files
2634 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2635 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2637$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2640 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 esac
2642 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002643else
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2645$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 >$cache_file
2647fi
2648
2649# Check that the precious variables saved in the cache have kept the same
2650# value.
2651ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2654 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2656 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 case $ac_old_set,$ac_new_set in
2658 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2660$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 +00002661 ac_cache_corrupted=: ;;
2662 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2664$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 ac_cache_corrupted=: ;;
2666 ,);;
2667 *)
2668 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 # differences in whitespace do not lead to failure.
2670 ac_old_val_w=`echo x $ac_old_val`
2671 ac_new_val_w=`echo x $ac_new_val`
2672 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2674$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2675 ac_cache_corrupted=:
2676 else
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2678$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2679 eval $ac_var=\$ac_old_val
2680 fi
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2682$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2684$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 fi;;
2686 esac
2687 # Pass precious variables to config.status.
2688 if test "$ac_new_set" = set; then
2689 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 *) ac_arg=$ac_var=$ac_new_val ;;
2692 esac
2693 case " $ac_configure_args " in
2694 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002695 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 esac
2697 fi
2698done
2699if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002700 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2703$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002704 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002706## -------------------- ##
2707## Main body of script. ##
2708## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709
Guido van Rossum7f43da71994-08-01 12:15:30 +00002710ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002712ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2713ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2714ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002715
Guido van Rossum627b2d71993-12-24 10:39:16 +00002716
Michael W. Hudson54241132001-12-07 15:38:26 +00002717
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718
2719
2720
2721
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002722if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723then
2724# Extract the first word of "hg", so it can be a program name with args.
2725set dummy hg; ac_word=$2
2726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2727$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002728if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729 $as_echo_n "(cached) " >&6
2730else
2731 if test -n "$HAS_HG"; then
2732 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2733else
2734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735for as_dir in $PATH
2736do
2737 IFS=$as_save_IFS
2738 test -z "$as_dir" && as_dir=.
2739 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002740 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741 ac_cv_prog_HAS_HG="found"
2742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2743 break 2
2744 fi
2745done
2746 done
2747IFS=$as_save_IFS
2748
2749 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2750fi
2751fi
2752HAS_HG=$ac_cv_prog_HAS_HG
2753if test -n "$HAS_HG"; then
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2755$as_echo "$HAS_HG" >&6; }
2756else
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2758$as_echo "no" >&6; }
2759fi
2760
2761
2762else
2763HAS_HG=no-repository
2764fi
2765if test $HAS_HG = found
2766then
2767 HGVERSION="hg id -i \$(srcdir)"
2768 HGTAG="hg id -t \$(srcdir)"
2769 HGBRANCH="hg id -b \$(srcdir)"
2770else
2771 HGVERSION=""
2772 HGTAG=""
2773 HGBRANCH=""
2774fi
2775
2776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002778
2779
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002780ac_aux_dir=
2781for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2782 if test -f "$ac_dir/install-sh"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/install-sh -c"
2785 break
2786 elif test -f "$ac_dir/install.sh"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/install.sh -c"
2789 break
2790 elif test -f "$ac_dir/shtool"; then
2791 ac_aux_dir=$ac_dir
2792 ac_install_sh="$ac_aux_dir/shtool install -c"
2793 break
2794 fi
2795done
2796if test -z "$ac_aux_dir"; then
2797 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2798fi
2799
2800# These three variables are undocumented and unsupported,
2801# and are intended to be withdrawn in a future Autoconf release.
2802# They can cause serious problems if a builder's source tree is in a directory
2803# whose full name contains unusual characters.
2804ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2805ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2806ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2807
2808
2809# Make sure we can run config.sub.
2810$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2811 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2812
2813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2814$as_echo_n "checking build system type... " >&6; }
2815if ${ac_cv_build+:} false; then :
2816 $as_echo_n "(cached) " >&6
2817else
2818 ac_build_alias=$build_alias
2819test "x$ac_build_alias" = x &&
2820 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2821test "x$ac_build_alias" = x &&
2822 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2823ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2824 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2825
2826fi
2827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2828$as_echo "$ac_cv_build" >&6; }
2829case $ac_cv_build in
2830*-*-*) ;;
2831*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2832esac
2833build=$ac_cv_build
2834ac_save_IFS=$IFS; IFS='-'
2835set x $ac_cv_build
2836shift
2837build_cpu=$1
2838build_vendor=$2
2839shift; shift
2840# Remember, the first character of IFS is used to create $*,
2841# except with old shells:
2842build_os=$*
2843IFS=$ac_save_IFS
2844case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2845
2846
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2848$as_echo_n "checking host system type... " >&6; }
2849if ${ac_cv_host+:} false; then :
2850 $as_echo_n "(cached) " >&6
2851else
2852 if test "x$host_alias" = x; then
2853 ac_cv_host=$ac_cv_build
2854else
2855 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2856 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2857fi
2858
2859fi
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2861$as_echo "$ac_cv_host" >&6; }
2862case $ac_cv_host in
2863*-*-*) ;;
2864*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2865esac
2866host=$ac_cv_host
2867ac_save_IFS=$IFS; IFS='-'
2868set x $ac_cv_host
2869shift
2870host_cpu=$1
2871host_vendor=$2
2872shift; shift
2873# Remember, the first character of IFS is used to create $*,
2874# except with old shells:
2875host_os=$*
2876IFS=$ac_save_IFS
2877case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2878
2879
2880
Martin v. Löwis11437992002-04-12 09:54:03 +00002881
Benjamin Petersond23f8222009-04-05 19:13:16 +00002882if test "$prefix" != "/"; then
2883 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2884fi
2885
2886
Martin v. Löwis11437992002-04-12 09:54:03 +00002887
2888
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002889# We don't use PACKAGE_ variables, and they cause conflicts
2890# with other autoconf-based packages that include Python.h
2891grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2892rm confdefs.h
2893mv confdefs.h.new confdefs.h
2894
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002895
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002896VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002897
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002898# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002899
2900SOVERSION=1.0
2901
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002902# The later defininition of _XOPEN_SOURCE disables certain features
2903# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2904
Matthias Kloseb9621712010-04-24 17:59:49 +00002905$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002906
2907
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002908# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2909# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2910# them.
2911
Matthias Kloseb9621712010-04-24 17:59:49 +00002912$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002913
2914
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002915# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2916# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2917# them.
2918
Matthias Kloseb9621712010-04-24 17:59:49 +00002919$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002920
2921
Martin v. Löwisd6320502004-08-12 13:45:08 +00002922# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2923# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2924
Matthias Kloseb9621712010-04-24 17:59:49 +00002925$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002926
2927
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002928# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2929# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2930# them.
2931
Matthias Kloseb9621712010-04-24 17:59:49 +00002932$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002933
2934
2935
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002936define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002937
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002938# Arguments passed to configure.
2939
2940CONFIG_ARGS="$ac_configure_args"
2941
Matthias Kloseb9621712010-04-24 17:59:49 +00002942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2943$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002944# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002945if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002946 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002947 case $enableval in
2948 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07002949 # Locate the best usable SDK, see Mac/README.txt for more
2950 # information
2951 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
2952 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002953 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07002954 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2955 if test ! -d "${enableval}"
2956 then
2957 enableval=/
2958 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002959 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002960 ;;
2961 esac
2962 case $enableval in
2963 no)
2964 UNIVERSALSDK=
2965 enable_universalsdk=
2966 ;;
2967 *)
2968 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002969 if test ! -d "${UNIVERSALSDK}"
2970 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002971 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002972 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002973 ;;
2974 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002976
Thomas Wouters477c8d52006-05-27 19:21:47 +00002977else
2978
2979 UNIVERSALSDK=
2980 enable_universalsdk=
2981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002982fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002983
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002984if test -n "${UNIVERSALSDK}"
2985then
Matthias Kloseb9621712010-04-24 17:59:49 +00002986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2987$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002988else
Matthias Kloseb9621712010-04-24 17:59:49 +00002989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2990$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002991fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002993
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002994
2995
Ned Deilycbfb9a52012-06-23 16:02:19 -07002996# For backward compatibility reasons we prefer to select '32-bit' if available,
2997# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002998UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07002999if test "`uname -s`" = "Darwin"
3000then
3001 if test -n "${UNIVERSALSDK}"
3002 then
3003 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3004 then
3005 UNIVERSAL_ARCHS="intel"
3006 fi
3007 fi
3008fi
3009
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3012$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003013
3014# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003015if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003016 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3018$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003019 UNIVERSAL_ARCHS="$withval"
3020
3021else
3022
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3024$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003025
3026fi
3027
3028
3029
3030
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003031
3032# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003033if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003034 withval=$with_framework_name;
3035 PYTHONFRAMEWORK=${withval}
3036 PYTHONFRAMEWORKDIR=${withval}.framework
3037 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3038
3039else
3040
3041 PYTHONFRAMEWORK=Python
3042 PYTHONFRAMEWORKDIR=Python.framework
3043 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3044
3045fi
3046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003048if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003050 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003051 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003052 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003053 esac
3054 case $enableval in
3055 no)
3056 PYTHONFRAMEWORK=
3057 PYTHONFRAMEWORKDIR=no-framework
3058 PYTHONFRAMEWORKPREFIX=
3059 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003060 FRAMEWORKINSTALLFIRST=
3061 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003062 FRAMEWORKALTINSTALLFIRST=
3063 FRAMEWORKALTINSTALLLAST=
3064 if test "x${prefix}" = "xNONE"; then
3065 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3066 else
3067 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3068 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003069 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003070 ;;
3071 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003072 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003073 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003074 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003075 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003076 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3077 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003078 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003080 if test "x${prefix}" = "xNONE" ; then
3081 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003082
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003083 else
3084 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3085 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003086
3087 case "${enableval}" in
3088 /System*)
3089 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3090 if test "${prefix}" = "NONE" ; then
3091 # See below
3092 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3093 fi
3094 ;;
3095
3096 /Library*)
3097 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3098 ;;
3099
3100 */Library/Frameworks)
3101 MDIR="`dirname "${enableval}"`"
3102 MDIR="`dirname "${MDIR}"`"
3103 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3104
3105 if test "${prefix}" = "NONE"; then
3106 # User hasn't specified the
3107 # --prefix option, but wants to install
3108 # the framework in a non-default location,
3109 # ensure that the compatibility links get
3110 # installed relative to that prefix as well
3111 # instead of in /usr/local.
3112 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3113 fi
3114 ;;
3115
3116 *)
3117 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3118 ;;
3119 esac
3120
Jack Jansen127e56e2001-09-11 14:41:54 +00003121 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003122
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003123 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003124 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003127 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003128
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003129 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3130
3131 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3132
Jack Jansene578a632001-08-15 01:27:14 +00003133 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003134
Guido van Rossum563e7081996-09-10 18:20:48 +00003135else
Martin v. Löwis11437992002-04-12 09:54:03 +00003136
Jack Jansene578a632001-08-15 01:27:14 +00003137 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003138 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003139 PYTHONFRAMEWORKPREFIX=
3140 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003141 FRAMEWORKINSTALLFIRST=
3142 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003143 FRAMEWORKALTINSTALLFIRST=
3144 FRAMEWORKALTINSTALLLAST=
3145 if test "x${prefix}" = "xNONE" ; then
3146 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3147 else
3148 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3149 fi
Jack Jansene578a632001-08-15 01:27:14 +00003150 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003151
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153fi
3154
Thomas Wouters477c8d52006-05-27 19:21:47 +00003155
3156
Michael W. Hudson54241132001-12-07 15:38:26 +00003157
3158
3159
3160
Jack Jansene578a632001-08-15 01:27:14 +00003161
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003162
3163
3164
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003165
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003166
Jack Jansene578a632001-08-15 01:27:14 +00003167##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003168## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003169## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003170##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003171# Set name for machine-dependent library files
3172
Matthias Kloseb9621712010-04-24 17:59:49 +00003173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3174$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003175if test -z "$MACHDEP"
3176then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003177 # avoid using uname for cross builds
3178 if test "$cross_compiling" = yes; then
3179 # ac_sys_system and ac_sys_release are only used for setting
3180 # `define_xopen_source' in the case statement below. For the
3181 # current supported cross builds, this macro is not adjusted.
3182 case "$host" in
3183 *-*-linux*)
3184 ac_sys_system=Linux
3185 ;;
3186 *-*-cygwin*)
3187 ac_sys_system=Cygwin
3188 ;;
3189 *)
3190 # for now, limit cross builds to known configurations
3191 MACHDEP="unknown"
3192 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3193 esac
3194 ac_sys_release=
3195 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003196 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003197 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003198 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003199 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003200 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003201 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003202 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003203 fi
3204 ac_md_system=`echo $ac_sys_system |
3205 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3206 ac_md_release=`echo $ac_sys_release |
3207 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3208 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003209
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003210 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003211 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003212 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003213 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003214 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003215 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003216 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003217fi
Guido van Rossum91922671997-10-09 20:24:13 +00003218
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003219# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3220# disable features if it is defined, without any means to access these
3221# features as extensions. For these systems, we skip the definition of
3222# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3223# some feature, make sure there is no alternative way to access this
3224# feature. Also, when using wildcards, make sure you have verified the
3225# need for not defining _XOPEN_SOURCE on all systems matching the
3226# wildcard, and that the wildcard does not include future systems
3227# (which may remove their limitations).
3228case $ac_sys_system/$ac_sys_release in
3229 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3230 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003231 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003232 # In addition, Stefan Krah confirms that issue #1244610 exists through
3233 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003234 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003235 define_xopen_source=no
3236 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3237 # also defined. This can be overridden by defining _BSD_SOURCE
3238 # As this has a different meaning on Linux, only define it on OpenBSD
3239
Matthias Kloseb9621712010-04-24 17:59:49 +00003240$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003241
3242 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003243 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003244 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3245 # also defined. This can be overridden by defining _BSD_SOURCE
3246 # As this has a different meaning on Linux, only define it on OpenBSD
3247
Matthias Kloseb9621712010-04-24 17:59:49 +00003248$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003249
3250 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003251 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3252 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3253 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003254 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 +00003255 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003256 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3257 # request to enable features supported by the standard as a request
3258 # to disable features not supported by the standard. The best way
3259 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3260 # entirely and define __EXTENSIONS__ instead.
3261 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003262 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003263 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3264 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003265 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003266 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003267 define_xopen_source=no;;
3268 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003269 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003270 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003271 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003272 # On FreeBSD 4, the math functions C89 does not cover are never defined
3273 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3274 FreeBSD/4.*)
3275 define_xopen_source=no;;
3276 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3277 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3278 # identifies itself as Darwin/7.*
3279 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3280 # disables platform specific features beyond repair.
3281 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3282 # has no effect, don't bother defining them
3283 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003284 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003285 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003286 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003287 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3288 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3289 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003290 AIX/4)
3291 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003292 AIX/5)
3293 if test `uname -r` -eq 1; then
3294 define_xopen_source=no
3295 fi
3296 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003297 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3298 # defining NI_NUMERICHOST.
3299 QNX/6.3.2)
3300 define_xopen_source=no
3301 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003302
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003303esac
3304
3305if test $define_xopen_source = yes
3306then
Victor Stinner14d098d2011-09-07 22:29:43 +02003307 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003308
Victor Stinner14d098d2011-09-07 22:29:43 +02003309$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003310
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003311
3312 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3313 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3314 # several APIs are not declared. Since this is also needed in some
3315 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003316
Matthias Kloseb9621712010-04-24 17:59:49 +00003317$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003318
3319
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003320
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003321$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003322
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003323fi
3324
Guido van Rossum91922671997-10-09 20:24:13 +00003325#
3326# SGI compilers allow the specification of the both the ABI and the
3327# ISA on the command line. Depending on the values of these switches,
3328# different and often incompatable code will be generated.
3329#
3330# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3331# thus supply support for various ABI/ISA combinations. The MACHDEP
3332# variable is also adjusted.
3333#
3334
3335if test ! -z "$SGI_ABI"
3336then
3337 CC="cc $SGI_ABI"
3338 LDFLAGS="$SGI_ABI $LDFLAGS"
3339 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3342$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003343
Jack Jansen6b08a402004-06-03 12:41:45 +00003344# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3345# it may influence the way we can build extensions, so distutils
3346# needs to check it
3347
Thomas Wouters477c8d52006-05-27 19:21:47 +00003348
Jack Jansen6b08a402004-06-03 12:41:45 +00003349CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003350EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003351
Guido van Rossum627b2d71993-12-24 10:39:16 +00003352# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003353
3354# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3355# for debug/optimization stuff. BASECFLAGS is for flags that are required
3356# just to get things to compile and link. Users are free to override OPT
3357# when running configure or make. The build should not break if they do.
3358# BASECFLAGS should generally not be messed with, however.
3359
3360# XXX shouldn't some/most/all of this code be merged with the stuff later
3361# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3363$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003365# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003366if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003367 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003368 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003369 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003370 without_gcc=yes;;
3371 yes) CC=gcc
3372 without_gcc=no;;
3373 *) CC=$withval
3374 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003375 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003376else
Martin v. Löwis11437992002-04-12 09:54:03 +00003377
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003378 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003379 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003380 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003381 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003382 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003383fi
3384
Matthias Kloseb9621712010-04-24 17:59:49 +00003385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3386$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003387
Guido van Rossum8b131c51995-03-09 14:10:13 +00003388# If the user switches compilers, we can't believe the cache
3389if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3390then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003391 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003392(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003393fi
3394
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003395# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3396# when the compiler supports them, but we don't always want -O2, and
3397# we set -g later.
3398if test -z "$CFLAGS"; then
3399 CFLAGS=
3400fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003401
3402if test "$ac_sys_system" = "Darwin"
3403then
3404 # Compiler selection on MacOSX is more complicated than
3405 # AC_PROG_CC can handle, see Mac/README.txt for more
3406 # information
3407 if test -z "${CC}"
3408 then
3409 found_gcc=
3410 found_clang=
3411 as_save_IFS=$IFS; IFS=:
3412 for as_dir in $PATH
3413 do
3414 IFS=$as_save_IFS
3415 if test -x $as_dir/gcc; then
3416 if test -z "${found_gcc}"; then
3417 found_gcc=$as_dir/gcc
3418 fi
3419 fi
3420 if test -x $as_dir/clang; then
3421 if test -z "${found_clang}"; then
3422 found_clang=$as_dir/clang
3423 fi
3424 fi
3425 done
3426 IFS=$as_save_IFS
3427
3428 if test -n "$found_gcc" -a -n "$found_clang"
3429 then
3430 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3431 then
3432 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3433$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3434 CC="$found_clang"
3435 CXX="$found_clang++"
3436 fi
3437
3438
3439 elif test -z "$found_gcc" -a -n "$found_clang"
3440 then
3441 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3442$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3443 CC="$found_clang"
3444 CXX="$found_clang++"
3445
3446 elif test -z "$found_gcc" -a -z "$found_clang"
3447 then
3448 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3449 if test -n "${found_clang}"
3450 then
3451 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3452$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3453 CC="${found_clang}"
3454 CXX="`/usr/bin/xcrun -find clang++`"
3455
3456 # else: use default behaviour
3457 fi
3458 fi
3459 fi
3460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003461ac_ext=c
3462ac_cpp='$CPP $CPPFLAGS'
3463ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3464ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3465ac_compiler_gnu=$ac_cv_c_compiler_gnu
3466if test -n "$ac_tool_prefix"; then
3467 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3468set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3470$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003471if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003472 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003473else
3474 if test -n "$CC"; then
3475 ac_cv_prog_CC="$CC" # Let the user override the test.
3476else
Martin v. Löwis11437992002-04-12 09:54:03 +00003477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3478for as_dir in $PATH
3479do
3480 IFS=$as_save_IFS
3481 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003482 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003483 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 +00003484 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003485 $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 +00003486 break 2
3487 fi
3488done
Matthias Kloseb9621712010-04-24 17:59:49 +00003489 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003490IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003491
Jack Jansendd19cf82001-12-06 22:36:17 +00003492fi
3493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003494CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003495if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3497$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003498else
Matthias Kloseb9621712010-04-24 17:59:49 +00003499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3500$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003501fi
3502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003503
Martin v. Löwis11437992002-04-12 09:54:03 +00003504fi
3505if test -z "$ac_cv_prog_CC"; then
3506 ac_ct_CC=$CC
3507 # Extract the first word of "gcc", so it can be a program name with args.
3508set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3510$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003511if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003512 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003513else
3514 if test -n "$ac_ct_CC"; then
3515 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3516else
3517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3518for as_dir in $PATH
3519do
3520 IFS=$as_save_IFS
3521 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003522 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003523 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 +00003524 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003526 break 2
3527 fi
3528done
Matthias Kloseb9621712010-04-24 17:59:49 +00003529 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003531
3532fi
3533fi
3534ac_ct_CC=$ac_cv_prog_ac_ct_CC
3535if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3537$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003538else
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3540$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003541fi
3542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543 if test "x$ac_ct_CC" = x; then
3544 CC=""
3545 else
3546 case $cross_compiling:$ac_tool_warned in
3547yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003548{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3549$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550ac_tool_warned=yes ;;
3551esac
3552 CC=$ac_ct_CC
3553 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003554else
3555 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003556fi
3557
Jack Jansendd19cf82001-12-06 22:36:17 +00003558if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003559 if test -n "$ac_tool_prefix"; then
3560 # 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 +00003561set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3563$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003564if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003565 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003566else
3567 if test -n "$CC"; then
3568 ac_cv_prog_CC="$CC" # Let the user override the test.
3569else
Martin v. Löwis11437992002-04-12 09:54:03 +00003570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3571for as_dir in $PATH
3572do
3573 IFS=$as_save_IFS
3574 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003575 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003576 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 +00003577 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003578 $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 +00003579 break 2
3580 fi
3581done
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003584
3585fi
3586fi
3587CC=$ac_cv_prog_CC
3588if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3590$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003591else
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3593$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003594fi
3595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003596
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003598fi
3599if test -z "$CC"; then
3600 # Extract the first word of "cc", so it can be a program name with args.
3601set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3603$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003604if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003606else
3607 if test -n "$CC"; then
3608 ac_cv_prog_CC="$CC" # Let the user override the test.
3609else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003610 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3612for as_dir in $PATH
3613do
3614 IFS=$as_save_IFS
3615 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003617 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 +00003618 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3619 ac_prog_rejected=yes
3620 continue
3621 fi
3622 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 break 2
3625 fi
3626done
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003629
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003630if test $ac_prog_rejected = yes; then
3631 # We found a bogon in the path, so make sure we never use it.
3632 set dummy $ac_cv_prog_CC
3633 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003635 # We chose a different compiler from the bogus one.
3636 # However, it has the same basename, so the bogon will be chosen
3637 # first if we set CC to just the basename; use the full file name.
3638 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003639 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003640 fi
3641fi
3642fi
3643fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003644CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003645if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3647$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003648else
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3650$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003651fi
3652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653
Martin v. Löwis11437992002-04-12 09:54:03 +00003654fi
3655if test -z "$CC"; then
3656 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 do
3659 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3660set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3662$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003663if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003665else
3666 if test -n "$CC"; then
3667 ac_cv_prog_CC="$CC" # Let the user override the test.
3668else
Martin v. Löwis11437992002-04-12 09:54:03 +00003669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3670for as_dir in $PATH
3671do
3672 IFS=$as_save_IFS
3673 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003675 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 +00003676 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 $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 +00003678 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003679 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003680done
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003683
3684fi
3685fi
3686CC=$ac_cv_prog_CC
3687if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3689$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690else
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3692$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003693fi
3694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003695
Martin v. Löwis11437992002-04-12 09:54:03 +00003696 test -n "$CC" && break
3697 done
3698fi
3699if test -z "$CC"; then
3700 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003702do
3703 # Extract the first word of "$ac_prog", so it can be a program name with args.
3704set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3706$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003707if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003709else
3710 if test -n "$ac_ct_CC"; then
3711 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3712else
3713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3714for as_dir in $PATH
3715do
3716 IFS=$as_save_IFS
3717 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003719 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 +00003720 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $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 +00003722 break 2
3723 fi
3724done
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003727
Martin v. Löwis11437992002-04-12 09:54:03 +00003728fi
3729fi
3730ac_ct_CC=$ac_cv_prog_ac_ct_CC
3731if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3733$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003734else
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3736$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003737fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 test -n "$ac_ct_CC" && break
3741done
Michael W. Hudson54241132001-12-07 15:38:26 +00003742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743 if test "x$ac_ct_CC" = x; then
3744 CC=""
3745 else
3746 case $cross_compiling:$ac_tool_warned in
3747yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750ac_tool_warned=yes ;;
3751esac
3752 CC=$ac_ct_CC
3753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
3755
3756fi
3757
3758
Matthias Kloseb9621712010-04-24 17:59:49 +00003759test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003761as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003762See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003763
3764# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003765$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3766set X $ac_compile
3767ac_compiler=$2
3768for ac_option in --version -v -V -qversion; do
3769 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770case "(($ac_try" in
3771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3772 *) ac_try_echo=$ac_try;;
3773esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3775$as_echo "$ac_try_echo"; } >&5
3776 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 if test -s conftest.err; then
3779 sed '10a\
3780... rest of stderr output deleted ...
3781 10q' conftest.err >conftest.er1
3782 cat conftest.er1 >&5
3783 fi
3784 rm -f conftest.er1 conftest.err
3785 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3786 test $ac_status = 0; }
3787done
Martin v. Löwis11437992002-04-12 09:54:03 +00003788
Matthias Kloseb9621712010-04-24 17:59:49 +00003789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003790/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003791
Martin v. Löwis11437992002-04-12 09:54:03 +00003792int
3793main ()
3794{
3795
3796 ;
3797 return 0;
3798}
3799_ACEOF
3800ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003801ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003802# Try to create an executable without -o first, disregard a.out.
3803# It will help us diagnose broken compilers, and finding out an intuition
3804# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3806$as_echo_n "checking whether the C compiler works... " >&6; }
3807ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3808
3809# The possible output files:
3810ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812ac_rmfiles=
3813for ac_file in $ac_files
3814do
3815 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3818 esac
3819done
3820rm -f $ac_rmfiles
3821
Matthias Kloseb9621712010-04-24 17:59:49 +00003822if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823case "(($ac_try" in
3824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3825 *) ac_try_echo=$ac_try;;
3826esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3828$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3832 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3834# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3835# in a Makefile. We should not override ac_cv_exeext if it was cached,
3836# so that the user can short-circuit this test for compilers unknown to
3837# Autoconf.
3838for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003839do
3840 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003843 ;;
3844 [ab].out )
3845 # We found the default executable, but exeext='' is most
3846 # certainly right.
3847 break;;
3848 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850 then :; else
3851 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3852 fi
3853 # We set ac_cv_exeext here because the later test for it is not
3854 # safe: cross compilers may not add the suffix if given an `-o'
3855 # argument, so we may need to know it at that point already.
3856 # Even if this section looks crufty: it has the advantage of
3857 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003858 break;;
3859 * )
3860 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003861 esac
3862done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863test "$ac_cv_exeext" = no && ac_cv_exeext=
3864
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003865else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866 ac_file=''
3867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003868if test -z "$ac_file"; then :
3869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3870$as_echo "no" >&6; }
3871$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003872sed 's/^/| /' conftest.$ac_ext >&5
3873
Matthias Kloseb9621712010-04-24 17:59:49 +00003874{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003876as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003877See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003878else
3879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3880$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3883$as_echo_n "checking for C compiler default output file name... " >&6; }
3884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3885$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003886ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003887
Matthias Kloseb9621712010-04-24 17:59:49 +00003888rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003889ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3891$as_echo_n "checking for suffix of executables... " >&6; }
3892if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893case "(($ac_try" in
3894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3895 *) ac_try_echo=$ac_try;;
3896esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3898$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003900 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3902 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003903 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3904# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3905# work properly (i.e., refer to `conftest.exe'), while it won't with
3906# `rm'.
3907for ac_file in conftest.exe conftest conftest.*; do
3908 test -f "$ac_file" || continue
3909 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003911 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3912 break;;
3913 * ) break;;
3914 esac
3915done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003916else
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003919as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003920See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003922rm -f conftest conftest$ac_cv_exeext
3923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3924$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003925
3926rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003927EXEEXT=$ac_cv_exeext
3928ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3930/* end confdefs.h. */
3931#include <stdio.h>
3932int
3933main ()
3934{
3935FILE *f = fopen ("conftest.out", "w");
3936 return ferror (f) || fclose (f) != 0;
3937
3938 ;
3939 return 0;
3940}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003942ac_clean_files="$ac_clean_files conftest.out"
3943# Check that the compiler produces executables we can run. If not, either
3944# the compiler is broken, or we cross compile.
3945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3946$as_echo_n "checking whether we are cross compiling... " >&6; }
3947if test "$cross_compiling" != yes; then
3948 { { ac_try="$ac_link"
3949case "(($ac_try" in
3950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3951 *) ac_try_echo=$ac_try;;
3952esac
3953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3954$as_echo "$ac_try_echo"; } >&5
3955 (eval "$ac_link") 2>&5
3956 ac_status=$?
3957 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3958 test $ac_status = 0; }
3959 if { ac_try='./conftest$ac_cv_exeext'
3960 { { case "(($ac_try" in
3961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3962 *) ac_try_echo=$ac_try;;
3963esac
3964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3965$as_echo "$ac_try_echo"; } >&5
3966 (eval "$ac_try") 2>&5
3967 ac_status=$?
3968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3969 test $ac_status = 0; }; }; then
3970 cross_compiling=no
3971 else
3972 if test "$cross_compiling" = maybe; then
3973 cross_compiling=yes
3974 else
3975 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3976$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003977as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003978If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02003979See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 fi
3981 fi
3982fi
3983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3984$as_echo "$cross_compiling" >&6; }
3985
3986rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3987ac_clean_files=$ac_clean_files_save
3988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3989$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003990if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 $as_echo_n "(cached) " >&6
3992else
3993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003994/* end confdefs.h. */
3995
3996int
3997main ()
3998{
3999
4000 ;
4001 return 0;
4002}
4003_ACEOF
4004rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004005if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006case "(($ac_try" in
4007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4008 *) ac_try_echo=$ac_try;;
4009esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004010eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4011$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004013 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004014 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4015 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016 for ac_file in conftest.o conftest.obj conftest.*; do
4017 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004018 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004020 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4021 break;;
4022 esac
4023done
4024else
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004026sed 's/^/| /' conftest.$ac_ext >&5
4027
Matthias Kloseb9621712010-04-24 17:59:49 +00004028{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004030as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004031See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004032fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004033rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4036$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004037OBJEXT=$ac_cv_objext
4038ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4040$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004041if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004043else
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004046
Martin v. Löwis11437992002-04-12 09:54:03 +00004047int
4048main ()
4049{
4050#ifndef __GNUC__
4051 choke me
4052#endif
4053
4054 ;
4055 return 0;
4056}
4057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004058if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004059 ac_compiler_gnu=yes
4060else
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004064ac_cv_c_compiler_gnu=$ac_compiler_gnu
4065
4066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4068$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4069if test $ac_compiler_gnu = yes; then
4070 GCC=yes
4071else
4072 GCC=
4073fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004074ac_test_CFLAGS=${CFLAGS+set}
4075ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4077$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004078if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004080else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004081 ac_save_c_werror_flag=$ac_c_werror_flag
4082 ac_c_werror_flag=yes
4083 ac_cv_prog_cc_g=no
4084 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004087
Martin v. Löwis11437992002-04-12 09:54:03 +00004088int
4089main ()
4090{
4091
4092 ;
4093 return 0;
4094}
4095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004096if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004097 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004098else
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 CFLAGS=""
4100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101/* end confdefs.h. */
4102
4103int
4104main ()
4105{
4106
4107 ;
4108 return 0;
4109}
4110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004111if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004112
Matthias Kloseb9621712010-04-24 17:59:49 +00004113else
4114 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117/* end confdefs.h. */
4118
4119int
4120main ()
4121{
4122
4123 ;
4124 return 0;
4125}
4126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004127if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4135 ac_c_werror_flag=$ac_save_c_werror_flag
4136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4138$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004139if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004140 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004141elif test $ac_cv_prog_cc_g = yes; then
4142 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004143 CFLAGS="-g -O2"
4144 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004145 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004146 fi
4147else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004148 if test "$GCC" = yes; then
4149 CFLAGS="-O2"
4150 else
4151 CFLAGS=
4152 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004153fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4155$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004156if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004158else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004159 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004160ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004162/* end confdefs.h. */
4163#include <stdarg.h>
4164#include <stdio.h>
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004165#include <sys/types.h>
4166#include <sys/stat.h>
Skip Montanaro6dead952003-09-25 14:50:04 +00004167/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4168struct buf { int x; };
4169FILE * (*rcsopen) (struct buf *, struct stat *, int);
4170static char *e (p, i)
4171 char **p;
4172 int i;
4173{
4174 return p[i];
4175}
4176static char *f (char * (*g) (char **, int), char **p, ...)
4177{
4178 char *s;
4179 va_list v;
4180 va_start (v,p);
4181 s = g (p, va_arg (v,int));
4182 va_end (v);
4183 return s;
4184}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004185
4186/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4187 function prototypes and stuff, but not '\xHH' hex character constants.
4188 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004190 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4191 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004193int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4196 inside strings and character constants. */
4197#define FOO(x) 'x'
4198int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4199
Skip Montanaro6dead952003-09-25 14:50:04 +00004200int test (int i, double x);
4201struct s1 {int (*f) (int a);};
4202struct s2 {int (*f) (double a);};
4203int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4204int argc;
4205char **argv;
4206int
4207main ()
4208{
4209return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4210 ;
4211 return 0;
4212}
4213_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4215 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004216do
4217 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221rm -f core conftest.err conftest.$ac_objext
4222 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004223done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004225CC=$ac_save_CC
4226
4227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228# AC_CACHE_VAL
4229case "x$ac_cv_prog_cc_c89" in
4230 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4232$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4235$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004236 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4239$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004240esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004241if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004242
Matthias Kloseb9621712010-04-24 17:59:49 +00004243fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004244
Martin v. Löwis11437992002-04-12 09:54:03 +00004245ac_ext=c
4246ac_cpp='$CPP $CPPFLAGS'
4247ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4248ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4249ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004251
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004252
4253
Matthias Kloseb9621712010-04-24 17:59:49 +00004254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4255$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004256
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004258if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004260
4261 case $withval in
4262 no) with_cxx_main=no
4263 MAINCC='$(CC)';;
4264 yes) with_cxx_main=yes
4265 MAINCC='$(CXX)';;
4266 *) with_cxx_main=yes
4267 MAINCC=$withval
4268 if test -z "$CXX"
4269 then
4270 CXX=$withval
4271 fi;;
4272 esac
4273else
4274
4275 with_cxx_main=no
4276 MAINCC='$(CC)'
4277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278fi
4279
Matthias Kloseb9621712010-04-24 17:59:49 +00004280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4281$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004282
4283preset_cxx="$CXX"
4284if test -z "$CXX"
4285then
4286 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004287 gcc) if test -n "$ac_tool_prefix"; then
4288 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4289set dummy ${ac_tool_prefix}g++; ac_word=$2
4290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4291$as_echo_n "checking for $ac_word... " >&6; }
4292if ${ac_cv_path_CXX+:} false; then :
4293 $as_echo_n "(cached) " >&6
4294else
4295 case $CXX in
4296 [\\/]* | ?:[\\/]*)
4297 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4298 ;;
4299 *)
4300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4301for as_dir in notfound
4302do
4303 IFS=$as_save_IFS
4304 test -z "$as_dir" && as_dir=.
4305 for ac_exec_ext in '' $ac_executable_extensions; do
4306 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4307 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4308 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4309 break 2
4310 fi
4311done
4312 done
4313IFS=$as_save_IFS
4314
4315 ;;
4316esac
4317fi
4318CXX=$ac_cv_path_CXX
4319if test -n "$CXX"; then
4320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4321$as_echo "$CXX" >&6; }
4322else
4323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4324$as_echo "no" >&6; }
4325fi
4326
4327
4328fi
4329if test -z "$ac_cv_path_CXX"; then
4330 ac_pt_CXX=$CXX
4331 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004332set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4334$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004335if ${ac_cv_path_ac_pt_CXX+:} false; then :
4336 $as_echo_n "(cached) " >&6
4337else
4338 case $ac_pt_CXX in
4339 [\\/]* | ?:[\\/]*)
4340 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4341 ;;
4342 *)
4343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4344for as_dir in notfound
4345do
4346 IFS=$as_save_IFS
4347 test -z "$as_dir" && as_dir=.
4348 for ac_exec_ext in '' $ac_executable_extensions; do
4349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4350 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4352 break 2
4353 fi
4354done
4355 done
4356IFS=$as_save_IFS
4357
4358 ;;
4359esac
4360fi
4361ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4362if test -n "$ac_pt_CXX"; then
4363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4364$as_echo "$ac_pt_CXX" >&6; }
4365else
4366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4367$as_echo "no" >&6; }
4368fi
4369
4370 if test "x$ac_pt_CXX" = x; then
4371 CXX="g++"
4372 else
4373 case $cross_compiling:$ac_tool_warned in
4374yes:)
4375{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4376$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4377ac_tool_warned=yes ;;
4378esac
4379 CXX=$ac_pt_CXX
4380 fi
4381else
4382 CXX="$ac_cv_path_CXX"
4383fi
4384 ;;
4385 cc) if test -n "$ac_tool_prefix"; then
4386 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4387set dummy ${ac_tool_prefix}c++; ac_word=$2
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4389$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004390if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004391 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004392else
4393 case $CXX in
4394 [\\/]* | ?:[\\/]*)
4395 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4396 ;;
4397 *)
4398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4399for as_dir in notfound
4400do
4401 IFS=$as_save_IFS
4402 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004404 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 +00004405 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004407 break 2
4408 fi
4409done
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004412
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004413 ;;
4414esac
4415fi
4416CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004417if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4419$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004420else
Matthias Kloseb9621712010-04-24 17:59:49 +00004421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4422$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004425
4426fi
4427if test -z "$ac_cv_path_CXX"; then
4428 ac_pt_CXX=$CXX
4429 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004430set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4432$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004433if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004434 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004435else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004436 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004437 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004438 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004439 ;;
4440 *)
4441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4442for as_dir in notfound
4443do
4444 IFS=$as_save_IFS
4445 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004446 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004447 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4448 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004449 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004450 break 2
4451 fi
4452done
Matthias Kloseb9621712010-04-24 17:59:49 +00004453 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004454IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004455
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004456 ;;
4457esac
4458fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004459ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4460if test -n "$ac_pt_CXX"; then
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4462$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004463else
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4465$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004467
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004468 if test "x$ac_pt_CXX" = x; then
4469 CXX="c++"
4470 else
4471 case $cross_compiling:$ac_tool_warned in
4472yes:)
4473{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4474$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4475ac_tool_warned=yes ;;
4476esac
4477 CXX=$ac_pt_CXX
4478 fi
4479else
4480 CXX="$ac_cv_path_CXX"
4481fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004482 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004483 clang|*/clang) if test -n "$ac_tool_prefix"; then
4484 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4485set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4487$as_echo_n "checking for $ac_word... " >&6; }
4488if ${ac_cv_path_CXX+:} false; then :
4489 $as_echo_n "(cached) " >&6
4490else
4491 case $CXX in
4492 [\\/]* | ?:[\\/]*)
4493 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4494 ;;
4495 *)
4496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4497for as_dir in notfound
4498do
4499 IFS=$as_save_IFS
4500 test -z "$as_dir" && as_dir=.
4501 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004502 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004503 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4504 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4505 break 2
4506 fi
4507done
4508 done
4509IFS=$as_save_IFS
4510
Ned Deilycbfb9a52012-06-23 16:02:19 -07004511 ;;
4512esac
4513fi
4514CXX=$ac_cv_path_CXX
4515if test -n "$CXX"; then
4516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4517$as_echo "$CXX" >&6; }
4518else
4519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4520$as_echo "no" >&6; }
4521fi
4522
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004523
4524fi
4525if test -z "$ac_cv_path_CXX"; then
4526 ac_pt_CXX=$CXX
4527 # Extract the first word of "clang++", so it can be a program name with args.
4528set dummy clang++; ac_word=$2
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
4531if ${ac_cv_path_ac_pt_CXX+:} false; then :
4532 $as_echo_n "(cached) " >&6
4533else
4534 case $ac_pt_CXX in
4535 [\\/]* | ?:[\\/]*)
4536 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4537 ;;
4538 *)
4539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in notfound
4541do
4542 IFS=$as_save_IFS
4543 test -z "$as_dir" && as_dir=.
4544 for ac_exec_ext in '' $ac_executable_extensions; do
4545 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4546 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4548 break 2
4549 fi
4550done
4551 done
4552IFS=$as_save_IFS
4553
4554 ;;
4555esac
4556fi
4557ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4558if test -n "$ac_pt_CXX"; then
4559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4560$as_echo "$ac_pt_CXX" >&6; }
4561else
4562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
4564fi
4565
4566 if test "x$ac_pt_CXX" = x; then
4567 CXX="clang++"
4568 else
4569 case $cross_compiling:$ac_tool_warned in
4570yes:)
4571{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4572$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4573ac_tool_warned=yes ;;
4574esac
4575 CXX=$ac_pt_CXX
4576 fi
4577else
4578 CXX="$ac_cv_path_CXX"
4579fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004580 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581 esac
4582 if test "$CXX" = "notfound"
4583 then
4584 CXX=""
4585 fi
4586fi
4587if test -z "$CXX"
4588then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004589 if test -n "$ac_tool_prefix"; then
4590 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4591 do
4592 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4593set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4595$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004596if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004597 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004598else
4599 if test -n "$CXX"; then
4600 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4601else
4602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4603for as_dir in $PATH
4604do
4605 IFS=$as_save_IFS
4606 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004607 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004608 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4609 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004611 break 2
4612 fi
4613done
Matthias Kloseb9621712010-04-24 17:59:49 +00004614 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004615IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004616
4617fi
4618fi
4619CXX=$ac_cv_prog_CXX
4620if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4622$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004623else
Matthias Kloseb9621712010-04-24 17:59:49 +00004624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4625$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004626fi
4627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004628
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004629 test -n "$CXX" && break
4630 done
4631fi
4632if test -z "$CXX"; then
4633 ac_ct_CXX=$CXX
4634 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4635do
4636 # Extract the first word of "$ac_prog", so it can be a program name with args.
4637set dummy $ac_prog; ac_word=$2
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4639$as_echo_n "checking for $ac_word... " >&6; }
4640if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4641 $as_echo_n "(cached) " >&6
4642else
4643 if test -n "$ac_ct_CXX"; then
4644 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4645else
4646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4647for as_dir in $PATH
4648do
4649 IFS=$as_save_IFS
4650 test -z "$as_dir" && as_dir=.
4651 for ac_exec_ext in '' $ac_executable_extensions; do
4652 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4653 ac_cv_prog_ac_ct_CXX="$ac_prog"
4654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4655 break 2
4656 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004657done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004658 done
4659IFS=$as_save_IFS
4660
4661fi
4662fi
4663ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4664if test -n "$ac_ct_CXX"; then
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4666$as_echo "$ac_ct_CXX" >&6; }
4667else
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4669$as_echo "no" >&6; }
4670fi
4671
4672
4673 test -n "$ac_ct_CXX" && break
4674done
4675
4676 if test "x$ac_ct_CXX" = x; then
4677 CXX="notfound"
4678 else
4679 case $cross_compiling:$ac_tool_warned in
4680yes:)
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4682$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4683ac_tool_warned=yes ;;
4684esac
4685 CXX=$ac_ct_CXX
4686 fi
4687fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004688
4689 if test "$CXX" = "notfound"
4690 then
4691 CXX=""
4692 fi
4693fi
4694if test "$preset_cxx" != "$CXX"
4695then
Matthias Kloseb9621712010-04-24 17:59:49 +00004696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004697
4698 By default, distutils will build C++ extension modules with \"$CXX\".
4699 If this is not intended, then set CXX on the configure command line.
4700 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004701$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004702
4703 By default, distutils will build C++ extension modules with \"$CXX\".
4704 If this is not intended, then set CXX on the configure command line.
4705 " >&2;}
4706fi
4707
4708
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4710$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4711save_LDFLAGS="$LDFLAGS"
4712LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004713
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4715/* end confdefs.h. */
4716
4717int
4718main ()
4719{
4720
4721 ;
4722 return 0;
4723}
4724_ACEOF
4725if ac_fn_c_try_link "$LINENO"; then :
4726 NO_AS_NEEDED="-Wl,--no-as-needed"
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4728$as_echo "yes" >&6; }
4729else
4730 NO_AS_NEEDED=""
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4732$as_echo "no" >&6; }
4733fi
4734rm -f core conftest.err conftest.$ac_objext \
4735 conftest$ac_exeext conftest.$ac_ext
4736LDFLAGS="$save_LDFLAGS"
4737
4738
4739
4740# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004741ac_ext=c
4742ac_cpp='$CPP $CPPFLAGS'
4743ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4744ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4745ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4747$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004748# On Suns, sometimes $CPP names a directory.
4749if test -n "$CPP" && test -d "$CPP"; then
4750 CPP=
4751fi
4752if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004753 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004755else
Martin v. Löwis11437992002-04-12 09:54:03 +00004756 # Double quotes because CPP needs to be expanded
4757 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4758 do
4759 ac_preproc_ok=false
4760for ac_c_preproc_warn_flag in '' yes
4761do
4762 # Use a header file that comes with gcc, so configuring glibc
4763 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004764 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4765 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004766 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004767 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004769/* end confdefs.h. */
4770#ifdef __STDC__
4771# include <limits.h>
4772#else
4773# include <assert.h>
4774#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004775 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004777if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004778
Matthias Kloseb9621712010-04-24 17:59:49 +00004779else
Martin v. Löwis11437992002-04-12 09:54:03 +00004780 # Broken: fails on valid input.
4781continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004782fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004783rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004785 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004786 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004789#include <ac_nonexistent.h>
4790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004791if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004792 # Broken: success on invalid input.
4793continue
4794else
Martin v. Löwis11437992002-04-12 09:54:03 +00004795 # Passes both tests.
4796ac_preproc_ok=:
4797break
4798fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004799rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004800
4801done
4802# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004803rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004804if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004805 break
4806fi
4807
4808 done
4809 ac_cv_prog_CPP=$CPP
4810
4811fi
4812 CPP=$ac_cv_prog_CPP
4813else
4814 ac_cv_prog_CPP=$CPP
4815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4817$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004818ac_preproc_ok=false
4819for ac_c_preproc_warn_flag in '' yes
4820do
4821 # Use a header file that comes with gcc, so configuring glibc
4822 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004823 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4824 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004825 # On the NeXT, cc -E runs the code through the compiler's parser,
4826 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004828/* end confdefs.h. */
4829#ifdef __STDC__
4830# include <limits.h>
4831#else
4832# include <assert.h>
4833#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004834 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004836if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004837
Matthias Kloseb9621712010-04-24 17:59:49 +00004838else
Martin v. Löwis11437992002-04-12 09:54:03 +00004839 # Broken: fails on valid input.
4840continue
4841fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004842rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004844 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004845 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004848#include <ac_nonexistent.h>
4849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004850if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004851 # Broken: success on invalid input.
4852continue
4853else
Martin v. Löwis11437992002-04-12 09:54:03 +00004854 # Passes both tests.
4855ac_preproc_ok=:
4856break
4857fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004858rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004859
4860done
4861# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004862rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004863if $ac_preproc_ok; then :
4864
Martin v. Löwis11437992002-04-12 09:54:03 +00004865else
Matthias Kloseb9621712010-04-24 17:59:49 +00004866 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004868as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004869See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004870fi
4871
4872ac_ext=c
4873ac_cpp='$CPP $CPPFLAGS'
4874ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4875ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4876ac_compiler_gnu=$ac_cv_c_compiler_gnu
4877
4878
Matthias Kloseb9621712010-04-24 17:59:49 +00004879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4880$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004881if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004882 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004883else
Matthias Kloseb9621712010-04-24 17:59:49 +00004884 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004885 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004886 # Loop through the user's path and test for each of PROGNAME-LIST
4887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004888for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4889do
4890 IFS=$as_save_IFS
4891 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 for ac_prog in grep ggrep; do
4893 for ac_exec_ext in '' $ac_executable_extensions; do
4894 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004895 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004896# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004897 # Check for GNU $ac_path_GREP
4898case `"$ac_path_GREP" --version 2>&1` in
4899*GNU*)
4900 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4901*)
4902 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004903 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004904 while :
4905 do
4906 cat "conftest.in" "conftest.in" >"conftest.tmp"
4907 mv "conftest.tmp" "conftest.in"
4908 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004909 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004910 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4911 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004912 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004913 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4914 # Best one so far, save it but keep looking for a better one
4915 ac_cv_path_GREP="$ac_path_GREP"
4916 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004917 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004918 # 10*(2^10) chars as input seems more than enough
4919 test $ac_count -gt 10 && break
4920 done
4921 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4922esac
4923
Matthias Kloseb9621712010-04-24 17:59:49 +00004924 $ac_path_GREP_found && break 3
4925 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004926 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004927 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004928IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004929 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004930 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 +00004931 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004932else
4933 ac_cv_path_GREP=$GREP
4934fi
4935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4938$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004939 GREP="$ac_cv_path_GREP"
4940
4941
Matthias Kloseb9621712010-04-24 17:59:49 +00004942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4943$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004944if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004945 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004946else
4947 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4948 then ac_cv_path_EGREP="$GREP -E"
4949 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004950 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004951 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004952 # Loop through the user's path and test for each of PROGNAME-LIST
4953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004954for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4955do
4956 IFS=$as_save_IFS
4957 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004958 for ac_prog in egrep; do
4959 for ac_exec_ext in '' $ac_executable_extensions; do
4960 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004961 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004962# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004963 # Check for GNU $ac_path_EGREP
4964case `"$ac_path_EGREP" --version 2>&1` in
4965*GNU*)
4966 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4967*)
4968 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004969 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004970 while :
4971 do
4972 cat "conftest.in" "conftest.in" >"conftest.tmp"
4973 mv "conftest.tmp" "conftest.in"
4974 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004975 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004976 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4977 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004979 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4980 # Best one so far, save it but keep looking for a better one
4981 ac_cv_path_EGREP="$ac_path_EGREP"
4982 ac_path_EGREP_max=$ac_count
4983 fi
4984 # 10*(2^10) chars as input seems more than enough
4985 test $ac_count -gt 10 && break
4986 done
4987 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4988esac
4989
Matthias Kloseb9621712010-04-24 17:59:49 +00004990 $ac_path_EGREP_found && break 3
4991 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004992 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004993 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004994IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004996 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 +00004997 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004998else
4999 ac_cv_path_EGREP=$EGREP
5000fi
5001
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005002 fi
5003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5005$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005006 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005007
5008
Matthias Kloseb9621712010-04-24 17:59:49 +00005009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5010$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005011if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005012 $as_echo_n "(cached) " >&6
5013else
5014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005015/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005016#include <stdlib.h>
5017#include <stdarg.h>
5018#include <string.h>
5019#include <float.h>
5020
5021int
5022main ()
5023{
5024
5025 ;
5026 return 0;
5027}
5028_ACEOF
5029if ac_fn_c_try_compile "$LINENO"; then :
5030 ac_cv_header_stdc=yes
5031else
5032 ac_cv_header_stdc=no
5033fi
5034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5035
5036if test $ac_cv_header_stdc = yes; then
5037 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5039/* end confdefs.h. */
5040#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005041
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005042_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005046else
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005048fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005049rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005050
Matthias Kloseb9621712010-04-24 17:59:49 +00005051fi
5052
5053if test $ac_cv_header_stdc = yes; then
5054 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5056/* end confdefs.h. */
5057#include <stdlib.h>
5058
5059_ACEOF
5060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5061 $EGREP "free" >/dev/null 2>&1; then :
5062
5063else
5064 ac_cv_header_stdc=no
5065fi
5066rm -f conftest*
5067
5068fi
5069
5070if test $ac_cv_header_stdc = yes; then
5071 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5072 if test "$cross_compiling" = yes; then :
5073 :
5074else
5075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5076/* end confdefs.h. */
5077#include <ctype.h>
5078#include <stdlib.h>
5079#if ((' ' & 0x0FF) == 0x020)
5080# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5081# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5082#else
5083# define ISLOWER(c) \
5084 (('a' <= (c) && (c) <= 'i') \
5085 || ('j' <= (c) && (c) <= 'r') \
5086 || ('s' <= (c) && (c) <= 'z'))
5087# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5088#endif
5089
5090#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5091int
5092main ()
5093{
5094 int i;
5095 for (i = 0; i < 256; i++)
5096 if (XOR (islower (i), ISLOWER (i))
5097 || toupper (i) != TOUPPER (i))
5098 return 2;
5099 return 0;
5100}
5101_ACEOF
5102if ac_fn_c_try_run "$LINENO"; then :
5103
5104else
5105 ac_cv_header_stdc=no
5106fi
5107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5108 conftest.$ac_objext conftest.beam conftest.$ac_ext
5109fi
5110
5111fi
5112fi
5113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5114$as_echo "$ac_cv_header_stdc" >&6; }
5115if test $ac_cv_header_stdc = yes; then
5116
5117$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5118
5119fi
5120
5121# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5122for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5123 inttypes.h stdint.h unistd.h
5124do :
5125 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5126ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5127"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005128if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 cat >>confdefs.h <<_ACEOF
5130#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5131_ACEOF
5132
5133fi
5134
5135done
5136
5137
5138
5139 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 +02005140if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005141 MINIX=yes
5142else
5143 MINIX=
5144fi
5145
5146
5147 if test "$MINIX" = yes; then
5148
5149$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5150
5151
5152$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5153
5154
5155$as_echo "#define _MINIX 1" >>confdefs.h
5156
5157 fi
5158
5159
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5161$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005162if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005163 $as_echo_n "(cached) " >&6
5164else
5165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5166/* end confdefs.h. */
5167
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005168# define __EXTENSIONS__ 1
5169 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005170int
5171main ()
5172{
5173
5174 ;
5175 return 0;
5176}
5177_ACEOF
5178if ac_fn_c_try_compile "$LINENO"; then :
5179 ac_cv_safe_to_define___extensions__=yes
5180else
5181 ac_cv_safe_to_define___extensions__=no
5182fi
5183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5184fi
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5186$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5187 test $ac_cv_safe_to_define___extensions__ = yes &&
5188 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5189
5190 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5191
5192 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5193
5194 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5195
5196 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5197
5198
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200# Check for unsupported systems
5201case $ac_sys_system/$ac_sys_release in
5202atheos*|Linux*/1*)
5203 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5204 echo See README for details.
5205 exit 1;;
5206esac
5207
5208
Matthias Kloseb9621712010-04-24 17:59:49 +00005209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5210$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005211
5212# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005213if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005214 withval=$with_suffix;
5215 case $withval in
5216 no) EXEEXT=;;
5217 yes) EXEEXT=.exe;;
5218 *) EXEEXT=$withval;;
5219 esac
5220fi
5221
Matthias Kloseb9621712010-04-24 17:59:49 +00005222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5223$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005224
5225# Test whether we're running on a non-case-sensitive system, in which
5226# case we give a warning if no ext is given
5227
Matthias Kloseb9621712010-04-24 17:59:49 +00005228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5229$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005230if test ! -d CaseSensitiveTestDir; then
5231mkdir CaseSensitiveTestDir
5232fi
5233
5234if test -d casesensitivetestdir
5235then
Matthias Kloseb9621712010-04-24 17:59:49 +00005236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5237$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238 BUILDEXEEXT=.exe
5239else
Matthias Kloseb9621712010-04-24 17:59:49 +00005240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005242 BUILDEXEEXT=$EXEEXT
5243fi
5244rmdir CaseSensitiveTestDir
5245
5246case $MACHDEP in
5247bsdos*)
5248 case $CC in
5249 gcc) CC="$CC -D_HAVE_BSDI";;
5250 esac;;
5251esac
5252
5253case $ac_sys_system in
5254hp*|HP*)
5255 case $CC in
5256 cc|*/cc) CC="$CC -Ae";;
5257 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005258esac
5259
5260
5261
Matthias Kloseb9621712010-04-24 17:59:49 +00005262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5263$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005264if test -z "$LIBRARY"
5265then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005266 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5269$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005270
5271# LDLIBRARY is the name of the library to link against (as opposed to the
5272# name of the library into which to insert object files). BLDLIBRARY is also
5273# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5274# is blank as the main program is not linked directly against LDLIBRARY.
5275# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5276# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5277# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5278# DLLLIBRARY is the shared (i.e., DLL) library.
5279#
5280# RUNSHARED is used to run shared python without installed libraries
5281#
5282# INSTSONAME is the name of the shared library that will be use to install
5283# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005284#
5285# LDVERSION is the shared library version number, normally the Python version
5286# with the ABI build flags appended.
5287
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005288
5289
5290
5291
5292
5293
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005294
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295LDLIBRARY="$LIBRARY"
5296BLDLIBRARY='$(LDLIBRARY)'
5297INSTSONAME='$(LDLIBRARY)'
5298DLLLIBRARY=''
5299LDLIBRARYDIR=''
5300RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005301LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005302
5303# LINKCC is the command that links the python executable -- default is $(CC).
5304# If CXX is set, and if it is needed to link a main function that was
5305# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5306# python might then depend on the C++ runtime
5307# This is altered for AIX in order to build the export list before
5308# linking.
5309
Matthias Kloseb9621712010-04-24 17:59:49 +00005310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5311$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312if test -z "$LINKCC"
5313then
5314 LINKCC='$(PURIFY) $(MAINCC)'
5315 case $ac_sys_system in
5316 AIX*)
5317 exp_extra="\"\""
5318 if test $ac_sys_release -ge 5 -o \
5319 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5320 exp_extra="."
5321 fi
5322 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323 QNX*)
5324 # qcc must be used because the other compilers do not
5325 # support -N.
5326 LINKCC=qcc;;
5327 esac
5328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5330$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005331
5332# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5333# make sure we default having it set to "no": this is used by
5334# distutils.unixccompiler to know if it should add --enable-new-dtags
5335# to linker command lines, and failing to detect GNU ld simply results
5336# in the same bahaviour as before.
5337
Matthias Kloseb9621712010-04-24 17:59:49 +00005338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5339$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340ac_prog=ld
5341if test "$GCC" = yes; then
5342 ac_prog=`$CC -print-prog-name=ld`
5343fi
5344case `"$ac_prog" -V 2>&1 < /dev/null` in
5345 *GNU*)
5346 GNULD=yes;;
5347 *)
5348 GNULD=no;;
5349esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5351$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5354$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005355if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005356 $as_echo_n "(cached) " >&6
5357else
5358 ac_cv_c_inline=no
5359for ac_kw in inline __inline__ __inline; do
5360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5361/* end confdefs.h. */
5362#ifndef __cplusplus
5363typedef int foo_t;
5364static $ac_kw foo_t static_foo () {return 0; }
5365$ac_kw foo_t foo () {return 0; }
5366#endif
5367
5368_ACEOF
5369if ac_fn_c_try_compile "$LINENO"; then :
5370 ac_cv_c_inline=$ac_kw
5371fi
5372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5373 test "$ac_cv_c_inline" != no && break
5374done
5375
5376fi
5377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5378$as_echo "$ac_cv_c_inline" >&6; }
5379
5380case $ac_cv_c_inline in
5381 inline | yes) ;;
5382 *)
5383 case $ac_cv_c_inline in
5384 no) ac_val=;;
5385 *) ac_val=$ac_cv_c_inline;;
5386 esac
5387 cat >>confdefs.h <<_ACEOF
5388#ifndef __cplusplus
5389#define inline $ac_val
5390#endif
5391_ACEOF
5392 ;;
5393esac
5394
5395if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005396
5397$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005398
5399
5400fi
5401
5402
Matthias Kloseb9621712010-04-24 17:59:49 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5404$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005406if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407 enableval=$enable_shared;
5408fi
5409
5410
5411if test -z "$enable_shared"
5412then
5413 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005414 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415 enable_shared="yes";;
5416 *)
5417 enable_shared="no";;
5418 esac
5419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5421$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422
Matthias Kloseb9621712010-04-24 17:59:49 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5424$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005426if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005427 enableval=$enable_profiling;
5428fi
5429
5430if test "x$enable_profiling" = xyes; then
5431 ac_save_cc="$CC"
5432 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434/* end confdefs.h. */
5435int main() { return 0; }
5436_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005437if ac_fn_c_try_link "$LINENO"; then :
5438
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005440 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005442rm -f core conftest.err conftest.$ac_objext \
5443 conftest$ac_exeext conftest.$ac_ext
5444 CC="$ac_save_cc"
5445else
5446 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5449$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
doko@ubuntu.comba015832012-06-30 16:52:05 +02005451if test "x$enable_profiling" = xyes; then
5452 BASECFLAGS="-pg $BASECFLAGS"
5453 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005454fi
5455
Matthias Kloseb9621712010-04-24 17:59:49 +00005456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5457$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458
5459# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5460# library that we build, but we do not want to link against it (we
5461# will find it with a -framework option). For this reason there is an
5462# extra variable BLDLIBRARY against which Python and the extension
5463# modules are linked, BLDLIBRARY. This is normally the same as
5464# LDLIBRARY, but empty for MacOSX framework builds.
5465if test "$enable_framework"
5466then
5467 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5468 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5469 BLDLIBRARY=''
5470else
5471 BLDLIBRARY='$(LDLIBRARY)'
5472fi
5473
5474# Other platforms follow
5475if test $enable_shared = "yes"; then
5476
Matthias Kloseb9621712010-04-24 17:59:49 +00005477$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005478
5479 case $ac_sys_system in
5480 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005481 LDLIBRARY='libpython$(LDVERSION).dll.a'
5482 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005483 ;;
5484 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005485 LDLIBRARY='libpython$(LDVERSION).so'
5486 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005487 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5488 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005489 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005490 then
5491 PY3LIBRARY=libpython3.so
5492 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005494 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005495 LDLIBRARY='libpython$(LDVERSION).so'
5496 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5498 case $ac_sys_system in
5499 FreeBSD*)
5500 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5501 ;;
5502 esac
5503 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005504 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005505 then
5506 PY3LIBRARY=libpython3.so
5507 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508 ;;
5509 hp*|HP*)
5510 case `uname -m` in
5511 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005512 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513 ;;
5514 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005515 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516 ;;
5517 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005518 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005519 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5520 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005521 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005522 LDLIBRARY='libpython$(LDVERSION).dylib'
5523 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5525 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005526 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005527 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005528 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5529 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005530
5531 esac
5532else # shared is disabled
5533 case $ac_sys_system in
5534 CYGWIN*)
5535 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005536 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537 ;;
5538 esac
5539fi
5540
Matthias Kloseb9621712010-04-24 17:59:49 +00005541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5542$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543
5544if test -n "$ac_tool_prefix"; then
5545 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5546set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5548$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005549if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005550 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551else
5552 if test -n "$RANLIB"; then
5553 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5554else
5555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5556for as_dir in $PATH
5557do
5558 IFS=$as_save_IFS
5559 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005560 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005561 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005564 break 2
5565 fi
5566done
Matthias Kloseb9621712010-04-24 17:59:49 +00005567 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005568IFS=$as_save_IFS
5569
5570fi
5571fi
5572RANLIB=$ac_cv_prog_RANLIB
5573if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5575$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005576else
Matthias Kloseb9621712010-04-24 17:59:49 +00005577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5578$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579fi
5580
5581
5582fi
5583if test -z "$ac_cv_prog_RANLIB"; then
5584 ac_ct_RANLIB=$RANLIB
5585 # Extract the first word of "ranlib", so it can be a program name with args.
5586set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5588$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005589if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005590 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591else
5592 if test -n "$ac_ct_RANLIB"; then
5593 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5594else
5595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5596for as_dir in $PATH
5597do
5598 IFS=$as_save_IFS
5599 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005600 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005601 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604 break 2
5605 fi
5606done
Matthias Kloseb9621712010-04-24 17:59:49 +00005607 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608IFS=$as_save_IFS
5609
5610fi
5611fi
5612ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5613if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5615$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616else
Matthias Kloseb9621712010-04-24 17:59:49 +00005617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5618$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619fi
5620
5621 if test "x$ac_ct_RANLIB" = x; then
5622 RANLIB=":"
5623 else
5624 case $cross_compiling:$ac_tool_warned in
5625yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005626{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5627$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628ac_tool_warned=yes ;;
5629esac
5630 RANLIB=$ac_ct_RANLIB
5631 fi
5632else
5633 RANLIB="$ac_cv_prog_RANLIB"
5634fi
5635
5636
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005637if test -n "$ac_tool_prefix"; then
5638 for ac_prog in ar aal
5639 do
5640 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5641set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5643$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005644if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005645 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646else
5647 if test -n "$AR"; then
5648 ac_cv_prog_AR="$AR" # Let the user override the test.
5649else
5650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5651for as_dir in $PATH
5652do
5653 IFS=$as_save_IFS
5654 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005655 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005656 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5657 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659 break 2
5660 fi
5661done
Matthias Kloseb9621712010-04-24 17:59:49 +00005662 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663IFS=$as_save_IFS
5664
5665fi
5666fi
5667AR=$ac_cv_prog_AR
5668if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5670$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671else
Matthias Kloseb9621712010-04-24 17:59:49 +00005672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5673$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674fi
5675
5676
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005677 test -n "$AR" && break
5678 done
5679fi
5680if test -z "$AR"; then
5681 ac_ct_AR=$AR
5682 for ac_prog in ar aal
5683do
5684 # Extract the first word of "$ac_prog", so it can be a program name with args.
5685set dummy $ac_prog; ac_word=$2
5686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5687$as_echo_n "checking for $ac_word... " >&6; }
5688if ${ac_cv_prog_ac_ct_AR+:} false; then :
5689 $as_echo_n "(cached) " >&6
5690else
5691 if test -n "$ac_ct_AR"; then
5692 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5693else
5694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5695for as_dir in $PATH
5696do
5697 IFS=$as_save_IFS
5698 test -z "$as_dir" && as_dir=.
5699 for ac_exec_ext in '' $ac_executable_extensions; do
5700 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5701 ac_cv_prog_ac_ct_AR="$ac_prog"
5702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5703 break 2
5704 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005706 done
5707IFS=$as_save_IFS
5708
5709fi
5710fi
5711ac_ct_AR=$ac_cv_prog_ac_ct_AR
5712if test -n "$ac_ct_AR"; then
5713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5714$as_echo "$ac_ct_AR" >&6; }
5715else
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5717$as_echo "no" >&6; }
5718fi
5719
5720
5721 test -n "$ac_ct_AR" && break
5722done
5723
5724 if test "x$ac_ct_AR" = x; then
5725 AR="ar"
5726 else
5727 case $cross_compiling:$ac_tool_warned in
5728yes:)
5729{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5730$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5731ac_tool_warned=yes ;;
5732esac
5733 AR=$ac_ct_AR
5734 fi
5735fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736
5737
5738# tweak ARFLAGS only if the user didn't set it on the command line
5739
5740if test -z "$ARFLAGS"
5741then
5742 ARFLAGS="rc"
5743fi
5744
5745
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005746DISABLE_ASDLGEN=""
5747# Extract the first word of "python", so it can be a program name with args.
5748set dummy python; ac_word=$2
5749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5750$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005751if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005752 $as_echo_n "(cached) " >&6
5753else
5754 if test -n "$HAS_PYTHON"; then
5755 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5756else
5757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5758for as_dir in $PATH
5759do
5760 IFS=$as_save_IFS
5761 test -z "$as_dir" && as_dir=.
5762 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005763 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005764 ac_cv_prog_HAS_PYTHON="found"
5765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5766 break 2
5767 fi
5768done
5769 done
5770IFS=$as_save_IFS
5771
5772 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5773fi
5774fi
5775HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5776if test -n "$HAS_PYTHON"; then
5777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5778$as_echo "$HAS_PYTHON" >&6; }
5779else
5780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5781$as_echo "no" >&6; }
5782fi
5783
5784
5785if test $HAS_HG != found -o $HAS_PYTHON != found
5786then
5787 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5788fi
5789
5790
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791case $MACHDEP in
5792bsdos*|hp*|HP*)
5793 # install -d does not work on BSDI or HP-UX
5794 if test -z "$INSTALL"
5795 then
5796 INSTALL="${srcdir}/install-sh -c"
5797 fi
5798esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799# Find a good install program. We prefer a C program (faster),
5800# so one script is as good as another. But avoid the broken or
5801# incompatible versions:
5802# SysV /etc/install, /usr/sbin/install
5803# SunOS /usr/etc/install
5804# IRIX /sbin/install
5805# AIX /bin/install
5806# AmigaOS /C/install, which installs bootblocks on floppy discs
5807# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5808# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5809# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5810# OS/2's system install, which has a completely different semantic
5811# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005812# Reject install programs that cannot install multiple files.
5813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5814$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005816if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005817 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818else
5819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5820for as_dir in $PATH
5821do
5822 IFS=$as_save_IFS
5823 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005824 # Account for people who put trailing slashes in PATH elements.
5825case $as_dir/ in #((
5826 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005828 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829 /usr/ucb/* ) ;;
5830 *)
5831 # OSF1 and SCO ODT 3.0 have their own names for install.
5832 # Don't use installbsd from OSF since it installs stuff as root
5833 # by default.
5834 for ac_prog in ginstall scoinst install; do
5835 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005836 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837 if test $ac_prog = install &&
5838 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5839 # AIX install. It has an incompatible calling convention.
5840 :
5841 elif test $ac_prog = install &&
5842 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5843 # program-specific install script used by HP pwplus--don't use.
5844 :
5845 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005846 rm -rf conftest.one conftest.two conftest.dir
5847 echo one > conftest.one
5848 echo two > conftest.two
5849 mkdir conftest.dir
5850 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5851 test -s conftest.one && test -s conftest.two &&
5852 test -s conftest.dir/conftest.one &&
5853 test -s conftest.dir/conftest.two
5854 then
5855 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5856 break 3
5857 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858 fi
5859 fi
5860 done
5861 done
5862 ;;
5863esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005864
5865 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866IFS=$as_save_IFS
5867
Matthias Kloseb9621712010-04-24 17:59:49 +00005868rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869
5870fi
5871 if test "${ac_cv_path_install+set}" = set; then
5872 INSTALL=$ac_cv_path_install
5873 else
5874 # As a last resort, use the slow shell script. Don't cache a
5875 # value for INSTALL within a source directory, because that will
5876 # break other packages using the cache if that directory is
5877 # removed, or if the value is a relative name.
5878 INSTALL=$ac_install_sh
5879 fi
5880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5882$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883
5884# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5885# It thinks the first close brace ends the variable substitution.
5886test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5887
5888test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5889
5890test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5891
Matthias Klose93a0ef12012-03-15 18:08:34 +01005892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5893$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5894if test -z "$MKDIR_P"; then
5895 if ${ac_cv_path_mkdir+:} false; then :
5896 $as_echo_n "(cached) " >&6
5897else
5898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5899for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5900do
5901 IFS=$as_save_IFS
5902 test -z "$as_dir" && as_dir=.
5903 for ac_prog in mkdir gmkdir; do
5904 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005905 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01005906 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5907 'mkdir (GNU coreutils) '* | \
5908 'mkdir (coreutils) '* | \
5909 'mkdir (fileutils) '4.1*)
5910 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5911 break 3;;
5912 esac
5913 done
5914 done
5915 done
5916IFS=$as_save_IFS
5917
5918fi
5919
5920 test -d ./--version && rmdir ./--version
5921 if test "${ac_cv_path_mkdir+set}" = set; then
5922 MKDIR_P="$ac_cv_path_mkdir -p"
5923 else
5924 # As a last resort, use the slow shell script. Don't cache a
5925 # value for MKDIR_P within a source directory, because that will
5926 # break other packages using the cache if that directory is
5927 # removed, or if the value is a relative name.
5928 MKDIR_P="$ac_install_sh -d"
5929 fi
5930fi
5931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5932$as_echo "$MKDIR_P" >&6; }
5933
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934
5935# Not every filesystem supports hard links
5936
5937if test -z "$LN" ; then
5938 case $ac_sys_system in
5939 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 *) LN=ln;;
5941 esac
5942fi
5943
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005944# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005945
5946ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005947
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5950$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
5952# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005953if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 withval=$with_pydebug;
5955if test "$withval" != no
5956then
5957
Matthias Kloseb9621712010-04-24 17:59:49 +00005958$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5961$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005963 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005964else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5965$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966fi
5967else
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5969$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970fi
5971
5972
5973# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5974# merged with this chunk of code?
5975
5976# Optimizer/debugger flags
5977# ------------------------
5978# (The following bit of code is complicated enough - please keep things
5979# indented properly. Just pretend you're editing Python code. ;-)
5980
5981# There are two parallel sets of case statements below, one that checks to
5982# see if OPT was set and one that does BASECFLAGS setting based upon
5983# compiler and platform. BASECFLAGS tweaks need to be made even if the
5984# user set OPT.
5985
5986# tweak OPT based on compiler and platform, only if the user didn't set
5987# it on the command line
5988
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005989if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990then
5991 case $GCC in
5992 yes)
5993 if test "$CC" != 'g++' ; then
5994 STRICT_PROTO="-Wstrict-prototypes"
5995 fi
5996 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5997 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5998 WRAP="-fwrapv"
5999 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006000
6001 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006002 case $CC in
6003 *clang*) WRAP="-fwrapv"
6004 ;;
6005 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006006
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007 case $ac_cv_prog_cc_g in
6008 yes)
6009 if test "$Py_DEBUG" = 'true' ; then
6010 # Optimization messes up debuggers, so turn it off for
6011 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006012 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013 else
6014 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6015 fi
6016 ;;
6017 *)
6018 OPT="-O3 -Wall $STRICT_PROTO"
6019 ;;
6020 esac
6021 case $ac_sys_system in
6022 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6023 ;;
6024 esac
6025 ;;
6026
6027 *)
6028 OPT="-O"
6029 ;;
6030 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031fi
6032
6033
6034
6035# The -arch flags for universal builds on OSX
6036UNIVERSAL_ARCH_FLAGS=
6037
6038
6039# tweak BASECFLAGS based on compiler and platform
6040case $GCC in
6041yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006042 # Python doesn't violate C99 aliasing rules, but older versions of
6043 # GCC produce warnings for legal Python code. Enable
6044 # -fno-strict-aliasing on versions of GCC that support but produce
6045 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6047$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048 ac_save_cc="$CC"
6049 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006050 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006051 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006053else
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006056
Matthias Kloseb159a552010-04-25 21:00:44 +00006057
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006058int
6059main ()
6060{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006061
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006062 ;
6063 return 0;
6064}
Matthias Kloseb159a552010-04-25 21:00:44 +00006065
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006067if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006068
6069 CC="$ac_save_cc -fstrict-aliasing"
6070 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006072/* end confdefs.h. */
6073
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006074 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006075int
6076main ()
6077{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006078double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006079 ;
6080 return 0;
6081}
Matthias Kloseb159a552010-04-25 21:00:44 +00006082
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006084if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006085
6086 ac_cv_no_strict_aliasing=no
6087
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088else
Matthias Kloseb159a552010-04-25 21:00:44 +00006089
6090 ac_cv_no_strict_aliasing=yes
6091
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006092fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006094
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006095else
Matthias Kloseb159a552010-04-25 21:00:44 +00006096
6097 ac_cv_no_strict_aliasing=no
6098
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006101fi
6102
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006103 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006104 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6106$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006107 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006108 then
6109 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6110 fi
6111
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6113$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6114 ac_save_cc="$CC"
6115 CC="$CC -Wunused-result -Werror"
6116 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006117 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006118 $as_echo_n "(cached) " >&6
6119else
6120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6121/* end confdefs.h. */
6122
6123
6124int
6125main ()
6126{
6127
6128 ;
6129 return 0;
6130}
6131
6132_ACEOF
6133if ac_fn_c_try_compile "$LINENO"; then :
6134
6135 ac_cv_disable_unused_result_warning=yes
6136
6137else
6138
6139 ac_cv_disable_unused_result_warning=no
6140
6141fi
6142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6143fi
6144
6145 CFLAGS="$save_CFLAGS"
6146 CC="$ac_save_cc"
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6148$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6149
6150 if test $ac_cv_disable_unused_result_warning = yes
6151 then
6152 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6153 fi
6154
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6156 # support. Without this, treatment of subnormals doesn't follow
6157 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006158 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159 alpha*)
6160 BASECFLAGS="$BASECFLAGS -mieee"
6161 ;;
6162 esac
6163
6164 case $ac_sys_system in
6165 SCO_SV*)
6166 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6167 ;;
6168 # is there any other compiler on Darwin besides gcc?
6169 Darwin*)
6170 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6171 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006172 if test "${CC}" = gcc
6173 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6175$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006176 case "${UNIVERSALSDK}" in
6177 */MacOSX10.4u.sdk)
6178 # Build using 10.4 SDK, force usage of gcc when the
6179 # compiler is gcc, otherwise the user will get very
6180 # confusing error messages when building on OSX 10.6
6181 CC=gcc-4.0
6182 CPP=cpp-4.0
6183 ;;
6184 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6186$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006187 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188
6189
6190 if test "${enable_universalsdk}"; then
6191 UNIVERSAL_ARCH_FLAGS=""
6192 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6193 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6194 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006195 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6197 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006198 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006199 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200
6201 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6202 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006203 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006204 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006206 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6207 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006208 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006209 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006210
6211 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6212 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006213 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006214 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006215
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006216 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006217 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 +00006218
6219 fi
6220
6221
Ronald Oussoren666028b2010-04-18 19:07:43 +00006222 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6223 if test "${UNIVERSALSDK}" != "/"
6224 then
6225 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6226 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006227 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228 fi
6229 fi
6230
6231 # Calculate the right deployment target for this build.
6232 #
6233 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006234 if test ${cur_target} '>' 10.2 && \
6235 test ${cur_target} '<' 10.6
6236 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006238 if test ${enable_universalsdk}; then
6239 if test "${UNIVERSAL_ARCHS}" = "all"; then
6240 # Ensure that the default platform for a
6241 # 4-way universal build is OSX 10.5,
6242 # that's the first OS release where
6243 # 4-way builds make sense.
6244 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006245
6246 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6247 cur_target='10.5'
6248
6249 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6250 cur_target='10.5'
6251
6252 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6253 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006254 fi
6255 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006256 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006257 # On Intel macs default to a deployment
6258 # target of 10.4, that's the first OSX
6259 # release with Intel support.
6260 cur_target="10.4"
6261 fi
6262 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263 fi
6264 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6265
6266 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6267 # environment with a value that is the same as what we'll use
6268 # in the Makefile to ensure that we'll get the same compiler
6269 # environment during configure and build time.
6270 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6271 export MACOSX_DEPLOYMENT_TARGET
6272 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6273
6274 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006275 esac
6276 ;;
6277
6278*)
6279 case $ac_sys_system in
6280 OpenUNIX*|UnixWare*)
6281 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6282 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283 SCO_SV*)
6284 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6285 ;;
6286 esac
6287 ;;
6288esac
6289
6290if test "$Py_DEBUG" = 'true'; then
6291 :
6292else
6293 OPT="-DNDEBUG $OPT"
6294fi
6295
6296if test "$ac_arch_flags"
6297then
6298 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6299fi
6300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301# Check whether GCC supports PyArg_ParseTuple format
6302if test "$GCC" = "yes"
6303then
Matthias Kloseb9621712010-04-24 17:59:49 +00006304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6305$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306 save_CFLAGS=$CFLAGS
6307 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309/* end confdefs.h. */
6310
6311 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312int
6313main ()
6314{
6315
6316 ;
6317 return 0;
6318}
Matthias Kloseb159a552010-04-25 21:00:44 +00006319
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006321if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322
Matthias Kloseb159a552010-04-25 21:00:44 +00006323
Matthias Kloseb9621712010-04-24 17:59:49 +00006324$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325
Matthias Kloseb159a552010-04-25 21:00:44 +00006326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006327$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006328
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329else
Matthias Kloseb159a552010-04-25 21:00:44 +00006330
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006332$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333
6334fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6336 CFLAGS=$save_CFLAGS
6337fi
6338
6339# On some compilers, pthreads are available without further options
6340# (e.g. MacOS X). On some of these systems, the compiler will not
6341# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6342# So we have to see first whether pthreads are available without
6343# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6345$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006346if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006347 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006348else
Matthias Kloseb9621712010-04-24 17:59:49 +00006349 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350 ac_cv_pthread_is_default=no
6351else
Matthias Kloseb9621712010-04-24 17:59:49 +00006352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006353/* end confdefs.h. */
6354
6355#include <pthread.h>
6356
6357void* routine(void* p){return NULL;}
6358
6359int main(){
6360 pthread_t p;
6361 if(pthread_create(&p,NULL,routine,NULL)!=0)
6362 return 1;
6363 (void)pthread_detach(p);
6364 return 0;
6365}
6366
6367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006368if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369
6370 ac_cv_pthread_is_default=yes
6371 ac_cv_kthread=no
6372 ac_cv_pthread=no
6373
6374else
Matthias Kloseb9621712010-04-24 17:59:49 +00006375 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6378 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379fi
6380
6381
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382fi
6383
Matthias Kloseb9621712010-04-24 17:59:49 +00006384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6385$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386
6387
6388if test $ac_cv_pthread_is_default = yes
6389then
6390 ac_cv_kpthread=no
6391else
6392# -Kpthread, if available, provides the right #defines
6393# and linker options to make pthread_create available
6394# Some compilers won't report that they do not support -Kpthread,
6395# so we need to run a program to see whether it really made the
6396# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6398$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006399if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006400 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401else
6402 ac_save_cc="$CC"
6403CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006404if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006405 ac_cv_kpthread=no
6406else
Matthias Kloseb9621712010-04-24 17:59:49 +00006407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408/* end confdefs.h. */
6409
6410#include <pthread.h>
6411
6412void* routine(void* p){return NULL;}
6413
6414int main(){
6415 pthread_t p;
6416 if(pthread_create(&p,NULL,routine,NULL)!=0)
6417 return 1;
6418 (void)pthread_detach(p);
6419 return 0;
6420}
6421
6422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006423if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424 ac_cv_kpthread=yes
6425else
Matthias Kloseb9621712010-04-24 17:59:49 +00006426 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6429 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006430fi
6431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006432CC="$ac_save_cc"
6433fi
6434
Matthias Kloseb9621712010-04-24 17:59:49 +00006435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6436$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437fi
6438
6439if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6440then
6441# -Kthread, if available, provides the right #defines
6442# and linker options to make pthread_create available
6443# Some compilers won't report that they do not support -Kthread,
6444# so we need to run a program to see whether it really made the
6445# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6447$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006448if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006449 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450else
6451 ac_save_cc="$CC"
6452CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006453if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006454 ac_cv_kthread=no
6455else
Matthias Kloseb9621712010-04-24 17:59:49 +00006456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006457/* end confdefs.h. */
6458
6459#include <pthread.h>
6460
6461void* routine(void* p){return NULL;}
6462
6463int main(){
6464 pthread_t p;
6465 if(pthread_create(&p,NULL,routine,NULL)!=0)
6466 return 1;
6467 (void)pthread_detach(p);
6468 return 0;
6469}
6470
6471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006472if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006473 ac_cv_kthread=yes
6474else
Matthias Kloseb9621712010-04-24 17:59:49 +00006475 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6478 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006479fi
6480
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006481CC="$ac_save_cc"
6482fi
6483
Matthias Kloseb9621712010-04-24 17:59:49 +00006484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6485$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006486fi
6487
6488if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6489then
6490# -pthread, if available, provides the right #defines
6491# and linker options to make pthread_create available
6492# Some compilers won't report that they do not support -pthread,
6493# so we need to run a program to see whether it really made the
6494# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6496$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006497if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006498 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006499else
6500 ac_save_cc="$CC"
6501CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006502if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006503 ac_cv_pthread=no
6504else
Matthias Kloseb9621712010-04-24 17:59:49 +00006505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006506/* end confdefs.h. */
6507
6508#include <pthread.h>
6509
6510void* routine(void* p){return NULL;}
6511
6512int main(){
6513 pthread_t p;
6514 if(pthread_create(&p,NULL,routine,NULL)!=0)
6515 return 1;
6516 (void)pthread_detach(p);
6517 return 0;
6518}
6519
6520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006521if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006522 ac_cv_pthread=yes
6523else
Matthias Kloseb9621712010-04-24 17:59:49 +00006524 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006526rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6527 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006528fi
6529
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530CC="$ac_save_cc"
6531fi
6532
Matthias Kloseb9621712010-04-24 17:59:49 +00006533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6534$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006535fi
6536
6537# If we have set a CC compiler flag for thread support then
6538# check if it works for CXX, too.
6539ac_cv_cxx_thread=no
6540if test ! -z "$CXX"
6541then
Matthias Kloseb9621712010-04-24 17:59:49 +00006542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6543$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006544ac_save_cxx="$CXX"
6545
6546if test "$ac_cv_kpthread" = "yes"
6547then
6548 CXX="$CXX -Kpthread"
6549 ac_cv_cxx_thread=yes
6550elif test "$ac_cv_kthread" = "yes"
6551then
6552 CXX="$CXX -Kthread"
6553 ac_cv_cxx_thread=yes
6554elif test "$ac_cv_pthread" = "yes"
6555then
6556 CXX="$CXX -pthread"
6557 ac_cv_cxx_thread=yes
6558fi
6559
6560if test $ac_cv_cxx_thread = yes
6561then
6562 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6563 $CXX -c conftest.$ac_ext 2>&5
6564 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6565 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6566 then
6567 ac_cv_cxx_thread=yes
6568 else
6569 ac_cv_cxx_thread=no
6570 fi
6571 rm -fr conftest*
6572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6574$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006575fi
6576CXX="$ac_save_cxx"
6577
6578
6579# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6581$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006582if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006583 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006584else
Matthias Kloseb9621712010-04-24 17:59:49 +00006585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006586/* end confdefs.h. */
6587#include <stdlib.h>
6588#include <stdarg.h>
6589#include <string.h>
6590#include <float.h>
6591
6592int
6593main ()
6594{
6595
6596 ;
6597 return 0;
6598}
6599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006600if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006601 ac_cv_header_stdc=yes
6602else
Matthias Kloseb9621712010-04-24 17:59:49 +00006603 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006604fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6606
6607if test $ac_cv_header_stdc = yes; then
6608 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610/* end confdefs.h. */
6611#include <string.h>
6612
6613_ACEOF
6614if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006615 $EGREP "memchr" >/dev/null 2>&1; then :
6616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006617else
6618 ac_cv_header_stdc=no
6619fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006620rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006621
6622fi
6623
6624if test $ac_cv_header_stdc = yes; then
6625 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006627/* end confdefs.h. */
6628#include <stdlib.h>
6629
6630_ACEOF
6631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006632 $EGREP "free" >/dev/null 2>&1; then :
6633
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006634else
6635 ac_cv_header_stdc=no
6636fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006637rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006638
6639fi
6640
6641if test $ac_cv_header_stdc = yes; then
6642 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006643 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644 :
6645else
Matthias Kloseb9621712010-04-24 17:59:49 +00006646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006647/* end confdefs.h. */
6648#include <ctype.h>
6649#include <stdlib.h>
6650#if ((' ' & 0x0FF) == 0x020)
6651# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6652# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6653#else
6654# define ISLOWER(c) \
6655 (('a' <= (c) && (c) <= 'i') \
6656 || ('j' <= (c) && (c) <= 'r') \
6657 || ('s' <= (c) && (c) <= 'z'))
6658# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6659#endif
6660
6661#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6662int
6663main ()
6664{
6665 int i;
6666 for (i = 0; i < 256; i++)
6667 if (XOR (islower (i), ISLOWER (i))
6668 || toupper (i) != TOUPPER (i))
6669 return 2;
6670 return 0;
6671}
6672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006673if ac_fn_c_try_run "$LINENO"; then :
6674
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006675else
Matthias Kloseb9621712010-04-24 17:59:49 +00006676 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6679 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006680fi
6681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006682fi
6683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6685$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686if test $ac_cv_header_stdc = yes; then
6687
Matthias Kloseb9621712010-04-24 17:59:49 +00006688$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006689
6690fi
6691
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006692for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006693fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006694ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006695sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006696unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006697poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006698sys/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 +01006699sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006700sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006701sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006702sys/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 -07006703libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006704bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006705do :
6706 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6707ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006708if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006709 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006710#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006711_ACEOF
6712
6713fi
6714
Guido van Rossum627b2d71993-12-24 10:39:16 +00006715done
6716
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006717ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006718for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006719 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6721$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006722if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006723 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006724else
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006726/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006727#include <sys/types.h>
6728#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006729
Martin v. Löwis11437992002-04-12 09:54:03 +00006730int
6731main ()
6732{
6733if ((DIR *) 0)
6734return 0;
6735 ;
6736 return 0;
6737}
6738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006739if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006740 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006741else
Matthias Kloseb9621712010-04-24 17:59:49 +00006742 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006746eval ac_res=\$$as_ac_Header
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6748$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006749if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006750 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006751#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006752_ACEOF
6753
6754ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006755fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006756
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006757done
6758# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6759if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6761$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006762if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006763 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006764else
Martin v. Löwis11437992002-04-12 09:54:03 +00006765 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006769/* Override any GCC internal prototype to avoid an error.
6770 Use char because int might match the return type of a GCC
6771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006772#ifdef __cplusplus
6773extern "C"
6774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006775char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006776int
6777main ()
6778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006779return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006780 ;
6781 return 0;
6782}
6783_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006784for ac_lib in '' dir; do
6785 if test -z "$ac_lib"; then
6786 ac_res="none required"
6787 else
6788 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006789 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006790 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006792 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006794rm -f core conftest.err conftest.$ac_objext \
6795 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006796 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006797 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799done
Victor Stinnere0be4232011-10-25 13:06:09 +02006800if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006802else
6803 ac_cv_search_opendir=no
6804fi
6805rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006806LIBS=$ac_func_search_save_LIBS
6807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6809$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006810ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006811if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006812 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006813
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006815
Michael W. Hudson54241132001-12-07 15:38:26 +00006816else
Matthias Kloseb9621712010-04-24 17:59:49 +00006817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6818$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006819if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006820 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006821else
6822 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006826/* Override any GCC internal prototype to avoid an error.
6827 Use char because int might match the return type of a GCC
6828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006829#ifdef __cplusplus
6830extern "C"
6831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006832char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006833int
6834main ()
6835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006836return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006837 ;
6838 return 0;
6839}
6840_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006841for ac_lib in '' x; do
6842 if test -z "$ac_lib"; then
6843 ac_res="none required"
6844 else
6845 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006846 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006847 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006851rm -f core conftest.err conftest.$ac_objext \
6852 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006853 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006854 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006856done
Victor Stinnere0be4232011-10-25 13:06:09 +02006857if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006859else
6860 ac_cv_search_opendir=no
6861fi
6862rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006863LIBS=$ac_func_search_save_LIBS
6864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6866$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006867ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006868if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006869 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006870
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006871fi
6872
6873fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006874
Matthias Kloseb9621712010-04-24 17:59:49 +00006875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6876$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006877if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006878 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006879else
Matthias Kloseb9621712010-04-24 17:59:49 +00006880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006881/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006882#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006883int
6884main ()
6885{
6886return makedev(0, 0);
6887 ;
6888 return 0;
6889}
6890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006892 ac_cv_header_sys_types_h_makedev=yes
6893else
Matthias Kloseb9621712010-04-24 17:59:49 +00006894 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006896rm -f core conftest.err conftest.$ac_objext \
6897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006898
6899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6901$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006902
6903if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006904ac_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 +02006905if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006906
Matthias Kloseb9621712010-04-24 17:59:49 +00006907$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006908
6909fi
6910
6911
6912
6913 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006914 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 +02006915if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006916
Matthias Kloseb9621712010-04-24 17:59:49 +00006917$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006918
6919fi
6920
6921
6922 fi
6923fi
6924
Michael W. Hudson54241132001-12-07 15:38:26 +00006925
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006926# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6927for ac_header in net/if.h
6928do :
6929 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6930#ifdef STDC_HEADERS
6931# include <stdlib.h>
6932# include <stddef.h>
6933#else
6934# ifdef HAVE_STDLIB_H
6935# include <stdlib.h>
6936# endif
6937#endif
6938#ifdef HAVE_SYS_SOCKET_H
6939# include <sys/socket.h>
6940#endif
6941
6942"
Victor Stinnere0be4232011-10-25 13:06:09 +02006943if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006944 cat >>confdefs.h <<_ACEOF
6945#define HAVE_NET_IF_H 1
6946_ACEOF
6947
6948fi
6949
6950done
6951
6952
6953
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006954# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006955for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006956do :
6957 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006958#ifdef HAVE_CURSES_H
6959#include <curses.h>
6960#endif
6961
Matthias Kloseb9621712010-04-24 17:59:49 +00006962"
Victor Stinnere0be4232011-10-25 13:06:09 +02006963if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006964 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006965#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006966_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006967
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006968fi
6969
6970done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006971
6972
Martin v. Löwis11017b12006-01-14 18:12:57 +00006973# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006974for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006975do :
6976 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 +00006977#ifdef HAVE_ASM_TYPES_H
6978#include <asm/types.h>
6979#endif
6980#ifdef HAVE_SYS_SOCKET_H
6981#include <sys/socket.h>
6982#endif
6983
Matthias Kloseb9621712010-04-24 17:59:49 +00006984"
Victor Stinnere0be4232011-10-25 13:06:09 +02006985if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006986 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006987#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006988_ACEOF
6989
6990fi
6991
6992done
6993
6994
Charles-François Natali47413c12011-10-06 19:47:44 +02006995# On Linux, can.h and can/raw.h require sys/socket.h
6996for ac_header in linux/can.h linux/can/raw.h
6997do :
6998 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6999ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7000#ifdef HAVE_SYS_SOCKET_H
7001#include <sys/socket.h>
7002#endif
7003
7004"
7005if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7006 cat >>confdefs.h <<_ACEOF
7007#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7008_ACEOF
7009
7010fi
7011
7012done
7013
7014
Guido van Rossum627b2d71993-12-24 10:39:16 +00007015# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007016was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7018$as_echo_n "checking for clock_t in time.h... " >&6; }
7019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007020/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007021#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007022
7023_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007025 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007026 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007027else
Martin v. Löwis11437992002-04-12 09:54:03 +00007028
7029
Matthias Kloseb9621712010-04-24 17:59:49 +00007030$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007031
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007032
Guido van Rossum627b2d71993-12-24 10:39:16 +00007033fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007034rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007035
Matthias Kloseb9621712010-04-24 17:59:49 +00007036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7037$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007038
Matthias Kloseb9621712010-04-24 17:59:49 +00007039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7040$as_echo_n "checking for makedev... " >&6; }
7041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007042/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007043
Jesus Cea740f53a2010-04-28 11:35:30 +00007044#if defined(MAJOR_IN_MKDEV)
7045#include <sys/mkdev.h>
7046#elif defined(MAJOR_IN_SYSMACROS)
7047#include <sys/sysmacros.h>
7048#else
7049#include <sys/types.h>
7050#endif
7051
Neal Norwitz11690112002-07-30 01:08:28 +00007052int
7053main ()
7054{
Jesus Cea740f53a2010-04-28 11:35:30 +00007055
7056 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007057 ;
7058 return 0;
7059}
Matthias Kloseb159a552010-04-25 21:00:44 +00007060
Neal Norwitz11690112002-07-30 01:08:28 +00007061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007062if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007063 ac_cv_has_makedev=yes
7064else
Matthias Kloseb9621712010-04-24 17:59:49 +00007065 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007067rm -f core conftest.err conftest.$ac_objext \
7068 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7070$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007071if test "$ac_cv_has_makedev" = "yes"; then
7072
Matthias Kloseb9621712010-04-24 17:59:49 +00007073$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007074
7075fi
7076
Martin v. Löwis399a6892002-10-04 10:22:02 +00007077# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7078# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7079# defined, but the compiler does not support pragma redefine_extname,
7080# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7081# structures (such as rlimit64) without declaring them. As a
7082# work-around, disable LFS on such configurations
7083
7084use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7086$as_echo_n "checking Solaris LFS bug... " >&6; }
7087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007088/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007089
7090#define _LARGEFILE_SOURCE 1
7091#define _FILE_OFFSET_BITS 64
7092#include <sys/resource.h>
7093
Martin v. Löwis399a6892002-10-04 10:22:02 +00007094int
7095main ()
7096{
7097struct rlimit foo;
7098 ;
7099 return 0;
7100}
7101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007102if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007103 sol_lfs_bug=no
7104else
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7109$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007110if test "$sol_lfs_bug" = "yes"; then
7111 use_lfs=no
7112fi
7113
7114if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007115# Two defines needed to enable largefile support on various platforms
7116# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007117case $ac_sys_system/$ac_sys_release in
7118AIX*)
7119
7120$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7121
7122 ;;
7123esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007124
Matthias Kloseb9621712010-04-24 17:59:49 +00007125$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007126
7127
Matthias Kloseb9621712010-04-24 17:59:49 +00007128$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007129
Martin v. Löwis399a6892002-10-04 10:22:02 +00007130fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007131
Guido van Rossum84e7b241996-08-19 21:59:00 +00007132# Add some code to confdefs.h so that the test for off_t works on SCO
7133cat >> confdefs.h <<\EOF
7134#if defined(SCO_DS)
7135#undef _OFF_T
7136#endif
7137EOF
7138
Guido van Rossumef2255b2000-03-10 22:30:29 +00007139# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007140ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007141if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007142
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007143else
Martin v. Löwis11437992002-04-12 09:54:03 +00007144
7145cat >>confdefs.h <<_ACEOF
7146#define mode_t int
7147_ACEOF
7148
7149fi
7150
Matthias Kloseb9621712010-04-24 17:59:49 +00007151ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007152if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007153
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007154else
Martin v. Löwis11437992002-04-12 09:54:03 +00007155
7156cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007157#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007158_ACEOF
7159
7160fi
7161
Matthias Kloseb9621712010-04-24 17:59:49 +00007162ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007163if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007165else
Martin v. Löwis11437992002-04-12 09:54:03 +00007166
7167cat >>confdefs.h <<_ACEOF
7168#define pid_t int
7169_ACEOF
7170
7171fi
7172
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007173
Martin v. Löwis11437992002-04-12 09:54:03 +00007174cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007175#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007176_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007177
Matthias Kloseb9621712010-04-24 17:59:49 +00007178ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007179if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007180
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007181else
Martin v. Löwis11437992002-04-12 09:54:03 +00007182
7183cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007184#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007185_ACEOF
7186
7187fi
7188
Matthias Kloseb9621712010-04-24 17:59:49 +00007189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7190$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007191if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007193else
Matthias Kloseb9621712010-04-24 17:59:49 +00007194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007195/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007196#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007197
7198_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007200 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007201 ac_cv_type_uid_t=yes
7202else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007203 ac_cv_type_uid_t=no
7204fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007205rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007206
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7209$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007210if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007211
Matthias Kloseb9621712010-04-24 17:59:49 +00007212$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007213
7214
Matthias Kloseb9621712010-04-24 17:59:49 +00007215$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007216
7217fi
7218
Matthias Kloseb9621712010-04-24 17:59:49 +00007219ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7220case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007221 no|yes) ;; #(
7222 *)
7223
Matthias Kloseb9621712010-04-24 17:59:49 +00007224$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007225
7226
7227cat >>confdefs.h <<_ACEOF
7228#define uint32_t $ac_cv_c_uint32_t
7229_ACEOF
7230;;
7231 esac
7232
Matthias Kloseb9621712010-04-24 17:59:49 +00007233ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7234case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007235 no|yes) ;; #(
7236 *)
7237
Matthias Kloseb9621712010-04-24 17:59:49 +00007238$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007239
7240
7241cat >>confdefs.h <<_ACEOF
7242#define uint64_t $ac_cv_c_uint64_t
7243_ACEOF
7244;;
7245 esac
7246
Matthias Kloseb9621712010-04-24 17:59:49 +00007247ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7248case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007249 no|yes) ;; #(
7250 *)
7251
7252cat >>confdefs.h <<_ACEOF
7253#define int32_t $ac_cv_c_int32_t
7254_ACEOF
7255;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007256esac
7257
Matthias Kloseb9621712010-04-24 17:59:49 +00007258ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7259case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007260 no|yes) ;; #(
7261 *)
7262
7263cat >>confdefs.h <<_ACEOF
7264#define int64_t $ac_cv_c_int64_t
7265_ACEOF
7266;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007267esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007268
Matthias Kloseb9621712010-04-24 17:59:49 +00007269ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007270if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007271
Matthias Kloseb9621712010-04-24 17:59:49 +00007272$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007273
7274fi
7275
Stefan Krah1919b7e2012-03-21 18:25:23 +01007276ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7277if test "x$ac_cv_type___uint128_t" = xyes; then :
7278
7279$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7280
7281fi
7282
Jack Jansendd19cf82001-12-06 22:36:17 +00007283
Michael W. Hudson54241132001-12-07 15:38:26 +00007284# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007285# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007286# The cast to long int works around a bug in the HP C Compiler
7287# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7288# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7289# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7291$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007292if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007293 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007294else
Matthias Kloseb9621712010-04-24 17:59:49 +00007295 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 +00007296
Martin v. Löwis11437992002-04-12 09:54:03 +00007297else
Matthias Kloseb9621712010-04-24 17:59:49 +00007298 if test "$ac_cv_type_int" = yes; then
7299 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007301as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007302See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007303 else
7304 ac_cv_sizeof_int=0
7305 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007307
Martin v. Löwis11437992002-04-12 09:54:03 +00007308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7310$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007311
7312
7313
Martin v. Löwis11437992002-04-12 09:54:03 +00007314cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007315#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007316_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007317
7318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007319# The cast to long int works around a bug in the HP C Compiler
7320# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7321# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7322# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7324$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007325if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007326 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007327else
Matthias Kloseb9621712010-04-24 17:59:49 +00007328 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 +00007329
Martin v. Löwis11437992002-04-12 09:54:03 +00007330else
Matthias Kloseb9621712010-04-24 17:59:49 +00007331 if test "$ac_cv_type_long" = yes; then
7332 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007334as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007335See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007336 else
7337 ac_cv_sizeof_long=0
7338 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007340
Martin v. Löwis11437992002-04-12 09:54:03 +00007341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7343$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007344
7345
7346
Martin v. Löwis11437992002-04-12 09:54:03 +00007347cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007348#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007349_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007350
7351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007352# The cast to long int works around a bug in the HP C Compiler
7353# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7354# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7355# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7357$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007358if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007359 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007360else
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 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 +00007362
Martin v. Löwis11437992002-04-12 09:54:03 +00007363else
Matthias Kloseb9621712010-04-24 17:59:49 +00007364 if test "$ac_cv_type_void_p" = yes; then
7365 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7366$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007367as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007368See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007369 else
7370 ac_cv_sizeof_void_p=0
7371 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007373
Martin v. Löwis11437992002-04-12 09:54:03 +00007374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7376$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007377
7378
7379
Martin v. Löwis11437992002-04-12 09:54:03 +00007380cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007381#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007382_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007383
7384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007385# The cast to long int works around a bug in the HP C Compiler
7386# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7387# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7388# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7390$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007391if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007393else
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 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 +00007395
Martin v. Löwis11437992002-04-12 09:54:03 +00007396else
Matthias Kloseb9621712010-04-24 17:59:49 +00007397 if test "$ac_cv_type_short" = yes; then
7398 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7399$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007400as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007401See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007402 else
7403 ac_cv_sizeof_short=0
7404 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007406
Martin v. Löwis11437992002-04-12 09:54:03 +00007407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7409$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007410
7411
7412
Martin v. Löwis11437992002-04-12 09:54:03 +00007413cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007414#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007415_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007416
7417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007418# The cast to long int works around a bug in the HP C Compiler
7419# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7420# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7421# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7423$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007424if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007425 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007426else
Matthias Kloseb9621712010-04-24 17:59:49 +00007427 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 +00007428
Martin v. Löwis11437992002-04-12 09:54:03 +00007429else
Matthias Kloseb9621712010-04-24 17:59:49 +00007430 if test "$ac_cv_type_float" = yes; then
7431 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7432$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007433as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007434See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007435 else
7436 ac_cv_sizeof_float=0
7437 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007439
Martin v. Löwis11437992002-04-12 09:54:03 +00007440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7442$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007443
7444
7445
Martin v. Löwis11437992002-04-12 09:54:03 +00007446cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007447#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007448_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007449
7450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007451# The cast to long int works around a bug in the HP C Compiler
7452# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7453# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7454# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7456$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007457if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007459else
Matthias Kloseb9621712010-04-24 17:59:49 +00007460 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 +00007461
Martin v. Löwis11437992002-04-12 09:54:03 +00007462else
Matthias Kloseb9621712010-04-24 17:59:49 +00007463 if test "$ac_cv_type_double" = yes; then
7464 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7465$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007466as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007467See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007468 else
7469 ac_cv_sizeof_double=0
7470 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007472
Martin v. Löwis11437992002-04-12 09:54:03 +00007473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7475$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007476
7477
7478
Martin v. Löwis11437992002-04-12 09:54:03 +00007479cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007480#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007481_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007482
7483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007484# The cast to long int works around a bug in the HP C Compiler
7485# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7486# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7487# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7489$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007490if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 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 +00007494
Martin v. Löwis11437992002-04-12 09:54:03 +00007495else
Matthias Kloseb9621712010-04-24 17:59:49 +00007496 if test "$ac_cv_type_fpos_t" = yes; then
7497 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007499as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007500See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007501 else
7502 ac_cv_sizeof_fpos_t=0
7503 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007505
Martin v. Löwis11437992002-04-12 09:54:03 +00007506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7508$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007509
7510
7511
Martin v. Löwis11437992002-04-12 09:54:03 +00007512cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007513#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007514_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007515
Michael W. Hudson54241132001-12-07 15:38:26 +00007516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007517# The cast to long int works around a bug in the HP C Compiler
7518# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7519# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7520# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7522$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007523if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007524 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007525else
Matthias Kloseb9621712010-04-24 17:59:49 +00007526 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 +00007527
Martin v. Löwis18e16552006-02-15 17:27:45 +00007528else
Matthias Kloseb9621712010-04-24 17:59:49 +00007529 if test "$ac_cv_type_size_t" = yes; then
7530 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7531$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007532as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007533See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007534 else
7535 ac_cv_sizeof_size_t=0
7536 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007538
Martin v. Löwis18e16552006-02-15 17:27:45 +00007539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7541$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007542
7543
7544
Martin v. Löwis18e16552006-02-15 17:27:45 +00007545cat >>confdefs.h <<_ACEOF
7546#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7547_ACEOF
7548
7549
Christian Heimes400adb02008-02-01 08:12:03 +00007550# The cast to long int works around a bug in the HP C Compiler
7551# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7552# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7553# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7555$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007556if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007558else
Matthias Kloseb9621712010-04-24 17:59:49 +00007559 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 +00007560
Christian Heimes400adb02008-02-01 08:12:03 +00007561else
Matthias Kloseb9621712010-04-24 17:59:49 +00007562 if test "$ac_cv_type_pid_t" = yes; then
7563 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7564$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007565as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007566See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007567 else
7568 ac_cv_sizeof_pid_t=0
7569 fi
7570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007571
Christian Heimes400adb02008-02-01 08:12:03 +00007572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7574$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007575
7576
7577
7578cat >>confdefs.h <<_ACEOF
7579#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7580_ACEOF
7581
7582
Michael W. Hudson54241132001-12-07 15:38:26 +00007583
Matthias Kloseb9621712010-04-24 17:59:49 +00007584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7585$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007586have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007588/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007589
Martin v. Löwis11437992002-04-12 09:54:03 +00007590int
7591main ()
7592{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007593long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007594 ;
7595 return 0;
7596}
7597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007598if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007599
7600
Matthias Kloseb9621712010-04-24 17:59:49 +00007601$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007602
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007603 have_long_long=yes
7604
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7608$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007609if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007610# The cast to long int works around a bug in the HP C Compiler
7611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7613# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7615$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007616if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007617 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007618else
Matthias Kloseb9621712010-04-24 17:59:49 +00007619 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 +00007620
Martin v. Löwis11437992002-04-12 09:54:03 +00007621else
Matthias Kloseb9621712010-04-24 17:59:49 +00007622 if test "$ac_cv_type_long_long" = yes; then
7623 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7624$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007625as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007626See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007627 else
7628 ac_cv_sizeof_long_long=0
7629 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007631
Martin v. Löwis11437992002-04-12 09:54:03 +00007632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7634$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007635
7636
7637
Martin v. Löwis11437992002-04-12 09:54:03 +00007638cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007639#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007640_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007641
Michael W. Hudson54241132001-12-07 15:38:26 +00007642
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007643fi
7644
Matthias Kloseb9621712010-04-24 17:59:49 +00007645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7646$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007647have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007649/* end confdefs.h. */
7650
7651int
7652main ()
7653{
7654long double x; x = (long double)0;
7655 ;
7656 return 0;
7657}
7658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007659if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007660
7661
Matthias Kloseb9621712010-04-24 17:59:49 +00007662$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007663
7664 have_long_double=yes
7665
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007666fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7669$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007670if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007671# The cast to long int works around a bug in the HP C Compiler
7672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7674# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7676$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007677if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007679else
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 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 +00007681
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007682else
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 if test "$ac_cv_type_long_double" = yes; then
7684 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007686as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007687See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007688 else
7689 ac_cv_sizeof_long_double=0
7690 fi
7691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007692
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7695$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007696
7697
7698
7699cat >>confdefs.h <<_ACEOF
7700#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7701_ACEOF
7702
7703
7704fi
7705
7706
Matthias Kloseb9621712010-04-24 17:59:49 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7708$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007709have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007711/* end confdefs.h. */
7712
7713int
7714main ()
7715{
7716_Bool x; x = (_Bool)0;
7717 ;
7718 return 0;
7719}
7720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007721if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007722
7723
Matthias Kloseb9621712010-04-24 17:59:49 +00007724$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007725
7726 have_c99_bool=yes
7727
Thomas Woutersb2137042007-02-01 18:02:27 +00007728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7731$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007732if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007733# The cast to long int works around a bug in the HP C Compiler
7734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7736# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7738$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007739if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007741else
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 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 +00007743
Thomas Woutersb2137042007-02-01 18:02:27 +00007744else
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 if test "$ac_cv_type__Bool" = yes; then
7746 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007748as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007749See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750 else
7751 ac_cv_sizeof__Bool=0
7752 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007754
Thomas Woutersb2137042007-02-01 18:02:27 +00007755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7757$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758
7759
7760
Thomas Woutersb2137042007-02-01 18:02:27 +00007761cat >>confdefs.h <<_ACEOF
7762#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7763_ACEOF
7764
7765
7766fi
7767
Matthias Kloseb9621712010-04-24 17:59:49 +00007768ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007769 #include <stdint.h>
7770 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007771 #ifdef HAVE_INTTYPES_H
7772 #include <inttypes.h>
7773 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007774"
Victor Stinnere0be4232011-10-25 13:06:09 +02007775if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007776
7777cat >>confdefs.h <<_ACEOF
7778#define HAVE_UINTPTR_T 1
7779_ACEOF
7780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781# The cast to long int works around a bug in the HP C Compiler
7782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7784# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7786$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007787if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007789else
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 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 +00007791
Martin v. Löwis11437992002-04-12 09:54:03 +00007792else
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 if test "$ac_cv_type_uintptr_t" = yes; then
7794 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007796as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007797See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798 else
7799 ac_cv_sizeof_uintptr_t=0
7800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007802
Martin v. Löwis11437992002-04-12 09:54:03 +00007803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7805$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806
7807
7808
Martin v. Löwis11437992002-04-12 09:54:03 +00007809cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007810#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007811_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007812
Michael W. Hudson54241132001-12-07 15:38:26 +00007813
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007814fi
7815
Thomas Wouters89f507f2006-12-13 04:49:30 +00007816
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007817# The cast to long int works around a bug in the HP C Compiler
7818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7820# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7822$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007823if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007825else
Matthias Kloseb9621712010-04-24 17:59:49 +00007826 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007827#ifdef HAVE_SYS_TYPES_H
7828#include <sys/types.h>
7829#endif
7830
Matthias Kloseb9621712010-04-24 17:59:49 +00007831"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007832
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007833else
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 if test "$ac_cv_type_off_t" = yes; then
7835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007837as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007838See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007839 else
7840 ac_cv_sizeof_off_t=0
7841 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007843
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7846$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007848
7849
Martin v. Löwis11437992002-04-12 09:54:03 +00007850cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007851#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007852_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007853
Michael W. Hudson54241132001-12-07 15:38:26 +00007854
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007855
Matthias Kloseb9621712010-04-24 17:59:49 +00007856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7857$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007858if test "$have_long_long" = yes
7859then
7860if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007861 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007862
Matthias Kloseb9621712010-04-24 17:59:49 +00007863$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007864
Matthias Kloseb9621712010-04-24 17:59:49 +00007865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7866$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007867else
Matthias Kloseb9621712010-04-24 17:59:49 +00007868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7869$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007870fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007871else
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7873$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007874fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007875
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007876# The cast to long int works around a bug in the HP C Compiler
7877# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7878# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7879# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7881$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007882if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007884else
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007886#ifdef HAVE_SYS_TYPES_H
7887#include <sys/types.h>
7888#endif
7889#ifdef HAVE_TIME_H
7890#include <time.h>
7891#endif
7892
Matthias Kloseb9621712010-04-24 17:59:49 +00007893"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007894
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007895else
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 if test "$ac_cv_type_time_t" = yes; then
7897 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007899as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007900See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007901 else
7902 ac_cv_sizeof_time_t=0
7903 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7908$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007909
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007910
7911
Martin v. Löwis11437992002-04-12 09:54:03 +00007912cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007913#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007914_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007915
Michael W. Hudson54241132001-12-07 15:38:26 +00007916
7917
Trent Mick635f6fb2000-08-23 21:33:05 +00007918# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007919ac_save_cc="$CC"
7920if test "$ac_cv_kpthread" = "yes"
7921then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007922elif test "$ac_cv_kthread" = "yes"
7923then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007924elif test "$ac_cv_pthread" = "yes"
7925then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007926fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007927
Matthias Kloseb9621712010-04-24 17:59:49 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7929$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007930have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007932/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007933
7934 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007935int
7936main ()
7937{
Guido van Rossum12580492000-09-24 16:47:19 +00007938pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 ;
7940 return 0;
7941}
Matthias Kloseb159a552010-04-25 21:00:44 +00007942
Martin v. Löwis11437992002-04-12 09:54:03 +00007943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007944if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007945 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7949$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007950if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007952# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7953# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7954# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7956$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007957if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007958 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007959else
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007961#ifdef HAVE_PTHREAD_H
7962#include <pthread.h>
7963#endif
7964
Matthias Kloseb9621712010-04-24 17:59:49 +00007965"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007966
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007967else
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 if test "$ac_cv_type_pthread_t" = yes; then
7969 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007971as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007972See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007973 else
7974 ac_cv_sizeof_pthread_t=0
7975 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977
Trent Mick635f6fb2000-08-23 21:33:05 +00007978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7980$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007981
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007982
7983
Martin v. Löwis11437992002-04-12 09:54:03 +00007984cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007985#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007986_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007987
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007988
Trent Mick635f6fb2000-08-23 21:33:05 +00007989fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007990CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007991
Michael W. Hudson54241132001-12-07 15:38:26 +00007992
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007993case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007994 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007995 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7996 ;;
7997 Darwin/*)
7998 OTHER_LIBTOOL_OPT=""
7999 ;;
8000esac
8001
8002
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008003ARCH_RUN_32BIT=""
8004
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008005case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008006 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008007 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8008 if test "${enable_universalsdk}"; then
8009 :
8010 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008011 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008012 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008013 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008014 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008015 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008016 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008017 if test ${gcc_version} '<' 4.0
8018 then
8019 LIBTOOL_CRUFT="-lcc_dynamic"
8020 else
8021 LIBTOOL_CRUFT=""
8022 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008024 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008025else
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008027/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008028
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008029 #include <unistd.h>
8030 int main(int argc, char*argv[])
8031 {
8032 if (sizeof(long) == 4) {
8033 return 0;
8034 } else {
8035 return 1;
8036 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008037 }
8038
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008040if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008041 ac_osx_32bit=yes
8042else
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8046 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008047fi
8048
8049
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008050 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008051 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008052 i386)
8053 MACOSX_DEFAULT_ARCH="i386"
8054 ;;
8055 ppc)
8056 MACOSX_DEFAULT_ARCH="ppc"
8057 ;;
8058 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008059 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008060 ;;
8061 esac
8062 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008063 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008064 i386)
8065 MACOSX_DEFAULT_ARCH="x86_64"
8066 ;;
8067 ppc)
8068 MACOSX_DEFAULT_ARCH="ppc64"
8069 ;;
8070 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008071 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008072 ;;
8073 esac
8074
8075 #ARCH_RUN_32BIT="true"
8076 fi
8077
8078 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008079 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008080 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008081esac
8082
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8084$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008085if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008086then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008087 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008089 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008090
Matthias Kloseb9621712010-04-24 17:59:49 +00008091$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008092
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8094$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008095 if test $enable_shared = "yes"
8096 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008097 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 +00008098 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008099else
Matthias Kloseb9621712010-04-24 17:59:49 +00008100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8101$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008102fi
8103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8105$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008106case $ac_sys_system/$ac_sys_release in
8107 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008108
Matthias Kloseb9621712010-04-24 17:59:49 +00008109$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008110
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8112$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008113 ;;
8114 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8116$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008117 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008118esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008119
Guido van Rossum0a516c91994-09-12 10:58:40 +00008120# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008121
Michael W. Hudson54241132001-12-07 15:38:26 +00008122
8123
8124
8125
Benjamin Peterson99f03762010-04-11 22:15:28 +00008126
Thomas Wouters477c8d52006-05-27 19:21:47 +00008127
Georg Brandlb1441c72009-01-03 22:33:39 +00008128
Thomas Wouters477c8d52006-05-27 19:21:47 +00008129cat >>confdefs.h <<_ACEOF
8130#define SHLIB_EXT "$SO"
8131_ACEOF
8132
Guido van Rossum0a516c91994-09-12 10:58:40 +00008133# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008134# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008135# (Shared libraries in this instance are shared modules to be loaded into
8136# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8138$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008139if test -z "$LDSHARED"
8140then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008141 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008142 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008143 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008144 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008145 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008146 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008147 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008149 if test "$GCC" = "yes" ; then
8150 LDSHARED='$(CC) -shared'
8151 LDCXXSHARED='$(CXX) -shared'
8152 else
8153 LDSHARED='$(CC) -G'
8154 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008155 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008156 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008157 if test "$GCC" = "yes" ; then
8158 LDSHARED='$(CC) -shared'
8159 LDCXXSHARED='$(CXX) -shared'
8160 else
8161 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008162 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008163 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008164 LDSHARED='$(CC) -bundle'
8165 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008166 if test "$enable_framework" ; then
8167 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008168 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8169 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008170 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008171 else
8172 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008173 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008174 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008175 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008176 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008177 LDSHARED='$(CC) -bundle'
8178 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008179 if test "$enable_framework" ; then
8180 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008181 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8182 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008183 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008184 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008185 # No framework, use the Python app as bundle-loader
8186 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008187 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008188 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008189 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008190 Darwin/*)
8191 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8192 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008193
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008194 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008195 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008196 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008197 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008198 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008199 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8200 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008201 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008202 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008203 LDSHARED='$(CC) -bundle'
8204 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008205 if test "$enable_framework" ; then
8206 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008207 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8208 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008209 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008210 else
8211 # No framework, use the Python app as bundle-loader
8212 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8213 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008214 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008215 fi
8216 fi
8217 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008218 Linux*|GNU*|QNX*)
8219 LDSHARED='$(CC) -shared'
8220 LDCXXSHARED='$(CXX) -shared';;
8221 BSD/OS*/4*)
8222 LDSHARED="gcc -shared"
8223 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008224 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008225 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008226 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008227 LDSHARED='$(CC) -shared'
8228 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008229 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008230 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008231 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008232 OpenBSD*)
8233 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8234 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008235 LDSHARED='$(CC) -shared $(CCSHARED)'
8236 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008237 else
8238 case `uname -r` in
8239 [01].* | 2.[0-7] | 2.[0-7].*)
8240 LDSHARED="ld -Bshareable ${LDFLAGS}"
8241 ;;
8242 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008243 LDSHARED='$(CC) -shared $(CCSHARED)'
8244 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008245 ;;
8246 esac
8247 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008248 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008249 LDSHARED='$(CC) -shared'
8250 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008251 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008252 if test "$GCC" = "yes" ; then
8253 LDSHARED='$(CC) -shared'
8254 LDCXXSHARED='$(CXX) -shared'
8255 else
8256 LDSHARED='$(CC) -G'
8257 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008258 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008259 SCO_SV*)
8260 LDSHARED='$(CC) -Wl,-G,-Bexport'
8261 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8262 CYGWIN*)
8263 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8264 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008265 *) LDSHARED="ld";;
8266 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8269$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008270LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008271BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008272# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008273# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8275$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008276if test -z "$CCSHARED"
8277then
Guido van Rossum07397971997-04-29 21:49:50 +00008278 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008279 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008280 then CCSHARED="-fPIC";
8281 elif test `uname -p` = sparc;
8282 then CCSHARED="-xcode=pic32";
8283 else CCSHARED="-Kpic";
8284 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008285 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008286 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008287 else CCSHARED="+z";
8288 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008289 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008290 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008291 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008292 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008293 if test "$GCC" = "yes"
8294 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008295 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008296 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008297 SCO_SV*)
8298 if test "$GCC" = "yes"
8299 then CCSHARED="-fPIC"
8300 else CCSHARED="-Kpic -belf"
8301 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008302 IRIX*/6*) case $CC in
8303 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008304 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008305 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008306 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8309$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008310# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008311# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8313$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008314if test -z "$LINKFORSHARED"
8315then
Guido van Rossum07397971997-04-29 21:49:50 +00008316 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008317 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008318 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008319 LINKFORSHARED="-Wl,-E -Wl,+s";;
8320# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008321 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008322 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008323 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008325 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008326 if test "$enable_framework"
8327 then
Jack Jansenda49e192005-01-07 13:08:22 +00008328 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008329 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008330 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008331 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008332 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008333 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008334 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008335 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8336 then
8337 LINKFORSHARED="-Wl,--export-dynamic"
8338 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008339 SunOS/5*) case $CC in
8340 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008341 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008342 then
8343 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008344 fi;;
8345 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008346 CYGWIN*)
8347 if test $enable_shared = "no"
8348 then
8349 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8350 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008351 QNX*)
8352 # -Wl,-E causes the symbols to be added to the dynamic
8353 # symbol table so that they can be found when a module
8354 # is loaded. -N 2048K causes the stack size to be set
8355 # to 2048 kilobytes so that the stack doesn't overflow
8356 # when running test_compile.py.
8357 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008358 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8361$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008362
Michael W. Hudson54241132001-12-07 15:38:26 +00008363
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008364
Matthias Kloseb9621712010-04-24 17:59:49 +00008365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8366$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008367if test ! "$LIBRARY" = "$LDLIBRARY"
8368then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008369 case $ac_sys_system in
8370 CYGWIN*)
8371 # Cygwin needs CCSHARED when building extension DLLs
8372 # but not when building the interpreter DLL.
8373 CFLAGSFORSHARED='';;
8374 *)
8375 CFLAGSFORSHARED='$(CCSHARED)'
8376 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008377fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8379$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008380
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008381# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8382# library (with --enable-shared).
8383# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008384# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8385# if it is not required, since it creates a dependency of the shared library
8386# to LIBS. This, in turn, means that applications linking the shared libpython
8387# don't need to link LIBS explicitly. The default should be only changed
8388# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008389
Matthias Kloseb9621712010-04-24 17:59:49 +00008390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8391$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008392case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008393 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008394 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008395esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8397$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008398
8399
Guido van Rossum627b2d71993-12-24 10:39:16 +00008400# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8402$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008403if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008404 $as_echo_n "(cached) " >&6
8405else
8406 ac_check_lib_save_LIBS=$LIBS
8407LIBS="-lsendfile $LIBS"
8408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8409/* end confdefs.h. */
8410
8411/* Override any GCC internal prototype to avoid an error.
8412 Use char because int might match the return type of a GCC
8413 builtin and then its argument prototype would still apply. */
8414#ifdef __cplusplus
8415extern "C"
8416#endif
8417char sendfile ();
8418int
8419main ()
8420{
8421return sendfile ();
8422 ;
8423 return 0;
8424}
8425_ACEOF
8426if ac_fn_c_try_link "$LINENO"; then :
8427 ac_cv_lib_sendfile_sendfile=yes
8428else
8429 ac_cv_lib_sendfile_sendfile=no
8430fi
8431rm -f core conftest.err conftest.$ac_objext \
8432 conftest$ac_exeext conftest.$ac_ext
8433LIBS=$ac_check_lib_save_LIBS
8434fi
8435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8436$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008437if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008438 cat >>confdefs.h <<_ACEOF
8439#define HAVE_LIBSENDFILE 1
8440_ACEOF
8441
8442 LIBS="-lsendfile $LIBS"
8443
8444fi
8445
Matthias Kloseb9621712010-04-24 17:59:49 +00008446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8447$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008448if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008450else
Martin v. Löwis11437992002-04-12 09:54:03 +00008451 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008452LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456/* Override any GCC internal prototype to avoid an error.
8457 Use char because int might match the return type of a GCC
8458 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008459#ifdef __cplusplus
8460extern "C"
8461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008462char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008463int
8464main ()
8465{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 ;
8468 return 0;
8469}
8470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008471if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008472 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008473else
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008476rm -f core conftest.err conftest.$ac_objext \
8477 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008478LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8481$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008482if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 cat >>confdefs.h <<_ACEOF
8484#define HAVE_LIBDL 1
8485_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008486
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008487 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008488
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008489fi
8490 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8492$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008493if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008495else
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008497LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501/* Override any GCC internal prototype to avoid an error.
8502 Use char because int might match the return type of a GCC
8503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008504#ifdef __cplusplus
8505extern "C"
8506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008507char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008508int
8509main ()
8510{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ;
8513 return 0;
8514}
8515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008516if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008517 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008518else
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008521rm -f core conftest.err conftest.$ac_objext \
8522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008523LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8526$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008527if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 cat >>confdefs.h <<_ACEOF
8529#define HAVE_LIBDLD 1
8530_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008531
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008532 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008534fi
8535 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008536
Georg Brandlb1441c72009-01-03 22:33:39 +00008537# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008538if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8540$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008541if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008543else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008544 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548/* Override any GCC internal prototype to avoid an error.
8549 Use char because int might match the return type of a GCC
8550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008551#ifdef __cplusplus
8552extern "C"
8553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008554char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008555int
8556main ()
8557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ;
8560 return 0;
8561}
8562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563for ac_lib in '' pthread rt posix4; do
8564 if test -z "$ac_lib"; then
8565 ac_res="none required"
8566 else
8567 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008568 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008573rm -f core conftest.err conftest.$ac_objext \
8574 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008575 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578done
Victor Stinnere0be4232011-10-25 13:06:09 +02008579if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581else
8582 ac_cv_search_sem_init=no
8583fi
8584rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008585LIBS=$ac_func_search_save_LIBS
8586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8588$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008590if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008592
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008593fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008594 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008595 # posix4 on Solaris 2.6
8596 # pthread (first!) on Linux
8597fi
8598
Martin v. Löwis19d17342003-06-14 21:03:05 +00008599# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8601$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008602if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008604else
8605 ac_check_lib_save_LIBS=$LIBS
8606LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008608/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610/* Override any GCC internal prototype to avoid an error.
8611 Use char because int might match the return type of a GCC
8612 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008613#ifdef __cplusplus
8614extern "C"
8615#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008616char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008617int
8618main ()
8619{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008621 ;
8622 return 0;
8623}
8624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008625if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008626 ac_cv_lib_intl_textdomain=yes
8627else
Matthias Kloseb9621712010-04-24 17:59:49 +00008628 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008630rm -f core conftest.err conftest.$ac_objext \
8631 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008632LIBS=$ac_check_lib_save_LIBS
8633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8635$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008636if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008637
Matthias Kloseb9621712010-04-24 17:59:49 +00008638$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008639
Brett Cannonc6d936e2009-06-07 20:09:53 +00008640 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008641fi
8642
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008643
8644# checks for system dependent C++ extensions support
8645case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008646 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8647$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008649/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008650
Georg Brandl59e87bd2011-02-15 19:48:59 +00008651 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008652int
8653main ()
8654{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008655loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 ;
8657 return 0;
8658}
Matthias Kloseb159a552010-04-25 21:00:44 +00008659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008661if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008662
Matthias Kloseb159a552010-04-25 21:00:44 +00008663
Matthias Kloseb9621712010-04-24 17:59:49 +00008664$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008665
Matthias Kloseb159a552010-04-25 21:00:44 +00008666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008667$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008668
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008669else
Matthias Kloseb159a552010-04-25 21:00:44 +00008670
8671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008672$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008673
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675rm -f core conftest.err conftest.$ac_objext \
8676 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008677 *) ;;
8678esac
8679
Guido van Rossum70c7f481998-03-26 18:44:10 +00008680# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8682$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008683if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008685else
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008687LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691/* Override any GCC internal prototype to avoid an error.
8692 Use char because int might match the return type of a GCC
8693 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008694#ifdef __cplusplus
8695extern "C"
8696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008697char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008698int
8699main ()
8700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008702 ;
8703 return 0;
8704}
8705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008706if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008708else
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711rm -f core conftest.err conftest.$ac_objext \
8712 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008713LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8716$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008717if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008718 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008719fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008720 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8722$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008723if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008724 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008725else
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008727LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731/* Override any GCC internal prototype to avoid an error.
8732 Use char because int might match the return type of a GCC
8733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008734#ifdef __cplusplus
8735extern "C"
8736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008737char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008741return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ;
8743 return 0;
8744}
8745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008746if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751rm -f core conftest.err conftest.$ac_objext \
8752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008753LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8756$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008757if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008758 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008759fi
8760 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008761
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8763$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008766if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008767 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8769$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008770LIBS="$withval $LIBS"
8771
8772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8774$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775fi
8776
Guido van Rossum7f43da71994-08-01 12:15:30 +00008777
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008778if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008779 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8780set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8782$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008783if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008785else
8786 case $PKG_CONFIG in
8787 [\\/]* | ?:[\\/]*)
8788 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8789 ;;
8790 *)
8791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8792for as_dir in $PATH
8793do
8794 IFS=$as_save_IFS
8795 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008797 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008798 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008800 break 2
8801 fi
8802done
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008804IFS=$as_save_IFS
8805
8806 ;;
8807esac
8808fi
8809PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8810if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8812$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008813else
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8815$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008816fi
8817
8818
8819fi
8820if test -z "$ac_cv_path_PKG_CONFIG"; then
8821 ac_pt_PKG_CONFIG=$PKG_CONFIG
8822 # Extract the first word of "pkg-config", so it can be a program name with args.
8823set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8825$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008826if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008828else
8829 case $ac_pt_PKG_CONFIG in
8830 [\\/]* | ?:[\\/]*)
8831 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8832 ;;
8833 *)
8834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8835for as_dir in $PATH
8836do
8837 IFS=$as_save_IFS
8838 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008840 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008841 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008843 break 2
8844 fi
8845done
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008847IFS=$as_save_IFS
8848
8849 ;;
8850esac
8851fi
8852ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8853if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8855$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008856else
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8858$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008859fi
8860
8861 if test "x$ac_pt_PKG_CONFIG" = x; then
8862 PKG_CONFIG=""
8863 else
8864 case $cross_compiling:$ac_tool_warned in
8865yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8867$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008868ac_tool_warned=yes ;;
8869esac
8870 PKG_CONFIG=$ac_pt_PKG_CONFIG
8871 fi
8872else
8873 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8874fi
8875
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008876
8877# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8879$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008880
8881# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008882if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008883 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008884else
8885 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008886fi
8887
8888
Matthias Kloseb9621712010-04-24 17:59:49 +00008889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8890$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008891
8892# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8894$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008895
8896# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008897if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008898 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008899else
8900 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008901fi
8902
8903
8904if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008905 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8906else
8907 LIBFFI_INCLUDEDIR=""
8908fi
8909
8910
Matthias Kloseb9621712010-04-24 17:59:49 +00008911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8912$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008913
Stefan Krah60187b52012-03-23 19:06:27 +01008914# Check for use of the system libmpdec library
8915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
8916$as_echo_n "checking for --with-system-libmpdec... " >&6; }
8917
8918# Check whether --with-system_libmpdec was given.
8919if test "${with_system_libmpdec+set}" = set; then :
8920 withval=$with_system_libmpdec;
8921else
8922 with_system_libmpdec="no"
8923fi
8924
8925
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
8927$as_echo "$with_system_libmpdec" >&6; }
8928
Benjamin Peterson076ed002010-10-31 17:11:02 +00008929# Check for support for loadable sqlite extensions
8930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8931$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8932# Check whether --enable-loadable-sqlite-extensions was given.
8933if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8934 enableval=$enable_loadable_sqlite_extensions;
8935else
8936 enable_loadable_sqlite_extensions="no"
8937fi
8938
8939
8940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8941$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8942
Matthias Klose55708cc2009-04-30 08:06:49 +00008943# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8945$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008946
8947# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008948if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008949 withval=$with_dbmliborder;
8950if test x$with_dbmliborder = xyes
8951then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008952as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008953else
8954 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8955 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8956 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008957 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008958 fi
8959 done
8960fi
8961fi
8962
Matthias Kloseb9621712010-04-24 17:59:49 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8964$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008965
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008966# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008967
8968
Matthias Kloseb9621712010-04-24 17:59:49 +00008969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8970$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008973if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974 withval=$with_signal_module;
8975fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008976
8977
8978if test -z "$with_signal_module"
8979then with_signal_module="yes"
8980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8982$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008983
8984if test "${with_signal_module}" = "yes"; then
8985 USE_SIGNAL_MODULE=""
8986 SIGNAL_OBJS=""
8987else
8988 USE_SIGNAL_MODULE="#"
8989 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8990fi
8991
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008992# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008993
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008994USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996
Martin v. Löwis11437992002-04-12 09:54:03 +00008997
8998# Templates for things AC_DEFINEd more than once.
8999# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009000
9001
Martin v. Löwis11437992002-04-12 09:54:03 +00009002
Matthias Kloseb9621712010-04-24 17:59:49 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9004$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009007if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009008 withval=$with_threads;
9009fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009010
9011
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009012# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009015if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009016 withval=$with_thread; with_threads=$with_thread
9017fi
9018
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009019
9020if test -z "$with_threads"
9021then with_threads="yes"
9022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9024$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009025
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009026
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009027if test "$with_threads" = "no"
9028then
9029 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009030elif test "$ac_cv_pthread_is_default" = yes
9031then
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009033
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009034 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009036
9037 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009039elif test "$ac_cv_kpthread" = "yes"
9040then
9041 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009042 if test "$ac_cv_cxx_thread" = "yes"; then
9043 CXX="$CXX -Kpthread"
9044 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009046
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009047 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009048 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009049elif test "$ac_cv_kthread" = "yes"
9050then
9051 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009052 if test "$ac_cv_cxx_thread" = "yes"; then
9053 CXX="$CXX -Kthread"
9054 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009056
9057 posix_threads=yes
9058 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009059elif test "$ac_cv_pthread" = "yes"
9060then
9061 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009062 if test "$ac_cv_cxx_thread" = "yes"; then
9063 CXX="$CXX -pthread"
9064 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009066
9067 posix_threads=yes
9068 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009069else
9070 if test ! -z "$with_threads" -a -d "$with_threads"
9071 then LDFLAGS="$LDFLAGS -L$with_threads"
9072 fi
9073 if test ! -z "$withval" -a -d "$withval"
9074 then LDFLAGS="$LDFLAGS -L$withval"
9075 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009076
9077 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009078 # define _POSIX_THREADS in unistd.h. Some apparently don't
9079 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9081$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009083/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009084
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009085#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009086#ifdef _POSIX_THREADS
9087yes
9088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009089
9090_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009092 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009093 unistd_defines_pthreads=yes
9094else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009095 unistd_defines_pthreads=no
9096fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009097rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009098
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9100$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009103
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009104 # Just looking for pthread_create in libpthread is not enough:
9105 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9106 # So we really have to include pthread.h, and then link.
9107 _libs=$LIBS
9108 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9110$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009112/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009113#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009114
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009115void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009116int
9117main ()
9118{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009119
9120pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 ;
9122 return 0;
9123}
9124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009125if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009126
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9128$as_echo "yes" >&6; }
9129 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009130
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009131 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009132 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009133else
Martin v. Löwis11437992002-04-12 09:54:03 +00009134
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009135 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009137if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009138 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009139
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009140 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009141 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009142else
Guido van Rossumad678af1998-10-02 14:42:15 +00009143
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9145$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009146if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009148else
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009150LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009154/* Override any GCC internal prototype to avoid an error.
9155 Use char because int might match the return type of a GCC
9156 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009157#ifdef __cplusplus
9158extern "C"
9159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009160char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009161int
9162main ()
9163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009164return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009165 ;
9166 return 0;
9167}
9168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009169if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009171else
Matthias Kloseb9621712010-04-24 17:59:49 +00009172 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009174rm -f core conftest.err conftest.$ac_objext \
9175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009176LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9179$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009180if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009181 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009182
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009183 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009184 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009185 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009186else
Greg Steinadf63d62000-07-05 10:38:09 +00009187
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9189$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009190if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009192else
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009194LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009197
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198/* Override any GCC internal prototype to avoid an error.
9199 Use char because int might match the return type of a GCC
9200 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009201#ifdef __cplusplus
9202extern "C"
9203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009204char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009205int
9206main ()
9207{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009208return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 ;
9210 return 0;
9211}
9212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009213if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009214 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009215else
Matthias Kloseb9621712010-04-24 17:59:49 +00009216 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009218rm -f core conftest.err conftest.$ac_objext \
9219 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009220LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009221fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9223$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009224if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009225 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009226
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009227 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009228 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009229 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009230else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009231
Matthias Kloseb9621712010-04-24 17:59:49 +00009232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9233$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009234if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009235 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009236else
Martin v. Löwis11437992002-04-12 09:54:03 +00009237 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009238LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009242/* Override any GCC internal prototype to avoid an error.
9243 Use char because int might match the return type of a GCC
9244 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009245#ifdef __cplusplus
9246extern "C"
9247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009248char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009249int
9250main ()
9251{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 ;
9254 return 0;
9255}
9256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009257if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009258 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009259else
Matthias Kloseb9621712010-04-24 17:59:49 +00009260 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009262rm -f core conftest.err conftest.$ac_objext \
9263 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009264LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9267$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009268if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009269 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009270
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009271 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009272 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009273 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009274else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009275
Matthias Kloseb9621712010-04-24 17:59:49 +00009276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9277$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009278if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009279 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009280else
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009282LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009286/* Override any GCC internal prototype to avoid an error.
9287 Use char because int might match the return type of a GCC
9288 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009289#ifdef __cplusplus
9290extern "C"
9291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009292char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009293int
9294main ()
9295{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 ;
9298 return 0;
9299}
9300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009301if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009302 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009303else
Matthias Kloseb9621712010-04-24 17:59:49 +00009304 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009306rm -f core conftest.err conftest.$ac_objext \
9307 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009308LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9311$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009312if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009313 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009314
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009315 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009316 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009317 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009318else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009319
Martin v. Löwis130fb172001-07-19 11:00:41 +00009320 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009321fi
9322
Guido van Rossum627b2d71993-12-24 10:39:16 +00009323
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009324fi
9325
Guido van Rossum0be3e491997-05-22 20:33:33 +00009326fi
9327
Guido van Rossum49545951997-12-02 19:28:29 +00009328fi
9329
Guido van Rossumb93a8621998-05-07 13:27:32 +00009330fi
9331
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009333rm -f core conftest.err conftest.$ac_objext \
9334 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009335
Matthias Kloseb9621712010-04-24 17:59:49 +00009336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9337$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009338if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009339 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009340else
Martin v. Löwis11437992002-04-12 09:54:03 +00009341 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009342LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009346/* Override any GCC internal prototype to avoid an error.
9347 Use char because int might match the return type of a GCC
9348 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009349#ifdef __cplusplus
9350extern "C"
9351#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009352char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009353int
9354main ()
9355{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 ;
9358 return 0;
9359}
9360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009361if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009362 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009363else
Matthias Kloseb9621712010-04-24 17:59:49 +00009364 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009366rm -f core conftest.err conftest.$ac_objext \
9367 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009368LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9371$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009372if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009373 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009374
Martin v. Löwis130fb172001-07-19 11:00:41 +00009375 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009376 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009377 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009378fi
9379
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009380
Neal Norwitza978ab02002-11-02 16:58:05 +00009381 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9383$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009384if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009385 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009386else
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009388LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009391
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009392/* Override any GCC internal prototype to avoid an error.
9393 Use char because int might match the return type of a GCC
9394 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009395#ifdef __cplusplus
9396extern "C"
9397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009398char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009399int
9400main ()
9401{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009402return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009403 ;
9404 return 0;
9405}
9406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009407if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009409else
Matthias Kloseb9621712010-04-24 17:59:49 +00009410 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009412rm -f core conftest.err conftest.$ac_objext \
9413 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009414LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9417$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009418if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009419 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009420
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009421 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009422 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009423 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009424fi
9425
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009426 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009427fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009428
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009429if test "$posix_threads" = "yes"; then
9430 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009431
Matthias Kloseb9621712010-04-24 17:59:49 +00009432$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009433
9434 fi
9435
9436 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9437 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009438 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009439$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009440
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009441 ;;
9442 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009443$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009444
9445 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009446 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009447$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009448
9449 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009450 esac
9451
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9453$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009454 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009455 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009456else
Matthias Kloseb9621712010-04-24 17:59:49 +00009457 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009458 ac_cv_pthread_system_supported=no
9459else
Matthias Kloseb9621712010-04-24 17:59:49 +00009460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009461/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009462#include <pthread.h>
9463 void *foo(void *parm) {
9464 return NULL;
9465 }
9466 main() {
9467 pthread_attr_t attr;
9468 pthread_t id;
9469 if (pthread_attr_init(&attr)) exit(-1);
9470 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9471 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9472 exit(0);
9473 }
9474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009475if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009476 ac_cv_pthread_system_supported=yes
9477else
Matthias Kloseb9621712010-04-24 17:59:49 +00009478 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9481 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009482fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009484
Guido van Rossum627b2d71993-12-24 10:39:16 +00009485fi
9486
Matthias Kloseb9621712010-04-24 17:59:49 +00009487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9488$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009489 if test "$ac_cv_pthread_system_supported" = "yes"; then
9490
Matthias Kloseb9621712010-04-24 17:59:49 +00009491$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009492
9493 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 for ac_func in pthread_sigmask
9495do :
9496 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009497if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009498 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009499#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009500_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009501 case $ac_sys_system in
9502 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009503
Matthias Kloseb9621712010-04-24 17:59:49 +00009504$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009505
9506 ;;
9507 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009508fi
9509done
9510
9511fi
9512
9513
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009514# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009515
Matthias Kloseb9621712010-04-24 17:59:49 +00009516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9517$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009519if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009520 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009521 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9523$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009524 ipv6=no
9525 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009526 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9527$as_echo "yes" >&6; }
9528 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009529
9530 ipv6=yes
9531 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009532 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009533else
Martin v. Löwis11437992002-04-12 09:54:03 +00009534
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009536
Matthias Kloseb9621712010-04-24 17:59:49 +00009537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009539 ipv6=no
9540
9541else
Matthias Kloseb9621712010-04-24 17:59:49 +00009542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009544 /* AF_INET6 available check */
9545#include <sys/types.h>
9546#include <sys/socket.h>
9547main()
9548{
9549 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9550 exit(1);
9551 else
9552 exit(0);
9553}
9554
Martin v. Löwis11437992002-04-12 09:54:03 +00009555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009556if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009557
Matthias Kloseb9621712010-04-24 17:59:49 +00009558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9559$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009560 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009561
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009562else
Matthias Kloseb159a552010-04-25 21:00:44 +00009563
Matthias Kloseb9621712010-04-24 17:59:49 +00009564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9565$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009566 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009567
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009569rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9570 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009571fi
9572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009574if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9576$as_echo_n "checking if RFC2553 API is available... " >&6; }
9577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009578/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009579
9580 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009581#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009582int
9583main ()
9584{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009585struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009586 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 ;
9588 return 0;
9589}
Matthias Kloseb159a552010-04-25 21:00:44 +00009590
Martin v. Löwis11437992002-04-12 09:54:03 +00009591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009592if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009593
9594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009595$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009596 ipv6=yes
9597
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009598else
Matthias Kloseb159a552010-04-25 21:00:44 +00009599
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009601$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009602 ipv6=no
9603
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009606fi
9607
9608if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009609 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009610
9611fi
9612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613fi
9614
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009615
9616ipv6type=unknown
9617ipv6lib=none
9618ipv6trylibc=no
9619
9620if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9622$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009623 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9624 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009625 case $i in
9626 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009628/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009629
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009630#include <netinet/in.h>
9631#ifdef IPV6_INRIA_VERSION
9632yes
9633#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009634_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009635if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009636 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009637 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009638fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009639rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009640
9641 ;;
9642 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009644/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009645
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009646#include <netinet/in.h>
9647#ifdef __KAME__
9648yes
9649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009650_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009651if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009652 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009653 ipv6type=$i;
9654 ipv6lib=inet6
9655 ipv6libdir=/usr/local/v6/lib
9656 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009657fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009658rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009659
9660 ;;
9661 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009664
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009665#include <features.h>
9666#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9667yes
9668#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009669_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009671 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009672 ipv6type=$i;
9673 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009674fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009675rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009676
9677 ;;
9678 linux-inet6)
9679 if test -d /usr/inet6; then
9680 ipv6type=$i
9681 ipv6lib=inet6
9682 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009683 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009684 fi
9685 ;;
9686 solaris)
9687 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009688 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009689 ipv6type=$i
9690 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009691 fi
9692 fi
9693 ;;
9694 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009696/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009697
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009698#include <sys/param.h>
9699#ifdef _TOSHIBA_INET6
9700yes
9701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009702_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009704 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009705 ipv6type=$i;
9706 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009707 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009708fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009709rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009710
9711 ;;
9712 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009714/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009715
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009716#include </usr/local/v6/include/sys/v6config.h>
9717#ifdef __V6D__
9718yes
9719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009720_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009723 ipv6type=$i;
9724 ipv6lib=v6;
9725 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009726 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009727fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009728rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009729
9730 ;;
9731 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009733/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009734
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009735#include <sys/param.h>
9736#ifdef _ZETA_MINAMI_INET6
9737yes
9738#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009739_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009740if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009741 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009742 ipv6type=$i;
9743 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009744 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009745fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009746rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009747
9748 ;;
9749 esac
9750 if test "$ipv6type" != "unknown"; then
9751 break
9752 fi
9753 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9755$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009756fi
9757
9758if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9759 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9760 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9761 echo "using lib$ipv6lib"
9762 else
9763 if test $ipv6trylibc = "yes"; then
9764 echo "using libc"
9765 else
9766 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9767 echo "You need to fetch lib$ipv6lib.a from appropriate"
9768 echo 'ipv6 kit and compile beforehand.'
9769 exit 1
9770 fi
9771 fi
9772fi
9773
Matthias Kloseb9621712010-04-24 17:59:49 +00009774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9775$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009777/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009778
9779 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009780int
9781main ()
9782{
9783FSIORefNum fRef = 0
9784 ;
9785 return 0;
9786}
Matthias Kloseb159a552010-04-25 21:00:44 +00009787
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009789if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009790
Matthias Kloseb159a552010-04-25 21:00:44 +00009791
Matthias Kloseb9621712010-04-24 17:59:49 +00009792$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009793
Matthias Kloseb9621712010-04-24 17:59:49 +00009794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9795$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009796
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009797else
Matthias Kloseb159a552010-04-25 21:00:44 +00009798
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9800$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009801
9802fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9804
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009805# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9807$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009810if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811 withval=$with_doc_strings;
9812fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009813
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009814
9815if test -z "$with_doc_strings"
9816then with_doc_strings="yes"
9817fi
9818if test "$with_doc_strings" != "no"
9819then
9820
Matthias Kloseb9621712010-04-24 17:59:49 +00009821$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009822
9823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9825$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009826
Antoine Pitrou042b1282010-08-13 21:15:58 +00009827# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9829$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009832if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009834if test "$withval" != no
9835then
9836
Matthias Kloseb9621712010-04-24 17:59:49 +00009837$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009838
Matthias Kloseb9621712010-04-24 17:59:49 +00009839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9840$as_echo "yes" >&6; }
9841else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9842$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009843fi
9844else
Matthias Kloseb9621712010-04-24 17:59:49 +00009845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9846$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847fi
9848
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009849
9850# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9852$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009855if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856 withval=$with_pymalloc;
9857fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009858
Neil Schemenauera35c6882001-02-27 04:45:05 +00009859
Neil Schemenauer16c22972002-03-22 15:34:49 +00009860if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009861then
9862 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009863 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009864fi
9865if test "$with_pymalloc" != "no"
9866then
Martin v. Löwis11437992002-04-12 09:54:03 +00009867
Matthias Kloseb9621712010-04-24 17:59:49 +00009868$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009869
9870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9872$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009873
Benjamin Peterson05159c42009-12-03 03:01:27 +00009874# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9876$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009877
9878# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009879if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009880 withval=$with_valgrind;
9881else
9882 with_valgrind=no
9883fi
9884
Matthias Kloseb9621712010-04-24 17:59:49 +00009885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9886$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009887if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 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 +02009889if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009890
Matthias Kloseb9621712010-04-24 17:59:49 +00009891$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009892
9893else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009894 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009895
9896fi
9897
9898
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009899 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009900fi
9901
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009902# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009903
Guido van Rossum98935bf2001-09-05 19:13:16 +00009904DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009905
Guido van Rossume97ee181999-12-20 21:27:22 +00009906# the dlopen() function means we might want to use dynload_shlib.o. some
9907# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009908for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009909do :
9910 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +02009911if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009912 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009913#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009914_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009915
Guido van Rossume97ee181999-12-20 21:27:22 +00009916fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009917done
Guido van Rossume97ee181999-12-20 21:27:22 +00009918
Michael W. Hudson54241132001-12-07 15:38:26 +00009919
Guido van Rossume97ee181999-12-20 21:27:22 +00009920# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9921# loading of modules.
9922
Matthias Kloseb9621712010-04-24 17:59:49 +00009923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9924$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009925if test -z "$DYNLOADFILE"
9926then
9927 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009928 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9929 if test "$ac_cv_func_dlopen" = yes
9930 then DYNLOADFILE="dynload_shlib.o"
9931 else DYNLOADFILE="dynload_aix.o"
9932 fi
9933 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009934 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009935 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9936 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009937 *)
9938 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9939 # out any dynamic loading
9940 if test "$ac_cv_func_dlopen" = yes
9941 then DYNLOADFILE="dynload_shlib.o"
9942 else DYNLOADFILE="dynload_stub.o"
9943 fi
9944 ;;
9945 esac
9946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9948$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009949if test "$DYNLOADFILE" != "dynload_stub.o"
9950then
Martin v. Löwis11437992002-04-12 09:54:03 +00009951
Matthias Kloseb9621712010-04-24 17:59:49 +00009952$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009953
9954fi
9955
Neil Schemenauer4e425612001-06-19 15:44:15 +00009956# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9957
Michael W. Hudson54241132001-12-07 15:38:26 +00009958
Matthias Kloseb9621712010-04-24 17:59:49 +00009959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9960$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009961if test -z "$MACHDEP_OBJS"
9962then
Jack Jansene578a632001-08-15 01:27:14 +00009963 MACHDEP_OBJS=$extra_machdep_objs
9964else
9965 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9968$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009969
Guido van Rossum627b2d71993-12-24 10:39:16 +00009970# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009971for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -08009972 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009973 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009974 futimens futimes gai_strerror \
9975 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009976 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009977 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +01009978 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
9979 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009980 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009981 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009982 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009983 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009984 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009985 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009986 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9987 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009988 sigaction sigaltstack siginterrupt sigpending sigrelse \
9989 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009990 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009991 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9992 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009993do :
9994 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9995ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009996if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009997 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009998#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009999_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010000
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010001fi
10002done
10003
Michael W. Hudson54241132001-12-07 15:38:26 +000010004
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010005ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10006 #include <dirent.h>
10007"
10008if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10009
10010$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10011
10012fi
10013
10014
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010015# For some functions, having a definition is not sufficient, since
10016# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10018$as_echo_n "checking for chroot... " >&6; }
10019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010020/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010021#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010022int
10023main ()
10024{
10025void *x=chroot
10026 ;
10027 return 0;
10028}
10029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010030if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010031
Matthias Kloseb9621712010-04-24 17:59:49 +000010032$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010033
Matthias Kloseb159a552010-04-25 21:00:44 +000010034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010035$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010036else
Matthias Kloseb9621712010-04-24 17:59:49 +000010037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10038$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010039
10040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10043$as_echo_n "checking for link... " >&6; }
10044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010045/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010046#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010047int
10048main ()
10049{
10050void *x=link
10051 ;
10052 return 0;
10053}
10054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010055if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010056
Matthias Kloseb9621712010-04-24 17:59:49 +000010057$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010058
Matthias Kloseb159a552010-04-25 21:00:44 +000010059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010060$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010061else
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10063$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010064
10065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10068$as_echo_n "checking for symlink... " >&6; }
10069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010070/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010071#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010072int
10073main ()
10074{
10075void *x=symlink
10076 ;
10077 return 0;
10078}
10079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010080if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010081
Matthias Kloseb9621712010-04-24 17:59:49 +000010082$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010083
Matthias Kloseb159a552010-04-25 21:00:44 +000010084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010085$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010086else
Matthias Kloseb9621712010-04-24 17:59:49 +000010087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10088$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010089
10090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10093$as_echo_n "checking for fchdir... " >&6; }
10094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010095/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010096#include <unistd.h>
10097int
10098main ()
10099{
10100void *x=fchdir
10101 ;
10102 return 0;
10103}
10104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010105if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010106
Matthias Kloseb9621712010-04-24 17:59:49 +000010107$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010108
Matthias Kloseb159a552010-04-25 21:00:44 +000010109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010110$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010111else
Matthias Kloseb9621712010-04-24 17:59:49 +000010112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10113$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010114
10115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10118$as_echo_n "checking for fsync... " >&6; }
10119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010120/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010121#include <unistd.h>
10122int
10123main ()
10124{
10125void *x=fsync
10126 ;
10127 return 0;
10128}
10129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010131
Matthias Kloseb9621712010-04-24 17:59:49 +000010132$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010133
Matthias Kloseb159a552010-04-25 21:00:44 +000010134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010135$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010136else
Matthias Kloseb9621712010-04-24 17:59:49 +000010137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10138$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010139
10140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10143$as_echo_n "checking for fdatasync... " >&6; }
10144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010145/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010146#include <unistd.h>
10147int
10148main ()
10149{
10150void *x=fdatasync
10151 ;
10152 return 0;
10153}
10154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010155if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010156
Matthias Kloseb9621712010-04-24 17:59:49 +000010157$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010158
Matthias Kloseb159a552010-04-25 21:00:44 +000010159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010160$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010161else
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10163$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010164
10165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10168$as_echo_n "checking for epoll... " >&6; }
10169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010170/* end confdefs.h. */
10171#include <sys/epoll.h>
10172int
10173main ()
10174{
10175void *x=epoll_create
10176 ;
10177 return 0;
10178}
10179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010181
Matthias Kloseb9621712010-04-24 17:59:49 +000010182$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010183
Matthias Kloseb159a552010-04-25 21:00:44 +000010184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010185$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010186else
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10188$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010189
10190fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10193$as_echo_n "checking for epoll_create1... " >&6; }
10194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10195/* end confdefs.h. */
10196#include <sys/epoll.h>
10197int
10198main ()
10199{
10200void *x=epoll_create1
10201 ;
10202 return 0;
10203}
10204_ACEOF
10205if ac_fn_c_try_compile "$LINENO"; then :
10206
10207$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10208
10209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10210$as_echo "yes" >&6; }
10211else
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10213$as_echo "no" >&6; }
10214
10215fi
10216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10218$as_echo_n "checking for kqueue... " >&6; }
10219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010220/* end confdefs.h. */
10221
10222#include <sys/types.h>
10223#include <sys/event.h>
10224
10225int
10226main ()
10227{
10228int x=kqueue()
10229 ;
10230 return 0;
10231}
10232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010233if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010234
Matthias Kloseb9621712010-04-24 17:59:49 +000010235$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010236
Matthias Kloseb159a552010-04-25 21:00:44 +000010237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010238$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010239else
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10241$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010242
10243fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010245# On some systems (eg. FreeBSD 5), we would find a definition of the
10246# functions ctermid_r, setgroups in the library, but no prototype
10247# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10248# address to avoid compiler warnings and potential miscompilations
10249# because of the missing prototypes.
10250
Matthias Kloseb9621712010-04-24 17:59:49 +000010251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10252$as_echo_n "checking for ctermid_r... " >&6; }
10253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010254/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010255
Martin v. Löwisd5843682002-11-21 20:41:28 +000010256#include <stdio.h>
10257
Martin v. Löwisd5843682002-11-21 20:41:28 +000010258int
10259main ()
10260{
10261void* p = ctermid_r
10262 ;
10263 return 0;
10264}
10265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010266if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010267
Matthias Kloseb9621712010-04-24 17:59:49 +000010268$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010269
Matthias Kloseb159a552010-04-25 21:00:44 +000010270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010271$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010272else
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10274$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010275
10276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10278
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10280$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010281if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010282 $as_echo_n "(cached) " >&6
10283else
10284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010285/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010286#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010287int
10288main ()
10289{
10290void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010291
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010292 ;
10293 return 0;
10294}
10295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010296if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010297 ac_cv_flock_decl=yes
10298else
10299 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010300
10301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010303
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010304fi
10305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10306$as_echo "$ac_cv_flock_decl" >&6; }
10307if test "x${ac_cv_flock_decl}" = xyes; then
10308 for ac_func in flock
10309do :
10310 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010311if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010312 cat >>confdefs.h <<_ACEOF
10313#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010314_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010315
Antoine Pitroua3000072010-09-07 14:52:42 +000010316else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010318$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010319if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010320 $as_echo_n "(cached) " >&6
10321else
10322 ac_check_lib_save_LIBS=$LIBS
10323LIBS="-lbsd $LIBS"
10324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10325/* end confdefs.h. */
10326
10327/* Override any GCC internal prototype to avoid an error.
10328 Use char because int might match the return type of a GCC
10329 builtin and then its argument prototype would still apply. */
10330#ifdef __cplusplus
10331extern "C"
10332#endif
10333char flock ();
10334int
10335main ()
10336{
10337return flock ();
10338 ;
10339 return 0;
10340}
10341_ACEOF
10342if ac_fn_c_try_link "$LINENO"; then :
10343 ac_cv_lib_bsd_flock=yes
10344else
10345 ac_cv_lib_bsd_flock=no
10346fi
10347rm -f core conftest.err conftest.$ac_objext \
10348 conftest$ac_exeext conftest.$ac_ext
10349LIBS=$ac_check_lib_save_LIBS
10350fi
10351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10352$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010353if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010354 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010355
10356
10357$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10358
10359
10360fi
10361
10362
10363fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010364done
10365
Antoine Pitroua3000072010-09-07 14:52:42 +000010366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010367
Matthias Kloseb9621712010-04-24 17:59:49 +000010368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10369$as_echo_n "checking for getpagesize... " >&6; }
10370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010371/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010372
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010373#include <unistd.h>
10374
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010375int
10376main ()
10377{
10378void* p = getpagesize
10379 ;
10380 return 0;
10381}
10382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010384
Matthias Kloseb9621712010-04-24 17:59:49 +000010385$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010386
Matthias Kloseb159a552010-04-25 21:00:44 +000010387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010388$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010389else
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010392
10393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010395
Victor Stinner984890f2011-11-24 13:53:38 +010010396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10397$as_echo_n "checking for broken unsetenv... " >&6; }
10398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10399/* end confdefs.h. */
10400
10401#include <stdlib.h>
10402
10403int
10404main ()
10405{
10406int res = unsetenv("DUMMY")
10407 ;
10408 return 0;
10409}
10410_ACEOF
10411if ac_fn_c_try_compile "$LINENO"; then :
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10413$as_echo "no" >&6; }
10414else
10415
10416$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10417
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10419$as_echo "yes" >&6; }
10420
10421fi
10422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10423
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010424for ac_prog in true
10425do
10426 # Extract the first word of "$ac_prog", so it can be a program name with args.
10427set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10429$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010430if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010432else
10433 if test -n "$TRUE"; then
10434 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10435else
10436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10437for as_dir in $PATH
10438do
10439 IFS=$as_save_IFS
10440 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +020010442 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 +000010443 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 $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 +000010445 break 2
10446 fi
10447done
Matthias Kloseb9621712010-04-24 17:59:49 +000010448 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010450
10451fi
10452fi
10453TRUE=$ac_cv_prog_TRUE
10454if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10456$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010457else
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010460fi
10461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010462
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010463 test -n "$TRUE" && break
10464done
10465test -n "$TRUE" || TRUE="/bin/true"
10466
10467
Matthias Kloseb9621712010-04-24 17:59:49 +000010468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10469$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010470if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010472else
10473 ac_check_lib_save_LIBS=$LIBS
10474LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010476/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478/* Override any GCC internal prototype to avoid an error.
10479 Use char because int might match the return type of a GCC
10480 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010481#ifdef __cplusplus
10482extern "C"
10483#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010484char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010485int
10486main ()
10487{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010488return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010489 ;
10490 return 0;
10491}
10492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010493if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010494 ac_cv_lib_c_inet_aton=yes
10495else
Matthias Kloseb9621712010-04-24 17:59:49 +000010496 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010498rm -f core conftest.err conftest.$ac_objext \
10499 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010500LIBS=$ac_check_lib_save_LIBS
10501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10503$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010504if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010505 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010506else
Matthias Kloseb9621712010-04-24 17:59:49 +000010507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10508$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010509if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010511else
10512 ac_check_lib_save_LIBS=$LIBS
10513LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010515/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517/* Override any GCC internal prototype to avoid an error.
10518 Use char because int might match the return type of a GCC
10519 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010520#ifdef __cplusplus
10521extern "C"
10522#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010523char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010524int
10525main ()
10526{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010527return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010528 ;
10529 return 0;
10530}
10531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010532if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010533 ac_cv_lib_resolv_inet_aton=yes
10534else
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010537rm -f core conftest.err conftest.$ac_objext \
10538 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010539LIBS=$ac_check_lib_save_LIBS
10540fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10542$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010543if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010544 cat >>confdefs.h <<_ACEOF
10545#define HAVE_LIBRESOLV 1
10546_ACEOF
10547
10548 LIBS="-lresolv $LIBS"
10549
10550fi
10551
10552
10553fi
10554
10555
Christian Heimesd0764e22007-12-04 15:00:33 +000010556# On Tru64, chflags seems to be present, but calling it will
10557# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10559$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010560if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010562else
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010564 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010565else
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010567/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010568
Christian Heimesd0764e22007-12-04 15:00:33 +000010569#include <sys/stat.h>
10570#include <unistd.h>
10571int main(int argc, char*argv[])
10572{
10573 if(chflags(argv[0], 0) != 0)
10574 return 1;
10575 return 0;
10576}
Ned Deily3eb67d52011-06-28 00:00:28 -070010577
Christian Heimesd0764e22007-12-04 15:00:33 +000010578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010579if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010580 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010581else
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10585 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010586fi
10587
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010588
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10591$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010592if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010594if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010595 ac_cv_have_chflags="yes"
10596else
10597 ac_cv_have_chflags="no"
10598fi
10599
10600fi
10601if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010602
Matthias Kloseb9621712010-04-24 17:59:49 +000010603$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010604
10605fi
10606
Matthias Kloseb9621712010-04-24 17:59:49 +000010607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10608$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010609if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010610 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010611else
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010613 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010614else
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010616/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010617
Christian Heimesd0764e22007-12-04 15:00:33 +000010618#include <sys/stat.h>
10619#include <unistd.h>
10620int main(int argc, char*argv[])
10621{
10622 if(lchflags(argv[0], 0) != 0)
10623 return 1;
10624 return 0;
10625}
Ned Deily3eb67d52011-06-28 00:00:28 -070010626
Christian Heimesd0764e22007-12-04 15:00:33 +000010627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010628if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010629 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010630else
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10634 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010635fi
10636
10637
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10640$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010641if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010643if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010644 ac_cv_have_lchflags="yes"
10645else
10646 ac_cv_have_lchflags="no"
10647fi
10648
10649fi
10650if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010651
Matthias Kloseb9621712010-04-24 17:59:49 +000010652$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010653
10654fi
10655
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010656case $ac_sys_system/$ac_sys_release in
10657Darwin/*)
10658 _CUR_CFLAGS="${CFLAGS}"
10659 _CUR_LDFLAGS="${LDFLAGS}"
10660 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10661 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10662 ;;
10663esac
10664
Matthias Kloseb9621712010-04-24 17:59:49 +000010665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10666$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010667if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010669else
10670 ac_check_lib_save_LIBS=$LIBS
10671LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010673/* end confdefs.h. */
10674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675/* Override any GCC internal prototype to avoid an error.
10676 Use char because int might match the return type of a GCC
10677 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010678#ifdef __cplusplus
10679extern "C"
10680#endif
10681char inflateCopy ();
10682int
10683main ()
10684{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010686 ;
10687 return 0;
10688}
10689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010690if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010691 ac_cv_lib_z_inflateCopy=yes
10692else
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010695rm -f core conftest.err conftest.$ac_objext \
10696 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010697LIBS=$ac_check_lib_save_LIBS
10698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10700$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010701if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010702
Matthias Kloseb9621712010-04-24 17:59:49 +000010703$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010704
10705fi
10706
10707
10708case $ac_sys_system/$ac_sys_release in
10709Darwin/*)
10710 CFLAGS="${_CUR_CFLAGS}"
10711 LDFLAGS="${_CUR_LDFLAGS}"
10712 ;;
10713esac
10714
Matthias Kloseb9621712010-04-24 17:59:49 +000010715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10716$as_echo_n "checking for hstrerror... " >&6; }
10717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010718/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010719
Martin v. Löwise9416172003-05-03 10:12:45 +000010720#include <netdb.h>
10721
Martin v. Löwise9416172003-05-03 10:12:45 +000010722int
10723main ()
10724{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010725void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010726 ;
10727 return 0;
10728}
10729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010730if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010731
Matthias Kloseb9621712010-04-24 17:59:49 +000010732$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010733
Matthias Kloseb159a552010-04-25 21:00:44 +000010734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010735$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010736else
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10738$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010739
10740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010741rm -f core conftest.err conftest.$ac_objext \
10742 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10745$as_echo_n "checking for inet_aton... " >&6; }
10746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010747/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010748
Martin v. Löwis86d66262006-02-17 08:40:11 +000010749#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010750#include <sys/socket.h>
10751#include <netinet/in.h>
10752#include <arpa/inet.h>
10753
Martin v. Löwise9416172003-05-03 10:12:45 +000010754int
10755main ()
10756{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010757void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010758 ;
10759 return 0;
10760}
10761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010762if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010763
Matthias Kloseb9621712010-04-24 17:59:49 +000010764$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010765
Matthias Kloseb159a552010-04-25 21:00:44 +000010766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010767$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010768else
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10770$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010771
10772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010773rm -f core conftest.err conftest.$ac_objext \
10774 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010775
Matthias Kloseb9621712010-04-24 17:59:49 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10777$as_echo_n "checking for inet_pton... " >&6; }
10778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010779/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010780
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010781#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010782#include <sys/socket.h>
10783#include <netinet/in.h>
10784#include <arpa/inet.h>
10785
Martin v. Löwise9416172003-05-03 10:12:45 +000010786int
10787main ()
10788{
10789void* p = inet_pton
10790 ;
10791 return 0;
10792}
10793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010794if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010797
Matthias Kloseb159a552010-04-25 21:00:44 +000010798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010799$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010800else
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10802$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010803
10804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010806
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010807# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10809$as_echo_n "checking for setgroups... " >&6; }
10810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010811/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010812
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010813#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010814#ifdef HAVE_GRP_H
10815#include <grp.h>
10816#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010817
Martin v. Löwisd5843682002-11-21 20:41:28 +000010818int
10819main ()
10820{
10821void* p = setgroups
10822 ;
10823 return 0;
10824}
10825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010826if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010827
Matthias Kloseb9621712010-04-24 17:59:49 +000010828$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010829
Matthias Kloseb159a552010-04-25 21:00:44 +000010830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010831$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010832else
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010835
10836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010838
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010839# check for openpty and forkpty
10840
10841for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010842do :
10843 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010844if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010846#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010847_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010848
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010849else
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10851$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010852if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010854else
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010856LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010860/* Override any GCC internal prototype to avoid an error.
10861 Use char because int might match the return type of a GCC
10862 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010863#ifdef __cplusplus
10864extern "C"
10865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010866char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010867int
10868main ()
10869{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010870return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010871 ;
10872 return 0;
10873}
10874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010875if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010876 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010877else
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010880rm -f core conftest.err conftest.$ac_objext \
10881 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010882LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10885$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010886if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010888 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010889else
Matthias Kloseb9621712010-04-24 17:59:49 +000010890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10891$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010892if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010893 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010894else
10895 ac_check_lib_save_LIBS=$LIBS
10896LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010898/* end confdefs.h. */
10899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010900/* Override any GCC internal prototype to avoid an error.
10901 Use char because int might match the return type of a GCC
10902 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010903#ifdef __cplusplus
10904extern "C"
10905#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010906char openpty ();
10907int
10908main ()
10909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010910return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010911 ;
10912 return 0;
10913}
10914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010915if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010916 ac_cv_lib_bsd_openpty=yes
10917else
Matthias Kloseb9621712010-04-24 17:59:49 +000010918 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010920rm -f core conftest.err conftest.$ac_objext \
10921 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010922LIBS=$ac_check_lib_save_LIBS
10923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10925$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010926if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010927 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010928 LIBS="$LIBS -lbsd"
10929fi
10930
10931
10932fi
10933
Fred Drake8cef4cf2000-06-28 16:40:38 +000010934
10935fi
10936done
10937
10938for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010939do :
10940 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010941if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010942 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010943#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010944_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010945
Fred Drake8cef4cf2000-06-28 16:40:38 +000010946else
Matthias Kloseb9621712010-04-24 17:59:49 +000010947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10948$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010949if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010951else
Martin v. Löwis11437992002-04-12 09:54:03 +000010952 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010953LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957/* Override any GCC internal prototype to avoid an error.
10958 Use char because int might match the return type of a GCC
10959 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010960#ifdef __cplusplus
10961extern "C"
10962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010963char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010964int
10965main ()
10966{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010967return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 ;
10969 return 0;
10970}
10971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010974else
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010977rm -f core conftest.err conftest.$ac_objext \
10978 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010979LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10982$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010983if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010985 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010986else
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10988$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010989if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010990 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010991else
10992 ac_check_lib_save_LIBS=$LIBS
10993LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010995/* end confdefs.h. */
10996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997/* Override any GCC internal prototype to avoid an error.
10998 Use char because int might match the return type of a GCC
10999 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011000#ifdef __cplusplus
11001extern "C"
11002#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011003char forkpty ();
11004int
11005main ()
11006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011007return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011008 ;
11009 return 0;
11010}
11011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011012if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011013 ac_cv_lib_bsd_forkpty=yes
11014else
Matthias Kloseb9621712010-04-24 17:59:49 +000011015 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011017rm -f core conftest.err conftest.$ac_objext \
11018 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011019LIBS=$ac_check_lib_save_LIBS
11020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11022$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011023if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011024 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011025 LIBS="$LIBS -lbsd"
11026fi
11027
11028
11029fi
11030
Fred Drake8cef4cf2000-06-28 16:40:38 +000011031
11032fi
11033done
11034
Jack Jansendd19cf82001-12-06 22:36:17 +000011035
Christian Heimesb186d002008-03-18 15:15:01 +000011036# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011037for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011038do :
11039 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011040if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011041 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011042#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011043_ACEOF
11044
11045fi
11046done
11047
11048
Michael W. Hudson54241132001-12-07 15:38:26 +000011049# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011050for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011051do :
11052 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11053ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011054if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011055 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011056#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011057_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011058
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011059fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011060done
11061
Michael W. Hudson54241132001-12-07 15:38:26 +000011062
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011063ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011064if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011065 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011066
Martin v. Löwis1142de32002-03-29 16:28:31 +000011067else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011068 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011069 *" dup2.$ac_objext "* ) ;;
11070 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011071 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011072esac
11073
Martin v. Löwis1142de32002-03-29 16:28:31 +000011074fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011075
11076ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011077if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011078 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11079
11080else
11081 case " $LIBOBJS " in
11082 *" getcwd.$ac_objext "* ) ;;
11083 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11084 ;;
11085esac
11086
11087fi
11088
11089ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011090if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011091 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11092
11093else
11094 case " $LIBOBJS " in
11095 *" strdup.$ac_objext "* ) ;;
11096 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11097 ;;
11098esac
11099
11100fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011101
11102
11103for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011104do :
11105 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011106if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011107 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011108#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011111/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011112#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011113int
11114main ()
11115{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011116getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 ;
11118 return 0;
11119}
11120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011121if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011122
Matthias Kloseb9621712010-04-24 17:59:49 +000011123$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011124
Guido van Rossum627b2d71993-12-24 10:39:16 +000011125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011127
Guido van Rossum627b2d71993-12-24 10:39:16 +000011128fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011129done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011130
Jack Jansen150753c2003-03-29 22:07:47 +000011131for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011132do :
11133 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011134if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011135 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011136#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011139/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011140#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011141int
11142main ()
11143{
11144setpgrp(0,0);
11145 ;
11146 return 0;
11147}
11148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011149if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011150
Matthias Kloseb9621712010-04-24 17:59:49 +000011151$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011152
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011155
11156fi
11157done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011158
Thomas Wouters3a584202000-08-05 23:28:51 +000011159for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011160do :
11161 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011162if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011163 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011164#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011167/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011168#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011169int
11170main ()
11171{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011172gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 ;
11174 return 0;
11175}
11176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011177if ac_fn_c_try_compile "$LINENO"; then :
11178
Guido van Rossum627b2d71993-12-24 10:39:16 +000011179else
Skip Montanaro6dead952003-09-25 14:50:04 +000011180
Matthias Kloseb9621712010-04-24 17:59:49 +000011181$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011182
Martin v. Löwis11437992002-04-12 09:54:03 +000011183
Guido van Rossum627b2d71993-12-24 10:39:16 +000011184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011186
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011187fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011188done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011189
Michael W. Hudson54241132001-12-07 15:38:26 +000011190
Victor Stinnere0be4232011-10-25 13:06:09 +020011191for ac_func in clock_gettime
11192do :
11193 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11194if test "x$ac_cv_func_clock_gettime" = xyes; then :
11195 cat >>confdefs.h <<_ACEOF
11196#define HAVE_CLOCK_GETTIME 1
11197_ACEOF
11198
11199else
11200
11201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11202$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11203if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11204 $as_echo_n "(cached) " >&6
11205else
11206 ac_check_lib_save_LIBS=$LIBS
11207LIBS="-lrt $LIBS"
11208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11209/* end confdefs.h. */
11210
11211/* Override any GCC internal prototype to avoid an error.
11212 Use char because int might match the return type of a GCC
11213 builtin and then its argument prototype would still apply. */
11214#ifdef __cplusplus
11215extern "C"
11216#endif
11217char clock_gettime ();
11218int
11219main ()
11220{
11221return clock_gettime ();
11222 ;
11223 return 0;
11224}
11225_ACEOF
11226if ac_fn_c_try_link "$LINENO"; then :
11227 ac_cv_lib_rt_clock_gettime=yes
11228else
11229 ac_cv_lib_rt_clock_gettime=no
11230fi
11231rm -f core conftest.err conftest.$ac_objext \
11232 conftest$ac_exeext conftest.$ac_ext
11233LIBS=$ac_check_lib_save_LIBS
11234fi
11235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11236$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11237if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11238
11239 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11240
11241
11242$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11243
11244
11245fi
11246
11247
11248fi
11249done
11250
11251
11252for ac_func in clock_getres
11253do :
11254 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11255if test "x$ac_cv_func_clock_getres" = xyes; then :
11256 cat >>confdefs.h <<_ACEOF
11257#define HAVE_CLOCK_GETRES 1
11258_ACEOF
11259
11260else
11261
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11263$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11264if ${ac_cv_lib_rt_clock_getres+:} false; then :
11265 $as_echo_n "(cached) " >&6
11266else
11267 ac_check_lib_save_LIBS=$LIBS
11268LIBS="-lrt $LIBS"
11269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11270/* end confdefs.h. */
11271
11272/* Override any GCC internal prototype to avoid an error.
11273 Use char because int might match the return type of a GCC
11274 builtin and then its argument prototype would still apply. */
11275#ifdef __cplusplus
11276extern "C"
11277#endif
11278char clock_getres ();
11279int
11280main ()
11281{
11282return clock_getres ();
11283 ;
11284 return 0;
11285}
11286_ACEOF
11287if ac_fn_c_try_link "$LINENO"; then :
11288 ac_cv_lib_rt_clock_getres=yes
11289else
11290 ac_cv_lib_rt_clock_getres=no
11291fi
11292rm -f core conftest.err conftest.$ac_objext \
11293 conftest$ac_exeext conftest.$ac_ext
11294LIBS=$ac_check_lib_save_LIBS
11295fi
11296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11297$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11298if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11299
11300 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11301
11302
11303fi
11304
11305
11306fi
11307done
11308
11309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11311$as_echo_n "checking for major... " >&6; }
11312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011313/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011314
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011315#if defined(MAJOR_IN_MKDEV)
11316#include <sys/mkdev.h>
11317#elif defined(MAJOR_IN_SYSMACROS)
11318#include <sys/sysmacros.h>
11319#else
11320#include <sys/types.h>
11321#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011322
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011323int
11324main ()
11325{
11326
11327 makedev(major(0),minor(0));
11328
11329 ;
11330 return 0;
11331}
11332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011333if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011334
11335
Matthias Kloseb9621712010-04-24 17:59:49 +000011336$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011337
Matthias Kloseb9621712010-04-24 17:59:49 +000011338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11339$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011340
11341else
Skip Montanaro6dead952003-09-25 14:50:04 +000011342
Matthias Kloseb9621712010-04-24 17:59:49 +000011343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11344$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011345
11346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011347rm -f core conftest.err conftest.$ac_objext \
11348 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011349
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011350# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011351# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11353$as_echo_n "checking for getaddrinfo... " >&6; }
11354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011355/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011356
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011357#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011358#include <sys/socket.h>
11359#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011360#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011361
Martin v. Löwis11437992002-04-12 09:54:03 +000011362int
11363main ()
11364{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011365getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011366 ;
11367 return 0;
11368}
11369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011370if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011371 have_getaddrinfo=yes
11372else
Matthias Kloseb9621712010-04-24 17:59:49 +000011373 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011375rm -f core conftest.err conftest.$ac_objext \
11376 conftest$ac_exeext conftest.$ac_ext
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11378$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011379if test $have_getaddrinfo = yes
11380then
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11382$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011383 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011384 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011385else
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011387
11388if test "${enable_ipv6+set}" = set; then
11389 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11390else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011391 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011392fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011393else
Matthias Kloseb9621712010-04-24 17:59:49 +000011394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011395/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011396
11397#include <sys/types.h>
11398#include <netdb.h>
11399#include <string.h>
11400#include <sys/socket.h>
11401#include <netinet/in.h>
11402
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011403int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011404{
11405 int passive, gaierr, inet4 = 0, inet6 = 0;
11406 struct addrinfo hints, *ai, *aitop;
11407 char straddr[INET6_ADDRSTRLEN], strport[16];
11408
11409 for (passive = 0; passive <= 1; passive++) {
11410 memset(&hints, 0, sizeof(hints));
11411 hints.ai_family = AF_UNSPEC;
11412 hints.ai_flags = passive ? AI_PASSIVE : 0;
11413 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011414 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011415 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11416 (void)gai_strerror(gaierr);
11417 goto bad;
11418 }
11419 for (ai = aitop; ai; ai = ai->ai_next) {
11420 if (ai->ai_addr == NULL ||
11421 ai->ai_addrlen == 0 ||
11422 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11423 straddr, sizeof(straddr), strport, sizeof(strport),
11424 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11425 goto bad;
11426 }
11427 switch (ai->ai_family) {
11428 case AF_INET:
11429 if (strcmp(strport, "54321") != 0) {
11430 goto bad;
11431 }
11432 if (passive) {
11433 if (strcmp(straddr, "0.0.0.0") != 0) {
11434 goto bad;
11435 }
11436 } else {
11437 if (strcmp(straddr, "127.0.0.1") != 0) {
11438 goto bad;
11439 }
11440 }
11441 inet4++;
11442 break;
11443 case AF_INET6:
11444 if (strcmp(strport, "54321") != 0) {
11445 goto bad;
11446 }
11447 if (passive) {
11448 if (strcmp(straddr, "::") != 0) {
11449 goto bad;
11450 }
11451 } else {
11452 if (strcmp(straddr, "::1") != 0) {
11453 goto bad;
11454 }
11455 }
11456 inet6++;
11457 break;
11458 case AF_UNSPEC:
11459 goto bad;
11460 break;
11461 default:
11462 /* another family support? */
11463 break;
11464 }
11465 }
11466 }
11467
11468 if (!(inet4 == 0 || inet4 == 2))
11469 goto bad;
11470 if (!(inet6 == 0 || inet6 == 2))
11471 goto bad;
11472
11473 if (aitop)
11474 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011475 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011476
11477 bad:
11478 if (aitop)
11479 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011480 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011481}
11482
Martin v. Löwis11437992002-04-12 09:54:03 +000011483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011484if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011485 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011486else
Matthias Kloseb9621712010-04-24 17:59:49 +000011487 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011492
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011493fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011494
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11498$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11499
Mark Dickinson2df5d282009-12-31 21:22:50 +000011500if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011501then
11502 if test $ipv6 = yes
11503 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011504 echo 'Fatal: You must get working getaddrinfo() function.'
11505 echo ' or you can specify "--disable-ipv6"'.
11506 exit 1
11507 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011508else
Martin v. Löwis11437992002-04-12 09:54:03 +000011509
Matthias Kloseb9621712010-04-24 17:59:49 +000011510$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011511
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011512fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011513
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011514for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011515do :
11516 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011517if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011519#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011520_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011521
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011522fi
11523done
11524
Michael W. Hudson54241132001-12-07 15:38:26 +000011525
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011526# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11528$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011529if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011530 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011531else
Matthias Kloseb9621712010-04-24 17:59:49 +000011532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011533/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011534#include <sys/types.h>
11535#include <sys/time.h>
11536#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011537
Martin v. Löwis11437992002-04-12 09:54:03 +000011538int
11539main ()
11540{
11541if ((struct tm *) 0)
11542return 0;
11543 ;
11544 return 0;
11545}
11546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011547if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011548 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011549else
Matthias Kloseb9621712010-04-24 17:59:49 +000011550 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11555$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011556if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
Matthias Kloseb9621712010-04-24 17:59:49 +000011558$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011559
11560fi
11561
Matthias Kloseb9621712010-04-24 17:59:49 +000011562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11563$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011564if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011566else
Matthias Kloseb9621712010-04-24 17:59:49 +000011567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011568/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011569#include <sys/types.h>
11570#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
Martin v. Löwis11437992002-04-12 09:54:03 +000011572int
11573main ()
11574{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011575struct tm tm;
11576 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 ;
11579 return 0;
11580}
11581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011582if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011583 ac_cv_struct_tm=time.h
11584else
Matthias Kloseb9621712010-04-24 17:59:49 +000011585 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11590$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011591if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011594
11595fi
11596
Matthias Kloseb9621712010-04-24 17:59:49 +000011597ac_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 +000011598#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600"
Victor Stinnere0be4232011-10-25 13:06:09 +020011601if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011602
11603cat >>confdefs.h <<_ACEOF
11604#define HAVE_STRUCT_TM_TM_ZONE 1
11605_ACEOF
11606
11607
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011608fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011609
Martin v. Löwis11437992002-04-12 09:54:03 +000011610if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11611
Matthias Kloseb9621712010-04-24 17:59:49 +000011612$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011613
11614else
Matthias Kloseb9621712010-04-24 17:59:49 +000011615 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11616"
Victor Stinnere0be4232011-10-25 13:06:09 +020011617if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011618 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619else
Matthias Kloseb9621712010-04-24 17:59:49 +000011620 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011621fi
11622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011624#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011625_ACEOF
11626
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11628$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011629if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011631else
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011633/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011634#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011635#if !HAVE_DECL_TZNAME
11636extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011637#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011638
Martin v. Löwis11437992002-04-12 09:54:03 +000011639int
11640main ()
11641{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011642return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011643 ;
11644 return 0;
11645}
11646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011647if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011648 ac_cv_var_tzname=yes
11649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011652rm -f core conftest.err conftest.$ac_objext \
11653 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11656$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011657 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011658
Matthias Kloseb9621712010-04-24 17:59:49 +000011659$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011660
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011661 fi
11662fi
11663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664ac_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 +020011665if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011666
11667cat >>confdefs.h <<_ACEOF
11668#define HAVE_STRUCT_STAT_ST_RDEV 1
11669_ACEOF
11670
11671
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011672fi
11673
Matthias Kloseb9621712010-04-24 17:59:49 +000011674ac_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 +020011675if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011676
Martin v. Löwis11437992002-04-12 09:54:03 +000011677cat >>confdefs.h <<_ACEOF
11678#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11679_ACEOF
11680
11681
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011682fi
11683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684ac_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 +020011685if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011686
11687cat >>confdefs.h <<_ACEOF
11688#define HAVE_STRUCT_STAT_ST_FLAGS 1
11689_ACEOF
11690
11691
11692fi
11693
Matthias Kloseb9621712010-04-24 17:59:49 +000011694ac_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 +020011695if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011696
11697cat >>confdefs.h <<_ACEOF
11698#define HAVE_STRUCT_STAT_ST_GEN 1
11699_ACEOF
11700
11701
11702fi
11703
Matthias Kloseb9621712010-04-24 17:59:49 +000011704ac_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 +020011705if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011706
11707cat >>confdefs.h <<_ACEOF
11708#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11709_ACEOF
11710
11711
11712fi
11713
Matthias Kloseb9621712010-04-24 17:59:49 +000011714ac_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 +020011715if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011716
Martin v. Löwis11437992002-04-12 09:54:03 +000011717cat >>confdefs.h <<_ACEOF
11718#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11719_ACEOF
11720
11721
Matthias Kloseb9621712010-04-24 17:59:49 +000011722$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011723
11724else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011725 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011726 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011727 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11728 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011729esac
11730
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011731fi
11732
Michael W. Hudson54241132001-12-07 15:38:26 +000011733
Martin v. Löwis11437992002-04-12 09:54:03 +000011734
Matthias Kloseb9621712010-04-24 17:59:49 +000011735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11736$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011737if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011739else
Matthias Kloseb159a552010-04-25 21:00:44 +000011740
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011742/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011743#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011744int
11745main ()
11746{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011747return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 ;
11749 return 0;
11750}
11751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011752if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011753 ac_cv_header_time_altzone=yes
11754else
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011759fi
11760
Matthias Kloseb9621712010-04-24 17:59:49 +000011761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11762$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011763if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011764
Matthias Kloseb9621712010-04-24 17:59:49 +000011765$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011766
11767fi
11768
Guido van Rossumda88dad1995-01-26 00:46:29 +000011769was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11771$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011773/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011774
11775#include <sys/types.h>
11776#include <sys/select.h>
11777#include <sys/time.h>
11778
Martin v. Löwis11437992002-04-12 09:54:03 +000011779int
11780main ()
11781{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011782;
Martin v. Löwis11437992002-04-12 09:54:03 +000011783 ;
11784 return 0;
11785}
11786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011787if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011788
11789
Matthias Kloseb9621712010-04-24 17:59:49 +000011790$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011791
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011792 was_it_defined=yes
11793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11797$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011798
Matthias Kloseb9621712010-04-24 17:59:49 +000011799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11800$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011801if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011803else
Matthias Kloseb9621712010-04-24 17:59:49 +000011804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011805/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011806#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011807int
11808main ()
11809{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011810struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011811 ;
11812 return 0;
11813}
11814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011815if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011816 ac_cv_struct_addrinfo=yes
11817else
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11821fi
11822
Matthias Kloseb9621712010-04-24 17:59:49 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11824$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011825if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011826
Matthias Kloseb9621712010-04-24 17:59:49 +000011827$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011828
11829fi
11830
Matthias Kloseb9621712010-04-24 17:59:49 +000011831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11832$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011833if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011835else
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011837/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011838
11839# include <sys/types.h>
11840# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011841int
11842main ()
11843{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011844struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011845 ;
11846 return 0;
11847}
11848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011849if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011850 ac_cv_struct_sockaddr_storage=yes
11851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11855fi
11856
Matthias Kloseb9621712010-04-24 17:59:49 +000011857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11858$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011859if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011862
11863fi
11864
Guido van Rossum627b2d71993-12-24 10:39:16 +000011865# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011866
Matthias Kloseb9621712010-04-24 17:59:49 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11868$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011869if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011871else
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011874$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011875int
11876main ()
11877{
11878static int test_array [1 - 2 * !(((char) -1) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011879test_array [0] = 0
Martin v. Löwis11437992002-04-12 09:54:03 +000011880
11881 ;
11882 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011883}
Martin v. Löwis11437992002-04-12 09:54:03 +000011884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011885if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011886 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011887else
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11893$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011894if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011895 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011896
11897fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011898
Matthias Kloseb9621712010-04-24 17:59:49 +000011899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11900$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011901if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011903else
Matthias Kloseb9621712010-04-24 17:59:49 +000011904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011905/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011906
Martin v. Löwis11437992002-04-12 09:54:03 +000011907int
11908main ()
11909{
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011910/* FIXME: Include the comments suggested by Paul. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011911#ifndef __cplusplus
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011912 /* Ultrix mips cc rejects this. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011913 typedef int charset[2];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011914 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011915 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011916 char const *const *pcpcc;
11917 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 /* NEC SVR4.0.2 mips cc rejects this. */
11919 struct point {int x, y;};
11920 static struct point const zero = {0,0};
11921 /* AIX XL C 1.02.0.0 rejects this.
11922 It does not let you subtract one const X* pointer from another in
11923 an arm of an if-expression whose if-part is not a constant
11924 expression */
11925 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011926 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011927 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011928 ++pcpcc;
11929 ppc = (char**) pcpcc;
11930 pcpcc = (char const *const *) ppc;
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011931 { /* SCO 3.2v4 cc rejects this. */
11932 char *t;
Martin v. Löwis11437992002-04-12 09:54:03 +000011933 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011934
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011936 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011937 }
11938 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11939 int x[] = {25, 17};
11940 const int *foo = &x[0];
11941 ++foo;
11942 }
11943 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11944 typedef const int *iptr;
11945 iptr p = 0;
11946 ++p;
11947 }
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011948 { /* AIX XL C 1.02.0.0 rejects this saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011949 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011950 struct s { int j; const int *ap[3]; };
11951 struct s *b; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011952 }
11953 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11954 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011955 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011956 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011957 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011958#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011959
Martin v. Löwis11437992002-04-12 09:54:03 +000011960 ;
11961 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011962}
Martin v. Löwis11437992002-04-12 09:54:03 +000011963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011964if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011965 ac_cv_c_const=yes
11966else
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11972$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011973if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011974
Matthias Kloseb9621712010-04-24 17:59:49 +000011975$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011976
11977fi
11978
Michael W. Hudson54241132001-12-07 15:38:26 +000011979
Guido van Rossumda88dad1995-01-26 00:46:29 +000011980works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11982$as_echo_n "checking for working volatile... " >&6; }
11983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011984/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011985
Martin v. Löwis11437992002-04-12 09:54:03 +000011986int
11987main ()
11988{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011989volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011990 ;
11991 return 0;
11992}
11993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011994if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011995 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011996else
Skip Montanaro6dead952003-09-25 14:50:04 +000011997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011999
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012000
Guido van Rossum627b2d71993-12-24 10:39:16 +000012001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12004$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012005
Guido van Rossumda88dad1995-01-26 00:46:29 +000012006works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12008$as_echo_n "checking for working signed char... " >&6; }
12009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012010/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012011
Martin v. Löwis11437992002-04-12 09:54:03 +000012012int
12013main ()
12014{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012015signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012016 ;
12017 return 0;
12018}
12019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012020if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012021 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012022else
Skip Montanaro6dead952003-09-25 14:50:04 +000012023
Matthias Kloseb9621712010-04-24 17:59:49 +000012024$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012025
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012026
Guido van Rossum7f43da71994-08-01 12:15:30 +000012027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12030$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012031
Guido van Rossumda88dad1995-01-26 00:46:29 +000012032have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12034$as_echo_n "checking for prototypes... " >&6; }
12035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012036/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012037int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012038int
12039main ()
12040{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012041return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012042 ;
12043 return 0;
12044}
12045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012046if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012047
Matthias Kloseb9621712010-04-24 17:59:49 +000012048$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012049
Matthias Kloseb159a552010-04-25 21:00:44 +000012050 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12054$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012055
Guido van Rossumda88dad1995-01-26 00:46:29 +000012056works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12058$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012060/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012061
12062#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012063int foo(int x, ...) {
12064 va_list va;
12065 va_start(va, x);
12066 va_arg(va, int);
12067 va_arg(va, char *);
12068 va_arg(va, double);
12069 return 0;
12070}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012071
Martin v. Löwis11437992002-04-12 09:54:03 +000012072int
12073main ()
12074{
Guido van Rossum90eea071996-08-30 20:58:57 +000012075return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012076 ;
12077 return 0;
12078}
12079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012080if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012081
12082
Matthias Kloseb9621712010-04-24 17:59:49 +000012083$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012084
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012085 works=yes
12086
Guido van Rossum627b2d71993-12-24 10:39:16 +000012087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12090$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012091
Martin v. Löwisd6320502004-08-12 13:45:08 +000012092# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12094$as_echo_n "checking for socketpair... " >&6; }
12095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012096/* end confdefs.h. */
12097
12098#include <sys/types.h>
12099#include <sys/socket.h>
12100
12101int
12102main ()
12103{
12104void *x=socketpair
12105 ;
12106 return 0;
12107}
12108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012109if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012110
Matthias Kloseb9621712010-04-24 17:59:49 +000012111$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012112
Matthias Kloseb159a552010-04-25 21:00:44 +000012113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012114$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012115else
Matthias Kloseb9621712010-04-24 17:59:49 +000012116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12117$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012118
12119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012121
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012122# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12124$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012126/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012127#include <sys/types.h>
12128#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012129int
12130main ()
12131{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012132struct sockaddr x;
12133x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 ;
12135 return 0;
12136}
12137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012138if ac_fn_c_try_compile "$LINENO"; then :
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12140$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012141
Matthias Kloseb9621712010-04-24 17:59:49 +000012142$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012143
12144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12146$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012147
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012150
Guido van Rossumda88dad1995-01-26 00:46:29 +000012151va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12153$as_echo_n "checking whether va_list is an array... " >&6; }
12154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012155/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156
12157#ifdef HAVE_STDARG_PROTOTYPES
12158#include <stdarg.h>
12159#else
12160#include <varargs.h>
12161#endif
12162
Martin v. Löwis11437992002-04-12 09:54:03 +000012163int
12164main ()
12165{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 ;
12168 return 0;
12169}
12170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012171if ac_fn_c_try_compile "$LINENO"; then :
12172
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012173else
Skip Montanaro6dead952003-09-25 14:50:04 +000012174
Martin v. Löwis11437992002-04-12 09:54:03 +000012175
Matthias Kloseb9621712010-04-24 17:59:49 +000012176$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012177
Guido van Rossumda88dad1995-01-26 00:46:29 +000012178 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012179
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12183$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012184
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012185# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012186
12187
Matthias Kloseb9621712010-04-24 17:59:49 +000012188ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012189if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012190
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012192
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12194$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012195 OLD_CFLAGS=$CFLAGS
12196 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012198/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012199
12200# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012201
Martin v. Löwis11437992002-04-12 09:54:03 +000012202int
12203main ()
12204{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012205
12206 char *name;
12207 struct hostent *he, *res;
12208 char buffer[2048];
12209 int buflen = 2048;
12210 int h_errnop;
12211
12212 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012213
12214 ;
12215 return 0;
12216}
12217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012219
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012221
Martin v. Löwis11437992002-04-12 09:54:03 +000012222
Matthias Kloseb9621712010-04-24 17:59:49 +000012223$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012224
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12226$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012227
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012228else
Skip Montanaro6dead952003-09-25 14:50:04 +000012229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12231$as_echo "no" >&6; }
12232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12233$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012235/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012236
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012237# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012238
Martin v. Löwis11437992002-04-12 09:54:03 +000012239int
12240main ()
12241{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012242
12243 char *name;
12244 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012245 char buffer[2048];
12246 int buflen = 2048;
12247 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012248
Matthias Kloseb159a552010-04-25 21:00:44 +000012249 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012250
12251 ;
12252 return 0;
12253}
12254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012255if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012256
Matthias Kloseb9621712010-04-24 17:59:49 +000012257 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012258
Martin v. Löwis11437992002-04-12 09:54:03 +000012259
Matthias Kloseb159a552010-04-25 21:00:44 +000012260$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012261
Matthias Kloseb9621712010-04-24 17:59:49 +000012262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12263$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012264
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012265else
Skip Montanaro6dead952003-09-25 14:50:04 +000012266
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12268$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12270$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12272/* end confdefs.h. */
12273
12274# include <netdb.h>
12275
12276int
12277main ()
12278{
12279
12280 char *name;
12281 struct hostent *he;
12282 struct hostent_data data;
12283
12284 (void) gethostbyname_r(name, he, &data);
12285
12286 ;
12287 return 0;
12288}
12289_ACEOF
12290if ac_fn_c_try_compile "$LINENO"; then :
12291
12292 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12293
12294
12295$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12296
12297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12298$as_echo "yes" >&6; }
12299
12300else
12301
12302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12303$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012304
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012310
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012313 CFLAGS=$OLD_CFLAGS
12314
12315else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317 for ac_func in gethostbyname
12318do :
12319 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012320if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012321 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012322#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012323_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012324
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012325fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012326done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012327
Michael W. Hudson54241132001-12-07 15:38:26 +000012328
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012329fi
12330
Michael W. Hudson54241132001-12-07 15:38:26 +000012331
12332
12333
12334
12335
12336
Guido van Rossum627b2d71993-12-24 10:39:16 +000012337# checks for system services
12338# (none yet)
12339
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012340# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012341ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012342if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012343
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012344else
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12346$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012347if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012349else
Martin v. Löwis11437992002-04-12 09:54:03 +000012350 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012351LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355/* Override any GCC internal prototype to avoid an error.
12356 Use char because int might match the return type of a GCC
12357 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012358#ifdef __cplusplus
12359extern "C"
12360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012361char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012362int
12363main ()
12364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012366 ;
12367 return 0;
12368}
12369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012370if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012372else
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012375rm -f core conftest.err conftest.$ac_objext \
12376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012377LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12380$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012381if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012382 cat >>confdefs.h <<_ACEOF
12383#define HAVE_LIBIEEE 1
12384_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012386 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012387
Guido van Rossum627b2d71993-12-24 10:39:16 +000012388fi
12389
Michael W. Hudson54241132001-12-07 15:38:26 +000012390
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012391fi
12392
Michael W. Hudson54241132001-12-07 15:38:26 +000012393
Guido van Rossum7f253911997-05-09 02:42:48 +000012394# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12396$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012398# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012399if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012400 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012401if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012402then
12403
Matthias Kloseb9621712010-04-24 17:59:49 +000012404$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12407$as_echo "yes" >&6; }
12408else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12409$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012410fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012411else
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12413$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414fi
12415
Guido van Rossum7f253911997-05-09 02:42:48 +000012416
Guido van Rossum7f43da71994-08-01 12:15:30 +000012417# check for --with-libm=...
12418
Guido van Rossum563e7081996-09-10 18:20:48 +000012419case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012420Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012421*) LIBM=-lm
12422esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12424$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012427if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012429if test "$withval" = no
12430then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12432$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012433elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012434then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12436$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012437else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012438fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012439else
Matthias Kloseb9621712010-04-24 17:59:49 +000012440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12441$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442fi
12443
Guido van Rossum7f43da71994-08-01 12:15:30 +000012444
12445# check for --with-libc=...
12446
Matthias Kloseb9621712010-04-24 17:59:49 +000012447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12448$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012450# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012451if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012453if test "$withval" = no
12454then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12456$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012457elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012458then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12460$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012461else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012462fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012463else
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12465$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466fi
12467
Guido van Rossum7f43da71994-08-01 12:15:30 +000012468
Stefan Krah1919b7e2012-03-21 18:25:23 +010012469# **************************************
12470# * Check for gcc x64 inline assembler *
12471# **************************************
12472
12473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12474$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12476/* end confdefs.h. */
12477
12478int
12479main ()
12480{
12481
12482 __asm__ __volatile__ ("movq %rcx, %rax");
12483
12484 ;
12485 return 0;
12486}
12487_ACEOF
12488if ac_fn_c_try_compile "$LINENO"; then :
12489 have_gcc_asm_for_x64=yes
12490else
12491 have_gcc_asm_for_x64=no
12492fi
12493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12495$as_echo "$have_gcc_asm_for_x64" >&6; }
12496if test "$have_gcc_asm_for_x64" = yes
12497then
12498
12499$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12500
12501fi
12502
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012503# **************************************************
12504# * Check for various properties of floating point *
12505# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012506
Matthias Kloseb9621712010-04-24 17:59:49 +000012507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12508$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012509if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012511else
12512
Matthias Kloseb9621712010-04-24 17:59:49 +000012513if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012514 ac_cv_little_endian_double=no
12515else
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012517/* end confdefs.h. */
12518
12519#include <string.h>
12520int main() {
12521 double x = 9006104071832581.0;
12522 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12523 return 0;
12524 else
12525 return 1;
12526}
12527
12528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012529if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012530 ac_cv_little_endian_double=yes
12531else
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12535 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012536fi
12537
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012538fi
12539
Matthias Kloseb9621712010-04-24 17:59:49 +000012540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12541$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012542if test "$ac_cv_little_endian_double" = yes
12543then
12544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012546
12547fi
12548
Matthias Kloseb9621712010-04-24 17:59:49 +000012549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12550$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012551if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012553else
12554
Matthias Kloseb9621712010-04-24 17:59:49 +000012555if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012556 ac_cv_big_endian_double=no
12557else
Matthias Kloseb9621712010-04-24 17:59:49 +000012558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012559/* end confdefs.h. */
12560
12561#include <string.h>
12562int main() {
12563 double x = 9006104071832581.0;
12564 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12565 return 0;
12566 else
12567 return 1;
12568}
12569
12570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012571if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012572 ac_cv_big_endian_double=yes
12573else
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12577 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012578fi
12579
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012580fi
12581
Matthias Kloseb9621712010-04-24 17:59:49 +000012582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12583$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012584if test "$ac_cv_big_endian_double" = yes
12585then
12586
Matthias Kloseb9621712010-04-24 17:59:49 +000012587$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012588
12589fi
12590
12591# Some ARM platforms use a mixed-endian representation for doubles.
12592# While Python doesn't currently have full support for these platforms
12593# (see e.g., issue 1762561), we can at least make sure that float <-> string
12594# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12596$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012597if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012598 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012599else
12600
Matthias Kloseb9621712010-04-24 17:59:49 +000012601if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012602 ac_cv_mixed_endian_double=no
12603else
Matthias Kloseb9621712010-04-24 17:59:49 +000012604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012605/* end confdefs.h. */
12606
12607#include <string.h>
12608int main() {
12609 double x = 9006104071832581.0;
12610 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12611 return 0;
12612 else
12613 return 1;
12614}
12615
12616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012617if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012618 ac_cv_mixed_endian_double=yes
12619else
Matthias Kloseb9621712010-04-24 17:59:49 +000012620 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012622rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12623 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012624fi
12625
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012626fi
12627
Matthias Kloseb9621712010-04-24 17:59:49 +000012628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12629$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012630if test "$ac_cv_mixed_endian_double" = yes
12631then
12632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012634
12635fi
12636
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012637# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012638# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012639# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012640# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012641# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012642# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012643
12644# This inline assembler syntax may also work for suncc and icc,
12645# so we try it on all platforms.
12646
Matthias Kloseb9621712010-04-24 17:59:49 +000012647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12648$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012650/* end confdefs.h. */
12651
12652int
12653main ()
12654{
12655
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012656 unsigned short cw;
12657 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12658 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012659
12660 ;
12661 return 0;
12662}
12663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012664if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012665 have_gcc_asm_for_x87=yes
12666else
Matthias Kloseb9621712010-04-24 17:59:49 +000012667 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012668fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12671$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012672if test "$have_gcc_asm_for_x87" = yes
12673then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012676
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012677fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012678
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012679# Detect whether system arithmetic is subject to x87-style double
12680# rounding issues. The result of this test has little meaning on non
12681# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12682# mode is round-to-nearest and double rounding issues are present, and
12683# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12685$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012686# $BASECFLAGS may affect the result
12687ac_save_cc="$CC"
12688CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012689if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012690 ac_cv_x87_double_rounding=no
12691else
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012693/* end confdefs.h. */
12694
12695#include <stdlib.h>
12696#include <math.h>
12697int main() {
12698 volatile double x, y, z;
12699 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12700 x = 0.99999999999999989; /* 1-2**-53 */
12701 y = 1./x;
12702 if (y != 1.)
12703 exit(0);
12704 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12705 x = 1e16;
12706 y = 2.99999;
12707 z = x + y;
12708 if (z != 1e16+4.)
12709 exit(0);
12710 /* both tests show evidence of double rounding */
12711 exit(1);
12712}
12713
12714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012715if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012716 ac_cv_x87_double_rounding=no
12717else
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12721 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012722fi
12723
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012724CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12726$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012727if test "$ac_cv_x87_double_rounding" = yes
12728then
12729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012731
12732fi
12733
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012734# ************************************
12735# * Check for mathematical functions *
12736# ************************************
12737
12738LIBS_SAVE=$LIBS
12739LIBS="$LIBS $LIBM"
12740
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012741for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12742do :
12743 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12744ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012745if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012746 cat >>confdefs.h <<_ACEOF
12747#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12748_ACEOF
12749
12750fi
12751done
12752
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012753for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012754do :
12755 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12756ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012757if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012758 cat >>confdefs.h <<_ACEOF
12759#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12760_ACEOF
12761
12762fi
12763done
12764
12765ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12766"
Victor Stinnere0be4232011-10-25 13:06:09 +020012767if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012768 ac_have_decl=1
12769else
12770 ac_have_decl=0
12771fi
12772
12773cat >>confdefs.h <<_ACEOF
12774#define HAVE_DECL_ISINF $ac_have_decl
12775_ACEOF
12776ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12777"
Victor Stinnere0be4232011-10-25 13:06:09 +020012778if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012779 ac_have_decl=1
12780else
12781 ac_have_decl=0
12782fi
12783
12784cat >>confdefs.h <<_ACEOF
12785#define HAVE_DECL_ISNAN $ac_have_decl
12786_ACEOF
12787ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12788"
Victor Stinnere0be4232011-10-25 13:06:09 +020012789if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012790 ac_have_decl=1
12791else
12792 ac_have_decl=0
12793fi
12794
12795cat >>confdefs.h <<_ACEOF
12796#define HAVE_DECL_ISFINITE $ac_have_decl
12797_ACEOF
12798
12799
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012800# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12801# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12803$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012804if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012805 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012806else
12807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012809 ac_cv_tanh_preserves_zero_sign=no
12810else
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012812/* end confdefs.h. */
12813
12814#include <math.h>
12815#include <stdlib.h>
12816int main() {
12817 /* return 0 if either negative zeros don't exist
12818 on this platform or if negative zeros exist
12819 and tanh(-0.) == -0. */
12820 if (atan2(0., -1.) == atan2(-0., -1.) ||
12821 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12822 else exit(1);
12823}
12824
12825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012826if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012827 ac_cv_tanh_preserves_zero_sign=yes
12828else
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012833fi
12834
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012835fi
12836
Matthias Kloseb9621712010-04-24 17:59:49 +000012837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12838$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012839if test "$ac_cv_tanh_preserves_zero_sign" = yes
12840then
12841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012843
12844fi
12845
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012846if test "$ac_cv_func_log1p" = yes
12847then
12848 # On some versions of AIX, log1p(-0.) returns 0. instead of
12849 # -0. See issue #9920.
12850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12851$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012852 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012853 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012854else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012855
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012856 if test "$cross_compiling" = yes; then :
12857 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012858else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12860/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012861
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012862 #include <math.h>
12863 #include <stdlib.h>
12864 int main() {
12865 /* Fail if the signs of log1p(-0.) and -0. can be
12866 distinguished. */
12867 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12868 return 0;
12869 else
12870 return 1;
12871 }
12872
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012873_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012874if ac_fn_c_try_run "$LINENO"; then :
12875 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012876else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012877 ac_cv_log1p_drops_zero_sign=yes
12878fi
12879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12880 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012881fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012882
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012883fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012884
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12886$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12887fi
12888if test "$ac_cv_log1p_drops_zero_sign" = yes
12889then
12890
12891$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12892
12893fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012894
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012895LIBS=$LIBS_SAVE
12896
Mark Dickinsona614f042009-11-28 12:48:43 +000012897# For multiprocessing module, check that sem_open
12898# actually works. For FreeBSD versions <= 7.2,
12899# the kernel module that provides POSIX semaphores
12900# isn't loaded by default, so an attempt to call
12901# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12903$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012904if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012906else
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012908 ac_cv_posix_semaphores_enabled=yes
12909else
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012911/* end confdefs.h. */
12912
12913#include <unistd.h>
12914#include <fcntl.h>
12915#include <stdio.h>
12916#include <semaphore.h>
12917#include <sys/stat.h>
12918
12919int main(void) {
12920 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12921 if (a == SEM_FAILED) {
12922 perror("sem_open");
12923 return 1;
12924 }
12925 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012926 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012927 return 0;
12928}
12929
12930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012931if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012932 ac_cv_posix_semaphores_enabled=yes
12933else
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12937 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012938fi
12939
12940
Mark Dickinsona614f042009-11-28 12:48:43 +000012941fi
12942
Matthias Kloseb9621712010-04-24 17:59:49 +000012943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12944$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012945if test $ac_cv_posix_semaphores_enabled = no
12946then
12947
Matthias Kloseb9621712010-04-24 17:59:49 +000012948$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012949
12950fi
12951
Mark Dickinson10683072009-04-18 21:18:19 +000012952# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12954$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012955if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012956 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012957else
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012959 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012962/* end confdefs.h. */
12963
12964#include <unistd.h>
12965#include <fcntl.h>
12966#include <stdio.h>
12967#include <semaphore.h>
12968#include <sys/stat.h>
12969
12970int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012971 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012972 int count;
12973 int res;
12974 if(a==SEM_FAILED){
12975 perror("sem_open");
12976 return 1;
12977
12978 }
12979 res = sem_getvalue(a, &count);
12980 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012981 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012982 return res==-1 ? 1 : 0;
12983}
12984
Mark Dickinson10683072009-04-18 21:18:19 +000012985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012986if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012987 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012988else
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12992 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012993fi
12994
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012995
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012996fi
12997
Matthias Kloseb9621712010-04-24 17:59:49 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12999$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013000if test $ac_cv_broken_sem_getvalue = yes
13001then
13002
Matthias Kloseb9621712010-04-24 17:59:49 +000013003$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013004
13005fi
13006
Mark Dickinsonbd792642009-03-18 20:06:12 +000013007# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13009$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013010# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013011if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013012 enableval=$enable_big_digits; case $enable_big_digits in
13013yes)
13014 enable_big_digits=30 ;;
13015no)
13016 enable_big_digits=15 ;;
1301715|30)
13018 ;;
13019*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013020 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 +000013021esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13023$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013024
13025cat >>confdefs.h <<_ACEOF
13026#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13027_ACEOF
13028
13029
13030else
Matthias Kloseb9621712010-04-24 17:59:49 +000013031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13032$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013033fi
13034
13035
Guido van Rossumef2255b2000-03-10 22:30:29 +000013036# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013037ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013038if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013039
13040
Matthias Kloseb9621712010-04-24 17:59:49 +000013041$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013042
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013043 wchar_h="yes"
13044
Guido van Rossumef2255b2000-03-10 22:30:29 +000013045else
Martin v. Löwis11437992002-04-12 09:54:03 +000013046 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013047
13048fi
13049
Michael W. Hudson54241132001-12-07 15:38:26 +000013050
Martin v. Löwis11437992002-04-12 09:54:03 +000013051
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013052# determine wchar_t size
13053if test "$wchar_h" = yes
13054then
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13057# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13058# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13060$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013061if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013063else
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13065"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013066
Martin v. Löwis11437992002-04-12 09:54:03 +000013067else
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 if test "$ac_cv_type_wchar_t" = yes; then
13069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013071as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013072See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013073 else
13074 ac_cv_sizeof_wchar_t=0
13075 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013077
Martin v. Löwis11437992002-04-12 09:54:03 +000013078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13080$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013081
13082
13083
Martin v. Löwis11437992002-04-12 09:54:03 +000013084cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013085#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013086_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013087
Michael W. Hudson54241132001-12-07 15:38:26 +000013088
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013089fi
13090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13092$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013093have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013095/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013096
13097#include <tcl.h>
13098#if TCL_UTF_MAX != 6
13099# error "NOT UCS4_TCL"
13100#endif
13101int
13102main ()
13103{
13104
13105 ;
13106 return 0;
13107}
13108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013109if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013110
13111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013113
13114 have_ucs4_tcl=yes
13115
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13119$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013120
Skip Montanaro6dead952003-09-25 14:50:04 +000013121# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013122if test "$wchar_h" = yes
13123then
13124 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13126$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013127 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013129else
13130
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013132 ac_cv_wchar_t_signed=yes
13133else
Matthias Kloseb9621712010-04-24 17:59:49 +000013134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013135/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013136
13137 #include <wchar.h>
13138 int main()
13139 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013140 /* Success: exit code 0 */
13141 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013142 }
13143
13144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013145if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013146 ac_cv_wchar_t_signed=yes
13147else
Matthias Kloseb9621712010-04-24 17:59:49 +000013148 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13151 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013152fi
13153
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013154fi
13155
Matthias Kloseb9621712010-04-24 17:59:49 +000013156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13157$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013158fi
13159
Georg Brandl52d168a2008-01-07 18:10:24 +000013160# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013161if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013162 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013163then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013164 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013165
Matthias Kloseb9621712010-04-24 17:59:49 +000013166$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013167
Georg Brandl52d168a2008-01-07 18:10:24 +000013168else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013169 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013170fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13172$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013173
13174# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13176$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013177if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013179else
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 ac_cv_c_bigendian=unknown
13181 # See if we're dealing with a universal compiler.
13182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13183/* end confdefs.h. */
13184#ifndef __APPLE_CC__
13185 not a universal capable compiler
13186 #endif
13187 typedef int dummy;
13188
Skip Montanaro6dead952003-09-25 14:50:04 +000013189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013190if ac_fn_c_try_compile "$LINENO"; then :
13191
13192 # Check for potential -arch flags. It is not universal unless
13193 # there are at least two -arch flags with different values.
13194 ac_arch=
13195 ac_prev=
13196 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13197 if test -n "$ac_prev"; then
13198 case $ac_word in
13199 i?86 | x86_64 | ppc | ppc64)
13200 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13201 ac_arch=$ac_word
13202 else
13203 ac_cv_c_bigendian=universal
13204 break
13205 fi
13206 ;;
13207 esac
13208 ac_prev=
13209 elif test "x$ac_word" = "x-arch"; then
13210 ac_prev=arch
13211 fi
13212 done
13213fi
13214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13215 if test $ac_cv_c_bigendian = unknown; then
13216 # See if sys/param.h defines the BYTE_ORDER macro.
13217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013218/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013219#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013221
Martin v. Löwis11437992002-04-12 09:54:03 +000013222int
13223main ()
13224{
Matthias Kloseb9621712010-04-24 17:59:49 +000013225#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13226 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13227 && LITTLE_ENDIAN)
13228 bogus endian macros
13229 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013230
13231 ;
13232 return 0;
13233}
13234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013235if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013236 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013238/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013239#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013241
Martin v. Löwis11437992002-04-12 09:54:03 +000013242int
13243main ()
13244{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013245#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 not big endian
13247 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013248
13249 ;
13250 return 0;
13251}
13252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013253if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013254 ac_cv_c_bigendian=yes
13255else
Matthias Kloseb9621712010-04-24 17:59:49 +000013256 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013259fi
13260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13261 fi
13262 if test $ac_cv_c_bigendian = unknown; then
13263 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013265/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013266#include <limits.h>
13267
Martin v. Löwis11437992002-04-12 09:54:03 +000013268int
13269main ()
13270{
Matthias Kloseb9621712010-04-24 17:59:49 +000013271#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13272 bogus endian macros
13273 #endif
13274
Martin v. Löwis11437992002-04-12 09:54:03 +000013275 ;
13276 return 0;
13277}
13278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013279if ac_fn_c_try_compile "$LINENO"; then :
13280 # It does; now see whether it defined to _BIG_ENDIAN or not.
13281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13282/* end confdefs.h. */
13283#include <limits.h>
13284
13285int
13286main ()
13287{
13288#ifndef _BIG_ENDIAN
13289 not big endian
13290 #endif
13291
13292 ;
13293 return 0;
13294}
13295_ACEOF
13296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013298else
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13302fi
13303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13304 fi
13305 if test $ac_cv_c_bigendian = unknown; then
13306 # Compile a test program.
13307 if test "$cross_compiling" = yes; then :
13308 # Try to guess by grepping values from an object file.
13309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13310/* end confdefs.h. */
13311short int ascii_mm[] =
13312 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13313 short int ascii_ii[] =
13314 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13315 int use_ascii (int i) {
13316 return ascii_mm[i] + ascii_ii[i];
13317 }
13318 short int ebcdic_ii[] =
13319 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13320 short int ebcdic_mm[] =
13321 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13322 int use_ebcdic (int i) {
13323 return ebcdic_mm[i] + ebcdic_ii[i];
13324 }
13325 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327int
13328main ()
13329{
13330return use_ascii (foo) == use_ebcdic (foo);
13331 ;
13332 return 0;
13333}
13334_ACEOF
13335if ac_fn_c_try_compile "$LINENO"; then :
13336 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13337 ac_cv_c_bigendian=yes
13338 fi
13339 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13340 if test "$ac_cv_c_bigendian" = unknown; then
13341 ac_cv_c_bigendian=no
13342 else
13343 # finding both strings is unlikely to happen, but who knows?
13344 ac_cv_c_bigendian=unknown
13345 fi
13346 fi
13347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013349else
Matthias Kloseb9621712010-04-24 17:59:49 +000013350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013351/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013353int
13354main ()
13355{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 /* Are we little or big endian? From Harbison&Steele. */
13358 union
13359 {
13360 long int l;
13361 char c[sizeof (long int)];
13362 } u;
13363 u.l = 1;
13364 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365
13366 ;
13367 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013368}
Martin v. Löwis11437992002-04-12 09:54:03 +000013369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013370if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013371 ac_cv_c_bigendian=no
13372else
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13376 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013380fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13382$as_echo "$ac_cv_c_bigendian" >&6; }
13383 case $ac_cv_c_bigendian in #(
13384 yes)
13385 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13386;; #(
13387 no)
13388 ;; #(
13389 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 ;; #(
13394 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013395 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013396 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013398
Michael W. Hudson54241132001-12-07 15:38:26 +000013399
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013400# ABI version string for Python extension modules. This appears between the
13401# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13402# from the following attributes which affect the ABI of this Python build (in
13403# this order):
13404#
13405# * The Python implementation (always 'cpython-' for us)
13406# * The major and minor version numbers
13407# * --with-pydebug (adds a 'd')
13408# * --with-pymalloc (adds a 'm')
13409# * --with-wide-unicode (adds a 'u')
13410#
13411# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013412# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13413# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013414
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13416$as_echo_n "checking ABIFLAGS... " >&6; }
13417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13418$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13420$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013421SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13423$as_echo "$SOABI" >&6; }
13424
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13426$as_echo_n "checking LDVERSION... " >&6; }
13427LDVERSION='$(VERSION)$(ABIFLAGS)'
13428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13429$as_echo "$LDVERSION" >&6; }
13430
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013431# SO is the extension of shared libraries `(including the dot!)
13432# -- usually .so, .sl on HP-UX, .dll on Cygwin
13433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13434$as_echo_n "checking SO... " >&6; }
13435if test -z "$SO"
13436then
13437 case $ac_sys_system in
13438 hp*|HP*)
13439 case `uname -m` in
13440 ia64) SO=.so;;
13441 *) SO=.sl;;
13442 esac
13443 ;;
13444 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013445 Linux*|GNU*)
13446 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013447 *) SO=.so;;
13448 esac
13449else
13450 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013451 echo
13452 echo '====================================================================='
13453 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013454 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013455 echo '+ Do you really mean to change the extension for shared libraries? +'
13456 echo '+ Continuing in 10 seconds to let you to ponder. +'
13457 echo '+ +'
13458 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013459 sleep 10
13460fi
13461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13462$as_echo "$SO" >&6; }
13463
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013464# Check whether right shifting a negative integer extends the sign bit
13465# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13467$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013468if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013470else
Martin v. Löwis11437992002-04-12 09:54:03 +000013471
Matthias Kloseb9621712010-04-24 17:59:49 +000013472if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013473 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013474else
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013476/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013477
13478int main()
13479{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013480 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013481}
13482
Martin v. Löwis11437992002-04-12 09:54:03 +000013483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013484if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013485 ac_cv_rshift_extends_sign=yes
13486else
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013491fi
13492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013493fi
13494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13496$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013497if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013498then
Martin v. Löwis11437992002-04-12 09:54:03 +000013499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013501
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013502fi
13503
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013504# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13506$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013507if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013508 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013509else
Martin v. Löwis11437992002-04-12 09:54:03 +000013510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013512/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013513#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013514int
13515main ()
13516{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013517
13518 FILE *f = fopen("/dev/null", "r");
13519 flockfile(f);
13520 getc_unlocked(f);
13521 funlockfile(f);
13522
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 ;
13524 return 0;
13525}
13526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013527if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013528 ac_cv_have_getc_unlocked=yes
13529else
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 ac_cv_have_getc_unlocked=no
13531fi
13532rm -f core conftest.err conftest.$ac_objext \
13533 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13537$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013538if test "$ac_cv_have_getc_unlocked" = yes
13539then
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013542
13543fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013544
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013545# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013546# save the value of LIBS so we don't actually link Python with readline
13547LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013548
Gregory P. Smith18820942008-09-07 06:24:49 +000013549# On some systems we need to link readline to a termcap compatible
13550# library. NOTE: Keep the precedence of listed libraries synchronised
13551# with setup.py.
13552py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13554$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013555for py_libtermcap in "" ncursesw ncurses curses termcap; do
13556 if test -z "$py_libtermcap"; then
13557 READLINE_LIBS="-lreadline"
13558 else
13559 READLINE_LIBS="-lreadline -l$py_libtermcap"
13560 fi
13561 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013563/* end confdefs.h. */
13564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565/* Override any GCC internal prototype to avoid an error.
13566 Use char because int might match the return type of a GCC
13567 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013568#ifdef __cplusplus
13569extern "C"
13570#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013571char readline ();
13572int
13573main ()
13574{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013575return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013576 ;
13577 return 0;
13578}
13579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013580if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013581 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013583rm -f core conftest.err conftest.$ac_objext \
13584 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013585 if test $py_cv_lib_readline = yes; then
13586 break
13587 fi
13588done
13589# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13590#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013591if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13593$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013594else
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13596$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013599
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013600fi
13601
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013602# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13604$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013605if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013607else
13608 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013609LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013611/* end confdefs.h. */
13612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013613/* Override any GCC internal prototype to avoid an error.
13614 Use char because int might match the return type of a GCC
13615 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013616#ifdef __cplusplus
13617extern "C"
13618#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013619char rl_callback_handler_install ();
13620int
13621main ()
13622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013623return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013624 ;
13625 return 0;
13626}
13627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013628if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013629 ac_cv_lib_readline_rl_callback_handler_install=yes
13630else
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013633rm -f core conftest.err conftest.$ac_objext \
13634 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013635LIBS=$ac_check_lib_save_LIBS
13636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13638$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013639if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013642
13643fi
13644
13645
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013646# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013648/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013649#include <readline/readline.h>
13650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013651if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013652 have_readline=yes
13653else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013654 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013655
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013656fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013657rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013658if test $have_readline = yes
13659then
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013661/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013662#include <readline/readline.h>
13663
13664_ACEOF
13665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013667
Matthias Kloseb9621712010-04-24 17:59:49 +000013668$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013669
13670fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013671rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013674/* end confdefs.h. */
13675#include <readline/readline.h>
13676
13677_ACEOF
13678if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013679 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013680
Matthias Kloseb9621712010-04-24 17:59:49 +000013681$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013682
13683fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013684rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013685
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013686fi
13687
Martin v. Löwis0daad592001-09-30 21:09:59 +000013688# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13690$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013691if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013692 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013693else
Martin v. Löwis11437992002-04-12 09:54:03 +000013694 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013695LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013699/* Override any GCC internal prototype to avoid an error.
13700 Use char because int might match the return type of a GCC
13701 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013702#ifdef __cplusplus
13703extern "C"
13704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013705char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013706int
13707main ()
13708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013709return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013710 ;
13711 return 0;
13712}
13713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013714if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013715 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013716else
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013719rm -f core conftest.err conftest.$ac_objext \
13720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013721LIBS=$ac_check_lib_save_LIBS
13722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13724$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013725if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013728
Martin v. Löwis0daad592001-09-30 21:09:59 +000013729fi
13730
Michael W. Hudson54241132001-12-07 15:38:26 +000013731
Thomas Wouters89d996e2007-09-08 17:39:28 +000013732# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13734$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013735if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013737else
13738 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013739LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013741/* end confdefs.h. */
13742
13743/* Override any GCC internal prototype to avoid an error.
13744 Use char because int might match the return type of a GCC
13745 builtin and then its argument prototype would still apply. */
13746#ifdef __cplusplus
13747extern "C"
13748#endif
13749char rl_completion_display_matches_hook ();
13750int
13751main ()
13752{
13753return rl_completion_display_matches_hook ();
13754 ;
13755 return 0;
13756}
13757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013758if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013759 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13760else
Matthias Kloseb9621712010-04-24 17:59:49 +000013761 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013763rm -f core conftest.err conftest.$ac_objext \
13764 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013765LIBS=$ac_check_lib_save_LIBS
13766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13768$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013769if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013772
13773fi
13774
13775
Martin v. Löwis0daad592001-09-30 21:09:59 +000013776# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13778$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013779if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013781else
Martin v. Löwis11437992002-04-12 09:54:03 +000013782 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013783LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013787/* Override any GCC internal prototype to avoid an error.
13788 Use char because int might match the return type of a GCC
13789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013790#ifdef __cplusplus
13791extern "C"
13792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013793char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013794int
13795main ()
13796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013797return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013798 ;
13799 return 0;
13800}
13801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013802if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013804else
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013807rm -f core conftest.err conftest.$ac_objext \
13808 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013809LIBS=$ac_check_lib_save_LIBS
13810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13812$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013813if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013814
Matthias Kloseb9621712010-04-24 17:59:49 +000013815$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013816
Guido van Rossum353ae582001-07-10 16:45:32 +000013817fi
13818
Jack Jansendd19cf82001-12-06 22:36:17 +000013819
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013820# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013822/* end confdefs.h. */
13823#include <readline/readline.h>
13824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013825if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013826 have_readline=yes
13827else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013828 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013829
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013830fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013831rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013832if test $have_readline = yes
13833then
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013835/* end confdefs.h. */
13836#include <readline/readline.h>
13837
13838_ACEOF
13839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013840 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013841
Matthias Kloseb9621712010-04-24 17:59:49 +000013842$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013843
13844fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013845rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013846
13847fi
13848
Martin v. Löwis82bca632006-02-10 20:49:30 +000013849# End of readline checks: restore LIBS
13850LIBS=$LIBS_no_readline
13851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13853$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013854if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013855 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013856else
Martin v. Löwis11437992002-04-12 09:54:03 +000013857
Matthias Kloseb9621712010-04-24 17:59:49 +000013858if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013859 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013860else
Matthias Kloseb9621712010-04-24 17:59:49 +000013861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013862/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013863
13864int main()
13865{
13866 int val1 = nice(1);
13867 if (val1 != -1 && val1 == nice(2))
13868 exit(0);
13869 exit(1);
13870}
13871
Martin v. Löwis11437992002-04-12 09:54:03 +000013872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013873if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013874 ac_cv_broken_nice=yes
13875else
Matthias Kloseb9621712010-04-24 17:59:49 +000013876 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13879 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013880fi
13881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882fi
13883
Matthias Kloseb9621712010-04-24 17:59:49 +000013884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13885$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013886if test "$ac_cv_broken_nice" = yes
13887then
Martin v. Löwis11437992002-04-12 09:54:03 +000013888
Matthias Kloseb9621712010-04-24 17:59:49 +000013889$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013890
13891fi
13892
Matthias Kloseb9621712010-04-24 17:59:49 +000013893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13894$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013895if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013897else
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013899 ac_cv_broken_poll=no
13900else
Matthias Kloseb9621712010-04-24 17:59:49 +000013901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013902/* end confdefs.h. */
13903
13904#include <poll.h>
13905
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013906int main()
13907{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013908 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013909 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013910
13911 close (42);
13912
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013913 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013914 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013915 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013916 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013917 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013918 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013919 return 1;
13920}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013921
13922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013923if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013924 ac_cv_broken_poll=yes
13925else
Matthias Kloseb9621712010-04-24 17:59:49 +000013926 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13929 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013932fi
13933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13935$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013936if test "$ac_cv_broken_poll" = yes
13937then
13938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013940
13941fi
13942
Brett Cannon43802422005-02-10 20:48:03 +000013943# 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 +000013944# (which is not required by ISO C or UNIX spec) and/or if we support
13945# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013946ac_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 +000013947#include <$ac_cv_struct_tm>
13948
Matthias Kloseb9621712010-04-24 17:59:49 +000013949"
Victor Stinnere0be4232011-10-25 13:06:09 +020013950if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013951
13952cat >>confdefs.h <<_ACEOF
13953#define HAVE_STRUCT_TM_TM_ZONE 1
13954_ACEOF
13955
13956
13957fi
13958
13959if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013962
13963else
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13965"
Victor Stinnere0be4232011-10-25 13:06:09 +020013966if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013968else
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013970fi
13971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013972cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013973#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013974_ACEOF
13975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13977$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013978if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980else
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013982/* end confdefs.h. */
13983#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984#if !HAVE_DECL_TZNAME
13985extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013986#endif
13987
13988int
13989main ()
13990{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013992 ;
13993 return 0;
13994}
13995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013996if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013997 ac_cv_var_tzname=yes
13998else
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014001rm -f core conftest.err conftest.$ac_objext \
14002 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14005$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014006 if test $ac_cv_var_tzname = yes; then
14007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014009
14010 fi
14011fi
14012
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014013
Martin v. Löwis1d459062005-03-14 21:23:33 +000014014# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14016$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014017if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014018 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014019else
14020
Matthias Kloseb9621712010-04-24 17:59:49 +000014021if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014022 ac_cv_working_tzset=no
14023else
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014025/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014026
14027#include <stdlib.h>
14028#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014029#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014030
14031#if HAVE_TZNAME
14032extern char *tzname[];
14033#endif
14034
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014035int main()
14036{
Brett Cannon18367812003-09-19 00:59:16 +000014037 /* Note that we need to ensure that not only does tzset(3)
14038 do 'something' with localtime, but it works as documented
14039 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014040 This includes making sure that tzname is set properly if
14041 tm->tm_zone does not exist since it is the alternative way
14042 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014043
14044 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014045 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014046 */
14047
Martin v. Löwis1d459062005-03-14 21:23:33 +000014048 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014049 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14050
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014051 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014052 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014053 if (localtime(&groundhogday)->tm_hour != 0)
14054 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014055#if HAVE_TZNAME
14056 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14057 if (strcmp(tzname[0], "UTC") ||
14058 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14059 exit(1);
14060#endif
Brett Cannon18367812003-09-19 00:59:16 +000014061
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014062 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014063 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014064 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014065 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014066#if HAVE_TZNAME
14067 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14068 exit(1);
14069#endif
Brett Cannon18367812003-09-19 00:59:16 +000014070
14071 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14072 tzset();
14073 if (localtime(&groundhogday)->tm_hour != 11)
14074 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014075#if HAVE_TZNAME
14076 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14077 exit(1);
14078#endif
14079
14080#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014081 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14082 exit(1);
14083 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14084 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014085#endif
Brett Cannon18367812003-09-19 00:59:16 +000014086
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014087 exit(0);
14088}
14089
14090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014091if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014092 ac_cv_working_tzset=yes
14093else
Matthias Kloseb9621712010-04-24 17:59:49 +000014094 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14097 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014098fi
14099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100fi
14101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14103$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014104if test "$ac_cv_working_tzset" = yes
14105then
14106
Matthias Kloseb9621712010-04-24 17:59:49 +000014107$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014108
14109fi
14110
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014111# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14113$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014114if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014116else
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014118/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014119#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014120int
14121main ()
14122{
14123
14124struct stat st;
14125st.st_mtim.tv_nsec = 1;
14126
14127 ;
14128 return 0;
14129}
14130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014131if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014132 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014133else
Matthias Kloseb9621712010-04-24 17:59:49 +000014134 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14137fi
14138
Matthias Kloseb9621712010-04-24 17:59:49 +000014139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14140$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014141if test "$ac_cv_stat_tv_nsec" = yes
14142then
14143
Matthias Kloseb9621712010-04-24 17:59:49 +000014144$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014145
14146fi
14147
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014148# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14150$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014151if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014153else
Matthias Kloseb9621712010-04-24 17:59:49 +000014154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014155/* end confdefs.h. */
14156#include <sys/stat.h>
14157int
14158main ()
14159{
14160
14161struct stat st;
14162st.st_mtimespec.tv_nsec = 1;
14163
14164 ;
14165 return 0;
14166}
14167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014168if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014169 ac_cv_stat_tv_nsec2=yes
14170else
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14174fi
14175
Matthias Kloseb9621712010-04-24 17:59:49 +000014176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14177$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014178if test "$ac_cv_stat_tv_nsec2" = yes
14179then
14180
Matthias Kloseb9621712010-04-24 17:59:49 +000014181$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014182
14183fi
14184
Jack Jansen666b1e72001-10-31 12:11:48 +000014185# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14187$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014188if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014190else
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014192/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014193#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014194int
14195main ()
14196{
Jack Jansen666b1e72001-10-31 12:11:48 +000014197
14198 int rtn;
14199 rtn = mvwdelch(0,0,0);
14200
Martin v. Löwis11437992002-04-12 09:54:03 +000014201 ;
14202 return 0;
14203}
14204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014205if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014206 ac_cv_mvwdelch_is_expression=yes
14207else
Matthias Kloseb9621712010-04-24 17:59:49 +000014208 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14211fi
14212
Matthias Kloseb9621712010-04-24 17:59:49 +000014213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14214$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014215
14216if test "$ac_cv_mvwdelch_is_expression" = yes
14217then
Martin v. Löwis11437992002-04-12 09:54:03 +000014218
Matthias Kloseb9621712010-04-24 17:59:49 +000014219$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014220
14221fi
14222
Matthias Kloseb9621712010-04-24 17:59:49 +000014223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14224$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014225if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014226 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014227else
Matthias Kloseb9621712010-04-24 17:59:49 +000014228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014229/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014230#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014231int
14232main ()
14233{
Jack Jansen666b1e72001-10-31 12:11:48 +000014234
14235 WINDOW *w;
14236 w->_flags = 0;
14237
Martin v. Löwis11437992002-04-12 09:54:03 +000014238 ;
14239 return 0;
14240}
14241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014242if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014243 ac_cv_window_has_flags=yes
14244else
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14248fi
14249
Matthias Kloseb9621712010-04-24 17:59:49 +000014250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14251$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014252
Jack Jansen666b1e72001-10-31 12:11:48 +000014253
14254if test "$ac_cv_window_has_flags" = yes
14255then
Martin v. Löwis11437992002-04-12 09:54:03 +000014256
Matthias Kloseb9621712010-04-24 17:59:49 +000014257$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014258
14259fi
14260
Matthias Kloseb9621712010-04-24 17:59:49 +000014261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14262$as_echo_n "checking for is_term_resized... " >&6; }
14263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014264/* end confdefs.h. */
14265#include <curses.h>
14266int
14267main ()
14268{
14269void *x=is_term_resized
14270 ;
14271 return 0;
14272}
14273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014275
Matthias Kloseb9621712010-04-24 17:59:49 +000014276$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014277
Matthias Kloseb159a552010-04-25 21:00:44 +000014278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014279$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014280else
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14282$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014283
14284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14286
Matthias Kloseb9621712010-04-24 17:59:49 +000014287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14288$as_echo_n "checking for resize_term... " >&6; }
14289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014290/* end confdefs.h. */
14291#include <curses.h>
14292int
14293main ()
14294{
14295void *x=resize_term
14296 ;
14297 return 0;
14298}
14299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014300if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014301
Matthias Kloseb9621712010-04-24 17:59:49 +000014302$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014303
Matthias Kloseb159a552010-04-25 21:00:44 +000014304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014305$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014306else
Matthias Kloseb9621712010-04-24 17:59:49 +000014307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14308$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014309
14310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14312
Matthias Kloseb9621712010-04-24 17:59:49 +000014313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14314$as_echo_n "checking for resizeterm... " >&6; }
14315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014316/* end confdefs.h. */
14317#include <curses.h>
14318int
14319main ()
14320{
14321void *x=resizeterm
14322 ;
14323 return 0;
14324}
14325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014326if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014327
Matthias Kloseb9621712010-04-24 17:59:49 +000014328$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014329
Matthias Kloseb159a552010-04-25 21:00:44 +000014330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014331$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014332else
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14334$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014335
14336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14338
Matthias Kloseb9621712010-04-24 17:59:49 +000014339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14340$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000014341
14342if test -r /dev/ptmx
14343then
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14345$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014346
Matthias Kloseb9621712010-04-24 17:59:49 +000014347$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014348
Thomas Wouters89f507f2006-12-13 04:49:30 +000014349else
Matthias Kloseb9621712010-04-24 17:59:49 +000014350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14351$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014352fi
14353
Matthias Kloseb9621712010-04-24 17:59:49 +000014354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14355$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000014356
14357if test -r /dev/ptc
14358then
Matthias Kloseb9621712010-04-24 17:59:49 +000014359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14360$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000014361
Matthias Kloseb9621712010-04-24 17:59:49 +000014362$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014363
Thomas Wouters89f507f2006-12-13 04:49:30 +000014364else
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14366$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000014367fi
14368
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014369if test "$have_long_long" = yes
14370then
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14372$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014373 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014375else
Matthias Kloseb9621712010-04-24 17:59:49 +000014376 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014377 ac_cv_have_long_long_format="cross -- assuming no"
14378 if test x$GCC = xyes; then
14379 save_CFLAGS=$CFLAGS
14380 CFLAGS="$CFLAGS -Werror -Wformat"
14381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14382/* end confdefs.h. */
14383
14384 #include <stdio.h>
14385 #include <stddef.h>
14386
14387int
14388main ()
14389{
14390
14391 char *buffer;
14392 sprintf(buffer, "%lld", (long long)123);
14393 sprintf(buffer, "%lld", (long long)-123);
14394 sprintf(buffer, "%llu", (unsigned long long)123);
14395
14396 ;
14397 return 0;
14398}
14399_ACEOF
14400if ac_fn_c_try_compile "$LINENO"; then :
14401 ac_cv_have_long_long_format=yes
14402
14403fi
14404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14405 CFLAGS=$save_CFLAGS
14406 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014407else
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014409/* end confdefs.h. */
14410
14411 #include <stdio.h>
14412 #include <stddef.h>
14413 #include <string.h>
14414
14415 #ifdef HAVE_SYS_TYPES_H
14416 #include <sys/types.h>
14417 #endif
14418
14419 int main()
14420 {
14421 char buffer[256];
14422
14423 if (sprintf(buffer, "%lld", (long long)123) < 0)
14424 return 1;
14425 if (strcmp(buffer, "123"))
14426 return 1;
14427
14428 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14429 return 1;
14430 if (strcmp(buffer, "-123"))
14431 return 1;
14432
14433 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14434 return 1;
14435 if (strcmp(buffer, "123"))
14436 return 1;
14437
14438 return 0;
14439 }
14440
14441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014442if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014443 ac_cv_have_long_long_format=yes
14444else
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14448 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014449fi
14450
14451
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014452fi
14453
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14455$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014456fi
14457
Mark Dickinson89d7d412009-12-31 20:50:59 +000014458if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014459then
14460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014462
14463fi
14464
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014465if test $ac_sys_system = Darwin
14466then
14467 LIBS="$LIBS -framework CoreFoundation"
14468fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014469
Matthias Kloseb9621712010-04-24 17:59:49 +000014470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14471$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014472if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014474else
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014476 ac_cv_have_size_t_format="cross -- assuming yes"
14477
Thomas Wouters477c8d52006-05-27 19:21:47 +000014478else
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014480/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014481
Thomas Wouters477c8d52006-05-27 19:21:47 +000014482#include <stdio.h>
14483#include <stddef.h>
14484#include <string.h>
14485
Christian Heimes2c181612007-12-17 20:04:13 +000014486#ifdef HAVE_SYS_TYPES_H
14487#include <sys/types.h>
14488#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014489
14490#ifdef HAVE_SSIZE_T
14491typedef ssize_t Py_ssize_t;
14492#elif SIZEOF_VOID_P == SIZEOF_LONG
14493typedef long Py_ssize_t;
14494#else
14495typedef int Py_ssize_t;
14496#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014497
Christian Heimes2c181612007-12-17 20:04:13 +000014498int main()
14499{
14500 char buffer[256];
14501
Thomas Wouters477c8d52006-05-27 19:21:47 +000014502 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14503 return 1;
14504
Thomas Wouters89f507f2006-12-13 04:49:30 +000014505 if (strcmp(buffer, "123"))
14506 return 1;
14507
14508 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14509 return 1;
14510
14511 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014512 return 1;
14513
14514 return 0;
14515}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014516
Thomas Wouters477c8d52006-05-27 19:21:47 +000014517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014518if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014519 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014520else
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14524 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014525fi
14526
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14529$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014530if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014533
14534fi
14535
Matthias Kloseb9621712010-04-24 17:59:49 +000014536ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014537#ifdef HAVE_SYS_TYPES_H
14538#include <sys/types.h>
14539#endif
14540#ifdef HAVE_SYS_SOCKET_H
14541#include <sys/socket.h>
14542#endif
14543
Matthias Kloseb9621712010-04-24 17:59:49 +000014544"
Victor Stinnere0be4232011-10-25 13:06:09 +020014545if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014546
Martin v. Löwis11437992002-04-12 09:54:03 +000014547else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014548
Matthias Kloseb9621712010-04-24 17:59:49 +000014549$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014550
14551fi
14552
Michael W. Hudson54241132001-12-07 15:38:26 +000014553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14555$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014556if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014557 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014558else
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014560 ac_cv_broken_mbstowcs=no
14561else
Matthias Kloseb9621712010-04-24 17:59:49 +000014562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014563/* end confdefs.h. */
14564
14565#include<stdlib.h>
14566int main() {
14567 size_t len = -1;
14568 const char *str = "text";
14569 len = mbstowcs(NULL, str, 0);
14570 return (len != 4);
14571}
14572
14573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014574if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014575 ac_cv_broken_mbstowcs=no
14576else
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014579rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14580 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014581fi
14582
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014583fi
14584
Matthias Kloseb9621712010-04-24 17:59:49 +000014585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14586$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014587if test "$ac_cv_broken_mbstowcs" = yes
14588then
14589
Matthias Kloseb9621712010-04-24 17:59:49 +000014590$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014591
14592fi
14593
Antoine Pitroub52ec782009-01-25 16:34:23 +000014594# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14596$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014597
14598# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014599if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014600 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014601if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014602then
14603
Matthias Kloseb9621712010-04-24 17:59:49 +000014604$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014605
Matthias Kloseb9621712010-04-24 17:59:49 +000014606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14607$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014608fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014609if test "$withval" = no
14610then
14611
14612$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14613
Matthias Kloseb9621712010-04-24 17:59:49 +000014614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14615$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014616fi
14617
Antoine Pitrou042b1282010-08-13 21:15:58 +000014618else
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14620$as_echo "no value specified" >&6; }
14621fi
14622
Antoine Pitroub52ec782009-01-25 16:34:23 +000014623
Matthias Kloseb17289e2012-03-15 19:51:34 +010014624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14625$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14626if ${ac_cv_computed_gotos+:} false; then :
14627 $as_echo_n "(cached) " >&6
14628else
14629 if test "$cross_compiling" = yes; then :
14630 if test "${with_computed_gotos+set}" = set; then
14631 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14632 else
14633 ac_cv_computed_gotos=no
14634 fi
14635else
14636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14637/* end confdefs.h. */
14638
14639int main(int argc, char **argv)
14640{
14641 static void *targets[1] = { &&LABEL1 };
14642 goto LABEL2;
14643LABEL1:
14644 return 0;
14645LABEL2:
14646 goto *targets[0];
14647 return 1;
14648}
14649
14650_ACEOF
14651if ac_fn_c_try_run "$LINENO"; then :
14652 ac_cv_computed_gotos=yes
14653else
14654 ac_cv_computed_gotos=no
14655fi
14656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14657 conftest.$ac_objext conftest.beam conftest.$ac_ext
14658fi
14659
14660fi
14661
14662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14663$as_echo "$ac_cv_computed_gotos" >&6; }
14664case "$ac_cv_computed_gotos" in yes*)
14665
14666$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14667
14668esac
14669
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014670case $ac_sys_system in
14671AIX*)
14672
14673$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14674 ;;
14675esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014676
Michael W. Hudson54241132001-12-07 15:38:26 +000014677
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014678
14679
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014680for h in `(cd $srcdir;echo Python/thread_*.h)`
14681do
14682 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14683done
14684
Michael W. Hudson54241132001-12-07 15:38:26 +000014685
Neal Norwitzd24499d2005-12-18 21:36:39 +000014686SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14688$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014689for dir in $SRCDIRS; do
14690 if test ! -d $dir; then
14691 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014692 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014693done
Matthias Kloseb9621712010-04-24 17:59:49 +000014694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14695$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014696
Stefan Krah1919b7e2012-03-21 18:25:23 +010014697# Availability of -O2:
14698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14699$as_echo_n "checking for -O2... " >&6; }
14700saved_cflags="$CFLAGS"
14701CFLAGS="-O2"
14702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14703/* end confdefs.h. */
14704
14705int
14706main ()
14707{
14708
14709
14710 ;
14711 return 0;
14712}
14713_ACEOF
14714if ac_fn_c_try_compile "$LINENO"; then :
14715 have_O2=yes
14716else
14717 have_O2=no
14718fi
14719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14721$as_echo "$have_O2" >&6; }
14722CFLAGS="$saved_cflags"
14723
14724# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14725# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14727$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14728saved_cflags="$CFLAGS"
14729CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14730if test "$have_O2" = no; then
14731 CFLAGS=""
14732fi
14733if test "$cross_compiling" = yes; then :
14734 have_glibc_memmove_bug=undefined
14735else
14736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14737/* end confdefs.h. */
14738
14739#include <stdio.h>
14740#include <stdlib.h>
14741#include <string.h>
14742void foo(void *p, void *q) { memmove(p, q, 19); }
14743int main() {
14744 char a[32] = "123456789000000000";
14745 foo(&a[9], a);
14746 if (strcmp(a, "123456789123456789000000000") != 0)
14747 return 1;
14748 foo(a, &a[9]);
14749 if (strcmp(a, "123456789000000000") != 0)
14750 return 1;
14751 return 0;
14752}
14753
14754_ACEOF
14755if ac_fn_c_try_run "$LINENO"; then :
14756 have_glibc_memmove_bug=no
14757else
14758 have_glibc_memmove_bug=yes
14759fi
14760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14761 conftest.$ac_objext conftest.beam conftest.$ac_ext
14762fi
14763
14764CFLAGS="$saved_cflags"
14765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
14766$as_echo "$have_glibc_memmove_bug" >&6; }
14767if test "$have_glibc_memmove_bug" = yes; then
14768
14769$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
14770
14771fi
14772
14773if test "$have_gcc_asm_for_x87" = yes; then
14774 # Some versions of gcc miscompile inline asm:
14775 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
14776 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
14777 case $CC in
14778 *gcc*)
14779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
14780$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
14781 saved_cflags="$CFLAGS"
14782 CFLAGS="-O2"
14783 if test "$cross_compiling" = yes; then :
14784 have_ipa_pure_const_bug=undefined
14785else
14786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14787/* end confdefs.h. */
14788
14789 __attribute__((noinline)) int
14790 foo(int *p) {
14791 int r;
14792 asm ( "movl \$6, (%1)\n\t"
14793 "xorl %0, %0\n\t"
14794 : "=r" (r) : "r" (p) : "memory"
14795 );
14796 return r;
14797 }
14798 int main() {
14799 int p = 8;
14800 if ((foo(&p) ? : p) != 6)
14801 return 1;
14802 return 0;
14803 }
14804
14805_ACEOF
14806if ac_fn_c_try_run "$LINENO"; then :
14807 have_ipa_pure_const_bug=no
14808else
14809 have_ipa_pure_const_bug=yes
14810fi
14811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14812 conftest.$ac_objext conftest.beam conftest.$ac_ext
14813fi
14814
14815 CFLAGS="$saved_cflags"
14816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
14817$as_echo "$have_ipa_pure_const_bug" >&6; }
14818 if test "$have_ipa_pure_const_bug" = yes; then
14819
14820$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
14821
14822 fi
14823 ;;
14824 esac
14825fi
14826
Guido van Rossum627b2d71993-12-24 10:39:16 +000014827# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014828ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014829
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014830ac_config_files="$ac_config_files Modules/ld_so_aix"
14831
Martin v. Löwis11437992002-04-12 09:54:03 +000014832cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014833# This file is a shell script that caches the results of configure
14834# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014835# scripts and configure runs, see configure's option --config-cache.
14836# It is not useful on other systems. If it contains results you don't
14837# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014838#
Martin v. Löwis11437992002-04-12 09:54:03 +000014839# config.status only pays attention to the cache file if you give it
14840# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014841#
Skip Montanaro6dead952003-09-25 14:50:04 +000014842# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014843# loading this file, other *unset* `ac_cv_foo' will be assigned the
14844# following values.
14845
14846_ACEOF
14847
Guido van Rossumf78abae1997-01-21 22:02:36 +000014848# The following way of writing the cache mishandles newlines in values,
14849# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014850# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014851# Ultrix sh set writes to stderr and can't be redirected directly,
14852# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853(
14854 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14855 eval ac_val=\$$ac_var
14856 case $ac_val in #(
14857 *${as_nl}*)
14858 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14860$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861 esac
14862 case $ac_var in #(
14863 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014864 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14865 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866 esac ;;
14867 esac
14868 done
14869
Martin v. Löwis11437992002-04-12 09:54:03 +000014870 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14872 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014873 # `set' does not quote correctly, so add quotes: double-quote
14874 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014875 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014876 "s/'/'\\\\''/g;
14877 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014879 *)
14880 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014882 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883 esac |
14884 sort
14885) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014886 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014888 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14891 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14893 :end' >>confcache
14894if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14895 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014896 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14898$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020014899 if test ! -f "$cache_file" || test -h "$cache_file"; then
14900 cat confcache >"$cache_file"
14901 else
14902 case $cache_file in #(
14903 */* | ?:*)
14904 mv -f confcache "$cache_file"$$ &&
14905 mv -f "$cache_file"$$ "$cache_file" ;; #(
14906 *)
14907 mv -f confcache "$cache_file" ;;
14908 esac
14909 fi
14910 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014911 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014912 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14913$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014914 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014915fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014916rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014917
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014918test "x$prefix" = xNONE && prefix=$ac_default_prefix
14919# Let make expand exec_prefix.
14920test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014921
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014922DEFS=-DHAVE_CONFIG_H
14923
Skip Montanaro6dead952003-09-25 14:50:04 +000014924ac_libobjs=
14925ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014926U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014927for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14928 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14932 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14934 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014935done
14936LIBOBJS=$ac_libobjs
14937
14938LTLIBOBJS=$ac_ltlibobjs
14939
14940
Martin v. Löwis11437992002-04-12 09:54:03 +000014941
Matthias Kloseb9621712010-04-24 17:59:49 +000014942
Victor Stinnere0be4232011-10-25 13:06:09 +020014943: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014944ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014945ac_clean_files_save=$ac_clean_files
14946ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014947{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14948$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14949as_write_fail=0
14950cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014951#! $SHELL
14952# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014953# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014954# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014955# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014956
Martin v. Löwis11437992002-04-12 09:54:03 +000014957debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014958ac_cs_recheck=false
14959ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014960
Matthias Kloseb9621712010-04-24 17:59:49 +000014961SHELL=\${CONFIG_SHELL-$SHELL}
14962export SHELL
14963_ASEOF
14964cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14965## -------------------- ##
14966## M4sh Initialization. ##
14967## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969# Be more Bourne compatible
14970DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014971if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 emulate sh
14973 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014975 # is contrary to our usage. Disable this feature.
14976 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014978else
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 case `(set -o) 2>/dev/null` in #(
14980 *posix*) :
14981 set -o posix ;; #(
14982 *) :
14983 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014985fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014986
14987
Matthias Kloseb9621712010-04-24 17:59:49 +000014988as_nl='
14989'
14990export as_nl
14991# Printing a long string crashes Solaris 7 /usr/bin/printf.
14992as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14993as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14994as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14995# Prefer a ksh shell builtin over an external printf program on Solaris,
14996# but without wasting forks for bash or zsh.
14997if test -z "$BASH_VERSION$ZSH_VERSION" \
14998 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14999 as_echo='print -r --'
15000 as_echo_n='print -rn --'
15001elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15002 as_echo='printf %s\n'
15003 as_echo_n='printf %s'
15004else
15005 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15006 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15007 as_echo_n='/usr/ucb/echo -n'
15008 else
15009 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15010 as_echo_n_body='eval
15011 arg=$1;
15012 case $arg in #(
15013 *"$as_nl"*)
15014 expr "X$arg" : "X\\(.*\\)$as_nl";
15015 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15016 esac;
15017 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15018 '
15019 export as_echo_n_body
15020 as_echo_n='sh -c $as_echo_n_body as_echo'
15021 fi
15022 export as_echo_body
15023 as_echo='sh -c $as_echo_body as_echo'
15024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015025
15026# The user is always right.
15027if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 PATH_SEPARATOR=:
15029 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15030 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15031 PATH_SEPARATOR=';'
15032 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035
15036# IFS
15037# We need space, tab and new line, in precisely that order. Quoting is
15038# there to prevent editors from complaining about space-tab.
15039# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15040# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015041IFS=" "" $as_nl"
15042
15043# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015044as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015045case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046 *[\\/]* ) as_myself=$0 ;;
15047 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015048for as_dir in $PATH
15049do
15050 IFS=$as_save_IFS
15051 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015052 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15053 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056 ;;
15057esac
15058# We did not find ourselves, most probably we were run as `sh COMMAND'
15059# in which case we are not to be found in the path.
15060if test "x$as_myself" = x; then
15061 as_myself=$0
15062fi
15063if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015064 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15065 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015066fi
15067
Matthias Kloseb9621712010-04-24 17:59:49 +000015068# Unset variables that we do not need and which cause bugs (e.g. in
15069# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15070# suppresses any "Segmentation fault" message there. '((' could
15071# trigger a bug in pdksh 5.2.14.
15072for as_var in BASH_ENV ENV MAIL MAILPATH
15073do eval test x\${$as_var+set} = xset \
15074 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075done
15076PS1='$ '
15077PS2='> '
15078PS4='+ '
15079
15080# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015081LC_ALL=C
15082export LC_ALL
15083LANGUAGE=C
15084export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085
Matthias Kloseb9621712010-04-24 17:59:49 +000015086# CDPATH.
15087(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15088
15089
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015090# as_fn_error STATUS ERROR [LINENO LOG_FD]
15091# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015092# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15093# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015094# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015095as_fn_error ()
15096{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015097 as_status=$1; test $as_status -eq 0 && as_status=1
15098 if test "$4"; then
15099 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15100 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015102 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015103 as_fn_exit $as_status
15104} # as_fn_error
15105
15106
15107# as_fn_set_status STATUS
15108# -----------------------
15109# Set $? to STATUS, without forking.
15110as_fn_set_status ()
15111{
15112 return $1
15113} # as_fn_set_status
15114
15115# as_fn_exit STATUS
15116# -----------------
15117# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15118as_fn_exit ()
15119{
15120 set +e
15121 as_fn_set_status $1
15122 exit $1
15123} # as_fn_exit
15124
15125# as_fn_unset VAR
15126# ---------------
15127# Portably unset VAR.
15128as_fn_unset ()
15129{
15130 { eval $1=; unset $1;}
15131}
15132as_unset=as_fn_unset
15133# as_fn_append VAR VALUE
15134# ----------------------
15135# Append the text in VALUE to the end of the definition contained in VAR. Take
15136# advantage of any shell optimizations that allow amortized linear growth over
15137# repeated appends, instead of the typical quadratic growth present in naive
15138# implementations.
15139if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15140 eval 'as_fn_append ()
15141 {
15142 eval $1+=\$2
15143 }'
15144else
15145 as_fn_append ()
15146 {
15147 eval $1=\$$1\$2
15148 }
15149fi # as_fn_append
15150
15151# as_fn_arith ARG...
15152# ------------------
15153# Perform arithmetic evaluation on the ARGs, and store the result in the
15154# global $as_val. Take advantage of shells that can avoid forks. The arguments
15155# must be portable across $(()) and expr.
15156if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15157 eval 'as_fn_arith ()
15158 {
15159 as_val=$(( $* ))
15160 }'
15161else
15162 as_fn_arith ()
15163 {
15164 as_val=`expr "$@" || test $? -eq 1`
15165 }
15166fi # as_fn_arith
15167
15168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015169if expr a : '\(a\)' >/dev/null 2>&1 &&
15170 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15171 as_expr=expr
15172else
15173 as_expr=false
15174fi
15175
15176if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15177 as_basename=basename
15178else
15179 as_basename=false
15180fi
15181
Matthias Kloseb9621712010-04-24 17:59:49 +000015182if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15183 as_dirname=dirname
15184else
15185 as_dirname=false
15186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188as_me=`$as_basename -- "$0" ||
15189$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15190 X"$0" : 'X\(//\)$' \| \
15191 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015192$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193 sed '/^.*\/\([^/][^/]*\)\/*$/{
15194 s//\1/
15195 q
15196 }
15197 /^X\/\(\/\/\)$/{
15198 s//\1/
15199 q
15200 }
15201 /^X\/\(\/\).*/{
15202 s//\1/
15203 q
15204 }
15205 s/.*/./; q'`
15206
Matthias Kloseb9621712010-04-24 17:59:49 +000015207# Avoid depending upon Character Ranges.
15208as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15209as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15210as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15211as_cr_digits='0123456789'
15212as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015213
15214ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015215case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015216-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015219 xy) ECHO_C='\c';;
15220 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15221 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222 esac;;
15223*)
15224 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015226
Martin v. Löwis11437992002-04-12 09:54:03 +000015227rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228if test -d conf$$.dir; then
15229 rm -f conf$$.dir/conf$$.file
15230else
15231 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015234if (echo >conf$$.file) 2>/dev/null; then
15235 if ln -s conf$$.file conf$$ 2>/dev/null; then
15236 as_ln_s='ln -s'
15237 # ... but there are two gotchas:
15238 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15239 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015240 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015241 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015242 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015243 elif ln conf$$.file conf$$ 2>/dev/null; then
15244 as_ln_s=ln
15245 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015246 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015247 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015248else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015249 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000015250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015251rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15252rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015253
Matthias Kloseb9621712010-04-24 17:59:49 +000015254
15255# as_fn_mkdir_p
15256# -------------
15257# Create "$as_dir" as a directory, including parents if necessary.
15258as_fn_mkdir_p ()
15259{
15260
15261 case $as_dir in #(
15262 -*) as_dir=./$as_dir;;
15263 esac
15264 test -d "$as_dir" || eval $as_mkdir_p || {
15265 as_dirs=
15266 while :; do
15267 case $as_dir in #(
15268 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15269 *) as_qdir=$as_dir;;
15270 esac
15271 as_dirs="'$as_qdir' $as_dirs"
15272 as_dir=`$as_dirname -- "$as_dir" ||
15273$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15274 X"$as_dir" : 'X\(//\)[^/]' \| \
15275 X"$as_dir" : 'X\(//\)$' \| \
15276 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15277$as_echo X"$as_dir" |
15278 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15279 s//\1/
15280 q
15281 }
15282 /^X\(\/\/\)[^/].*/{
15283 s//\1/
15284 q
15285 }
15286 /^X\(\/\/\)$/{
15287 s//\1/
15288 q
15289 }
15290 /^X\(\/\).*/{
15291 s//\1/
15292 q
15293 }
15294 s/.*/./; q'`
15295 test -d "$as_dir" && break
15296 done
15297 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015298 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015299
15300
15301} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015302if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015303 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015304else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015305 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015306 as_mkdir_p=false
15307fi
15308
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015309if test -x / >/dev/null 2>&1; then
15310 as_test_x='test -x'
15311else
15312 if ls -dL / >/dev/null 2>&1; then
15313 as_ls_L_option=L
15314 else
15315 as_ls_L_option=
15316 fi
15317 as_test_x='
15318 eval sh -c '\''
15319 if test -d "$1"; then
15320 test -d "$1/.";
15321 else
15322 case $1 in #(
15323 -*)set "./$1";;
15324 esac;
15325 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15326 ???[sx]*):;;*)false;;esac;fi
15327 '\'' sh
15328 '
15329fi
15330as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000015331
15332# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015333as_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 +000015334
15335# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015336as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015337
15338
Martin v. Löwis11437992002-04-12 09:54:03 +000015339exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015340## ----------------------------------- ##
15341## Main body of $CONFIG_STATUS script. ##
15342## ----------------------------------- ##
15343_ASEOF
15344test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015345
Matthias Kloseb9621712010-04-24 17:59:49 +000015346cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15347# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015348# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349# values after options handling.
15350ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015351This file was extended by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015352generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015353
15354 CONFIG_FILES = $CONFIG_FILES
15355 CONFIG_HEADERS = $CONFIG_HEADERS
15356 CONFIG_LINKS = $CONFIG_LINKS
15357 CONFIG_COMMANDS = $CONFIG_COMMANDS
15358 $ $0 $@
15359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015360on `(hostname || uname -n) 2>/dev/null | sed 1q`
15361"
15362
Martin v. Löwis11437992002-04-12 09:54:03 +000015363_ACEOF
15364
Matthias Kloseb9621712010-04-24 17:59:49 +000015365case $ac_config_files in *"
15366"*) set x $ac_config_files; shift; ac_config_files=$*;;
15367esac
15368
15369case $ac_config_headers in *"
15370"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15371esac
15372
15373
15374cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015375# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015376config_files="$ac_config_files"
15377config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015379_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015380
Matthias Kloseb9621712010-04-24 17:59:49 +000015381cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015382ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015383\`$as_me' instantiates files and other configuration actions
15384from templates according to the current configuration. Unless the files
15385and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015386
Matthias Kloseb9621712010-04-24 17:59:49 +000015387Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015388
15389 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015391 --config print configuration, then exit
15392 -q, --quiet, --silent
15393 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015394 -d, --debug don't remove temporary files
15395 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015396 --file=FILE[:TEMPLATE]
15397 instantiate the configuration file FILE
15398 --header=FILE[:TEMPLATE]
15399 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015400
15401Configuration files:
15402$config_files
15403
15404Configuration headers:
15405$config_headers
15406
Matthias Kloseb9621712010-04-24 17:59:49 +000015407Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015410cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15411ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015412ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015413python config.status 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015414configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000015415 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015416
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015417Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015418This config.status script is free software; the Free Software Foundation
15419gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015420
15421ac_pwd='$ac_pwd'
15422srcdir='$srcdir'
15423INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015424MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015425test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015426_ACEOF
15427
Matthias Kloseb9621712010-04-24 17:59:49 +000015428cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15429# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015430ac_need_defaults=:
15431while test $# != 0
15432do
15433 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015434 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15436 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015437 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015438 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015439 --*=)
15440 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15441 ac_optarg=
15442 ac_shift=:
15443 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015444 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015445 ac_option=$1
15446 ac_optarg=$2
15447 ac_shift=shift
15448 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015449 esac
15450
Skip Montanaro6dead952003-09-25 14:50:04 +000015451 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015452 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015453 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15454 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015455 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015456 $as_echo "$ac_cs_version"; exit ;;
15457 --config | --confi | --conf | --con | --co | --c )
15458 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015459 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015460 debug=: ;;
15461 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015462 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015463 case $ac_optarg in
15464 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015465 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015466 esac
15467 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015468 ac_need_defaults=false;;
15469 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015470 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015471 case $ac_optarg in
15472 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15473 esac
15474 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476 --he | --h)
15477 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015478 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015479Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015481 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015482 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15483 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15484 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015485
15486 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015487 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015488Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015489
Matthias Kloseb9621712010-04-24 17:59:49 +000015490 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015491 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015492
15493 esac
15494 shift
15495done
15496
Skip Montanaro6dead952003-09-25 14:50:04 +000015497ac_configure_extra_args=
15498
15499if $ac_cs_silent; then
15500 exec 6>/dev/null
15501 ac_configure_extra_args="$ac_configure_extra_args --silent"
15502fi
15503
15504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015505cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015506if \$ac_cs_recheck; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015507 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015508 shift
15509 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15510 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015511 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015512 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015513fi
15514
Martin v. Löwis11437992002-04-12 09:54:03 +000015515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015517exec 5>>config.log
15518{
15519 echo
15520 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15521## Running $as_me. ##
15522_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015523 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015524} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015527cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015528_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015529
Matthias Kloseb9621712010-04-24 17:59:49 +000015530cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015531
15532# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015533for ac_config_target in $ac_config_targets
15534do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535 case $ac_config_target in
15536 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15537 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15538 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015539 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15540 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015541 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15542 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015543 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015544 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015545
Victor Stinnere0be4232011-10-25 13:06:09 +020015546 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015547 esac
15548done
15549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015550
Martin v. Löwis11437992002-04-12 09:54:03 +000015551# If the user did not use the arguments to specify the items to instantiate,
15552# then the envvar interface is used. Set only those that are not.
15553# We use the long form for the default assignment because of an extremely
15554# bizarre bug on SunOS 4.1.3.
15555if $ac_need_defaults; then
15556 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15557 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15558fi
15559
Skip Montanaro6dead952003-09-25 14:50:04 +000015560# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015561# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015562# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563# Hook for its removal unless debugging.
15564# Note that there is a small window in which the directory will not be cleaned:
15565# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015566$debug ||
15567{
Victor Stinnere0be4232011-10-25 13:06:09 +020015568 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015570 : "${ac_tmp:=$tmp}"
15571 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015572' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015573 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015574}
Martin v. Löwis11437992002-04-12 09:54:03 +000015575# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015576
Martin v. Löwis11437992002-04-12 09:54:03 +000015577{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015578 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015579 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015580} ||
15581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015582 tmp=./conf$$-$RANDOM
15583 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015584} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015585ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015586
Matthias Kloseb9621712010-04-24 17:59:49 +000015587# Set up the scripts for CONFIG_FILES section.
15588# No need to generate them if there are no CONFIG_FILES.
15589# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015590if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015591
Matthias Kloseb9621712010-04-24 17:59:49 +000015592
15593ac_cr=`echo X | tr X '\015'`
15594# On cygwin, bash can eat \r inside `` if the user requested igncr.
15595# But we know of no other shell where ac_cr would be empty at this
15596# point, so we can use a bashism as a fallback.
15597if test "x$ac_cr" = x; then
15598 eval ac_cr=\$\'\\r\'
15599fi
15600ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15601if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015602 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015603else
15604 ac_cs_awk_cr=$ac_cr
15605fi
15606
Victor Stinnere0be4232011-10-25 13:06:09 +020015607echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015608_ACEOF
15609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015610
Matthias Kloseb9621712010-04-24 17:59:49 +000015611{
15612 echo "cat >conf$$subs.awk <<_ACEOF" &&
15613 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15614 echo "_ACEOF"
15615} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015616 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15617ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015618ac_delim='%!_!# '
15619for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015620 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015621 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015622
Matthias Kloseb9621712010-04-24 17:59:49 +000015623 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15624 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625 break
15626 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015627 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015628 else
15629 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015631done
Matthias Kloseb9621712010-04-24 17:59:49 +000015632rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633
Matthias Kloseb9621712010-04-24 17:59:49 +000015634cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015635cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015637sed -n '
15638h
15639s/^/S["/; s/!.*/"]=/
15640p
15641g
15642s/^[^!]*!//
15643:repl
15644t repl
15645s/'"$ac_delim"'$//
15646t delim
15647:nl
15648h
15649s/\(.\{148\}\)..*/\1/
15650t more1
15651s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15652p
15653n
15654b repl
15655:more1
15656s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15657p
15658g
15659s/.\{148\}//
15660t nl
15661:delim
15662h
15663s/\(.\{148\}\)..*/\1/
15664t more2
15665s/["\\]/\\&/g; s/^/"/; s/$/"/
15666p
15667b
15668:more2
15669s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15670p
15671g
15672s/.\{148\}//
15673t delim
15674' <conf$$subs.awk | sed '
15675/^[^""]/{
15676 N
15677 s/\n//
15678}
15679' >>$CONFIG_STATUS || ac_write_fail=1
15680rm -f conf$$subs.awk
15681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15682_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015683cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015684 for (key in S) S_is_set[key] = 1
15685 FS = ""
15686
15687}
15688{
15689 line = $ 0
15690 nfields = split(line, field, "@")
15691 substed = 0
15692 len = length(field[1])
15693 for (i = 2; i < nfields; i++) {
15694 key = field[i]
15695 keylen = length(key)
15696 if (S_is_set[key]) {
15697 value = S[key]
15698 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15699 len += length(value) + length(field[++i])
15700 substed = 1
15701 } else
15702 len += 1 + keylen
15703 }
15704
15705 print line
15706}
15707
15708_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015710cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15711if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15712 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15713else
15714 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015715fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015716 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015717_ACEOF
15718
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015719# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15720# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015721# trailing colons and then remove the whole line if VPATH becomes empty
15722# (actually we leave an empty line to preserve line numbers).
15723if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015724 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15725h
15726s///
15727s/^/:/
15728s/[ ]*$/:/
15729s/:\$(srcdir):/:/g
15730s/:\${srcdir}:/:/g
15731s/:@srcdir@:/:/g
15732s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015733s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015734x
15735s/\(=[ ]*\).*/\1/
15736G
15737s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738s/^[^=]*=[ ]*$//
15739}'
15740fi
15741
Matthias Kloseb9621712010-04-24 17:59:49 +000015742cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015743fi # test -n "$CONFIG_FILES"
15744
Matthias Kloseb9621712010-04-24 17:59:49 +000015745# Set up the scripts for CONFIG_HEADERS section.
15746# No need to generate them if there are no CONFIG_HEADERS.
15747# This happens for instance with `./config.status Makefile'.
15748if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015749cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015750BEGIN {
15751_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752
Matthias Kloseb9621712010-04-24 17:59:49 +000015753# Transform confdefs.h into an awk script `defines.awk', embedded as
15754# here-document in config.status, that substitutes the proper values into
15755# config.h.in to produce config.h.
15756
15757# Create a delimiter string that does not exist in confdefs.h, to ease
15758# handling of long lines.
15759ac_delim='%!_!# '
15760for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015761 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15762 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 break
15764 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015765 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015766 else
15767 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15768 fi
15769done
15770
15771# For the awk script, D is an array of macro values keyed by name,
15772# likewise P contains macro parameters if any. Preserve backslash
15773# newline sequences.
15774
15775ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15776sed -n '
15777s/.\{148\}/&'"$ac_delim"'/g
15778t rset
15779:rset
15780s/^[ ]*#[ ]*define[ ][ ]*/ /
15781t def
15782d
15783:def
15784s/\\$//
15785t bsnl
15786s/["\\]/\\&/g
15787s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15788D["\1"]=" \3"/p
15789s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15790d
15791:bsnl
15792s/["\\]/\\&/g
15793s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15794D["\1"]=" \3\\\\\\n"\\/p
15795t cont
15796s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15797t cont
15798d
15799:cont
15800n
15801s/.\{148\}/&'"$ac_delim"'/g
15802t clear
15803:clear
15804s/\\$//
15805t bsnlc
15806s/["\\]/\\&/g; s/^/"/; s/$/"/p
15807d
15808:bsnlc
15809s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15810b cont
15811' <confdefs.h | sed '
15812s/'"$ac_delim"'/"\\\
15813"/g' >>$CONFIG_STATUS || ac_write_fail=1
15814
15815cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15816 for (key in D) D_is_set[key] = 1
15817 FS = ""
15818}
15819/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15820 line = \$ 0
15821 split(line, arg, " ")
15822 if (arg[1] == "#") {
15823 defundef = arg[2]
15824 mac1 = arg[3]
15825 } else {
15826 defundef = substr(arg[1], 2)
15827 mac1 = arg[2]
15828 }
15829 split(mac1, mac2, "(") #)
15830 macro = mac2[1]
15831 prefix = substr(line, 1, index(line, defundef) - 1)
15832 if (D_is_set[macro]) {
15833 # Preserve the white space surrounding the "#".
15834 print prefix "define", macro P[macro] D[macro]
15835 next
15836 } else {
15837 # Replace #undef with comments. This is necessary, for example,
15838 # in the case of _POSIX_SOURCE, which is predefined and required
15839 # on some systems where configure will not decide to define it.
15840 if (defundef == "undef") {
15841 print "/*", prefix defundef, macro, "*/"
15842 next
15843 }
15844 }
15845}
15846{ print }
15847_ACAWK
15848_ACEOF
15849cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015850 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015851fi # test -n "$CONFIG_HEADERS"
15852
15853
15854eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15855shift
15856for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015857do
15858 case $ac_tag in
15859 :[FHLC]) ac_mode=$ac_tag; continue;;
15860 esac
15861 case $ac_mode$ac_tag in
15862 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015863 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864 :[FH]-) ac_tag=-:-;;
15865 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15866 esac
15867 ac_save_IFS=$IFS
15868 IFS=:
15869 set x $ac_tag
15870 IFS=$ac_save_IFS
15871 shift
15872 ac_file=$1
15873 shift
15874
15875 case $ac_mode in
15876 :L) ac_source=$1;;
15877 :[FH])
15878 ac_file_inputs=
15879 for ac_f
15880 do
15881 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015882 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015883 *) # Look for the file first in the build tree, then in the source tree
15884 # (if the path is not absolute). The absolute path cannot be DOS-style,
15885 # because $ac_f cannot contain `:'.
15886 test -f "$ac_f" ||
15887 case $ac_f in
15888 [\\/$]*) false;;
15889 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15890 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020015891 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015892 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015893 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15894 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015895 done
15896
15897 # Let's still pretend it is `configure' which instantiates (i.e., don't
15898 # use $as_me), people would be surprised to read:
15899 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015900 configure_input='Generated from '`
15901 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15902 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015903 if test x"$ac_file" != x-; then
15904 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015905 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15906$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015907 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015908 # Neutralize special characters interpreted by sed in replacement strings.
15909 case $configure_input in #(
15910 *\&* | *\|* | *\\* )
15911 ac_sed_conf_input=`$as_echo "$configure_input" |
15912 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15913 *) ac_sed_conf_input=$configure_input;;
15914 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915
15916 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020015917 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15918 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015919 esac
15920 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015921 esac
15922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015924$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015925 X"$ac_file" : 'X\(//\)[^/]' \| \
15926 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015928$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015929 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15930 s//\1/
15931 q
15932 }
15933 /^X\(\/\/\)[^/].*/{
15934 s//\1/
15935 q
15936 }
15937 /^X\(\/\/\)$/{
15938 s//\1/
15939 q
15940 }
15941 /^X\(\/\).*/{
15942 s//\1/
15943 q
15944 }
15945 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015946 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015947 ac_builddir=.
15948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015949case "$ac_dir" in
15950.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15951*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015952 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015953 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015954 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015955 case $ac_top_builddir_sub in
15956 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15957 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15958 esac ;;
15959esac
15960ac_abs_top_builddir=$ac_pwd
15961ac_abs_builddir=$ac_pwd$ac_dir_suffix
15962# for backward compatibility:
15963ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015964
15965case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015966 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015967 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015968 ac_top_srcdir=$ac_top_builddir_sub
15969 ac_abs_top_srcdir=$ac_pwd ;;
15970 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015972 ac_top_srcdir=$srcdir
15973 ac_abs_top_srcdir=$srcdir ;;
15974 *) # Relative name.
15975 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15976 ac_top_srcdir=$ac_top_build_prefix$srcdir
15977 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015978esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015979ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015980
Martin v. Löwis11437992002-04-12 09:54:03 +000015981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015982 case $ac_mode in
15983 :F)
15984 #
15985 # CONFIG_FILE
15986 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015987
15988 case $INSTALL in
15989 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015990 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015991 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010015992 ac_MKDIR_P=$MKDIR_P
15993 case $MKDIR_P in
15994 [\\/$]* | ?:[\\/]* ) ;;
15995 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15996 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015997_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015998
Matthias Kloseb9621712010-04-24 17:59:49 +000015999cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016000# If the template does not know about datarootdir, expand it.
16001# FIXME: This hack should be removed a few years after 2.60.
16002ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016003ac_sed_dataroot='
16004/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016005 p
16006 q
16007}
16008/@datadir@/p
16009/@docdir@/p
16010/@infodir@/p
16011/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016012/@mandir@/p'
16013case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016014*datarootdir*) ac_datarootdir_seen=yes;;
16015*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016016 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16017$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016019cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020 ac_datarootdir_hack='
16021 s&@datadir@&$datadir&g
16022 s&@docdir@&$docdir&g
16023 s&@infodir@&$infodir&g
16024 s&@localedir@&$localedir&g
16025 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016026 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016027esac
16028_ACEOF
16029
16030# Neutralize VPATH when `$srcdir' = `.'.
16031# Shell code in configure.ac might set extrasub.
16032# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016033cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16034ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016035$extrasub
16036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016038:t
16039/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016040s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016041s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016042s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016043s&@srcdir@&$ac_srcdir&;t t
16044s&@abs_srcdir@&$ac_abs_srcdir&;t t
16045s&@top_srcdir@&$ac_top_srcdir&;t t
16046s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16047s&@builddir@&$ac_builddir&;t t
16048s&@abs_builddir@&$ac_abs_builddir&;t t
16049s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16050s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016051s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016052$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016053"
Victor Stinnere0be4232011-10-25 13:06:09 +020016054eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16055 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016057test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016058 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16059 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16060 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016061 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016062which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016063$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016064which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016065
Victor Stinnere0be4232011-10-25 13:06:09 +020016066 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016067 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016068 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16069 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016070 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016071 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016072 ;;
16073 :H)
16074 #
16075 # CONFIG_HEADER
16076 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016077 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016078 {
16079 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016080 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16081 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016082 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016083 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016084 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16085$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016086 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016087 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016088 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016089 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016090 fi
16091 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016092 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016093 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016094 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016095 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016096 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016098
16099 esac
16100
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016101
16102 case $ac_file$ac_mode in
16103 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16104
16105 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016106done # for ac_tag
16107
Guido van Rossum627b2d71993-12-24 10:39:16 +000016108
Matthias Kloseb9621712010-04-24 17:59:49 +000016109as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016110_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016111ac_clean_files=$ac_clean_files_save
16112
Matthias Kloseb9621712010-04-24 17:59:49 +000016113test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016114 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016115
Martin v. Löwis11437992002-04-12 09:54:03 +000016116
16117# configure is writing to config.log, and then calls config.status.
16118# config.status does its own redirection, appending to config.log.
16119# Unfortunately, on DOS this fails, as config.log is still kept open
16120# by configure, so config.status won't be able to write to it; its
16121# output is simply discarded. So we exec the FD to /dev/null,
16122# effectively closing config.log, so it can be properly (re)opened and
16123# appended to by config.status. When coming back to configure, we
16124# need to make the FD available again.
16125if test "$no_create" != yes; then
16126 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016127 ac_config_status_args=
16128 test "$silent" = yes &&
16129 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016130 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016131 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016132 exec 5>>config.log
16133 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16134 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016135 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016136fi
16137if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16138 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16139$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016140fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016141
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016142
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016143echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016144if test ! -f Modules/Setup
16145then
16146 cp $srcdir/Modules/Setup.dist Modules/Setup
16147fi
16148
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016149echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016150if test ! -f Modules/Setup.local
16151then
16152 echo "# Edit this file for local setup changes" >Modules/Setup.local
16153fi
16154
16155echo "creating Makefile"
16156$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16157 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016158 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016159mv config.c Modules