blob: 72c33e5192e4f0c339bfd3cee897d3ebe8de8e3e [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";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003214 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 :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427 enableval=$enable_profiling; ac_save_cc="$CC"
5428 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005429 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005430 ac_enable_profiling="no"
5431else
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005433/* end confdefs.h. */
5434int main() { return 0; }
5435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005436if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005437 ac_enable_profiling="yes"
5438else
Matthias Kloseb9621712010-04-24 17:59:49 +00005439 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5442 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443fi
5444
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005445 CC="$ac_save_cc"
5446fi
5447
Matthias Kloseb9621712010-04-24 17:59:49 +00005448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
5449$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
5451case "$ac_enable_profiling" in
5452 "yes")
5453 BASECFLAGS="-pg $BASECFLAGS"
5454 LDFLAGS="-pg $LDFLAGS"
5455 ;;
5456esac
5457
Matthias Kloseb9621712010-04-24 17:59:49 +00005458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5459$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460
5461# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5462# library that we build, but we do not want to link against it (we
5463# will find it with a -framework option). For this reason there is an
5464# extra variable BLDLIBRARY against which Python and the extension
5465# modules are linked, BLDLIBRARY. This is normally the same as
5466# LDLIBRARY, but empty for MacOSX framework builds.
5467if test "$enable_framework"
5468then
5469 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5470 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5471 BLDLIBRARY=''
5472else
5473 BLDLIBRARY='$(LDLIBRARY)'
5474fi
5475
5476# Other platforms follow
5477if test $enable_shared = "yes"; then
5478
Matthias Kloseb9621712010-04-24 17:59:49 +00005479$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480
5481 case $ac_sys_system in
5482 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005483 LDLIBRARY='libpython$(LDVERSION).dll.a'
5484 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485 ;;
5486 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005487 LDLIBRARY='libpython$(LDVERSION).so'
5488 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5490 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005491 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005492 then
5493 PY3LIBRARY=libpython3.so
5494 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005496 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005497 LDLIBRARY='libpython$(LDVERSION).so'
5498 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5500 case $ac_sys_system in
5501 FreeBSD*)
5502 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5503 ;;
5504 esac
5505 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005506 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005507 then
5508 PY3LIBRARY=libpython3.so
5509 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510 ;;
5511 hp*|HP*)
5512 case `uname -m` in
5513 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005514 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005515 ;;
5516 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005517 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518 ;;
5519 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005520 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005521 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5522 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005523 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005524 LDLIBRARY='libpython$(LDVERSION).dylib'
5525 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5527 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005528 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005529 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005530 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5531 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532
5533 esac
5534else # shared is disabled
5535 case $ac_sys_system in
5536 CYGWIN*)
5537 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005538 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539 ;;
5540 esac
5541fi
5542
Matthias Kloseb9621712010-04-24 17:59:49 +00005543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5544$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545
5546if test -n "$ac_tool_prefix"; then
5547 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5548set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5550$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005551if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005552 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553else
5554 if test -n "$RANLIB"; then
5555 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5556else
5557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5558for as_dir in $PATH
5559do
5560 IFS=$as_save_IFS
5561 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005562 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005563 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 +00005564 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566 break 2
5567 fi
5568done
Matthias Kloseb9621712010-04-24 17:59:49 +00005569 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570IFS=$as_save_IFS
5571
5572fi
5573fi
5574RANLIB=$ac_cv_prog_RANLIB
5575if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5577$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578else
Matthias Kloseb9621712010-04-24 17:59:49 +00005579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5580$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581fi
5582
5583
5584fi
5585if test -z "$ac_cv_prog_RANLIB"; then
5586 ac_ct_RANLIB=$RANLIB
5587 # Extract the first word of "ranlib", so it can be a program name with args.
5588set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5590$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005591if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005592 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593else
5594 if test -n "$ac_ct_RANLIB"; then
5595 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5596else
5597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5598for as_dir in $PATH
5599do
5600 IFS=$as_save_IFS
5601 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005602 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005603 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 +00005604 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005605 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606 break 2
5607 fi
5608done
Matthias Kloseb9621712010-04-24 17:59:49 +00005609 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610IFS=$as_save_IFS
5611
5612fi
5613fi
5614ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5615if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5617$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618else
Matthias Kloseb9621712010-04-24 17:59:49 +00005619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5620$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621fi
5622
5623 if test "x$ac_ct_RANLIB" = x; then
5624 RANLIB=":"
5625 else
5626 case $cross_compiling:$ac_tool_warned in
5627yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005628{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5629$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630ac_tool_warned=yes ;;
5631esac
5632 RANLIB=$ac_ct_RANLIB
5633 fi
5634else
5635 RANLIB="$ac_cv_prog_RANLIB"
5636fi
5637
5638
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005639if test -n "$ac_tool_prefix"; then
5640 for ac_prog in ar aal
5641 do
5642 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5643set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5645$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005646if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005647 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648else
5649 if test -n "$AR"; then
5650 ac_cv_prog_AR="$AR" # Let the user override the test.
5651else
5652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5653for as_dir in $PATH
5654do
5655 IFS=$as_save_IFS
5656 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005658 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5659 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 break 2
5662 fi
5663done
Matthias Kloseb9621712010-04-24 17:59:49 +00005664 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665IFS=$as_save_IFS
5666
5667fi
5668fi
5669AR=$ac_cv_prog_AR
5670if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5672$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673else
Matthias Kloseb9621712010-04-24 17:59:49 +00005674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5675$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676fi
5677
5678
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005679 test -n "$AR" && break
5680 done
5681fi
5682if test -z "$AR"; then
5683 ac_ct_AR=$AR
5684 for ac_prog in ar aal
5685do
5686 # Extract the first word of "$ac_prog", so it can be a program name with args.
5687set dummy $ac_prog; ac_word=$2
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5689$as_echo_n "checking for $ac_word... " >&6; }
5690if ${ac_cv_prog_ac_ct_AR+:} false; then :
5691 $as_echo_n "(cached) " >&6
5692else
5693 if test -n "$ac_ct_AR"; then
5694 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5695else
5696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5697for as_dir in $PATH
5698do
5699 IFS=$as_save_IFS
5700 test -z "$as_dir" && as_dir=.
5701 for ac_exec_ext in '' $ac_executable_extensions; do
5702 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5703 ac_cv_prog_ac_ct_AR="$ac_prog"
5704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5705 break 2
5706 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005708 done
5709IFS=$as_save_IFS
5710
5711fi
5712fi
5713ac_ct_AR=$ac_cv_prog_ac_ct_AR
5714if test -n "$ac_ct_AR"; then
5715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5716$as_echo "$ac_ct_AR" >&6; }
5717else
5718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5719$as_echo "no" >&6; }
5720fi
5721
5722
5723 test -n "$ac_ct_AR" && break
5724done
5725
5726 if test "x$ac_ct_AR" = x; then
5727 AR="ar"
5728 else
5729 case $cross_compiling:$ac_tool_warned in
5730yes:)
5731{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5732$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5733ac_tool_warned=yes ;;
5734esac
5735 AR=$ac_ct_AR
5736 fi
5737fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
5739
5740# tweak ARFLAGS only if the user didn't set it on the command line
5741
5742if test -z "$ARFLAGS"
5743then
5744 ARFLAGS="rc"
5745fi
5746
5747
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005748DISABLE_ASDLGEN=""
5749# Extract the first word of "python", so it can be a program name with args.
5750set dummy python; ac_word=$2
5751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5752$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005753if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005754 $as_echo_n "(cached) " >&6
5755else
5756 if test -n "$HAS_PYTHON"; then
5757 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5758else
5759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5760for as_dir in $PATH
5761do
5762 IFS=$as_save_IFS
5763 test -z "$as_dir" && as_dir=.
5764 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005765 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 -05005766 ac_cv_prog_HAS_PYTHON="found"
5767 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5768 break 2
5769 fi
5770done
5771 done
5772IFS=$as_save_IFS
5773
5774 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5775fi
5776fi
5777HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5778if test -n "$HAS_PYTHON"; then
5779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5780$as_echo "$HAS_PYTHON" >&6; }
5781else
5782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5783$as_echo "no" >&6; }
5784fi
5785
5786
5787if test $HAS_HG != found -o $HAS_PYTHON != found
5788then
5789 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5790fi
5791
5792
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793case $MACHDEP in
5794bsdos*|hp*|HP*)
5795 # install -d does not work on BSDI or HP-UX
5796 if test -z "$INSTALL"
5797 then
5798 INSTALL="${srcdir}/install-sh -c"
5799 fi
5800esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801# Find a good install program. We prefer a C program (faster),
5802# so one script is as good as another. But avoid the broken or
5803# incompatible versions:
5804# SysV /etc/install, /usr/sbin/install
5805# SunOS /usr/etc/install
5806# IRIX /sbin/install
5807# AIX /bin/install
5808# AmigaOS /C/install, which installs bootblocks on floppy discs
5809# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5810# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5811# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5812# OS/2's system install, which has a completely different semantic
5813# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005814# Reject install programs that cannot install multiple files.
5815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5816$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005818if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820else
5821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5822for as_dir in $PATH
5823do
5824 IFS=$as_save_IFS
5825 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 # Account for people who put trailing slashes in PATH elements.
5827case $as_dir/ in #((
5828 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005830 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831 /usr/ucb/* ) ;;
5832 *)
5833 # OSF1 and SCO ODT 3.0 have their own names for install.
5834 # Don't use installbsd from OSF since it installs stuff as root
5835 # by default.
5836 for ac_prog in ginstall scoinst install; do
5837 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005838 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 +00005839 if test $ac_prog = install &&
5840 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5841 # AIX install. It has an incompatible calling convention.
5842 :
5843 elif test $ac_prog = install &&
5844 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5845 # program-specific install script used by HP pwplus--don't use.
5846 :
5847 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005848 rm -rf conftest.one conftest.two conftest.dir
5849 echo one > conftest.one
5850 echo two > conftest.two
5851 mkdir conftest.dir
5852 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5853 test -s conftest.one && test -s conftest.two &&
5854 test -s conftest.dir/conftest.one &&
5855 test -s conftest.dir/conftest.two
5856 then
5857 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5858 break 3
5859 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860 fi
5861 fi
5862 done
5863 done
5864 ;;
5865esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005866
5867 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868IFS=$as_save_IFS
5869
Matthias Kloseb9621712010-04-24 17:59:49 +00005870rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871
5872fi
5873 if test "${ac_cv_path_install+set}" = set; then
5874 INSTALL=$ac_cv_path_install
5875 else
5876 # As a last resort, use the slow shell script. Don't cache a
5877 # value for INSTALL within a source directory, because that will
5878 # break other packages using the cache if that directory is
5879 # removed, or if the value is a relative name.
5880 INSTALL=$ac_install_sh
5881 fi
5882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5884$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885
5886# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5887# It thinks the first close brace ends the variable substitution.
5888test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5889
5890test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5891
5892test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5893
Matthias Klose93a0ef12012-03-15 18:08:34 +01005894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5895$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5896if test -z "$MKDIR_P"; then
5897 if ${ac_cv_path_mkdir+:} false; then :
5898 $as_echo_n "(cached) " >&6
5899else
5900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5901for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5902do
5903 IFS=$as_save_IFS
5904 test -z "$as_dir" && as_dir=.
5905 for ac_prog in mkdir gmkdir; do
5906 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005907 { 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 +01005908 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5909 'mkdir (GNU coreutils) '* | \
5910 'mkdir (coreutils) '* | \
5911 'mkdir (fileutils) '4.1*)
5912 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5913 break 3;;
5914 esac
5915 done
5916 done
5917 done
5918IFS=$as_save_IFS
5919
5920fi
5921
5922 test -d ./--version && rmdir ./--version
5923 if test "${ac_cv_path_mkdir+set}" = set; then
5924 MKDIR_P="$ac_cv_path_mkdir -p"
5925 else
5926 # As a last resort, use the slow shell script. Don't cache a
5927 # value for MKDIR_P within a source directory, because that will
5928 # break other packages using the cache if that directory is
5929 # removed, or if the value is a relative name.
5930 MKDIR_P="$ac_install_sh -d"
5931 fi
5932fi
5933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5934$as_echo "$MKDIR_P" >&6; }
5935
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936
5937# Not every filesystem supports hard links
5938
5939if test -z "$LN" ; then
5940 case $ac_sys_system in
5941 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 *) LN=ln;;
5943 esac
5944fi
5945
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005946# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005947
5948ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005949
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5952$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953
5954# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005955if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 withval=$with_pydebug;
5957if test "$withval" != no
5958then
5959
Matthias Kloseb9621712010-04-24 17:59:49 +00005960$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5963$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005965 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005966else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5967$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968fi
5969else
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5971$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972fi
5973
5974
5975# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5976# merged with this chunk of code?
5977
5978# Optimizer/debugger flags
5979# ------------------------
5980# (The following bit of code is complicated enough - please keep things
5981# indented properly. Just pretend you're editing Python code. ;-)
5982
5983# There are two parallel sets of case statements below, one that checks to
5984# see if OPT was set and one that does BASECFLAGS setting based upon
5985# compiler and platform. BASECFLAGS tweaks need to be made even if the
5986# user set OPT.
5987
5988# tweak OPT based on compiler and platform, only if the user didn't set
5989# it on the command line
5990
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005991if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992then
5993 case $GCC in
5994 yes)
5995 if test "$CC" != 'g++' ; then
5996 STRICT_PROTO="-Wstrict-prototypes"
5997 fi
5998 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5999 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6000 WRAP="-fwrapv"
6001 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006002
6003 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006004 case $CC in
6005 *clang*) WRAP="-fwrapv"
6006 ;;
6007 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006008
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009 case $ac_cv_prog_cc_g in
6010 yes)
6011 if test "$Py_DEBUG" = 'true' ; then
6012 # Optimization messes up debuggers, so turn it off for
6013 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006014 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015 else
6016 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6017 fi
6018 ;;
6019 *)
6020 OPT="-O3 -Wall $STRICT_PROTO"
6021 ;;
6022 esac
6023 case $ac_sys_system in
6024 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6025 ;;
6026 esac
6027 ;;
6028
6029 *)
6030 OPT="-O"
6031 ;;
6032 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033fi
6034
6035
6036
6037# The -arch flags for universal builds on OSX
6038UNIVERSAL_ARCH_FLAGS=
6039
6040
6041# tweak BASECFLAGS based on compiler and platform
6042case $GCC in
6043yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006044 # Python doesn't violate C99 aliasing rules, but older versions of
6045 # GCC produce warnings for legal Python code. Enable
6046 # -fno-strict-aliasing on versions of GCC that support but produce
6047 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6049$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 ac_save_cc="$CC"
6051 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006052 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006053 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006055else
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006058
Matthias Kloseb159a552010-04-25 21:00:44 +00006059
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006060int
6061main ()
6062{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006063
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006064 ;
6065 return 0;
6066}
Matthias Kloseb159a552010-04-25 21:00:44 +00006067
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006069if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006070
6071 CC="$ac_save_cc -fstrict-aliasing"
6072 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006074/* end confdefs.h. */
6075
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006076 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006077int
6078main ()
6079{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006080double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006081 ;
6082 return 0;
6083}
Matthias Kloseb159a552010-04-25 21:00:44 +00006084
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006086if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006087
6088 ac_cv_no_strict_aliasing=no
6089
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090else
Matthias Kloseb159a552010-04-25 21:00:44 +00006091
6092 ac_cv_no_strict_aliasing=yes
6093
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006094fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006096
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006097else
Matthias Kloseb159a552010-04-25 21:00:44 +00006098
6099 ac_cv_no_strict_aliasing=no
6100
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006101fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006103fi
6104
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006105 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6108$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006109 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110 then
6111 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6112 fi
6113
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6115$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6116 ac_save_cc="$CC"
6117 CC="$CC -Wunused-result -Werror"
6118 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006119 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006120 $as_echo_n "(cached) " >&6
6121else
6122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6123/* end confdefs.h. */
6124
6125
6126int
6127main ()
6128{
6129
6130 ;
6131 return 0;
6132}
6133
6134_ACEOF
6135if ac_fn_c_try_compile "$LINENO"; then :
6136
6137 ac_cv_disable_unused_result_warning=yes
6138
6139else
6140
6141 ac_cv_disable_unused_result_warning=no
6142
6143fi
6144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6145fi
6146
6147 CFLAGS="$save_CFLAGS"
6148 CC="$ac_save_cc"
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6150$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6151
6152 if test $ac_cv_disable_unused_result_warning = yes
6153 then
6154 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6155 fi
6156
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6158 # support. Without this, treatment of subnormals doesn't follow
6159 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006160 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161 alpha*)
6162 BASECFLAGS="$BASECFLAGS -mieee"
6163 ;;
6164 esac
6165
6166 case $ac_sys_system in
6167 SCO_SV*)
6168 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6169 ;;
6170 # is there any other compiler on Darwin besides gcc?
6171 Darwin*)
6172 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6173 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006174 if test "${CC}" = gcc
6175 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6177$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006178 case "${UNIVERSALSDK}" in
6179 */MacOSX10.4u.sdk)
6180 # Build using 10.4 SDK, force usage of gcc when the
6181 # compiler is gcc, otherwise the user will get very
6182 # confusing error messages when building on OSX 10.6
6183 CC=gcc-4.0
6184 CPP=cpp-4.0
6185 ;;
6186 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6188$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006189 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190
6191
6192 if test "${enable_universalsdk}"; then
6193 UNIVERSAL_ARCH_FLAGS=""
6194 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6195 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6196 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006197 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6199 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006200 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006201 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202
6203 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6204 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006205 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006206 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006208 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6209 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006210 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006211 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006212
6213 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6214 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006215 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006216 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006217
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006218 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006219 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 +00006220
6221 fi
6222
6223
Ronald Oussoren666028b2010-04-18 19:07:43 +00006224 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6225 if test "${UNIVERSALSDK}" != "/"
6226 then
6227 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6228 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006229 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006230 fi
6231 fi
6232
6233 # Calculate the right deployment target for this build.
6234 #
6235 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006236 if test ${cur_target} '>' 10.2 && \
6237 test ${cur_target} '<' 10.6
6238 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006240 if test ${enable_universalsdk}; then
6241 if test "${UNIVERSAL_ARCHS}" = "all"; then
6242 # Ensure that the default platform for a
6243 # 4-way universal build is OSX 10.5,
6244 # that's the first OS release where
6245 # 4-way builds make sense.
6246 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006247
6248 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6249 cur_target='10.5'
6250
6251 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6252 cur_target='10.5'
6253
6254 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6255 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006256 fi
6257 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006258 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006259 # On Intel macs default to a deployment
6260 # target of 10.4, that's the first OSX
6261 # release with Intel support.
6262 cur_target="10.4"
6263 fi
6264 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006265 fi
6266 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6267
6268 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6269 # environment with a value that is the same as what we'll use
6270 # in the Makefile to ensure that we'll get the same compiler
6271 # environment during configure and build time.
6272 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6273 export MACOSX_DEPLOYMENT_TARGET
6274 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6275
6276 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006277 esac
6278 ;;
6279
6280*)
6281 case $ac_sys_system in
6282 OpenUNIX*|UnixWare*)
6283 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6284 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285 SCO_SV*)
6286 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6287 ;;
6288 esac
6289 ;;
6290esac
6291
6292if test "$Py_DEBUG" = 'true'; then
6293 :
6294else
6295 OPT="-DNDEBUG $OPT"
6296fi
6297
6298if test "$ac_arch_flags"
6299then
6300 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6301fi
6302
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303# Check whether GCC supports PyArg_ParseTuple format
6304if test "$GCC" = "yes"
6305then
Matthias Kloseb9621712010-04-24 17:59:49 +00006306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6307$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308 save_CFLAGS=$CFLAGS
6309 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311/* end confdefs.h. */
6312
6313 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314int
6315main ()
6316{
6317
6318 ;
6319 return 0;
6320}
Matthias Kloseb159a552010-04-25 21:00:44 +00006321
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006323if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324
Matthias Kloseb159a552010-04-25 21:00:44 +00006325
Matthias Kloseb9621712010-04-24 17:59:49 +00006326$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327
Matthias Kloseb159a552010-04-25 21:00:44 +00006328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006329$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006330
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331else
Matthias Kloseb159a552010-04-25 21:00:44 +00006332
6333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006334$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335
6336fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6338 CFLAGS=$save_CFLAGS
6339fi
6340
6341# On some compilers, pthreads are available without further options
6342# (e.g. MacOS X). On some of these systems, the compiler will not
6343# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6344# So we have to see first whether pthreads are available without
6345# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6347$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006348if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006349 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350else
Matthias Kloseb9621712010-04-24 17:59:49 +00006351 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352 ac_cv_pthread_is_default=no
6353else
Matthias Kloseb9621712010-04-24 17:59:49 +00006354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006355/* end confdefs.h. */
6356
6357#include <pthread.h>
6358
6359void* routine(void* p){return NULL;}
6360
6361int main(){
6362 pthread_t p;
6363 if(pthread_create(&p,NULL,routine,NULL)!=0)
6364 return 1;
6365 (void)pthread_detach(p);
6366 return 0;
6367}
6368
6369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006370if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371
6372 ac_cv_pthread_is_default=yes
6373 ac_cv_kthread=no
6374 ac_cv_pthread=no
6375
6376else
Matthias Kloseb9621712010-04-24 17:59:49 +00006377 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6380 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381fi
6382
6383
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006384fi
6385
Matthias Kloseb9621712010-04-24 17:59:49 +00006386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6387$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006388
6389
6390if test $ac_cv_pthread_is_default = yes
6391then
6392 ac_cv_kpthread=no
6393else
6394# -Kpthread, if available, provides the right #defines
6395# and linker options to make pthread_create available
6396# Some compilers won't report that they do not support -Kpthread,
6397# so we need to run a program to see whether it really made the
6398# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6400$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006401if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006402 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006403else
6404 ac_save_cc="$CC"
6405CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006406if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006407 ac_cv_kpthread=no
6408else
Matthias Kloseb9621712010-04-24 17:59:49 +00006409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006410/* end confdefs.h. */
6411
6412#include <pthread.h>
6413
6414void* routine(void* p){return NULL;}
6415
6416int main(){
6417 pthread_t p;
6418 if(pthread_create(&p,NULL,routine,NULL)!=0)
6419 return 1;
6420 (void)pthread_detach(p);
6421 return 0;
6422}
6423
6424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006425if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426 ac_cv_kpthread=yes
6427else
Matthias Kloseb9621712010-04-24 17:59:49 +00006428 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6431 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006432fi
6433
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006434CC="$ac_save_cc"
6435fi
6436
Matthias Kloseb9621712010-04-24 17:59:49 +00006437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6438$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006439fi
6440
6441if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6442then
6443# -Kthread, if available, provides the right #defines
6444# and linker options to make pthread_create available
6445# Some compilers won't report that they do not support -Kthread,
6446# so we need to run a program to see whether it really made the
6447# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6449$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006450if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006451 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452else
6453 ac_save_cc="$CC"
6454CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006455if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006456 ac_cv_kthread=no
6457else
Matthias Kloseb9621712010-04-24 17:59:49 +00006458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006459/* end confdefs.h. */
6460
6461#include <pthread.h>
6462
6463void* routine(void* p){return NULL;}
6464
6465int main(){
6466 pthread_t p;
6467 if(pthread_create(&p,NULL,routine,NULL)!=0)
6468 return 1;
6469 (void)pthread_detach(p);
6470 return 0;
6471}
6472
6473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006474if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006475 ac_cv_kthread=yes
6476else
Matthias Kloseb9621712010-04-24 17:59:49 +00006477 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6480 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006481fi
6482
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006483CC="$ac_save_cc"
6484fi
6485
Matthias Kloseb9621712010-04-24 17:59:49 +00006486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6487$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006488fi
6489
6490if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6491then
6492# -pthread, if available, provides the right #defines
6493# and linker options to make pthread_create available
6494# Some compilers won't report that they do not support -pthread,
6495# so we need to run a program to see whether it really made the
6496# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6498$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006499if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006500 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006501else
6502 ac_save_cc="$CC"
6503CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006504if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006505 ac_cv_pthread=no
6506else
Matthias Kloseb9621712010-04-24 17:59:49 +00006507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006508/* end confdefs.h. */
6509
6510#include <pthread.h>
6511
6512void* routine(void* p){return NULL;}
6513
6514int main(){
6515 pthread_t p;
6516 if(pthread_create(&p,NULL,routine,NULL)!=0)
6517 return 1;
6518 (void)pthread_detach(p);
6519 return 0;
6520}
6521
6522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006523if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524 ac_cv_pthread=yes
6525else
Matthias Kloseb9621712010-04-24 17:59:49 +00006526 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6529 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530fi
6531
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532CC="$ac_save_cc"
6533fi
6534
Matthias Kloseb9621712010-04-24 17:59:49 +00006535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6536$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006537fi
6538
6539# If we have set a CC compiler flag for thread support then
6540# check if it works for CXX, too.
6541ac_cv_cxx_thread=no
6542if test ! -z "$CXX"
6543then
Matthias Kloseb9621712010-04-24 17:59:49 +00006544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6545$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006546ac_save_cxx="$CXX"
6547
6548if test "$ac_cv_kpthread" = "yes"
6549then
6550 CXX="$CXX -Kpthread"
6551 ac_cv_cxx_thread=yes
6552elif test "$ac_cv_kthread" = "yes"
6553then
6554 CXX="$CXX -Kthread"
6555 ac_cv_cxx_thread=yes
6556elif test "$ac_cv_pthread" = "yes"
6557then
6558 CXX="$CXX -pthread"
6559 ac_cv_cxx_thread=yes
6560fi
6561
6562if test $ac_cv_cxx_thread = yes
6563then
6564 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6565 $CXX -c conftest.$ac_ext 2>&5
6566 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6567 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6568 then
6569 ac_cv_cxx_thread=yes
6570 else
6571 ac_cv_cxx_thread=no
6572 fi
6573 rm -fr conftest*
6574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6576$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006577fi
6578CXX="$ac_save_cxx"
6579
6580
6581# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6583$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006584if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006585 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006586else
Matthias Kloseb9621712010-04-24 17:59:49 +00006587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006588/* end confdefs.h. */
6589#include <stdlib.h>
6590#include <stdarg.h>
6591#include <string.h>
6592#include <float.h>
6593
6594int
6595main ()
6596{
6597
6598 ;
6599 return 0;
6600}
6601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006602if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006603 ac_cv_header_stdc=yes
6604else
Matthias Kloseb9621712010-04-24 17:59:49 +00006605 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006606fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6608
6609if test $ac_cv_header_stdc = yes; then
6610 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006612/* end confdefs.h. */
6613#include <string.h>
6614
6615_ACEOF
6616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006617 $EGREP "memchr" >/dev/null 2>&1; then :
6618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006619else
6620 ac_cv_header_stdc=no
6621fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006622rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006623
6624fi
6625
6626if test $ac_cv_header_stdc = yes; then
6627 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006629/* end confdefs.h. */
6630#include <stdlib.h>
6631
6632_ACEOF
6633if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006634 $EGREP "free" >/dev/null 2>&1; then :
6635
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006636else
6637 ac_cv_header_stdc=no
6638fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006639rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640
6641fi
6642
6643if test $ac_cv_header_stdc = yes; then
6644 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006645 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006646 :
6647else
Matthias Kloseb9621712010-04-24 17:59:49 +00006648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006649/* end confdefs.h. */
6650#include <ctype.h>
6651#include <stdlib.h>
6652#if ((' ' & 0x0FF) == 0x020)
6653# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6654# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6655#else
6656# define ISLOWER(c) \
6657 (('a' <= (c) && (c) <= 'i') \
6658 || ('j' <= (c) && (c) <= 'r') \
6659 || ('s' <= (c) && (c) <= 'z'))
6660# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6661#endif
6662
6663#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6664int
6665main ()
6666{
6667 int i;
6668 for (i = 0; i < 256; i++)
6669 if (XOR (islower (i), ISLOWER (i))
6670 || toupper (i) != TOUPPER (i))
6671 return 2;
6672 return 0;
6673}
6674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006675if ac_fn_c_try_run "$LINENO"; then :
6676
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677else
Matthias Kloseb9621712010-04-24 17:59:49 +00006678 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6681 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006682fi
6683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684fi
6685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6687$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688if test $ac_cv_header_stdc = yes; then
6689
Matthias Kloseb9621712010-04-24 17:59:49 +00006690$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691
6692fi
6693
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006694for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006695fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006696ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006697sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006698unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006699poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006700sys/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 +01006701sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006702sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006703sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006704sys/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 -07006705libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006706bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006707do :
6708 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6709ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006710if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006711 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006712#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006713_ACEOF
6714
6715fi
6716
Guido van Rossum627b2d71993-12-24 10:39:16 +00006717done
6718
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006719ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006720for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006721 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6723$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006724if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006726else
Matthias Kloseb9621712010-04-24 17:59:49 +00006727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006728/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006729#include <sys/types.h>
6730#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006731
Martin v. Löwis11437992002-04-12 09:54:03 +00006732int
6733main ()
6734{
6735if ((DIR *) 0)
6736return 0;
6737 ;
6738 return 0;
6739}
6740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006741if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006742 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006743else
Matthias Kloseb9621712010-04-24 17:59:49 +00006744 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006748eval ac_res=\$$as_ac_Header
6749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6750$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006751if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006752 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006753#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006754_ACEOF
6755
6756ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006757fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006758
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006759done
6760# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6761if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6763$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006764if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006765 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006766else
Martin v. Löwis11437992002-04-12 09:54:03 +00006767 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006771/* Override any GCC internal prototype to avoid an error.
6772 Use char because int might match the return type of a GCC
6773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006774#ifdef __cplusplus
6775extern "C"
6776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006777char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006778int
6779main ()
6780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006781return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006782 ;
6783 return 0;
6784}
6785_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006786for ac_lib in '' dir; do
6787 if test -z "$ac_lib"; then
6788 ac_res="none required"
6789 else
6790 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006791 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006792 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006796rm -f core conftest.err conftest.$ac_objext \
6797 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006798 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006801done
Victor Stinnere0be4232011-10-25 13:06:09 +02006802if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006804else
6805 ac_cv_search_opendir=no
6806fi
6807rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006808LIBS=$ac_func_search_save_LIBS
6809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6811$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006812ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006813if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006814 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006815
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006816fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006817
Michael W. Hudson54241132001-12-07 15:38:26 +00006818else
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6820$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006821if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006822 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006823else
6824 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006828/* Override any GCC internal prototype to avoid an error.
6829 Use char because int might match the return type of a GCC
6830 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006831#ifdef __cplusplus
6832extern "C"
6833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006834char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006835int
6836main ()
6837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006838return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006839 ;
6840 return 0;
6841}
6842_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006843for ac_lib in '' x; do
6844 if test -z "$ac_lib"; then
6845 ac_res="none required"
6846 else
6847 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006848 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006850 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006851 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006853rm -f core conftest.err conftest.$ac_objext \
6854 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006855 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006856 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006858done
Victor Stinnere0be4232011-10-25 13:06:09 +02006859if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006861else
6862 ac_cv_search_opendir=no
6863fi
6864rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006865LIBS=$ac_func_search_save_LIBS
6866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6868$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006869ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006870if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006871 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006872
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006873fi
6874
6875fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006876
Matthias Kloseb9621712010-04-24 17:59:49 +00006877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6878$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006879if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006880 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006881else
Matthias Kloseb9621712010-04-24 17:59:49 +00006882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006883/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006884#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006885int
6886main ()
6887{
6888return makedev(0, 0);
6889 ;
6890 return 0;
6891}
6892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006893if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006894 ac_cv_header_sys_types_h_makedev=yes
6895else
Matthias Kloseb9621712010-04-24 17:59:49 +00006896 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006898rm -f core conftest.err conftest.$ac_objext \
6899 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006900
6901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6903$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006904
6905if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006906ac_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 +02006907if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006908
Matthias Kloseb9621712010-04-24 17:59:49 +00006909$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006910
6911fi
6912
6913
6914
6915 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006916 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 +02006917if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006918
Matthias Kloseb9621712010-04-24 17:59:49 +00006919$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006920
6921fi
6922
6923
6924 fi
6925fi
6926
Michael W. Hudson54241132001-12-07 15:38:26 +00006927
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006928# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6929for ac_header in net/if.h
6930do :
6931 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6932#ifdef STDC_HEADERS
6933# include <stdlib.h>
6934# include <stddef.h>
6935#else
6936# ifdef HAVE_STDLIB_H
6937# include <stdlib.h>
6938# endif
6939#endif
6940#ifdef HAVE_SYS_SOCKET_H
6941# include <sys/socket.h>
6942#endif
6943
6944"
Victor Stinnere0be4232011-10-25 13:06:09 +02006945if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006946 cat >>confdefs.h <<_ACEOF
6947#define HAVE_NET_IF_H 1
6948_ACEOF
6949
6950fi
6951
6952done
6953
6954
6955
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006956# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006957for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006958do :
6959 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006960#ifdef HAVE_CURSES_H
6961#include <curses.h>
6962#endif
6963
Matthias Kloseb9621712010-04-24 17:59:49 +00006964"
Victor Stinnere0be4232011-10-25 13:06:09 +02006965if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006966 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006967#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006968_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006969
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006970fi
6971
6972done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006973
6974
Martin v. Löwis11017b12006-01-14 18:12:57 +00006975# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006976for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006977do :
6978 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 +00006979#ifdef HAVE_ASM_TYPES_H
6980#include <asm/types.h>
6981#endif
6982#ifdef HAVE_SYS_SOCKET_H
6983#include <sys/socket.h>
6984#endif
6985
Matthias Kloseb9621712010-04-24 17:59:49 +00006986"
Victor Stinnere0be4232011-10-25 13:06:09 +02006987if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006988 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006989#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006990_ACEOF
6991
6992fi
6993
6994done
6995
6996
Charles-François Natali47413c12011-10-06 19:47:44 +02006997# On Linux, can.h and can/raw.h require sys/socket.h
6998for ac_header in linux/can.h linux/can/raw.h
6999do :
7000 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7001ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7002#ifdef HAVE_SYS_SOCKET_H
7003#include <sys/socket.h>
7004#endif
7005
7006"
7007if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7008 cat >>confdefs.h <<_ACEOF
7009#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7010_ACEOF
7011
7012fi
7013
7014done
7015
7016
Guido van Rossum627b2d71993-12-24 10:39:16 +00007017# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007018was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7020$as_echo_n "checking for clock_t in time.h... " >&6; }
7021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007022/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007023#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007024
7025_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007028 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007029else
Martin v. Löwis11437992002-04-12 09:54:03 +00007030
7031
Matthias Kloseb9621712010-04-24 17:59:49 +00007032$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007033
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007034
Guido van Rossum627b2d71993-12-24 10:39:16 +00007035fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007036rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007037
Matthias Kloseb9621712010-04-24 17:59:49 +00007038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7039$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007040
Matthias Kloseb9621712010-04-24 17:59:49 +00007041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7042$as_echo_n "checking for makedev... " >&6; }
7043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007044/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007045
Jesus Cea740f53a2010-04-28 11:35:30 +00007046#if defined(MAJOR_IN_MKDEV)
7047#include <sys/mkdev.h>
7048#elif defined(MAJOR_IN_SYSMACROS)
7049#include <sys/sysmacros.h>
7050#else
7051#include <sys/types.h>
7052#endif
7053
Neal Norwitz11690112002-07-30 01:08:28 +00007054int
7055main ()
7056{
Jesus Cea740f53a2010-04-28 11:35:30 +00007057
7058 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007059 ;
7060 return 0;
7061}
Matthias Kloseb159a552010-04-25 21:00:44 +00007062
Neal Norwitz11690112002-07-30 01:08:28 +00007063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007064if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007065 ac_cv_has_makedev=yes
7066else
Matthias Kloseb9621712010-04-24 17:59:49 +00007067 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007069rm -f core conftest.err conftest.$ac_objext \
7070 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7072$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007073if test "$ac_cv_has_makedev" = "yes"; then
7074
Matthias Kloseb9621712010-04-24 17:59:49 +00007075$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007076
7077fi
7078
Martin v. Löwis399a6892002-10-04 10:22:02 +00007079# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7080# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7081# defined, but the compiler does not support pragma redefine_extname,
7082# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7083# structures (such as rlimit64) without declaring them. As a
7084# work-around, disable LFS on such configurations
7085
7086use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7088$as_echo_n "checking Solaris LFS bug... " >&6; }
7089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007090/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007091
7092#define _LARGEFILE_SOURCE 1
7093#define _FILE_OFFSET_BITS 64
7094#include <sys/resource.h>
7095
Martin v. Löwis399a6892002-10-04 10:22:02 +00007096int
7097main ()
7098{
7099struct rlimit foo;
7100 ;
7101 return 0;
7102}
7103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007104if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007105 sol_lfs_bug=no
7106else
Matthias Kloseb9621712010-04-24 17:59:49 +00007107 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7111$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007112if test "$sol_lfs_bug" = "yes"; then
7113 use_lfs=no
7114fi
7115
7116if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007117# Two defines needed to enable largefile support on various platforms
7118# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007119case $ac_sys_system/$ac_sys_release in
7120AIX*)
7121
7122$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7123
7124 ;;
7125esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007126
Matthias Kloseb9621712010-04-24 17:59:49 +00007127$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007128
7129
Matthias Kloseb9621712010-04-24 17:59:49 +00007130$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007131
Martin v. Löwis399a6892002-10-04 10:22:02 +00007132fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007133
Guido van Rossum84e7b241996-08-19 21:59:00 +00007134# Add some code to confdefs.h so that the test for off_t works on SCO
7135cat >> confdefs.h <<\EOF
7136#if defined(SCO_DS)
7137#undef _OFF_T
7138#endif
7139EOF
7140
Guido van Rossumef2255b2000-03-10 22:30:29 +00007141# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007142ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007143if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007144
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007145else
Martin v. Löwis11437992002-04-12 09:54:03 +00007146
7147cat >>confdefs.h <<_ACEOF
7148#define mode_t int
7149_ACEOF
7150
7151fi
7152
Matthias Kloseb9621712010-04-24 17:59:49 +00007153ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007154if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007156else
Martin v. Löwis11437992002-04-12 09:54:03 +00007157
7158cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007159#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007160_ACEOF
7161
7162fi
7163
Matthias Kloseb9621712010-04-24 17:59:49 +00007164ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007165if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007167else
Martin v. Löwis11437992002-04-12 09:54:03 +00007168
7169cat >>confdefs.h <<_ACEOF
7170#define pid_t int
7171_ACEOF
7172
7173fi
7174
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007175
Martin v. Löwis11437992002-04-12 09:54:03 +00007176cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007177#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007178_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007179
Matthias Kloseb9621712010-04-24 17:59:49 +00007180ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007181if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007182
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007183else
Martin v. Löwis11437992002-04-12 09:54:03 +00007184
7185cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007186#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007187_ACEOF
7188
7189fi
7190
Matthias Kloseb9621712010-04-24 17:59:49 +00007191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7192$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007193if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007194 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007195else
Matthias Kloseb9621712010-04-24 17:59:49 +00007196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007197/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007198#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007199
7200_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007201if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007202 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007203 ac_cv_type_uid_t=yes
7204else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007205 ac_cv_type_uid_t=no
7206fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007207rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007208
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7211$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007212if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007213
Matthias Kloseb9621712010-04-24 17:59:49 +00007214$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007215
7216
Matthias Kloseb9621712010-04-24 17:59:49 +00007217$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007218
7219fi
7220
Matthias Kloseb9621712010-04-24 17:59:49 +00007221ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7222case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007223 no|yes) ;; #(
7224 *)
7225
Matthias Kloseb9621712010-04-24 17:59:49 +00007226$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007227
7228
7229cat >>confdefs.h <<_ACEOF
7230#define uint32_t $ac_cv_c_uint32_t
7231_ACEOF
7232;;
7233 esac
7234
Matthias Kloseb9621712010-04-24 17:59:49 +00007235ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7236case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007237 no|yes) ;; #(
7238 *)
7239
Matthias Kloseb9621712010-04-24 17:59:49 +00007240$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007241
7242
7243cat >>confdefs.h <<_ACEOF
7244#define uint64_t $ac_cv_c_uint64_t
7245_ACEOF
7246;;
7247 esac
7248
Matthias Kloseb9621712010-04-24 17:59:49 +00007249ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7250case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007251 no|yes) ;; #(
7252 *)
7253
7254cat >>confdefs.h <<_ACEOF
7255#define int32_t $ac_cv_c_int32_t
7256_ACEOF
7257;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007258esac
7259
Matthias Kloseb9621712010-04-24 17:59:49 +00007260ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7261case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007262 no|yes) ;; #(
7263 *)
7264
7265cat >>confdefs.h <<_ACEOF
7266#define int64_t $ac_cv_c_int64_t
7267_ACEOF
7268;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007269esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007270
Matthias Kloseb9621712010-04-24 17:59:49 +00007271ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007272if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007273
Matthias Kloseb9621712010-04-24 17:59:49 +00007274$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007275
7276fi
7277
Stefan Krah1919b7e2012-03-21 18:25:23 +01007278ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7279if test "x$ac_cv_type___uint128_t" = xyes; then :
7280
7281$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7282
7283fi
7284
Jack Jansendd19cf82001-12-06 22:36:17 +00007285
Michael W. Hudson54241132001-12-07 15:38:26 +00007286# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007287# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007288# The cast to long int works around a bug in the HP C Compiler
7289# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7290# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7291# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7293$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007294if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007295 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007296else
Matthias Kloseb9621712010-04-24 17:59:49 +00007297 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 +00007298
Martin v. Löwis11437992002-04-12 09:54:03 +00007299else
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 if test "$ac_cv_type_int" = yes; then
7301 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7302$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007303as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007304See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007305 else
7306 ac_cv_sizeof_int=0
7307 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007309
Martin v. Löwis11437992002-04-12 09:54:03 +00007310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7312$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007313
7314
7315
Martin v. Löwis11437992002-04-12 09:54:03 +00007316cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007317#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007318_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007319
7320
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007321# The cast to long int works around a bug in the HP C Compiler
7322# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7323# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7324# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7326$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007327if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007328 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007329else
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 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 +00007331
Martin v. Löwis11437992002-04-12 09:54:03 +00007332else
Matthias Kloseb9621712010-04-24 17:59:49 +00007333 if test "$ac_cv_type_long" = yes; then
7334 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7335$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007336as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007337See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007338 else
7339 ac_cv_sizeof_long=0
7340 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007342
Martin v. Löwis11437992002-04-12 09:54:03 +00007343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7345$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007346
7347
7348
Martin v. Löwis11437992002-04-12 09:54:03 +00007349cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007350#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007351_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007352
7353
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007354# The cast to long int works around a bug in the HP C Compiler
7355# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7356# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7357# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7359$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007360if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007362else
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 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 +00007364
Martin v. Löwis11437992002-04-12 09:54:03 +00007365else
Matthias Kloseb9621712010-04-24 17:59:49 +00007366 if test "$ac_cv_type_void_p" = yes; then
7367 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7368$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007369as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007370See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007371 else
7372 ac_cv_sizeof_void_p=0
7373 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007375
Martin v. Löwis11437992002-04-12 09:54:03 +00007376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7378$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007379
7380
7381
Martin v. Löwis11437992002-04-12 09:54:03 +00007382cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007383#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007384_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007385
7386
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007387# The cast to long int works around a bug in the HP C Compiler
7388# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7389# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7390# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7392$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007393if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007395else
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 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 +00007397
Martin v. Löwis11437992002-04-12 09:54:03 +00007398else
Matthias Kloseb9621712010-04-24 17:59:49 +00007399 if test "$ac_cv_type_short" = yes; then
7400 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7401$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007402as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007403See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007404 else
7405 ac_cv_sizeof_short=0
7406 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007408
Martin v. Löwis11437992002-04-12 09:54:03 +00007409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7411$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007412
7413
7414
Martin v. Löwis11437992002-04-12 09:54:03 +00007415cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007416#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007417_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007418
7419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007420# The cast to long int works around a bug in the HP C Compiler
7421# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7422# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7423# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7425$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007426if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007427 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007428else
Matthias Kloseb9621712010-04-24 17:59:49 +00007429 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 +00007430
Martin v. Löwis11437992002-04-12 09:54:03 +00007431else
Matthias Kloseb9621712010-04-24 17:59:49 +00007432 if test "$ac_cv_type_float" = yes; then
7433 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7434$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007435as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007436See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007437 else
7438 ac_cv_sizeof_float=0
7439 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007441
Martin v. Löwis11437992002-04-12 09:54:03 +00007442fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7444$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007445
7446
7447
Martin v. Löwis11437992002-04-12 09:54:03 +00007448cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007449#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007450_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007451
7452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007453# The cast to long int works around a bug in the HP C Compiler
7454# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7455# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7456# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7458$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007459if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007460 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007461else
Matthias Kloseb9621712010-04-24 17:59:49 +00007462 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 +00007463
Martin v. Löwis11437992002-04-12 09:54:03 +00007464else
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 if test "$ac_cv_type_double" = yes; then
7466 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7467$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007468as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007469See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007470 else
7471 ac_cv_sizeof_double=0
7472 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007474
Martin v. Löwis11437992002-04-12 09:54:03 +00007475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7477$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007478
7479
7480
Martin v. Löwis11437992002-04-12 09:54:03 +00007481cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007482#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007483_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007484
7485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007486# The cast to long int works around a bug in the HP C Compiler
7487# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7488# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7489# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7491$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007492if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007494else
Matthias Kloseb9621712010-04-24 17:59:49 +00007495 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 +00007496
Martin v. Löwis11437992002-04-12 09:54:03 +00007497else
Matthias Kloseb9621712010-04-24 17:59:49 +00007498 if test "$ac_cv_type_fpos_t" = yes; then
7499 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007501as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007502See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007503 else
7504 ac_cv_sizeof_fpos_t=0
7505 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007507
Martin v. Löwis11437992002-04-12 09:54:03 +00007508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7510$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007511
7512
7513
Martin v. Löwis11437992002-04-12 09:54:03 +00007514cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007515#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007516_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007517
Michael W. Hudson54241132001-12-07 15:38:26 +00007518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007519# The cast to long int works around a bug in the HP C Compiler
7520# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7521# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7522# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7524$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007525if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007526 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007527else
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 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 +00007529
Martin v. Löwis18e16552006-02-15 17:27:45 +00007530else
Matthias Kloseb9621712010-04-24 17:59:49 +00007531 if test "$ac_cv_type_size_t" = yes; then
7532 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007534as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007535See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007536 else
7537 ac_cv_sizeof_size_t=0
7538 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007540
Martin v. Löwis18e16552006-02-15 17:27:45 +00007541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7543$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007544
7545
7546
Martin v. Löwis18e16552006-02-15 17:27:45 +00007547cat >>confdefs.h <<_ACEOF
7548#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7549_ACEOF
7550
7551
Christian Heimes400adb02008-02-01 08:12:03 +00007552# The cast to long int works around a bug in the HP C Compiler
7553# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7554# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7555# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7557$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007558if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007559 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007560else
Matthias Kloseb9621712010-04-24 17:59:49 +00007561 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 +00007562
Christian Heimes400adb02008-02-01 08:12:03 +00007563else
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 if test "$ac_cv_type_pid_t" = yes; then
7565 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007567as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007568See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007569 else
7570 ac_cv_sizeof_pid_t=0
7571 fi
7572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007573
Christian Heimes400adb02008-02-01 08:12:03 +00007574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7576$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007577
7578
7579
7580cat >>confdefs.h <<_ACEOF
7581#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7582_ACEOF
7583
7584
Michael W. Hudson54241132001-12-07 15:38:26 +00007585
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7587$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007588have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007590/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007591
Martin v. Löwis11437992002-04-12 09:54:03 +00007592int
7593main ()
7594{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007595long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007596 ;
7597 return 0;
7598}
7599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007600if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007601
7602
Matthias Kloseb9621712010-04-24 17:59:49 +00007603$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007604
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007605 have_long_long=yes
7606
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7610$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007611if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612# The cast to long int works around a bug in the HP C Compiler
7613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7615# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7617$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007618if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007620else
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 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 +00007622
Martin v. Löwis11437992002-04-12 09:54:03 +00007623else
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 if test "$ac_cv_type_long_long" = yes; then
7625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007627as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007628See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007629 else
7630 ac_cv_sizeof_long_long=0
7631 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007633
Martin v. Löwis11437992002-04-12 09:54:03 +00007634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7636$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007637
7638
7639
Martin v. Löwis11437992002-04-12 09:54:03 +00007640cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007641#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007642_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007643
Michael W. Hudson54241132001-12-07 15:38:26 +00007644
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007645fi
7646
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7648$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007649have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007651/* end confdefs.h. */
7652
7653int
7654main ()
7655{
7656long double x; x = (long double)0;
7657 ;
7658 return 0;
7659}
7660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007661if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007662
7663
Matthias Kloseb9621712010-04-24 17:59:49 +00007664$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007665
7666 have_long_double=yes
7667
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007668fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7671$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007672if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007673# The cast to long int works around a bug in the HP C Compiler
7674# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7675# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7676# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7678$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007679if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007681else
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 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 +00007683
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007684else
Matthias Kloseb9621712010-04-24 17:59:49 +00007685 if test "$ac_cv_type_long_double" = yes; then
7686 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007688as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007689See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007690 else
7691 ac_cv_sizeof_long_double=0
7692 fi
7693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007694
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7697$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007698
7699
7700
7701cat >>confdefs.h <<_ACEOF
7702#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7703_ACEOF
7704
7705
7706fi
7707
7708
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7710$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007711have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007713/* end confdefs.h. */
7714
7715int
7716main ()
7717{
7718_Bool x; x = (_Bool)0;
7719 ;
7720 return 0;
7721}
7722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007723if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007724
7725
Matthias Kloseb9621712010-04-24 17:59:49 +00007726$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007727
7728 have_c99_bool=yes
7729
Thomas Woutersb2137042007-02-01 18:02:27 +00007730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7733$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007734if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735# The cast to long int works around a bug in the HP C Compiler
7736# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7737# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7738# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7740$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007741if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007743else
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 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 +00007745
Thomas Woutersb2137042007-02-01 18:02:27 +00007746else
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 if test "$ac_cv_type__Bool" = yes; then
7748 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007750as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007751See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752 else
7753 ac_cv_sizeof__Bool=0
7754 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007756
Thomas Woutersb2137042007-02-01 18:02:27 +00007757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7759$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760
7761
7762
Thomas Woutersb2137042007-02-01 18:02:27 +00007763cat >>confdefs.h <<_ACEOF
7764#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7765_ACEOF
7766
7767
7768fi
7769
Matthias Kloseb9621712010-04-24 17:59:49 +00007770ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007771 #include <stdint.h>
7772 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007773 #ifdef HAVE_INTTYPES_H
7774 #include <inttypes.h>
7775 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007776"
Victor Stinnere0be4232011-10-25 13:06:09 +02007777if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007778
7779cat >>confdefs.h <<_ACEOF
7780#define HAVE_UINTPTR_T 1
7781_ACEOF
7782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007783# The cast to long int works around a bug in the HP C Compiler
7784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7786# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7788$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007789if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007791else
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 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 +00007793
Martin v. Löwis11437992002-04-12 09:54:03 +00007794else
Matthias Kloseb9621712010-04-24 17:59:49 +00007795 if test "$ac_cv_type_uintptr_t" = yes; then
7796 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007798as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007799See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800 else
7801 ac_cv_sizeof_uintptr_t=0
7802 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007804
Martin v. Löwis11437992002-04-12 09:54:03 +00007805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7807$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808
7809
7810
Martin v. Löwis11437992002-04-12 09:54:03 +00007811cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007812#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007813_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007814
Michael W. Hudson54241132001-12-07 15:38:26 +00007815
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007816fi
7817
Thomas Wouters89f507f2006-12-13 04:49:30 +00007818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007819# The cast to long int works around a bug in the HP C Compiler
7820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7822# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7824$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007825if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007826 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007827else
Matthias Kloseb9621712010-04-24 17:59:49 +00007828 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007829#ifdef HAVE_SYS_TYPES_H
7830#include <sys/types.h>
7831#endif
7832
Matthias Kloseb9621712010-04-24 17:59:49 +00007833"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007834
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007835else
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 if test "$ac_cv_type_off_t" = yes; then
7837 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007839as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007840See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007841 else
7842 ac_cv_sizeof_off_t=0
7843 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007845
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7848$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007849
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007850
7851
Martin v. Löwis11437992002-04-12 09:54:03 +00007852cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007853#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007854_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007855
Michael W. Hudson54241132001-12-07 15:38:26 +00007856
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007857
Matthias Kloseb9621712010-04-24 17:59:49 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7859$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007860if test "$have_long_long" = yes
7861then
7862if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007863 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007864
Matthias Kloseb9621712010-04-24 17:59:49 +00007865$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007866
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7868$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007869else
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7871$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007872fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007873else
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7875$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007876fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007877
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007878# The cast to long int works around a bug in the HP C Compiler
7879# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7880# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7881# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7883$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007884if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007886else
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007888#ifdef HAVE_SYS_TYPES_H
7889#include <sys/types.h>
7890#endif
7891#ifdef HAVE_TIME_H
7892#include <time.h>
7893#endif
7894
Matthias Kloseb9621712010-04-24 17:59:49 +00007895"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007896
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007897else
Matthias Kloseb9621712010-04-24 17:59:49 +00007898 if test "$ac_cv_type_time_t" = yes; then
7899 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007901as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007902See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007903 else
7904 ac_cv_sizeof_time_t=0
7905 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007907
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7910$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007911
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007912
7913
Martin v. Löwis11437992002-04-12 09:54:03 +00007914cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007915#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007916_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007917
Michael W. Hudson54241132001-12-07 15:38:26 +00007918
7919
Trent Mick635f6fb2000-08-23 21:33:05 +00007920# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007921ac_save_cc="$CC"
7922if test "$ac_cv_kpthread" = "yes"
7923then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007924elif test "$ac_cv_kthread" = "yes"
7925then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007926elif test "$ac_cv_pthread" = "yes"
7927then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007928fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007929
Matthias Kloseb9621712010-04-24 17:59:49 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7931$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007932have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007934/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007935
7936 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007937int
7938main ()
7939{
Guido van Rossum12580492000-09-24 16:47:19 +00007940pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007941 ;
7942 return 0;
7943}
Matthias Kloseb159a552010-04-25 21:00:44 +00007944
Martin v. Löwis11437992002-04-12 09:54:03 +00007945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007946if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007947 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7951$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007952if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007954# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7955# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7956# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7958$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007959if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007961else
Matthias Kloseb9621712010-04-24 17:59:49 +00007962 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007963#ifdef HAVE_PTHREAD_H
7964#include <pthread.h>
7965#endif
7966
Matthias Kloseb9621712010-04-24 17:59:49 +00007967"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007968
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007969else
Matthias Kloseb9621712010-04-24 17:59:49 +00007970 if test "$ac_cv_type_pthread_t" = yes; then
7971 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007973as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007974See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007975 else
7976 ac_cv_sizeof_pthread_t=0
7977 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007979
Trent Mick635f6fb2000-08-23 21:33:05 +00007980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7982$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007983
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007984
7985
Martin v. Löwis11437992002-04-12 09:54:03 +00007986cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007987#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007988_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007989
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007990
Trent Mick635f6fb2000-08-23 21:33:05 +00007991fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007992CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007993
Michael W. Hudson54241132001-12-07 15:38:26 +00007994
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007995case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007996 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007997 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7998 ;;
7999 Darwin/*)
8000 OTHER_LIBTOOL_OPT=""
8001 ;;
8002esac
8003
8004
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008005ARCH_RUN_32BIT=""
8006
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008007case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008008 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008009 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8010 if test "${enable_universalsdk}"; then
8011 :
8012 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008013 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008014 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008015 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008016 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008017 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008018 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008019 if test ${gcc_version} '<' 4.0
8020 then
8021 LIBTOOL_CRUFT="-lcc_dynamic"
8022 else
8023 LIBTOOL_CRUFT=""
8024 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008026 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008027else
Matthias Kloseb9621712010-04-24 17:59:49 +00008028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008029/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008030
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008031 #include <unistd.h>
8032 int main(int argc, char*argv[])
8033 {
8034 if (sizeof(long) == 4) {
8035 return 0;
8036 } else {
8037 return 1;
8038 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008039 }
8040
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008042if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008043 ac_osx_32bit=yes
8044else
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8048 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008049fi
8050
8051
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008052 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008053 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008054 i386)
8055 MACOSX_DEFAULT_ARCH="i386"
8056 ;;
8057 ppc)
8058 MACOSX_DEFAULT_ARCH="ppc"
8059 ;;
8060 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008061 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008062 ;;
8063 esac
8064 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008065 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008066 i386)
8067 MACOSX_DEFAULT_ARCH="x86_64"
8068 ;;
8069 ppc)
8070 MACOSX_DEFAULT_ARCH="ppc64"
8071 ;;
8072 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008073 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008074 ;;
8075 esac
8076
8077 #ARCH_RUN_32BIT="true"
8078 fi
8079
8080 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008081 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008082 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008083esac
8084
Matthias Kloseb9621712010-04-24 17:59:49 +00008085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8086$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008087if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008088then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008089 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008090 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008091 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008092
Matthias Kloseb9621712010-04-24 17:59:49 +00008093$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008094
Matthias Kloseb9621712010-04-24 17:59:49 +00008095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8096$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008097 if test $enable_shared = "yes"
8098 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008099 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 +00008100 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008101else
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8103$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008104fi
8105
Matthias Kloseb9621712010-04-24 17:59:49 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8107$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008108case $ac_sys_system/$ac_sys_release in
8109 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008110
Matthias Kloseb9621712010-04-24 17:59:49 +00008111$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008112
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8114$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008115 ;;
8116 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8118$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008119 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008120esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008121
Guido van Rossum0a516c91994-09-12 10:58:40 +00008122# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008123
Michael W. Hudson54241132001-12-07 15:38:26 +00008124
8125
8126
8127
Benjamin Peterson99f03762010-04-11 22:15:28 +00008128
Thomas Wouters477c8d52006-05-27 19:21:47 +00008129
Georg Brandlb1441c72009-01-03 22:33:39 +00008130
Thomas Wouters477c8d52006-05-27 19:21:47 +00008131cat >>confdefs.h <<_ACEOF
8132#define SHLIB_EXT "$SO"
8133_ACEOF
8134
Guido van Rossum0a516c91994-09-12 10:58:40 +00008135# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008136# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008137# (Shared libraries in this instance are shared modules to be loaded into
8138# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8140$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008141if test -z "$LDSHARED"
8142then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008143 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008144 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008145 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008146 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008147 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008148 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008149 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008151 if test "$GCC" = "yes" ; then
8152 LDSHARED='$(CC) -shared'
8153 LDCXXSHARED='$(CXX) -shared'
8154 else
8155 LDSHARED='$(CC) -G'
8156 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008157 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008158 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008159 if test "$GCC" = "yes" ; then
8160 LDSHARED='$(CC) -shared'
8161 LDCXXSHARED='$(CXX) -shared'
8162 else
8163 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008164 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008165 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008166 LDSHARED='$(CC) -bundle'
8167 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008168 if test "$enable_framework" ; then
8169 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008170 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8171 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008172 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008173 else
8174 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008175 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008176 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008177 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008178 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008179 LDSHARED='$(CC) -bundle'
8180 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008181 if test "$enable_framework" ; then
8182 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008183 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8184 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008185 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008186 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008187 # No framework, use the Python app as bundle-loader
8188 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008189 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008190 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008191 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008192 Darwin/*)
8193 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8194 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008195
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008196 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008197 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008198 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008199 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008200 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008201 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8202 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008203 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008204 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008205 LDSHARED='$(CC) -bundle'
8206 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008207 if test "$enable_framework" ; then
8208 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008209 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8210 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008211 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008212 else
8213 # No framework, use the Python app as bundle-loader
8214 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8215 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008216 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008217 fi
8218 fi
8219 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008220 Linux*|GNU*|QNX*)
8221 LDSHARED='$(CC) -shared'
8222 LDCXXSHARED='$(CXX) -shared';;
8223 BSD/OS*/4*)
8224 LDSHARED="gcc -shared"
8225 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008226 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008227 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008228 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008229 LDSHARED='$(CC) -shared'
8230 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008231 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008232 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008233 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008234 OpenBSD*)
8235 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8236 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008237 LDSHARED='$(CC) -shared $(CCSHARED)'
8238 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008239 else
8240 case `uname -r` in
8241 [01].* | 2.[0-7] | 2.[0-7].*)
8242 LDSHARED="ld -Bshareable ${LDFLAGS}"
8243 ;;
8244 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008245 LDSHARED='$(CC) -shared $(CCSHARED)'
8246 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008247 ;;
8248 esac
8249 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008250 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008251 LDSHARED='$(CC) -shared'
8252 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008253 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008254 if test "$GCC" = "yes" ; then
8255 LDSHARED='$(CC) -shared'
8256 LDCXXSHARED='$(CXX) -shared'
8257 else
8258 LDSHARED='$(CC) -G'
8259 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008260 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008261 SCO_SV*)
8262 LDSHARED='$(CC) -Wl,-G,-Bexport'
8263 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8264 CYGWIN*)
8265 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8266 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008267 *) LDSHARED="ld";;
8268 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8271$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008272LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008273BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008274# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008275# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8277$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008278if test -z "$CCSHARED"
8279then
Guido van Rossum07397971997-04-29 21:49:50 +00008280 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008281 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008282 then CCSHARED="-fPIC";
8283 elif test `uname -p` = sparc;
8284 then CCSHARED="-xcode=pic32";
8285 else CCSHARED="-Kpic";
8286 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008287 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008288 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008289 else CCSHARED="+z";
8290 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008291 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008292 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008293 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008294 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008295 if test "$GCC" = "yes"
8296 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008297 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008298 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008299 SCO_SV*)
8300 if test "$GCC" = "yes"
8301 then CCSHARED="-fPIC"
8302 else CCSHARED="-Kpic -belf"
8303 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008304 IRIX*/6*) case $CC in
8305 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008306 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008307 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008308 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8311$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008312# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008313# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8315$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008316if test -z "$LINKFORSHARED"
8317then
Guido van Rossum07397971997-04-29 21:49:50 +00008318 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008319 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008320 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008321 LINKFORSHARED="-Wl,-E -Wl,+s";;
8322# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008323 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008324 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008325 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008327 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008328 if test "$enable_framework"
8329 then
Jack Jansenda49e192005-01-07 13:08:22 +00008330 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008331 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008332 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008333 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008334 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008335 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008336 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008337 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8338 then
8339 LINKFORSHARED="-Wl,--export-dynamic"
8340 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008341 SunOS/5*) case $CC in
8342 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008343 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008344 then
8345 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008346 fi;;
8347 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008348 CYGWIN*)
8349 if test $enable_shared = "no"
8350 then
8351 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8352 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008353 QNX*)
8354 # -Wl,-E causes the symbols to be added to the dynamic
8355 # symbol table so that they can be found when a module
8356 # is loaded. -N 2048K causes the stack size to be set
8357 # to 2048 kilobytes so that the stack doesn't overflow
8358 # when running test_compile.py.
8359 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008360 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8363$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008364
Michael W. Hudson54241132001-12-07 15:38:26 +00008365
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8368$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008369if test ! "$LIBRARY" = "$LDLIBRARY"
8370then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008371 case $ac_sys_system in
8372 CYGWIN*)
8373 # Cygwin needs CCSHARED when building extension DLLs
8374 # but not when building the interpreter DLL.
8375 CFLAGSFORSHARED='';;
8376 *)
8377 CFLAGSFORSHARED='$(CCSHARED)'
8378 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8381$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008382
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008383# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8384# library (with --enable-shared).
8385# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008386# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8387# if it is not required, since it creates a dependency of the shared library
8388# to LIBS. This, in turn, means that applications linking the shared libpython
8389# don't need to link LIBS explicitly. The default should be only changed
8390# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008391
Matthias Kloseb9621712010-04-24 17:59:49 +00008392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8393$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008394case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008395 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008396 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008397esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8399$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008400
8401
Guido van Rossum627b2d71993-12-24 10:39:16 +00008402# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8404$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008405if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008406 $as_echo_n "(cached) " >&6
8407else
8408 ac_check_lib_save_LIBS=$LIBS
8409LIBS="-lsendfile $LIBS"
8410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8411/* end confdefs.h. */
8412
8413/* Override any GCC internal prototype to avoid an error.
8414 Use char because int might match the return type of a GCC
8415 builtin and then its argument prototype would still apply. */
8416#ifdef __cplusplus
8417extern "C"
8418#endif
8419char sendfile ();
8420int
8421main ()
8422{
8423return sendfile ();
8424 ;
8425 return 0;
8426}
8427_ACEOF
8428if ac_fn_c_try_link "$LINENO"; then :
8429 ac_cv_lib_sendfile_sendfile=yes
8430else
8431 ac_cv_lib_sendfile_sendfile=no
8432fi
8433rm -f core conftest.err conftest.$ac_objext \
8434 conftest$ac_exeext conftest.$ac_ext
8435LIBS=$ac_check_lib_save_LIBS
8436fi
8437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8438$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008439if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008440 cat >>confdefs.h <<_ACEOF
8441#define HAVE_LIBSENDFILE 1
8442_ACEOF
8443
8444 LIBS="-lsendfile $LIBS"
8445
8446fi
8447
Matthias Kloseb9621712010-04-24 17:59:49 +00008448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8449$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008450if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008452else
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008454LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008458/* Override any GCC internal prototype to avoid an error.
8459 Use char because int might match the return type of a GCC
8460 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008461#ifdef __cplusplus
8462extern "C"
8463#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008464char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008465int
8466main ()
8467{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 ;
8470 return 0;
8471}
8472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008473if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008475else
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008478rm -f core conftest.err conftest.$ac_objext \
8479 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008480LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8483$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008484if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 cat >>confdefs.h <<_ACEOF
8486#define HAVE_LIBDL 1
8487_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008488
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008489 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008490
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008491fi
8492 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8494$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008495if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008497else
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008499LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503/* Override any GCC internal prototype to avoid an error.
8504 Use char because int might match the return type of a GCC
8505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008506#ifdef __cplusplus
8507extern "C"
8508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008509char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008510int
8511main ()
8512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ;
8515 return 0;
8516}
8517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008520else
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008523rm -f core conftest.err conftest.$ac_objext \
8524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008525LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8528$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008529if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 cat >>confdefs.h <<_ACEOF
8531#define HAVE_LIBDLD 1
8532_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008533
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008534 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008536fi
8537 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008538
Georg Brandlb1441c72009-01-03 22:33:39 +00008539# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008540if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8542$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008543if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008545else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008546 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550/* Override any GCC internal prototype to avoid an error.
8551 Use char because int might match the return type of a GCC
8552 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008553#ifdef __cplusplus
8554extern "C"
8555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008556char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008557int
8558main ()
8559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 ;
8562 return 0;
8563}
8564_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565for ac_lib in '' pthread rt posix4; do
8566 if test -z "$ac_lib"; then
8567 ac_res="none required"
8568 else
8569 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008570 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008575rm -f core conftest.err conftest.$ac_objext \
8576 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008577 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580done
Victor Stinnere0be4232011-10-25 13:06:09 +02008581if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583else
8584 ac_cv_search_sem_init=no
8585fi
8586rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008587LIBS=$ac_func_search_save_LIBS
8588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8590$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008592if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008593 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008594
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008595fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008596 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008597 # posix4 on Solaris 2.6
8598 # pthread (first!) on Linux
8599fi
8600
Martin v. Löwis19d17342003-06-14 21:03:05 +00008601# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8603$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008604if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008606else
8607 ac_check_lib_save_LIBS=$LIBS
8608LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008610/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612/* Override any GCC internal prototype to avoid an error.
8613 Use char because int might match the return type of a GCC
8614 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008615#ifdef __cplusplus
8616extern "C"
8617#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008618char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008619int
8620main ()
8621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008623 ;
8624 return 0;
8625}
8626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008627if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008628 ac_cv_lib_intl_textdomain=yes
8629else
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632rm -f core conftest.err conftest.$ac_objext \
8633 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008634LIBS=$ac_check_lib_save_LIBS
8635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8637$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008638if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008639
Matthias Kloseb9621712010-04-24 17:59:49 +00008640$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008641
Brett Cannonc6d936e2009-06-07 20:09:53 +00008642 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008643fi
8644
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008645
8646# checks for system dependent C++ extensions support
8647case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8649$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008651/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008652
Georg Brandl59e87bd2011-02-15 19:48:59 +00008653 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008654int
8655main ()
8656{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008657loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 ;
8659 return 0;
8660}
Matthias Kloseb159a552010-04-25 21:00:44 +00008661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008663if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008664
Matthias Kloseb159a552010-04-25 21:00:44 +00008665
Matthias Kloseb9621712010-04-24 17:59:49 +00008666$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
Matthias Kloseb159a552010-04-25 21:00:44 +00008668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008669$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008670
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008671else
Matthias Kloseb159a552010-04-25 21:00:44 +00008672
8673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008674$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008675
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008677rm -f core conftest.err conftest.$ac_objext \
8678 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008679 *) ;;
8680esac
8681
Guido van Rossum70c7f481998-03-26 18:44:10 +00008682# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8684$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008685if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008687else
Martin v. Löwis11437992002-04-12 09:54:03 +00008688 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008689LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008693/* Override any GCC internal prototype to avoid an error.
8694 Use char because int might match the return type of a GCC
8695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008696#ifdef __cplusplus
8697extern "C"
8698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008699char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008700int
8701main ()
8702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008704 ;
8705 return 0;
8706}
8707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008708if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008710else
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008713rm -f core conftest.err conftest.$ac_objext \
8714 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008715LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8718$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008719if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008720 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008721fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008722 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8724$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008725if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008727else
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008729LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008732
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008733/* Override any GCC internal prototype to avoid an error.
8734 Use char because int might match the return type of a GCC
8735 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008736#ifdef __cplusplus
8737extern "C"
8738#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008739char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008740int
8741main ()
8742{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008743return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 ;
8745 return 0;
8746}
8747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008748if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008750else
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753rm -f core conftest.err conftest.$ac_objext \
8754 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008755LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8758$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008759if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008760 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008761fi
8762 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008763
Matthias Kloseb9621712010-04-24 17:59:49 +00008764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8765$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008767# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008768if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8771$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008772LIBS="$withval $LIBS"
8773
8774else
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8776$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008777fi
8778
Guido van Rossum7f43da71994-08-01 12:15:30 +00008779
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008780if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008781 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8782set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8784$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008785if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008787else
8788 case $PKG_CONFIG in
8789 [\\/]* | ?:[\\/]*)
8790 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8791 ;;
8792 *)
8793 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8794for as_dir in $PATH
8795do
8796 IFS=$as_save_IFS
8797 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008799 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 +00008800 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008802 break 2
8803 fi
8804done
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008806IFS=$as_save_IFS
8807
8808 ;;
8809esac
8810fi
8811PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8812if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8814$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008815else
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8817$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008818fi
8819
8820
8821fi
8822if test -z "$ac_cv_path_PKG_CONFIG"; then
8823 ac_pt_PKG_CONFIG=$PKG_CONFIG
8824 # Extract the first word of "pkg-config", so it can be a program name with args.
8825set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8827$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008828if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008830else
8831 case $ac_pt_PKG_CONFIG in
8832 [\\/]* | ?:[\\/]*)
8833 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8834 ;;
8835 *)
8836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8837for as_dir in $PATH
8838do
8839 IFS=$as_save_IFS
8840 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008841 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008842 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 +00008843 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008845 break 2
8846 fi
8847done
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008849IFS=$as_save_IFS
8850
8851 ;;
8852esac
8853fi
8854ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8855if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8857$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008858else
Matthias Kloseb9621712010-04-24 17:59:49 +00008859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8860$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008861fi
8862
8863 if test "x$ac_pt_PKG_CONFIG" = x; then
8864 PKG_CONFIG=""
8865 else
8866 case $cross_compiling:$ac_tool_warned in
8867yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008868{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8869$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008870ac_tool_warned=yes ;;
8871esac
8872 PKG_CONFIG=$ac_pt_PKG_CONFIG
8873 fi
8874else
8875 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8876fi
8877
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008878
8879# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8881$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008882
8883# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008884if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008885 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008886else
8887 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008888fi
8889
8890
Matthias Kloseb9621712010-04-24 17:59:49 +00008891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8892$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008893
8894# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8896$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008897
8898# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008899if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008900 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008901else
8902 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008903fi
8904
8905
8906if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008907 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8908else
8909 LIBFFI_INCLUDEDIR=""
8910fi
8911
8912
Matthias Kloseb9621712010-04-24 17:59:49 +00008913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8914$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008915
Stefan Krah60187b52012-03-23 19:06:27 +01008916# Check for use of the system libmpdec library
8917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
8918$as_echo_n "checking for --with-system-libmpdec... " >&6; }
8919
8920# Check whether --with-system_libmpdec was given.
8921if test "${with_system_libmpdec+set}" = set; then :
8922 withval=$with_system_libmpdec;
8923else
8924 with_system_libmpdec="no"
8925fi
8926
8927
8928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
8929$as_echo "$with_system_libmpdec" >&6; }
8930
Benjamin Peterson076ed002010-10-31 17:11:02 +00008931# Check for support for loadable sqlite extensions
8932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8933$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8934# Check whether --enable-loadable-sqlite-extensions was given.
8935if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8936 enableval=$enable_loadable_sqlite_extensions;
8937else
8938 enable_loadable_sqlite_extensions="no"
8939fi
8940
8941
8942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8943$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8944
Matthias Klose55708cc2009-04-30 08:06:49 +00008945# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8947$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008948
8949# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008950if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008951 withval=$with_dbmliborder;
8952if test x$with_dbmliborder = xyes
8953then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008954as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008955else
8956 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8957 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8958 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008959 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008960 fi
8961 done
8962fi
8963fi
8964
Matthias Kloseb9621712010-04-24 17:59:49 +00008965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8966$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008967
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008968# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008969
8970
Matthias Kloseb9621712010-04-24 17:59:49 +00008971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8972$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008973
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008975if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976 withval=$with_signal_module;
8977fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008978
8979
8980if test -z "$with_signal_module"
8981then with_signal_module="yes"
8982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8984$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008985
8986if test "${with_signal_module}" = "yes"; then
8987 USE_SIGNAL_MODULE=""
8988 SIGNAL_OBJS=""
8989else
8990 USE_SIGNAL_MODULE="#"
8991 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8992fi
8993
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008994# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008995
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008996USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998
Martin v. Löwis11437992002-04-12 09:54:03 +00008999
9000# Templates for things AC_DEFINEd more than once.
9001# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009002
9003
Martin v. Löwis11437992002-04-12 09:54:03 +00009004
Matthias Kloseb9621712010-04-24 17:59:49 +00009005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9006$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009007
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009008# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009009if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009010 withval=$with_threads;
9011fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009012
9013
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009014# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009015
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009016# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009017if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009018 withval=$with_thread; with_threads=$with_thread
9019fi
9020
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009021
9022if test -z "$with_threads"
9023then with_threads="yes"
9024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9026$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009027
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009028
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009029if test "$with_threads" = "no"
9030then
9031 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009032elif test "$ac_cv_pthread_is_default" = yes
9033then
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009035
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009036 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009038
9039 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009041elif test "$ac_cv_kpthread" = "yes"
9042then
9043 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009044 if test "$ac_cv_cxx_thread" = "yes"; then
9045 CXX="$CXX -Kpthread"
9046 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009048
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009049 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009050 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009051elif test "$ac_cv_kthread" = "yes"
9052then
9053 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009054 if test "$ac_cv_cxx_thread" = "yes"; then
9055 CXX="$CXX -Kthread"
9056 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009058
9059 posix_threads=yes
9060 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009061elif test "$ac_cv_pthread" = "yes"
9062then
9063 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009064 if test "$ac_cv_cxx_thread" = "yes"; then
9065 CXX="$CXX -pthread"
9066 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009067 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009068
9069 posix_threads=yes
9070 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009071else
9072 if test ! -z "$with_threads" -a -d "$with_threads"
9073 then LDFLAGS="$LDFLAGS -L$with_threads"
9074 fi
9075 if test ! -z "$withval" -a -d "$withval"
9076 then LDFLAGS="$LDFLAGS -L$withval"
9077 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009078
9079 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009080 # define _POSIX_THREADS in unistd.h. Some apparently don't
9081 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9083$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009085/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009086
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009087#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009088#ifdef _POSIX_THREADS
9089yes
9090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009091
9092_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009093if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009094 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009095 unistd_defines_pthreads=yes
9096else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009097 unistd_defines_pthreads=no
9098fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009099rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009100
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9102$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009103
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009105
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009106 # Just looking for pthread_create in libpthread is not enough:
9107 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9108 # So we really have to include pthread.h, and then link.
9109 _libs=$LIBS
9110 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9112$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009114/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009115#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009116
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009117void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009118int
9119main ()
9120{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009121
9122pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 ;
9124 return 0;
9125}
9126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009127if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009128
Matthias Kloseb9621712010-04-24 17:59:49 +00009129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9130$as_echo "yes" >&6; }
9131 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009132
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009133 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009134 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009135else
Martin v. Löwis11437992002-04-12 09:54:03 +00009136
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009137 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009138 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009139if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009140 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009141
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009142 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009143 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009144else
Guido van Rossumad678af1998-10-02 14:42:15 +00009145
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9147$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009148if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009149 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009150else
Martin v. Löwis11437992002-04-12 09:54:03 +00009151 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009152LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009156/* Override any GCC internal prototype to avoid an error.
9157 Use char because int might match the return type of a GCC
9158 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009159#ifdef __cplusplus
9160extern "C"
9161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009162char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009163int
9164main ()
9165{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009166return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009167 ;
9168 return 0;
9169}
9170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009173else
Matthias Kloseb9621712010-04-24 17:59:49 +00009174 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009176rm -f core conftest.err conftest.$ac_objext \
9177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009178LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9181$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009182if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009183 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009184
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009185 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009186 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009187 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009188else
Greg Steinadf63d62000-07-05 10:38:09 +00009189
Matthias Kloseb9621712010-04-24 17:59:49 +00009190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9191$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009192if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009193 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009194else
Martin v. Löwis11437992002-04-12 09:54:03 +00009195 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009196LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009200/* Override any GCC internal prototype to avoid an error.
9201 Use char because int might match the return type of a GCC
9202 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009203#ifdef __cplusplus
9204extern "C"
9205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009206char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009207int
9208main ()
9209{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009210return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009211 ;
9212 return 0;
9213}
9214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009215if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009216 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009217else
Matthias Kloseb9621712010-04-24 17:59:49 +00009218 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009220rm -f core conftest.err conftest.$ac_objext \
9221 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009222LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9225$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009226if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009227 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009228
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009229 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009230 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009231 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009232else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009233
Matthias Kloseb9621712010-04-24 17:59:49 +00009234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9235$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009236if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009237 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009238else
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009240LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009243
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009244/* Override any GCC internal prototype to avoid an error.
9245 Use char because int might match the return type of a GCC
9246 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009247#ifdef __cplusplus
9248extern "C"
9249#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009250char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009251int
9252main ()
9253{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009254return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009255 ;
9256 return 0;
9257}
9258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009259if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009261else
Matthias Kloseb9621712010-04-24 17:59:49 +00009262 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009264rm -f core conftest.err conftest.$ac_objext \
9265 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009266LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9269$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009270if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009271 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009272
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009273 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009274 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009275 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009276else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009277
Matthias Kloseb9621712010-04-24 17:59:49 +00009278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9279$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009280if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009281 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009282else
Martin v. Löwis11437992002-04-12 09:54:03 +00009283 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009284LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009286/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009287
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009288/* Override any GCC internal prototype to avoid an error.
9289 Use char because int might match the return type of a GCC
9290 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009291#ifdef __cplusplus
9292extern "C"
9293#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009294char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009295int
9296main ()
9297{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 ;
9300 return 0;
9301}
9302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009303if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009305else
Matthias Kloseb9621712010-04-24 17:59:49 +00009306 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009308rm -f core conftest.err conftest.$ac_objext \
9309 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009310LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9313$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009314if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009316
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009317 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009318 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009319 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009320else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009321
Martin v. Löwis130fb172001-07-19 11:00:41 +00009322 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009323fi
9324
Guido van Rossum627b2d71993-12-24 10:39:16 +00009325
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009326fi
9327
Guido van Rossum0be3e491997-05-22 20:33:33 +00009328fi
9329
Guido van Rossum49545951997-12-02 19:28:29 +00009330fi
9331
Guido van Rossumb93a8621998-05-07 13:27:32 +00009332fi
9333
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009335rm -f core conftest.err conftest.$ac_objext \
9336 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009337
Matthias Kloseb9621712010-04-24 17:59:49 +00009338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9339$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009340if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009341 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009342else
Martin v. Löwis11437992002-04-12 09:54:03 +00009343 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009344LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009347
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009348/* Override any GCC internal prototype to avoid an error.
9349 Use char because int might match the return type of a GCC
9350 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009351#ifdef __cplusplus
9352extern "C"
9353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009354char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009355int
9356main ()
9357{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009358return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009359 ;
9360 return 0;
9361}
9362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009363if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009365else
Matthias Kloseb9621712010-04-24 17:59:49 +00009366 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009368rm -f core conftest.err conftest.$ac_objext \
9369 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009370LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009371fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9373$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009374if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009375 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009376
Martin v. Löwis130fb172001-07-19 11:00:41 +00009377 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009378 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009379 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009380fi
9381
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009382
Neal Norwitza978ab02002-11-02 16:58:05 +00009383 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9385$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009386if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009387 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009388else
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009390LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009393
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394/* Override any GCC internal prototype to avoid an error.
9395 Use char because int might match the return type of a GCC
9396 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009397#ifdef __cplusplus
9398extern "C"
9399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009400char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009401int
9402main ()
9403{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 ;
9406 return 0;
9407}
9408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009409if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009410 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009411else
Matthias Kloseb9621712010-04-24 17:59:49 +00009412 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009414rm -f core conftest.err conftest.$ac_objext \
9415 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009416LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9419$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009420if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009421 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009422
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009423 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009424 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009425 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009426fi
9427
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009428 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009429fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009430
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009431if test "$posix_threads" = "yes"; then
9432 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009433
Matthias Kloseb9621712010-04-24 17:59:49 +00009434$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009435
9436 fi
9437
9438 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9439 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009440 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009441$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009442
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009443 ;;
9444 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009445$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009446
9447 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009448 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009449$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009450
9451 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009452 esac
9453
Matthias Kloseb9621712010-04-24 17:59:49 +00009454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9455$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009456 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009457 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009458else
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009460 ac_cv_pthread_system_supported=no
9461else
Matthias Kloseb9621712010-04-24 17:59:49 +00009462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009463/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009464#include <pthread.h>
9465 void *foo(void *parm) {
9466 return NULL;
9467 }
9468 main() {
9469 pthread_attr_t attr;
9470 pthread_t id;
9471 if (pthread_attr_init(&attr)) exit(-1);
9472 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9473 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9474 exit(0);
9475 }
9476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009477if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009478 ac_cv_pthread_system_supported=yes
9479else
Matthias Kloseb9621712010-04-24 17:59:49 +00009480 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009482rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9483 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009484fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486
Guido van Rossum627b2d71993-12-24 10:39:16 +00009487fi
9488
Matthias Kloseb9621712010-04-24 17:59:49 +00009489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9490$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009491 if test "$ac_cv_pthread_system_supported" = "yes"; then
9492
Matthias Kloseb9621712010-04-24 17:59:49 +00009493$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009494
9495 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 for ac_func in pthread_sigmask
9497do :
9498 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009499if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009500 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009501#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009502_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009503 case $ac_sys_system in
9504 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009505
Matthias Kloseb9621712010-04-24 17:59:49 +00009506$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009507
9508 ;;
9509 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009510fi
9511done
9512
9513fi
9514
9515
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009516# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009517
Matthias Kloseb9621712010-04-24 17:59:49 +00009518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9519$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009520# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009521if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009523 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9525$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009526 ipv6=no
9527 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009528 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9529$as_echo "yes" >&6; }
9530 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009531
9532 ipv6=yes
9533 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009534 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009535else
Martin v. Löwis11437992002-04-12 09:54:03 +00009536
Matthias Kloseb9621712010-04-24 17:59:49 +00009537 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009538
Matthias Kloseb9621712010-04-24 17:59:49 +00009539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009541 ipv6=no
9542
9543else
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009545/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009546 /* AF_INET6 available check */
9547#include <sys/types.h>
9548#include <sys/socket.h>
9549main()
9550{
9551 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9552 exit(1);
9553 else
9554 exit(0);
9555}
9556
Martin v. Löwis11437992002-04-12 09:54:03 +00009557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009558if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009559
Matthias Kloseb9621712010-04-24 17:59:49 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9561$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009562 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009563
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009564else
Matthias Kloseb159a552010-04-25 21:00:44 +00009565
Matthias Kloseb9621712010-04-24 17:59:49 +00009566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9567$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009568 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009569
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9572 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009573fi
9574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009575
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009576if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9578$as_echo_n "checking if RFC2553 API is available... " >&6; }
9579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009580/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009581
9582 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009583#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009584int
9585main ()
9586{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009587struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009588 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 ;
9590 return 0;
9591}
Matthias Kloseb159a552010-04-25 21:00:44 +00009592
Martin v. Löwis11437992002-04-12 09:54:03 +00009593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009594if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009595
9596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009597$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009598 ipv6=yes
9599
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009600else
Matthias Kloseb159a552010-04-25 21:00:44 +00009601
9602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009603$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009604 ipv6=no
9605
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009608fi
9609
9610if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009611 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009612
9613fi
9614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009615fi
9616
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009617
9618ipv6type=unknown
9619ipv6lib=none
9620ipv6trylibc=no
9621
9622if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9624$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009625 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9626 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009627 case $i in
9628 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009630/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009631
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009632#include <netinet/in.h>
9633#ifdef IPV6_INRIA_VERSION
9634yes
9635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009636_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009637if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009639 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009640fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009641rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009642
9643 ;;
9644 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009647
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009648#include <netinet/in.h>
9649#ifdef __KAME__
9650yes
9651#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009652_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009654 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009655 ipv6type=$i;
9656 ipv6lib=inet6
9657 ipv6libdir=/usr/local/v6/lib
9658 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009659fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009660rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009661
9662 ;;
9663 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009665/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009666
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009667#include <features.h>
9668#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9669yes
9670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009671_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009672if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009673 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009674 ipv6type=$i;
9675 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009676fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009677rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009678
9679 ;;
9680 linux-inet6)
9681 if test -d /usr/inet6; then
9682 ipv6type=$i
9683 ipv6lib=inet6
9684 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009685 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009686 fi
9687 ;;
9688 solaris)
9689 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009690 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009691 ipv6type=$i
9692 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009693 fi
9694 fi
9695 ;;
9696 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009698/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009699
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009700#include <sys/param.h>
9701#ifdef _TOSHIBA_INET6
9702yes
9703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009704_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009705if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009706 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009707 ipv6type=$i;
9708 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009709 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009710fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009711rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009712
9713 ;;
9714 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009716/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009717
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009718#include </usr/local/v6/include/sys/v6config.h>
9719#ifdef __V6D__
9720yes
9721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009722_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009724 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009725 ipv6type=$i;
9726 ipv6lib=v6;
9727 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009728 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009729fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009730rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009731
9732 ;;
9733 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009735/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009736
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009737#include <sys/param.h>
9738#ifdef _ZETA_MINAMI_INET6
9739yes
9740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009741_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009743 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009744 ipv6type=$i;
9745 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009746 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009747fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009748rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009749
9750 ;;
9751 esac
9752 if test "$ipv6type" != "unknown"; then
9753 break
9754 fi
9755 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9757$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009758fi
9759
9760if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9761 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9762 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9763 echo "using lib$ipv6lib"
9764 else
9765 if test $ipv6trylibc = "yes"; then
9766 echo "using libc"
9767 else
9768 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9769 echo "You need to fetch lib$ipv6lib.a from appropriate"
9770 echo 'ipv6 kit and compile beforehand.'
9771 exit 1
9772 fi
9773 fi
9774fi
9775
Matthias Kloseb9621712010-04-24 17:59:49 +00009776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9777$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009779/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009780
9781 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009782int
9783main ()
9784{
9785FSIORefNum fRef = 0
9786 ;
9787 return 0;
9788}
Matthias Kloseb159a552010-04-25 21:00:44 +00009789
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009791if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009792
Matthias Kloseb159a552010-04-25 21:00:44 +00009793
Matthias Kloseb9621712010-04-24 17:59:49 +00009794$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009795
Matthias Kloseb9621712010-04-24 17:59:49 +00009796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9797$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009798
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009799else
Matthias Kloseb159a552010-04-25 21:00:44 +00009800
Matthias Kloseb9621712010-04-24 17:59:49 +00009801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009803
9804fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9806
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009807# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9809$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009812if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813 withval=$with_doc_strings;
9814fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009815
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009816
9817if test -z "$with_doc_strings"
9818then with_doc_strings="yes"
9819fi
9820if test "$with_doc_strings" != "no"
9821then
9822
Matthias Kloseb9621712010-04-24 17:59:49 +00009823$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009824
9825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9827$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009828
Antoine Pitrou042b1282010-08-13 21:15:58 +00009829# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9831$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009834if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009836if test "$withval" != no
9837then
9838
Matthias Kloseb9621712010-04-24 17:59:49 +00009839$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009840
Matthias Kloseb9621712010-04-24 17:59:49 +00009841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9842$as_echo "yes" >&6; }
9843else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9844$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009845fi
9846else
Matthias Kloseb9621712010-04-24 17:59:49 +00009847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9848$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849fi
9850
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009851
9852# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9854$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009857if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858 withval=$with_pymalloc;
9859fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009860
Neil Schemenauera35c6882001-02-27 04:45:05 +00009861
Neil Schemenauer16c22972002-03-22 15:34:49 +00009862if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009863then
9864 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009865 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009866fi
9867if test "$with_pymalloc" != "no"
9868then
Martin v. Löwis11437992002-04-12 09:54:03 +00009869
Matthias Kloseb9621712010-04-24 17:59:49 +00009870$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009871
9872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9874$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009875
Benjamin Peterson05159c42009-12-03 03:01:27 +00009876# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9878$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009879
9880# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009881if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009882 withval=$with_valgrind;
9883else
9884 with_valgrind=no
9885fi
9886
Matthias Kloseb9621712010-04-24 17:59:49 +00009887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9888$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009889if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 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 +02009891if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009892
Matthias Kloseb9621712010-04-24 17:59:49 +00009893$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009894
9895else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009896 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009897
9898fi
9899
9900
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009901 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009902fi
9903
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009904# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009905
Guido van Rossum98935bf2001-09-05 19:13:16 +00009906DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009907
Guido van Rossume97ee181999-12-20 21:27:22 +00009908# the dlopen() function means we might want to use dynload_shlib.o. some
9909# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009910for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009911do :
9912 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +02009913if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009915#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009916_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009917
Guido van Rossume97ee181999-12-20 21:27:22 +00009918fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009919done
Guido van Rossume97ee181999-12-20 21:27:22 +00009920
Michael W. Hudson54241132001-12-07 15:38:26 +00009921
Guido van Rossume97ee181999-12-20 21:27:22 +00009922# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9923# loading of modules.
9924
Matthias Kloseb9621712010-04-24 17:59:49 +00009925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9926$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009927if test -z "$DYNLOADFILE"
9928then
9929 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009930 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9931 if test "$ac_cv_func_dlopen" = yes
9932 then DYNLOADFILE="dynload_shlib.o"
9933 else DYNLOADFILE="dynload_aix.o"
9934 fi
9935 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009936 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009937 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9938 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009939 *)
9940 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9941 # out any dynamic loading
9942 if test "$ac_cv_func_dlopen" = yes
9943 then DYNLOADFILE="dynload_shlib.o"
9944 else DYNLOADFILE="dynload_stub.o"
9945 fi
9946 ;;
9947 esac
9948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9950$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009951if test "$DYNLOADFILE" != "dynload_stub.o"
9952then
Martin v. Löwis11437992002-04-12 09:54:03 +00009953
Matthias Kloseb9621712010-04-24 17:59:49 +00009954$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009955
9956fi
9957
Neil Schemenauer4e425612001-06-19 15:44:15 +00009958# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9959
Michael W. Hudson54241132001-12-07 15:38:26 +00009960
Matthias Kloseb9621712010-04-24 17:59:49 +00009961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9962$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009963if test -z "$MACHDEP_OBJS"
9964then
Jack Jansene578a632001-08-15 01:27:14 +00009965 MACHDEP_OBJS=$extra_machdep_objs
9966else
9967 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9970$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009971
Guido van Rossum627b2d71993-12-24 10:39:16 +00009972# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009973for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -08009974 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009975 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009976 futimens futimes gai_strerror \
9977 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009978 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009979 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +01009980 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
9981 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009982 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009983 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009984 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009985 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009986 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009987 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009988 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9989 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009990 sigaction sigaltstack siginterrupt sigpending sigrelse \
9991 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009992 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009993 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9994 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009995do :
9996 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9997ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009998if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009999 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010000#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010001_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010002
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010003fi
10004done
10005
Michael W. Hudson54241132001-12-07 15:38:26 +000010006
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010007ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10008 #include <dirent.h>
10009"
10010if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10011
10012$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10013
10014fi
10015
10016
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010017# For some functions, having a definition is not sufficient, since
10018# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10020$as_echo_n "checking for chroot... " >&6; }
10021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010022/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010023#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010024int
10025main ()
10026{
10027void *x=chroot
10028 ;
10029 return 0;
10030}
10031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010032if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010033
Matthias Kloseb9621712010-04-24 17:59:49 +000010034$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010035
Matthias Kloseb159a552010-04-25 21:00:44 +000010036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010037$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010038else
Matthias Kloseb9621712010-04-24 17:59:49 +000010039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10040$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010041
10042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10045$as_echo_n "checking for link... " >&6; }
10046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010047/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010048#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010049int
10050main ()
10051{
10052void *x=link
10053 ;
10054 return 0;
10055}
10056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010058
Matthias Kloseb9621712010-04-24 17:59:49 +000010059$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010060
Matthias Kloseb159a552010-04-25 21:00:44 +000010061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010062$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010063else
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10065$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010066
10067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10070$as_echo_n "checking for symlink... " >&6; }
10071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010072/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010073#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010074int
10075main ()
10076{
10077void *x=symlink
10078 ;
10079 return 0;
10080}
10081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010083
Matthias Kloseb9621712010-04-24 17:59:49 +000010084$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010085
Matthias Kloseb159a552010-04-25 21:00:44 +000010086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010087$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010088else
Matthias Kloseb9621712010-04-24 17:59:49 +000010089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10090$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010091
10092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10095$as_echo_n "checking for fchdir... " >&6; }
10096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010097/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010098#include <unistd.h>
10099int
10100main ()
10101{
10102void *x=fchdir
10103 ;
10104 return 0;
10105}
10106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010108
Matthias Kloseb9621712010-04-24 17:59:49 +000010109$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010110
Matthias Kloseb159a552010-04-25 21:00:44 +000010111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010112$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010113else
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010116
10117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10120$as_echo_n "checking for fsync... " >&6; }
10121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010122/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010123#include <unistd.h>
10124int
10125main ()
10126{
10127void *x=fsync
10128 ;
10129 return 0;
10130}
10131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010132if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010133
Matthias Kloseb9621712010-04-24 17:59:49 +000010134$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010135
Matthias Kloseb159a552010-04-25 21:00:44 +000010136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010137$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010138else
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010141
10142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10145$as_echo_n "checking for fdatasync... " >&6; }
10146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010147/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010148#include <unistd.h>
10149int
10150main ()
10151{
10152void *x=fdatasync
10153 ;
10154 return 0;
10155}
10156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010157if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010158
Matthias Kloseb9621712010-04-24 17:59:49 +000010159$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010160
Matthias Kloseb159a552010-04-25 21:00:44 +000010161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010162$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010163else
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10165$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010166
10167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10170$as_echo_n "checking for epoll... " >&6; }
10171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010172/* end confdefs.h. */
10173#include <sys/epoll.h>
10174int
10175main ()
10176{
10177void *x=epoll_create
10178 ;
10179 return 0;
10180}
10181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010183
Matthias Kloseb9621712010-04-24 17:59:49 +000010184$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010185
Matthias Kloseb159a552010-04-25 21:00:44 +000010186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010187$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010188else
Matthias Kloseb9621712010-04-24 17:59:49 +000010189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10190$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010191
10192fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10195$as_echo_n "checking for epoll_create1... " >&6; }
10196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10197/* end confdefs.h. */
10198#include <sys/epoll.h>
10199int
10200main ()
10201{
10202void *x=epoll_create1
10203 ;
10204 return 0;
10205}
10206_ACEOF
10207if ac_fn_c_try_compile "$LINENO"; then :
10208
10209$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10210
10211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10212$as_echo "yes" >&6; }
10213else
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
10216
10217fi
10218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10220$as_echo_n "checking for kqueue... " >&6; }
10221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010222/* end confdefs.h. */
10223
10224#include <sys/types.h>
10225#include <sys/event.h>
10226
10227int
10228main ()
10229{
10230int x=kqueue()
10231 ;
10232 return 0;
10233}
10234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010235if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010236
Matthias Kloseb9621712010-04-24 17:59:49 +000010237$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010238
Matthias Kloseb159a552010-04-25 21:00:44 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010240$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010241else
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10243$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010244
10245fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010247# On some systems (eg. FreeBSD 5), we would find a definition of the
10248# functions ctermid_r, setgroups in the library, but no prototype
10249# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10250# address to avoid compiler warnings and potential miscompilations
10251# because of the missing prototypes.
10252
Matthias Kloseb9621712010-04-24 17:59:49 +000010253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10254$as_echo_n "checking for ctermid_r... " >&6; }
10255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010256/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010257
Martin v. Löwisd5843682002-11-21 20:41:28 +000010258#include <stdio.h>
10259
Martin v. Löwisd5843682002-11-21 20:41:28 +000010260int
10261main ()
10262{
10263void* p = ctermid_r
10264 ;
10265 return 0;
10266}
10267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010269
Matthias Kloseb9621712010-04-24 17:59:49 +000010270$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010271
Matthias Kloseb159a552010-04-25 21:00:44 +000010272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010273$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010274else
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010277
10278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10280
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10282$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010283if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010284 $as_echo_n "(cached) " >&6
10285else
10286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010287/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010288#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010289int
10290main ()
10291{
10292void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010293
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010294 ;
10295 return 0;
10296}
10297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010298if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010299 ac_cv_flock_decl=yes
10300else
10301 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010302
10303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010305
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010306fi
10307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10308$as_echo "$ac_cv_flock_decl" >&6; }
10309if test "x${ac_cv_flock_decl}" = xyes; then
10310 for ac_func in flock
10311do :
10312 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010313if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010314 cat >>confdefs.h <<_ACEOF
10315#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010316_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010317
Antoine Pitroua3000072010-09-07 14:52:42 +000010318else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010320$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010321if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010322 $as_echo_n "(cached) " >&6
10323else
10324 ac_check_lib_save_LIBS=$LIBS
10325LIBS="-lbsd $LIBS"
10326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10327/* end confdefs.h. */
10328
10329/* Override any GCC internal prototype to avoid an error.
10330 Use char because int might match the return type of a GCC
10331 builtin and then its argument prototype would still apply. */
10332#ifdef __cplusplus
10333extern "C"
10334#endif
10335char flock ();
10336int
10337main ()
10338{
10339return flock ();
10340 ;
10341 return 0;
10342}
10343_ACEOF
10344if ac_fn_c_try_link "$LINENO"; then :
10345 ac_cv_lib_bsd_flock=yes
10346else
10347 ac_cv_lib_bsd_flock=no
10348fi
10349rm -f core conftest.err conftest.$ac_objext \
10350 conftest$ac_exeext conftest.$ac_ext
10351LIBS=$ac_check_lib_save_LIBS
10352fi
10353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10354$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010355if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010356 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010357
10358
10359$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10360
10361
10362fi
10363
10364
10365fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010366done
10367
Antoine Pitroua3000072010-09-07 14:52:42 +000010368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010369
Matthias Kloseb9621712010-04-24 17:59:49 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10371$as_echo_n "checking for getpagesize... " >&6; }
10372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010373/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010374
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010375#include <unistd.h>
10376
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010377int
10378main ()
10379{
10380void* p = getpagesize
10381 ;
10382 return 0;
10383}
10384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010386
Matthias Kloseb9621712010-04-24 17:59:49 +000010387$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010388
Matthias Kloseb159a552010-04-25 21:00:44 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010390$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010391else
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10393$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010394
10395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010397
Victor Stinner984890f2011-11-24 13:53:38 +010010398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10399$as_echo_n "checking for broken unsetenv... " >&6; }
10400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10401/* end confdefs.h. */
10402
10403#include <stdlib.h>
10404
10405int
10406main ()
10407{
10408int res = unsetenv("DUMMY")
10409 ;
10410 return 0;
10411}
10412_ACEOF
10413if ac_fn_c_try_compile "$LINENO"; then :
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10415$as_echo "no" >&6; }
10416else
10417
10418$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10419
10420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10421$as_echo "yes" >&6; }
10422
10423fi
10424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10425
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010426for ac_prog in true
10427do
10428 # Extract the first word of "$ac_prog", so it can be a program name with args.
10429set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10431$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010432if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010434else
10435 if test -n "$TRUE"; then
10436 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10437else
10438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10439for as_dir in $PATH
10440do
10441 IFS=$as_save_IFS
10442 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010443 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +020010444 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 +000010445 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 $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 +000010447 break 2
10448 fi
10449done
Matthias Kloseb9621712010-04-24 17:59:49 +000010450 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010452
10453fi
10454fi
10455TRUE=$ac_cv_prog_TRUE
10456if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10458$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010459else
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10461$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010462fi
10463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010464
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010465 test -n "$TRUE" && break
10466done
10467test -n "$TRUE" || TRUE="/bin/true"
10468
10469
Matthias Kloseb9621712010-04-24 17:59:49 +000010470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10471$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010472if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010473 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010474else
10475 ac_check_lib_save_LIBS=$LIBS
10476LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010478/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480/* Override any GCC internal prototype to avoid an error.
10481 Use char because int might match the return type of a GCC
10482 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010483#ifdef __cplusplus
10484extern "C"
10485#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010486char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010487int
10488main ()
10489{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010490return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010491 ;
10492 return 0;
10493}
10494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010495if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010496 ac_cv_lib_c_inet_aton=yes
10497else
Matthias Kloseb9621712010-04-24 17:59:49 +000010498 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010500rm -f core conftest.err conftest.$ac_objext \
10501 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010502LIBS=$ac_check_lib_save_LIBS
10503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10505$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010506if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010507 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010508else
Matthias Kloseb9621712010-04-24 17:59:49 +000010509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10510$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010511if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010512 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010513else
10514 ac_check_lib_save_LIBS=$LIBS
10515LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010517/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010519/* Override any GCC internal prototype to avoid an error.
10520 Use char because int might match the return type of a GCC
10521 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010522#ifdef __cplusplus
10523extern "C"
10524#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010525char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010526int
10527main ()
10528{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010529return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010530 ;
10531 return 0;
10532}
10533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010534if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010535 ac_cv_lib_resolv_inet_aton=yes
10536else
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010539rm -f core conftest.err conftest.$ac_objext \
10540 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010541LIBS=$ac_check_lib_save_LIBS
10542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10544$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010545if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010546 cat >>confdefs.h <<_ACEOF
10547#define HAVE_LIBRESOLV 1
10548_ACEOF
10549
10550 LIBS="-lresolv $LIBS"
10551
10552fi
10553
10554
10555fi
10556
10557
Christian Heimesd0764e22007-12-04 15:00:33 +000010558# On Tru64, chflags seems to be present, but calling it will
10559# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10561$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010562if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010564else
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010566 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010567else
Matthias Kloseb9621712010-04-24 17:59:49 +000010568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010569/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010570
Christian Heimesd0764e22007-12-04 15:00:33 +000010571#include <sys/stat.h>
10572#include <unistd.h>
10573int main(int argc, char*argv[])
10574{
10575 if(chflags(argv[0], 0) != 0)
10576 return 1;
10577 return 0;
10578}
Ned Deily3eb67d52011-06-28 00:00:28 -070010579
Christian Heimesd0764e22007-12-04 15:00:33 +000010580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010581if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010582 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010583else
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010588fi
10589
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010590
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10593$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010594if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010596if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010597 ac_cv_have_chflags="yes"
10598else
10599 ac_cv_have_chflags="no"
10600fi
10601
10602fi
10603if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010604
Matthias Kloseb9621712010-04-24 17:59:49 +000010605$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010606
10607fi
10608
Matthias Kloseb9621712010-04-24 17:59:49 +000010609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10610$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010611if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010613else
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010615 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010616else
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010618/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010619
Christian Heimesd0764e22007-12-04 15:00:33 +000010620#include <sys/stat.h>
10621#include <unistd.h>
10622int main(int argc, char*argv[])
10623{
10624 if(lchflags(argv[0], 0) != 0)
10625 return 1;
10626 return 0;
10627}
Ned Deily3eb67d52011-06-28 00:00:28 -070010628
Christian Heimesd0764e22007-12-04 15:00:33 +000010629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010630if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010631 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010632else
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10636 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010637fi
10638
10639
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10642$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010643if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010645if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010646 ac_cv_have_lchflags="yes"
10647else
10648 ac_cv_have_lchflags="no"
10649fi
10650
10651fi
10652if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010655
10656fi
10657
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010658case $ac_sys_system/$ac_sys_release in
10659Darwin/*)
10660 _CUR_CFLAGS="${CFLAGS}"
10661 _CUR_LDFLAGS="${LDFLAGS}"
10662 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10663 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10664 ;;
10665esac
10666
Matthias Kloseb9621712010-04-24 17:59:49 +000010667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10668$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010669if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010671else
10672 ac_check_lib_save_LIBS=$LIBS
10673LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010675/* end confdefs.h. */
10676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677/* Override any GCC internal prototype to avoid an error.
10678 Use char because int might match the return type of a GCC
10679 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010680#ifdef __cplusplus
10681extern "C"
10682#endif
10683char inflateCopy ();
10684int
10685main ()
10686{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010688 ;
10689 return 0;
10690}
10691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010692if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010693 ac_cv_lib_z_inflateCopy=yes
10694else
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010697rm -f core conftest.err conftest.$ac_objext \
10698 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010699LIBS=$ac_check_lib_save_LIBS
10700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10702$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010703if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010704
Matthias Kloseb9621712010-04-24 17:59:49 +000010705$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010706
10707fi
10708
10709
10710case $ac_sys_system/$ac_sys_release in
10711Darwin/*)
10712 CFLAGS="${_CUR_CFLAGS}"
10713 LDFLAGS="${_CUR_LDFLAGS}"
10714 ;;
10715esac
10716
Matthias Kloseb9621712010-04-24 17:59:49 +000010717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10718$as_echo_n "checking for hstrerror... " >&6; }
10719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010720/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010721
Martin v. Löwise9416172003-05-03 10:12:45 +000010722#include <netdb.h>
10723
Martin v. Löwise9416172003-05-03 10:12:45 +000010724int
10725main ()
10726{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010727void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010728 ;
10729 return 0;
10730}
10731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010732if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010733
Matthias Kloseb9621712010-04-24 17:59:49 +000010734$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010735
Matthias Kloseb159a552010-04-25 21:00:44 +000010736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010737$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010738else
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10740$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010741
10742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010743rm -f core conftest.err conftest.$ac_objext \
10744 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010745
Matthias Kloseb9621712010-04-24 17:59:49 +000010746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10747$as_echo_n "checking for inet_aton... " >&6; }
10748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010749/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010750
Martin v. Löwis86d66262006-02-17 08:40:11 +000010751#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010752#include <sys/socket.h>
10753#include <netinet/in.h>
10754#include <arpa/inet.h>
10755
Martin v. Löwise9416172003-05-03 10:12:45 +000010756int
10757main ()
10758{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010759void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010760 ;
10761 return 0;
10762}
10763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010764if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010765
Matthias Kloseb9621712010-04-24 17:59:49 +000010766$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010767
Matthias Kloseb159a552010-04-25 21:00:44 +000010768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010769$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010770else
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10772$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010773
10774fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010775rm -f core conftest.err conftest.$ac_objext \
10776 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010777
Matthias Kloseb9621712010-04-24 17:59:49 +000010778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10779$as_echo_n "checking for inet_pton... " >&6; }
10780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010781/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010782
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010783#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010784#include <sys/socket.h>
10785#include <netinet/in.h>
10786#include <arpa/inet.h>
10787
Martin v. Löwise9416172003-05-03 10:12:45 +000010788int
10789main ()
10790{
10791void* p = inet_pton
10792 ;
10793 return 0;
10794}
10795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010796if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010797
Matthias Kloseb9621712010-04-24 17:59:49 +000010798$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010799
Matthias Kloseb159a552010-04-25 21:00:44 +000010800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010801$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010802else
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10804$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010805
10806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010808
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010809# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10811$as_echo_n "checking for setgroups... " >&6; }
10812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010813/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010814
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010815#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010816#ifdef HAVE_GRP_H
10817#include <grp.h>
10818#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010819
Martin v. Löwisd5843682002-11-21 20:41:28 +000010820int
10821main ()
10822{
10823void* p = setgroups
10824 ;
10825 return 0;
10826}
10827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010828if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010829
Matthias Kloseb9621712010-04-24 17:59:49 +000010830$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010831
Matthias Kloseb159a552010-04-25 21:00:44 +000010832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010833$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010834else
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10836$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010837
10838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010840
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010841# check for openpty and forkpty
10842
10843for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010844do :
10845 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010846if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010847 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010848#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010849_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010850
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010851else
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10853$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010854if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010856else
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010858LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010862/* Override any GCC internal prototype to avoid an error.
10863 Use char because int might match the return type of a GCC
10864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010865#ifdef __cplusplus
10866extern "C"
10867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010868char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010869int
10870main ()
10871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010872return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010873 ;
10874 return 0;
10875}
10876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010877if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010879else
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010882rm -f core conftest.err conftest.$ac_objext \
10883 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010884LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10887$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010888if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010890 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010891else
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10893$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010894if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010896else
10897 ac_check_lib_save_LIBS=$LIBS
10898LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010900/* end confdefs.h. */
10901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010902/* Override any GCC internal prototype to avoid an error.
10903 Use char because int might match the return type of a GCC
10904 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010905#ifdef __cplusplus
10906extern "C"
10907#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010908char openpty ();
10909int
10910main ()
10911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010912return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010913 ;
10914 return 0;
10915}
10916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010917if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010918 ac_cv_lib_bsd_openpty=yes
10919else
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010922rm -f core conftest.err conftest.$ac_objext \
10923 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010924LIBS=$ac_check_lib_save_LIBS
10925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10927$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010928if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010929 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010930 LIBS="$LIBS -lbsd"
10931fi
10932
10933
10934fi
10935
Fred Drake8cef4cf2000-06-28 16:40:38 +000010936
10937fi
10938done
10939
10940for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010941do :
10942 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010943if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010945#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010946_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010947
Fred Drake8cef4cf2000-06-28 16:40:38 +000010948else
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10950$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010951if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010953else
Martin v. Löwis11437992002-04-12 09:54:03 +000010954 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010955LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010959/* Override any GCC internal prototype to avoid an error.
10960 Use char because int might match the return type of a GCC
10961 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010962#ifdef __cplusplus
10963extern "C"
10964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010965char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010966int
10967main ()
10968{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 ;
10971 return 0;
10972}
10973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010974if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010975 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010976else
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010979rm -f core conftest.err conftest.$ac_objext \
10980 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010981LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10984$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010985if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010986 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010987 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010988else
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10990$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010991if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010993else
10994 ac_check_lib_save_LIBS=$LIBS
10995LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010997/* end confdefs.h. */
10998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999/* Override any GCC internal prototype to avoid an error.
11000 Use char because int might match the return type of a GCC
11001 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011002#ifdef __cplusplus
11003extern "C"
11004#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011005char forkpty ();
11006int
11007main ()
11008{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011010 ;
11011 return 0;
11012}
11013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011015 ac_cv_lib_bsd_forkpty=yes
11016else
Matthias Kloseb9621712010-04-24 17:59:49 +000011017 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011019rm -f core conftest.err conftest.$ac_objext \
11020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011021LIBS=$ac_check_lib_save_LIBS
11022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11024$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011025if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011027 LIBS="$LIBS -lbsd"
11028fi
11029
11030
11031fi
11032
Fred Drake8cef4cf2000-06-28 16:40:38 +000011033
11034fi
11035done
11036
Jack Jansendd19cf82001-12-06 22:36:17 +000011037
Christian Heimesb186d002008-03-18 15:15:01 +000011038# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011039for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011040do :
11041 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011042if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011043 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011044#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011045_ACEOF
11046
11047fi
11048done
11049
11050
Michael W. Hudson54241132001-12-07 15:38:26 +000011051# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011052for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011053do :
11054 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11055ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011056if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011058#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011059_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011060
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011061fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011062done
11063
Michael W. Hudson54241132001-12-07 15:38:26 +000011064
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011065ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011066if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011067 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011068
Martin v. Löwis1142de32002-03-29 16:28:31 +000011069else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011070 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011071 *" dup2.$ac_objext "* ) ;;
11072 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011074esac
11075
Martin v. Löwis1142de32002-03-29 16:28:31 +000011076fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011077
11078ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011079if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011080 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11081
11082else
11083 case " $LIBOBJS " in
11084 *" getcwd.$ac_objext "* ) ;;
11085 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11086 ;;
11087esac
11088
11089fi
11090
11091ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011092if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011093 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11094
11095else
11096 case " $LIBOBJS " in
11097 *" strdup.$ac_objext "* ) ;;
11098 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11099 ;;
11100esac
11101
11102fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011103
11104
11105for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011106do :
11107 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011108if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011109 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011110#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011113/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011114#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011115int
11116main ()
11117{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011118getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011119 ;
11120 return 0;
11121}
11122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011123if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011124
Matthias Kloseb9621712010-04-24 17:59:49 +000011125$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011126
Guido van Rossum627b2d71993-12-24 10:39:16 +000011127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011129
Guido van Rossum627b2d71993-12-24 10:39:16 +000011130fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011131done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011132
Jack Jansen150753c2003-03-29 22:07:47 +000011133for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011134do :
11135 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011136if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011137 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011138#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011141/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011142#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011143int
11144main ()
11145{
11146setpgrp(0,0);
11147 ;
11148 return 0;
11149}
11150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011152
Matthias Kloseb9621712010-04-24 17:59:49 +000011153$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011154
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011157
11158fi
11159done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011160
Thomas Wouters3a584202000-08-05 23:28:51 +000011161for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011162do :
11163 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011164if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011165 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011166#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011169/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011170#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011171int
11172main ()
11173{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011174gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011175 ;
11176 return 0;
11177}
11178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011179if ac_fn_c_try_compile "$LINENO"; then :
11180
Guido van Rossum627b2d71993-12-24 10:39:16 +000011181else
Skip Montanaro6dead952003-09-25 14:50:04 +000011182
Matthias Kloseb9621712010-04-24 17:59:49 +000011183$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011184
Martin v. Löwis11437992002-04-12 09:54:03 +000011185
Guido van Rossum627b2d71993-12-24 10:39:16 +000011186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011188
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011189fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011190done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011191
Michael W. Hudson54241132001-12-07 15:38:26 +000011192
Victor Stinnere0be4232011-10-25 13:06:09 +020011193for ac_func in clock_gettime
11194do :
11195 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11196if test "x$ac_cv_func_clock_gettime" = xyes; then :
11197 cat >>confdefs.h <<_ACEOF
11198#define HAVE_CLOCK_GETTIME 1
11199_ACEOF
11200
11201else
11202
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11204$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11205if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11206 $as_echo_n "(cached) " >&6
11207else
11208 ac_check_lib_save_LIBS=$LIBS
11209LIBS="-lrt $LIBS"
11210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11211/* end confdefs.h. */
11212
11213/* Override any GCC internal prototype to avoid an error.
11214 Use char because int might match the return type of a GCC
11215 builtin and then its argument prototype would still apply. */
11216#ifdef __cplusplus
11217extern "C"
11218#endif
11219char clock_gettime ();
11220int
11221main ()
11222{
11223return clock_gettime ();
11224 ;
11225 return 0;
11226}
11227_ACEOF
11228if ac_fn_c_try_link "$LINENO"; then :
11229 ac_cv_lib_rt_clock_gettime=yes
11230else
11231 ac_cv_lib_rt_clock_gettime=no
11232fi
11233rm -f core conftest.err conftest.$ac_objext \
11234 conftest$ac_exeext conftest.$ac_ext
11235LIBS=$ac_check_lib_save_LIBS
11236fi
11237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11238$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11239if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11240
11241 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11242
11243
11244$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11245
11246
11247fi
11248
11249
11250fi
11251done
11252
11253
11254for ac_func in clock_getres
11255do :
11256 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11257if test "x$ac_cv_func_clock_getres" = xyes; then :
11258 cat >>confdefs.h <<_ACEOF
11259#define HAVE_CLOCK_GETRES 1
11260_ACEOF
11261
11262else
11263
11264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11265$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11266if ${ac_cv_lib_rt_clock_getres+:} false; then :
11267 $as_echo_n "(cached) " >&6
11268else
11269 ac_check_lib_save_LIBS=$LIBS
11270LIBS="-lrt $LIBS"
11271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11272/* end confdefs.h. */
11273
11274/* Override any GCC internal prototype to avoid an error.
11275 Use char because int might match the return type of a GCC
11276 builtin and then its argument prototype would still apply. */
11277#ifdef __cplusplus
11278extern "C"
11279#endif
11280char clock_getres ();
11281int
11282main ()
11283{
11284return clock_getres ();
11285 ;
11286 return 0;
11287}
11288_ACEOF
11289if ac_fn_c_try_link "$LINENO"; then :
11290 ac_cv_lib_rt_clock_getres=yes
11291else
11292 ac_cv_lib_rt_clock_getres=no
11293fi
11294rm -f core conftest.err conftest.$ac_objext \
11295 conftest$ac_exeext conftest.$ac_ext
11296LIBS=$ac_check_lib_save_LIBS
11297fi
11298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11299$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11300if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11301
11302 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11303
11304
11305fi
11306
11307
11308fi
11309done
11310
11311
Matthias Kloseb9621712010-04-24 17:59:49 +000011312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11313$as_echo_n "checking for major... " >&6; }
11314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011315/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011316
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011317#if defined(MAJOR_IN_MKDEV)
11318#include <sys/mkdev.h>
11319#elif defined(MAJOR_IN_SYSMACROS)
11320#include <sys/sysmacros.h>
11321#else
11322#include <sys/types.h>
11323#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011324
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011325int
11326main ()
11327{
11328
11329 makedev(major(0),minor(0));
11330
11331 ;
11332 return 0;
11333}
11334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011335if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011336
11337
Matthias Kloseb9621712010-04-24 17:59:49 +000011338$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011339
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11341$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011342
11343else
Skip Montanaro6dead952003-09-25 14:50:04 +000011344
Matthias Kloseb9621712010-04-24 17:59:49 +000011345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11346$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011347
11348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011349rm -f core conftest.err conftest.$ac_objext \
11350 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011351
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011352# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011353# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11355$as_echo_n "checking for getaddrinfo... " >&6; }
11356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011357/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011358
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011359#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011360#include <sys/socket.h>
11361#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011362#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011363
Martin v. Löwis11437992002-04-12 09:54:03 +000011364int
11365main ()
11366{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011367getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 ;
11369 return 0;
11370}
11371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011372if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011373 have_getaddrinfo=yes
11374else
Matthias Kloseb9621712010-04-24 17:59:49 +000011375 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011376fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011377rm -f core conftest.err conftest.$ac_objext \
11378 conftest$ac_exeext conftest.$ac_ext
11379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11380$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011381if test $have_getaddrinfo = yes
11382then
Matthias Kloseb9621712010-04-24 17:59:49 +000011383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11384$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011385 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011387else
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011389
11390if test "${enable_ipv6+set}" = set; then
11391 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11392else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011393 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011394fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011395else
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011397/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011398
11399#include <sys/types.h>
11400#include <netdb.h>
11401#include <string.h>
11402#include <sys/socket.h>
11403#include <netinet/in.h>
11404
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011405int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011406{
11407 int passive, gaierr, inet4 = 0, inet6 = 0;
11408 struct addrinfo hints, *ai, *aitop;
11409 char straddr[INET6_ADDRSTRLEN], strport[16];
11410
11411 for (passive = 0; passive <= 1; passive++) {
11412 memset(&hints, 0, sizeof(hints));
11413 hints.ai_family = AF_UNSPEC;
11414 hints.ai_flags = passive ? AI_PASSIVE : 0;
11415 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011416 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011417 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11418 (void)gai_strerror(gaierr);
11419 goto bad;
11420 }
11421 for (ai = aitop; ai; ai = ai->ai_next) {
11422 if (ai->ai_addr == NULL ||
11423 ai->ai_addrlen == 0 ||
11424 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11425 straddr, sizeof(straddr), strport, sizeof(strport),
11426 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11427 goto bad;
11428 }
11429 switch (ai->ai_family) {
11430 case AF_INET:
11431 if (strcmp(strport, "54321") != 0) {
11432 goto bad;
11433 }
11434 if (passive) {
11435 if (strcmp(straddr, "0.0.0.0") != 0) {
11436 goto bad;
11437 }
11438 } else {
11439 if (strcmp(straddr, "127.0.0.1") != 0) {
11440 goto bad;
11441 }
11442 }
11443 inet4++;
11444 break;
11445 case AF_INET6:
11446 if (strcmp(strport, "54321") != 0) {
11447 goto bad;
11448 }
11449 if (passive) {
11450 if (strcmp(straddr, "::") != 0) {
11451 goto bad;
11452 }
11453 } else {
11454 if (strcmp(straddr, "::1") != 0) {
11455 goto bad;
11456 }
11457 }
11458 inet6++;
11459 break;
11460 case AF_UNSPEC:
11461 goto bad;
11462 break;
11463 default:
11464 /* another family support? */
11465 break;
11466 }
11467 }
11468 }
11469
11470 if (!(inet4 == 0 || inet4 == 2))
11471 goto bad;
11472 if (!(inet6 == 0 || inet6 == 2))
11473 goto bad;
11474
11475 if (aitop)
11476 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011477 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011478
11479 bad:
11480 if (aitop)
11481 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011482 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011483}
11484
Martin v. Löwis11437992002-04-12 09:54:03 +000011485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011486if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011487 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011488else
Matthias Kloseb9621712010-04-24 17:59:49 +000011489 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11492 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011495fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011496
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11500$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11501
Mark Dickinson2df5d282009-12-31 21:22:50 +000011502if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011503then
11504 if test $ipv6 = yes
11505 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011506 echo 'Fatal: You must get working getaddrinfo() function.'
11507 echo ' or you can specify "--disable-ipv6"'.
11508 exit 1
11509 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011510else
Martin v. Löwis11437992002-04-12 09:54:03 +000011511
Matthias Kloseb9621712010-04-24 17:59:49 +000011512$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011513
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011514fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011515
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011516for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011517do :
11518 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011519if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011521#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011522_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011523
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011524fi
11525done
11526
Michael W. Hudson54241132001-12-07 15:38:26 +000011527
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011528# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11530$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011531if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011532 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011533else
Matthias Kloseb9621712010-04-24 17:59:49 +000011534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011535/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011536#include <sys/types.h>
11537#include <sys/time.h>
11538#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011539
Martin v. Löwis11437992002-04-12 09:54:03 +000011540int
11541main ()
11542{
11543if ((struct tm *) 0)
11544return 0;
11545 ;
11546 return 0;
11547}
11548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011549if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011550 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011551else
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11557$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011558if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011559
Matthias Kloseb9621712010-04-24 17:59:49 +000011560$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011561
11562fi
11563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11565$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011566if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011567 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011568else
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011570/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011571#include <sys/types.h>
11572#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011573
Martin v. Löwis11437992002-04-12 09:54:03 +000011574int
11575main ()
11576{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577struct tm tm;
11578 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011579 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 ;
11581 return 0;
11582}
11583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011584if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011585 ac_cv_struct_tm=time.h
11586else
Matthias Kloseb9621712010-04-24 17:59:49 +000011587 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11592$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011593if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011596
11597fi
11598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599ac_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 +000011600#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602"
Victor Stinnere0be4232011-10-25 13:06:09 +020011603if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011604
11605cat >>confdefs.h <<_ACEOF
11606#define HAVE_STRUCT_TM_TM_ZONE 1
11607_ACEOF
11608
11609
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011610fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011611
Martin v. Löwis11437992002-04-12 09:54:03 +000011612if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11613
Matthias Kloseb9621712010-04-24 17:59:49 +000011614$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011615
11616else
Matthias Kloseb9621712010-04-24 17:59:49 +000011617 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11618"
Victor Stinnere0be4232011-10-25 13:06:09 +020011619if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011620 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011621else
Matthias Kloseb9621712010-04-24 17:59:49 +000011622 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623fi
11624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011625cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011626#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011627_ACEOF
11628
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11630$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011631if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011633else
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011635/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011636#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011637#if !HAVE_DECL_TZNAME
11638extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011640
Martin v. Löwis11437992002-04-12 09:54:03 +000011641int
11642main ()
11643{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011644return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011645 ;
11646 return 0;
11647}
11648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011649if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011650 ac_cv_var_tzname=yes
11651else
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011654rm -f core conftest.err conftest.$ac_objext \
11655 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11658$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011659 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011662
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011663 fi
11664fi
11665
Matthias Kloseb9621712010-04-24 17:59:49 +000011666ac_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 +020011667if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011668
11669cat >>confdefs.h <<_ACEOF
11670#define HAVE_STRUCT_STAT_ST_RDEV 1
11671_ACEOF
11672
11673
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011674fi
11675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676ac_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 +020011677if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011678
Martin v. Löwis11437992002-04-12 09:54:03 +000011679cat >>confdefs.h <<_ACEOF
11680#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11681_ACEOF
11682
11683
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011684fi
11685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686ac_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 +020011687if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011688
11689cat >>confdefs.h <<_ACEOF
11690#define HAVE_STRUCT_STAT_ST_FLAGS 1
11691_ACEOF
11692
11693
11694fi
11695
Matthias Kloseb9621712010-04-24 17:59:49 +000011696ac_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 +020011697if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011698
11699cat >>confdefs.h <<_ACEOF
11700#define HAVE_STRUCT_STAT_ST_GEN 1
11701_ACEOF
11702
11703
11704fi
11705
Matthias Kloseb9621712010-04-24 17:59:49 +000011706ac_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 +020011707if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011708
11709cat >>confdefs.h <<_ACEOF
11710#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11711_ACEOF
11712
11713
11714fi
11715
Matthias Kloseb9621712010-04-24 17:59:49 +000011716ac_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 +020011717if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011718
Martin v. Löwis11437992002-04-12 09:54:03 +000011719cat >>confdefs.h <<_ACEOF
11720#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11721_ACEOF
11722
11723
Matthias Kloseb9621712010-04-24 17:59:49 +000011724$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011725
11726else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011727 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011728 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011729 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11730 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011731esac
11732
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011733fi
11734
Michael W. Hudson54241132001-12-07 15:38:26 +000011735
Martin v. Löwis11437992002-04-12 09:54:03 +000011736
Matthias Kloseb9621712010-04-24 17:59:49 +000011737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11738$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011739if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011740 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011741else
Matthias Kloseb159a552010-04-25 21:00:44 +000011742
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011744/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011745#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011746int
11747main ()
11748{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011749return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011750 ;
11751 return 0;
11752}
11753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011754if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011755 ac_cv_header_time_altzone=yes
11756else
Matthias Kloseb9621712010-04-24 17:59:49 +000011757 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011760
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011761fi
11762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11764$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011765if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011766
Matthias Kloseb9621712010-04-24 17:59:49 +000011767$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011768
11769fi
11770
Guido van Rossumda88dad1995-01-26 00:46:29 +000011771was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11773$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011775/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011776
11777#include <sys/types.h>
11778#include <sys/select.h>
11779#include <sys/time.h>
11780
Martin v. Löwis11437992002-04-12 09:54:03 +000011781int
11782main ()
11783{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011784;
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 ;
11786 return 0;
11787}
11788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011789if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011790
11791
Matthias Kloseb9621712010-04-24 17:59:49 +000011792$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011793
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011794 was_it_defined=yes
11795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11799$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011800
Matthias Kloseb9621712010-04-24 17:59:49 +000011801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11802$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011803if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011804 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011805else
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011807/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011808#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011809int
11810main ()
11811{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011812struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011813 ;
11814 return 0;
11815}
11816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011817if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011818 ac_cv_struct_addrinfo=yes
11819else
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11823fi
11824
Matthias Kloseb9621712010-04-24 17:59:49 +000011825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11826$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011827if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011828
Matthias Kloseb9621712010-04-24 17:59:49 +000011829$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011830
11831fi
11832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11834$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011835if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011839/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011840
11841# include <sys/types.h>
11842# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011843int
11844main ()
11845{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011846struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011847 ;
11848 return 0;
11849}
11850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011851if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011852 ac_cv_struct_sockaddr_storage=yes
11853else
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11857fi
11858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11860$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011861if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011862
Matthias Kloseb9621712010-04-24 17:59:49 +000011863$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011864
11865fi
11866
Guido van Rossum627b2d71993-12-24 10:39:16 +000011867# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011868
Matthias Kloseb9621712010-04-24 17:59:49 +000011869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11870$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011871if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011873else
Matthias Kloseb9621712010-04-24 17:59:49 +000011874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011876$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011877int
11878main ()
11879{
11880static int test_array [1 - 2 * !(((char) -1) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011881test_array [0] = 0
Martin v. Löwis11437992002-04-12 09:54:03 +000011882
11883 ;
11884 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011885}
Martin v. Löwis11437992002-04-12 09:54:03 +000011886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011887if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011888 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011889else
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11895$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011896if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011897 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011898
11899fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011900
Matthias Kloseb9621712010-04-24 17:59:49 +000011901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11902$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011903if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011904 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011905else
Matthias Kloseb9621712010-04-24 17:59:49 +000011906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011907/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011908
Martin v. Löwis11437992002-04-12 09:54:03 +000011909int
11910main ()
11911{
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011912/* FIXME: Include the comments suggested by Paul. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011913#ifndef __cplusplus
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011914 /* Ultrix mips cc rejects this. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011915 typedef int charset[2];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011916 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011918 char const *const *pcpcc;
11919 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011920 /* NEC SVR4.0.2 mips cc rejects this. */
11921 struct point {int x, y;};
11922 static struct point const zero = {0,0};
11923 /* AIX XL C 1.02.0.0 rejects this.
11924 It does not let you subtract one const X* pointer from another in
11925 an arm of an if-expression whose if-part is not a constant
11926 expression */
11927 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011928 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011929 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011930 ++pcpcc;
11931 ppc = (char**) pcpcc;
11932 pcpcc = (char const *const *) ppc;
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011933 { /* SCO 3.2v4 cc rejects this. */
11934 char *t;
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011936
Martin v. Löwis11437992002-04-12 09:54:03 +000011937 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011938 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011939 }
11940 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11941 int x[] = {25, 17};
11942 const int *foo = &x[0];
11943 ++foo;
11944 }
11945 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11946 typedef const int *iptr;
11947 iptr p = 0;
11948 ++p;
11949 }
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011950 { /* AIX XL C 1.02.0.0 rejects this saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011951 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011952 struct s { int j; const int *ap[3]; };
11953 struct s *b; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011954 }
11955 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11956 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011957 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011958 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011959 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011960#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011961
Martin v. Löwis11437992002-04-12 09:54:03 +000011962 ;
11963 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011964}
Martin v. Löwis11437992002-04-12 09:54:03 +000011965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011966if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011967 ac_cv_c_const=yes
11968else
Matthias Kloseb9621712010-04-24 17:59:49 +000011969 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11974$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011975if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011976
Matthias Kloseb9621712010-04-24 17:59:49 +000011977$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011978
11979fi
11980
Michael W. Hudson54241132001-12-07 15:38:26 +000011981
Guido van Rossumda88dad1995-01-26 00:46:29 +000011982works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11984$as_echo_n "checking for working volatile... " >&6; }
11985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011986/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011987
Martin v. Löwis11437992002-04-12 09:54:03 +000011988int
11989main ()
11990{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011991volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011992 ;
11993 return 0;
11994}
11995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011996if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011997 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011998else
Skip Montanaro6dead952003-09-25 14:50:04 +000011999
Matthias Kloseb9621712010-04-24 17:59:49 +000012000$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012001
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012002
Guido van Rossum627b2d71993-12-24 10:39:16 +000012003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12006$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012007
Guido van Rossumda88dad1995-01-26 00:46:29 +000012008works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12010$as_echo_n "checking for working signed char... " >&6; }
12011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012012/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012013
Martin v. Löwis11437992002-04-12 09:54:03 +000012014int
12015main ()
12016{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012017signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012018 ;
12019 return 0;
12020}
12021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012022if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012023 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012024else
Skip Montanaro6dead952003-09-25 14:50:04 +000012025
Matthias Kloseb9621712010-04-24 17:59:49 +000012026$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012027
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012028
Guido van Rossum7f43da71994-08-01 12:15:30 +000012029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12032$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012033
Guido van Rossumda88dad1995-01-26 00:46:29 +000012034have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12036$as_echo_n "checking for prototypes... " >&6; }
12037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012038/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012039int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012040int
12041main ()
12042{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012043return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 ;
12045 return 0;
12046}
12047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012048if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012049
Matthias Kloseb9621712010-04-24 17:59:49 +000012050$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012051
Matthias Kloseb159a552010-04-25 21:00:44 +000012052 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12056$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012057
Guido van Rossumda88dad1995-01-26 00:46:29 +000012058works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12060$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012062/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012063
12064#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012065int foo(int x, ...) {
12066 va_list va;
12067 va_start(va, x);
12068 va_arg(va, int);
12069 va_arg(va, char *);
12070 va_arg(va, double);
12071 return 0;
12072}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012073
Martin v. Löwis11437992002-04-12 09:54:03 +000012074int
12075main ()
12076{
Guido van Rossum90eea071996-08-30 20:58:57 +000012077return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012078 ;
12079 return 0;
12080}
12081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012083
12084
Matthias Kloseb9621712010-04-24 17:59:49 +000012085$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012086
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012087 works=yes
12088
Guido van Rossum627b2d71993-12-24 10:39:16 +000012089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12092$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012093
Martin v. Löwisd6320502004-08-12 13:45:08 +000012094# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12096$as_echo_n "checking for socketpair... " >&6; }
12097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012098/* end confdefs.h. */
12099
12100#include <sys/types.h>
12101#include <sys/socket.h>
12102
12103int
12104main ()
12105{
12106void *x=socketpair
12107 ;
12108 return 0;
12109}
12110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012111if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012112
Matthias Kloseb9621712010-04-24 17:59:49 +000012113$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012114
Matthias Kloseb159a552010-04-25 21:00:44 +000012115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012116$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012117else
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12119$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012120
12121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012123
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012124# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12126$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012128/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012129#include <sys/types.h>
12130#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012131int
12132main ()
12133{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012134struct sockaddr x;
12135x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012136 ;
12137 return 0;
12138}
12139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012140if ac_fn_c_try_compile "$LINENO"; then :
12141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12142$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012143
Matthias Kloseb9621712010-04-24 17:59:49 +000012144$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012145
12146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12148$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012149
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012152
Guido van Rossumda88dad1995-01-26 00:46:29 +000012153va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12155$as_echo_n "checking whether va_list is an array... " >&6; }
12156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012157/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012158
12159#ifdef HAVE_STDARG_PROTOTYPES
12160#include <stdarg.h>
12161#else
12162#include <varargs.h>
12163#endif
12164
Martin v. Löwis11437992002-04-12 09:54:03 +000012165int
12166main ()
12167{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012168va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 ;
12170 return 0;
12171}
12172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012173if ac_fn_c_try_compile "$LINENO"; then :
12174
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012175else
Skip Montanaro6dead952003-09-25 14:50:04 +000012176
Martin v. Löwis11437992002-04-12 09:54:03 +000012177
Matthias Kloseb9621712010-04-24 17:59:49 +000012178$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012179
Guido van Rossumda88dad1995-01-26 00:46:29 +000012180 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012181
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12185$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012186
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012187# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012188
12189
Matthias Kloseb9621712010-04-24 17:59:49 +000012190ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012191if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012192
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012194
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12196$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012197 OLD_CFLAGS=$CFLAGS
12198 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012200/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012201
12202# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012203
Martin v. Löwis11437992002-04-12 09:54:03 +000012204int
12205main ()
12206{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012207
12208 char *name;
12209 struct hostent *he, *res;
12210 char buffer[2048];
12211 int buflen = 2048;
12212 int h_errnop;
12213
12214 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012215
12216 ;
12217 return 0;
12218}
12219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012220if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012221
Matthias Kloseb9621712010-04-24 17:59:49 +000012222 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012223
Martin v. Löwis11437992002-04-12 09:54:03 +000012224
Matthias Kloseb9621712010-04-24 17:59:49 +000012225$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012226
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12228$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012229
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012230else
Skip Montanaro6dead952003-09-25 14:50:04 +000012231
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12233$as_echo "no" >&6; }
12234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12235$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012237/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012238
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012239# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012240
Martin v. Löwis11437992002-04-12 09:54:03 +000012241int
12242main ()
12243{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012244
12245 char *name;
12246 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012247 char buffer[2048];
12248 int buflen = 2048;
12249 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012250
Matthias Kloseb159a552010-04-25 21:00:44 +000012251 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012252
12253 ;
12254 return 0;
12255}
12256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012257if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012258
Matthias Kloseb9621712010-04-24 17:59:49 +000012259 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012260
Martin v. Löwis11437992002-04-12 09:54:03 +000012261
Matthias Kloseb159a552010-04-25 21:00:44 +000012262$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012263
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12265$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012266
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012267else
Skip Montanaro6dead952003-09-25 14:50:04 +000012268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12270$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12272$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12274/* end confdefs.h. */
12275
12276# include <netdb.h>
12277
12278int
12279main ()
12280{
12281
12282 char *name;
12283 struct hostent *he;
12284 struct hostent_data data;
12285
12286 (void) gethostbyname_r(name, he, &data);
12287
12288 ;
12289 return 0;
12290}
12291_ACEOF
12292if ac_fn_c_try_compile "$LINENO"; then :
12293
12294 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12295
12296
12297$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12298
12299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12300$as_echo "yes" >&6; }
12301
12302else
12303
12304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12305$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012306
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012309
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012312
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012315 CFLAGS=$OLD_CFLAGS
12316
12317else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012318
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 for ac_func in gethostbyname
12320do :
12321 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012322if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012323 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012324#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012325_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012326
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012327fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012328done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012329
Michael W. Hudson54241132001-12-07 15:38:26 +000012330
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012331fi
12332
Michael W. Hudson54241132001-12-07 15:38:26 +000012333
12334
12335
12336
12337
12338
Guido van Rossum627b2d71993-12-24 10:39:16 +000012339# checks for system services
12340# (none yet)
12341
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012342# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012343ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012344if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012345
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012346else
Matthias Kloseb9621712010-04-24 17:59:49 +000012347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12348$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012349if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012350 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012351else
Martin v. Löwis11437992002-04-12 09:54:03 +000012352 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012353LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012355/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357/* Override any GCC internal prototype to avoid an error.
12358 Use char because int might match the return type of a GCC
12359 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012360#ifdef __cplusplus
12361extern "C"
12362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012363char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012364int
12365main ()
12366{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 ;
12369 return 0;
12370}
12371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012372if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012373 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012374else
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012376fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012377rm -f core conftest.err conftest.$ac_objext \
12378 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012379LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012380fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12382$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012383if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 cat >>confdefs.h <<_ACEOF
12385#define HAVE_LIBIEEE 1
12386_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012387
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012388 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012389
Guido van Rossum627b2d71993-12-24 10:39:16 +000012390fi
12391
Michael W. Hudson54241132001-12-07 15:38:26 +000012392
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012393fi
12394
Michael W. Hudson54241132001-12-07 15:38:26 +000012395
Guido van Rossum7f253911997-05-09 02:42:48 +000012396# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12398$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012400# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012401if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012402 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012403if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012404then
12405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12409$as_echo "yes" >&6; }
12410else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12411$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012412fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012413else
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12415$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416fi
12417
Guido van Rossum7f253911997-05-09 02:42:48 +000012418
Guido van Rossum7f43da71994-08-01 12:15:30 +000012419# check for --with-libm=...
12420
Guido van Rossum563e7081996-09-10 18:20:48 +000012421case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012422Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012423*) LIBM=-lm
12424esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12426$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012429if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012431if test "$withval" = no
12432then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12434$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012435elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012436then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12438$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012439else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012440fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012441else
Matthias Kloseb9621712010-04-24 17:59:49 +000012442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12443$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444fi
12445
Guido van Rossum7f43da71994-08-01 12:15:30 +000012446
12447# check for --with-libc=...
12448
Matthias Kloseb9621712010-04-24 17:59:49 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12450$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012453if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012455if test "$withval" = no
12456then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12458$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012459elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012460then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12462$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012463else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012464fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012465else
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12467$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468fi
12469
Guido van Rossum7f43da71994-08-01 12:15:30 +000012470
Stefan Krah1919b7e2012-03-21 18:25:23 +010012471# **************************************
12472# * Check for gcc x64 inline assembler *
12473# **************************************
12474
12475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12476$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12478/* end confdefs.h. */
12479
12480int
12481main ()
12482{
12483
12484 __asm__ __volatile__ ("movq %rcx, %rax");
12485
12486 ;
12487 return 0;
12488}
12489_ACEOF
12490if ac_fn_c_try_compile "$LINENO"; then :
12491 have_gcc_asm_for_x64=yes
12492else
12493 have_gcc_asm_for_x64=no
12494fi
12495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12497$as_echo "$have_gcc_asm_for_x64" >&6; }
12498if test "$have_gcc_asm_for_x64" = yes
12499then
12500
12501$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12502
12503fi
12504
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012505# **************************************************
12506# * Check for various properties of floating point *
12507# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012508
Matthias Kloseb9621712010-04-24 17:59:49 +000012509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12510$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012511if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012513else
12514
Matthias Kloseb9621712010-04-24 17:59:49 +000012515if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012516 ac_cv_little_endian_double=no
12517else
Matthias Kloseb9621712010-04-24 17:59:49 +000012518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012519/* end confdefs.h. */
12520
12521#include <string.h>
12522int main() {
12523 double x = 9006104071832581.0;
12524 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12525 return 0;
12526 else
12527 return 1;
12528}
12529
12530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012531if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012532 ac_cv_little_endian_double=yes
12533else
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12537 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012538fi
12539
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012540fi
12541
Matthias Kloseb9621712010-04-24 17:59:49 +000012542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12543$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012544if test "$ac_cv_little_endian_double" = yes
12545then
12546
Matthias Kloseb9621712010-04-24 17:59:49 +000012547$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012548
12549fi
12550
Matthias Kloseb9621712010-04-24 17:59:49 +000012551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12552$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012553if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012554 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012555else
12556
Matthias Kloseb9621712010-04-24 17:59:49 +000012557if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012558 ac_cv_big_endian_double=no
12559else
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012561/* end confdefs.h. */
12562
12563#include <string.h>
12564int main() {
12565 double x = 9006104071832581.0;
12566 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12567 return 0;
12568 else
12569 return 1;
12570}
12571
12572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012573if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012574 ac_cv_big_endian_double=yes
12575else
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12579 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012580fi
12581
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012582fi
12583
Matthias Kloseb9621712010-04-24 17:59:49 +000012584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12585$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012586if test "$ac_cv_big_endian_double" = yes
12587then
12588
Matthias Kloseb9621712010-04-24 17:59:49 +000012589$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012590
12591fi
12592
12593# Some ARM platforms use a mixed-endian representation for doubles.
12594# While Python doesn't currently have full support for these platforms
12595# (see e.g., issue 1762561), we can at least make sure that float <-> string
12596# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12598$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012599if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012601else
12602
Matthias Kloseb9621712010-04-24 17:59:49 +000012603if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012604 ac_cv_mixed_endian_double=no
12605else
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012607/* end confdefs.h. */
12608
12609#include <string.h>
12610int main() {
12611 double x = 9006104071832581.0;
12612 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12613 return 0;
12614 else
12615 return 1;
12616}
12617
12618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012619if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012620 ac_cv_mixed_endian_double=yes
12621else
Matthias Kloseb9621712010-04-24 17:59:49 +000012622 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012623fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012624rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12625 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012626fi
12627
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012628fi
12629
Matthias Kloseb9621712010-04-24 17:59:49 +000012630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12631$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012632if test "$ac_cv_mixed_endian_double" = yes
12633then
12634
Matthias Kloseb9621712010-04-24 17:59:49 +000012635$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012636
12637fi
12638
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012639# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012640# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012641# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012642# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012643# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012644# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012645
12646# This inline assembler syntax may also work for suncc and icc,
12647# so we try it on all platforms.
12648
Matthias Kloseb9621712010-04-24 17:59:49 +000012649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12650$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012652/* end confdefs.h. */
12653
12654int
12655main ()
12656{
12657
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012658 unsigned short cw;
12659 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12660 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012661
12662 ;
12663 return 0;
12664}
12665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012666if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012667 have_gcc_asm_for_x87=yes
12668else
Matthias Kloseb9621712010-04-24 17:59:49 +000012669 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012670fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12673$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012674if test "$have_gcc_asm_for_x87" = yes
12675then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012676
Matthias Kloseb9621712010-04-24 17:59:49 +000012677$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012678
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012679fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012681# Detect whether system arithmetic is subject to x87-style double
12682# rounding issues. The result of this test has little meaning on non
12683# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12684# mode is round-to-nearest and double rounding issues are present, and
12685# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12687$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012688# $BASECFLAGS may affect the result
12689ac_save_cc="$CC"
12690CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012691if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012692 ac_cv_x87_double_rounding=no
12693else
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012695/* end confdefs.h. */
12696
12697#include <stdlib.h>
12698#include <math.h>
12699int main() {
12700 volatile double x, y, z;
12701 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12702 x = 0.99999999999999989; /* 1-2**-53 */
12703 y = 1./x;
12704 if (y != 1.)
12705 exit(0);
12706 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12707 x = 1e16;
12708 y = 2.99999;
12709 z = x + y;
12710 if (z != 1e16+4.)
12711 exit(0);
12712 /* both tests show evidence of double rounding */
12713 exit(1);
12714}
12715
12716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012717if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012718 ac_cv_x87_double_rounding=no
12719else
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12723 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012724fi
12725
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012726CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12728$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012729if test "$ac_cv_x87_double_rounding" = yes
12730then
12731
Matthias Kloseb9621712010-04-24 17:59:49 +000012732$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012733
12734fi
12735
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012736# ************************************
12737# * Check for mathematical functions *
12738# ************************************
12739
12740LIBS_SAVE=$LIBS
12741LIBS="$LIBS $LIBM"
12742
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012743for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12744do :
12745 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12746ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012747if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012748 cat >>confdefs.h <<_ACEOF
12749#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12750_ACEOF
12751
12752fi
12753done
12754
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012755for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012756do :
12757 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12758ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012759if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012760 cat >>confdefs.h <<_ACEOF
12761#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12762_ACEOF
12763
12764fi
12765done
12766
12767ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12768"
Victor Stinnere0be4232011-10-25 13:06:09 +020012769if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012770 ac_have_decl=1
12771else
12772 ac_have_decl=0
12773fi
12774
12775cat >>confdefs.h <<_ACEOF
12776#define HAVE_DECL_ISINF $ac_have_decl
12777_ACEOF
12778ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12779"
Victor Stinnere0be4232011-10-25 13:06:09 +020012780if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012781 ac_have_decl=1
12782else
12783 ac_have_decl=0
12784fi
12785
12786cat >>confdefs.h <<_ACEOF
12787#define HAVE_DECL_ISNAN $ac_have_decl
12788_ACEOF
12789ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12790"
Victor Stinnere0be4232011-10-25 13:06:09 +020012791if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012792 ac_have_decl=1
12793else
12794 ac_have_decl=0
12795fi
12796
12797cat >>confdefs.h <<_ACEOF
12798#define HAVE_DECL_ISFINITE $ac_have_decl
12799_ACEOF
12800
12801
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012802# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12803# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12805$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012806if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012808else
12809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012811 ac_cv_tanh_preserves_zero_sign=no
12812else
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012814/* end confdefs.h. */
12815
12816#include <math.h>
12817#include <stdlib.h>
12818int main() {
12819 /* return 0 if either negative zeros don't exist
12820 on this platform or if negative zeros exist
12821 and tanh(-0.) == -0. */
12822 if (atan2(0., -1.) == atan2(-0., -1.) ||
12823 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12824 else exit(1);
12825}
12826
12827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012828if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012829 ac_cv_tanh_preserves_zero_sign=yes
12830else
Matthias Kloseb9621712010-04-24 17:59:49 +000012831 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12834 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012835fi
12836
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012837fi
12838
Matthias Kloseb9621712010-04-24 17:59:49 +000012839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12840$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012841if test "$ac_cv_tanh_preserves_zero_sign" = yes
12842then
12843
Matthias Kloseb9621712010-04-24 17:59:49 +000012844$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012845
12846fi
12847
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012848if test "$ac_cv_func_log1p" = yes
12849then
12850 # On some versions of AIX, log1p(-0.) returns 0. instead of
12851 # -0. See issue #9920.
12852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12853$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012854 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012855 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012856else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012857
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012858 if test "$cross_compiling" = yes; then :
12859 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012860else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12862/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012863
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012864 #include <math.h>
12865 #include <stdlib.h>
12866 int main() {
12867 /* Fail if the signs of log1p(-0.) and -0. can be
12868 distinguished. */
12869 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12870 return 0;
12871 else
12872 return 1;
12873 }
12874
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012875_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012876if ac_fn_c_try_run "$LINENO"; then :
12877 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012878else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012879 ac_cv_log1p_drops_zero_sign=yes
12880fi
12881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012883fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012884
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012885fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012886
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12888$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12889fi
12890if test "$ac_cv_log1p_drops_zero_sign" = yes
12891then
12892
12893$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12894
12895fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012896
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012897LIBS=$LIBS_SAVE
12898
Mark Dickinsona614f042009-11-28 12:48:43 +000012899# For multiprocessing module, check that sem_open
12900# actually works. For FreeBSD versions <= 7.2,
12901# the kernel module that provides POSIX semaphores
12902# isn't loaded by default, so an attempt to call
12903# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12905$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012906if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012908else
Matthias Kloseb9621712010-04-24 17:59:49 +000012909 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012910 ac_cv_posix_semaphores_enabled=yes
12911else
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012913/* end confdefs.h. */
12914
12915#include <unistd.h>
12916#include <fcntl.h>
12917#include <stdio.h>
12918#include <semaphore.h>
12919#include <sys/stat.h>
12920
12921int main(void) {
12922 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12923 if (a == SEM_FAILED) {
12924 perror("sem_open");
12925 return 1;
12926 }
12927 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012928 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012929 return 0;
12930}
12931
12932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012933if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012934 ac_cv_posix_semaphores_enabled=yes
12935else
Matthias Kloseb9621712010-04-24 17:59:49 +000012936 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12939 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012940fi
12941
12942
Mark Dickinsona614f042009-11-28 12:48:43 +000012943fi
12944
Matthias Kloseb9621712010-04-24 17:59:49 +000012945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12946$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012947if test $ac_cv_posix_semaphores_enabled = no
12948then
12949
Matthias Kloseb9621712010-04-24 17:59:49 +000012950$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012951
12952fi
12953
Mark Dickinson10683072009-04-18 21:18:19 +000012954# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12956$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012957if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012959else
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012961 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012962else
Matthias Kloseb9621712010-04-24 17:59:49 +000012963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012964/* end confdefs.h. */
12965
12966#include <unistd.h>
12967#include <fcntl.h>
12968#include <stdio.h>
12969#include <semaphore.h>
12970#include <sys/stat.h>
12971
12972int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012973 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012974 int count;
12975 int res;
12976 if(a==SEM_FAILED){
12977 perror("sem_open");
12978 return 1;
12979
12980 }
12981 res = sem_getvalue(a, &count);
12982 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012983 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012984 return res==-1 ? 1 : 0;
12985}
12986
Mark Dickinson10683072009-04-18 21:18:19 +000012987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012988if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012989 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012990else
Matthias Kloseb9621712010-04-24 17:59:49 +000012991 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012995fi
12996
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012997
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012998fi
12999
Matthias Kloseb9621712010-04-24 17:59:49 +000013000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13001$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013002if test $ac_cv_broken_sem_getvalue = yes
13003then
13004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013006
13007fi
13008
Mark Dickinsonbd792642009-03-18 20:06:12 +000013009# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13011$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013012# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013013if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013014 enableval=$enable_big_digits; case $enable_big_digits in
13015yes)
13016 enable_big_digits=30 ;;
13017no)
13018 enable_big_digits=15 ;;
1301915|30)
13020 ;;
13021*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013022 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 +000013023esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13025$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013026
13027cat >>confdefs.h <<_ACEOF
13028#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13029_ACEOF
13030
13031
13032else
Matthias Kloseb9621712010-04-24 17:59:49 +000013033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13034$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013035fi
13036
13037
Guido van Rossumef2255b2000-03-10 22:30:29 +000013038# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013039ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013040if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013041
13042
Matthias Kloseb9621712010-04-24 17:59:49 +000013043$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013044
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013045 wchar_h="yes"
13046
Guido van Rossumef2255b2000-03-10 22:30:29 +000013047else
Martin v. Löwis11437992002-04-12 09:54:03 +000013048 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013049
13050fi
13051
Michael W. Hudson54241132001-12-07 15:38:26 +000013052
Martin v. Löwis11437992002-04-12 09:54:03 +000013053
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013054# determine wchar_t size
13055if test "$wchar_h" = yes
13056then
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13059# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13060# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13062$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013063if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013065else
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13067"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013068
Martin v. Löwis11437992002-04-12 09:54:03 +000013069else
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 if test "$ac_cv_type_wchar_t" = yes; then
13071 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13072$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013073as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013074See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013075 else
13076 ac_cv_sizeof_wchar_t=0
13077 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013079
Martin v. Löwis11437992002-04-12 09:54:03 +000013080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13082$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013083
13084
13085
Martin v. Löwis11437992002-04-12 09:54:03 +000013086cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013087#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013088_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013089
Michael W. Hudson54241132001-12-07 15:38:26 +000013090
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013091fi
13092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13094$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013095have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013097/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013098
13099#include <tcl.h>
13100#if TCL_UTF_MAX != 6
13101# error "NOT UCS4_TCL"
13102#endif
13103int
13104main ()
13105{
13106
13107 ;
13108 return 0;
13109}
13110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013111if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013112
13113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013115
13116 have_ucs4_tcl=yes
13117
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13121$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013122
Skip Montanaro6dead952003-09-25 14:50:04 +000013123# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013124if test "$wchar_h" = yes
13125then
13126 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13128$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013129 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013131else
13132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013134 ac_cv_wchar_t_signed=yes
13135else
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013137/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013138
13139 #include <wchar.h>
13140 int main()
13141 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013142 /* Success: exit code 0 */
13143 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013144 }
13145
13146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013147if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013148 ac_cv_wchar_t_signed=yes
13149else
Matthias Kloseb9621712010-04-24 17:59:49 +000013150 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013152rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13153 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013154fi
13155
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013156fi
13157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13159$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013160fi
13161
Georg Brandl52d168a2008-01-07 18:10:24 +000013162# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013163if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013164 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013165then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013166 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013169
Georg Brandl52d168a2008-01-07 18:10:24 +000013170else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013171 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013172fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13174$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013175
13176# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13178$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013179if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013181else
Matthias Kloseb9621712010-04-24 17:59:49 +000013182 ac_cv_c_bigendian=unknown
13183 # See if we're dealing with a universal compiler.
13184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13185/* end confdefs.h. */
13186#ifndef __APPLE_CC__
13187 not a universal capable compiler
13188 #endif
13189 typedef int dummy;
13190
Skip Montanaro6dead952003-09-25 14:50:04 +000013191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013192if ac_fn_c_try_compile "$LINENO"; then :
13193
13194 # Check for potential -arch flags. It is not universal unless
13195 # there are at least two -arch flags with different values.
13196 ac_arch=
13197 ac_prev=
13198 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13199 if test -n "$ac_prev"; then
13200 case $ac_word in
13201 i?86 | x86_64 | ppc | ppc64)
13202 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13203 ac_arch=$ac_word
13204 else
13205 ac_cv_c_bigendian=universal
13206 break
13207 fi
13208 ;;
13209 esac
13210 ac_prev=
13211 elif test "x$ac_word" = "x-arch"; then
13212 ac_prev=arch
13213 fi
13214 done
13215fi
13216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13217 if test $ac_cv_c_bigendian = unknown; then
13218 # See if sys/param.h defines the BYTE_ORDER macro.
13219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013220/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013221#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013223
Martin v. Löwis11437992002-04-12 09:54:03 +000013224int
13225main ()
13226{
Matthias Kloseb9621712010-04-24 17:59:49 +000013227#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13228 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13229 && LITTLE_ENDIAN)
13230 bogus endian macros
13231 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013232
13233 ;
13234 return 0;
13235}
13236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013237if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013238 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013240/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013241#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013243
Martin v. Löwis11437992002-04-12 09:54:03 +000013244int
13245main ()
13246{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013247#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 not big endian
13249 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013250
13251 ;
13252 return 0;
13253}
13254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013255if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013256 ac_cv_c_bigendian=yes
13257else
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013261fi
13262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13263 fi
13264 if test $ac_cv_c_bigendian = unknown; then
13265 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013267/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013268#include <limits.h>
13269
Martin v. Löwis11437992002-04-12 09:54:03 +000013270int
13271main ()
13272{
Matthias Kloseb9621712010-04-24 17:59:49 +000013273#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13274 bogus endian macros
13275 #endif
13276
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 ;
13278 return 0;
13279}
13280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013281if ac_fn_c_try_compile "$LINENO"; then :
13282 # It does; now see whether it defined to _BIG_ENDIAN or not.
13283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13284/* end confdefs.h. */
13285#include <limits.h>
13286
13287int
13288main ()
13289{
13290#ifndef _BIG_ENDIAN
13291 not big endian
13292 #endif
13293
13294 ;
13295 return 0;
13296}
13297_ACEOF
13298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013299 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013300else
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13304fi
13305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13306 fi
13307 if test $ac_cv_c_bigendian = unknown; then
13308 # Compile a test program.
13309 if test "$cross_compiling" = yes; then :
13310 # Try to guess by grepping values from an object file.
13311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13312/* end confdefs.h. */
13313short int ascii_mm[] =
13314 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13315 short int ascii_ii[] =
13316 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13317 int use_ascii (int i) {
13318 return ascii_mm[i] + ascii_ii[i];
13319 }
13320 short int ebcdic_ii[] =
13321 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13322 short int ebcdic_mm[] =
13323 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13324 int use_ebcdic (int i) {
13325 return ebcdic_mm[i] + ebcdic_ii[i];
13326 }
13327 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013328
Matthias Kloseb9621712010-04-24 17:59:49 +000013329int
13330main ()
13331{
13332return use_ascii (foo) == use_ebcdic (foo);
13333 ;
13334 return 0;
13335}
13336_ACEOF
13337if ac_fn_c_try_compile "$LINENO"; then :
13338 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13339 ac_cv_c_bigendian=yes
13340 fi
13341 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13342 if test "$ac_cv_c_bigendian" = unknown; then
13343 ac_cv_c_bigendian=no
13344 else
13345 # finding both strings is unlikely to happen, but who knows?
13346 ac_cv_c_bigendian=unknown
13347 fi
13348 fi
13349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013351else
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013353/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013354$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013355int
13356main ()
13357{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359 /* Are we little or big endian? From Harbison&Steele. */
13360 union
13361 {
13362 long int l;
13363 char c[sizeof (long int)];
13364 } u;
13365 u.l = 1;
13366 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013367
13368 ;
13369 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013370}
Martin v. Löwis11437992002-04-12 09:54:03 +000013371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013372if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013373 ac_cv_c_bigendian=no
13374else
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013376fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13378 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13384$as_echo "$ac_cv_c_bigendian" >&6; }
13385 case $ac_cv_c_bigendian in #(
13386 yes)
13387 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13388;; #(
13389 no)
13390 ;; #(
13391 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 ;; #(
13396 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013397 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013398 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013400
Michael W. Hudson54241132001-12-07 15:38:26 +000013401
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013402# ABI version string for Python extension modules. This appears between the
13403# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13404# from the following attributes which affect the ABI of this Python build (in
13405# this order):
13406#
13407# * The Python implementation (always 'cpython-' for us)
13408# * The major and minor version numbers
13409# * --with-pydebug (adds a 'd')
13410# * --with-pymalloc (adds a 'm')
13411# * --with-wide-unicode (adds a 'u')
13412#
13413# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013414# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13415# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013416
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13418$as_echo_n "checking ABIFLAGS... " >&6; }
13419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13420$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13422$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013423SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13425$as_echo "$SOABI" >&6; }
13426
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13428$as_echo_n "checking LDVERSION... " >&6; }
13429LDVERSION='$(VERSION)$(ABIFLAGS)'
13430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13431$as_echo "$LDVERSION" >&6; }
13432
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013433# SO is the extension of shared libraries `(including the dot!)
13434# -- usually .so, .sl on HP-UX, .dll on Cygwin
13435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13436$as_echo_n "checking SO... " >&6; }
13437if test -z "$SO"
13438then
13439 case $ac_sys_system in
13440 hp*|HP*)
13441 case `uname -m` in
13442 ia64) SO=.so;;
13443 *) SO=.sl;;
13444 esac
13445 ;;
13446 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013447 Linux*|GNU*)
13448 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013449 *) SO=.so;;
13450 esac
13451else
13452 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013453 echo
13454 echo '====================================================================='
13455 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013456 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013457 echo '+ Do you really mean to change the extension for shared libraries? +'
13458 echo '+ Continuing in 10 seconds to let you to ponder. +'
13459 echo '+ +'
13460 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013461 sleep 10
13462fi
13463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13464$as_echo "$SO" >&6; }
13465
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013466# Check whether right shifting a negative integer extends the sign bit
13467# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13469$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013470if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013472else
Martin v. Löwis11437992002-04-12 09:54:03 +000013473
Matthias Kloseb9621712010-04-24 17:59:49 +000013474if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013475 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013476else
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013478/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013479
13480int main()
13481{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013482 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013483}
13484
Martin v. Löwis11437992002-04-12 09:54:03 +000013485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013486if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013487 ac_cv_rshift_extends_sign=yes
13488else
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13492 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013493fi
13494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013495fi
13496
Matthias Kloseb9621712010-04-24 17:59:49 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13498$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013499if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013500then
Martin v. Löwis11437992002-04-12 09:54:03 +000013501
Matthias Kloseb9621712010-04-24 17:59:49 +000013502$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013503
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013504fi
13505
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013506# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13508$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013509if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013511else
Martin v. Löwis11437992002-04-12 09:54:03 +000013512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013514/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013515#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013516int
13517main ()
13518{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013519
13520 FILE *f = fopen("/dev/null", "r");
13521 flockfile(f);
13522 getc_unlocked(f);
13523 funlockfile(f);
13524
Martin v. Löwis11437992002-04-12 09:54:03 +000013525 ;
13526 return 0;
13527}
13528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013529if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013530 ac_cv_have_getc_unlocked=yes
13531else
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 ac_cv_have_getc_unlocked=no
13533fi
13534rm -f core conftest.err conftest.$ac_objext \
13535 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13539$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013540if test "$ac_cv_have_getc_unlocked" = yes
13541then
Martin v. Löwis11437992002-04-12 09:54:03 +000013542
Matthias Kloseb9621712010-04-24 17:59:49 +000013543$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013544
13545fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013546
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013547# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013548# save the value of LIBS so we don't actually link Python with readline
13549LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013550
Gregory P. Smith18820942008-09-07 06:24:49 +000013551# On some systems we need to link readline to a termcap compatible
13552# library. NOTE: Keep the precedence of listed libraries synchronised
13553# with setup.py.
13554py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13556$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013557for py_libtermcap in "" ncursesw ncurses curses termcap; do
13558 if test -z "$py_libtermcap"; then
13559 READLINE_LIBS="-lreadline"
13560 else
13561 READLINE_LIBS="-lreadline -l$py_libtermcap"
13562 fi
13563 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013565/* end confdefs.h. */
13566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013567/* Override any GCC internal prototype to avoid an error.
13568 Use char because int might match the return type of a GCC
13569 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013570#ifdef __cplusplus
13571extern "C"
13572#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013573char readline ();
13574int
13575main ()
13576{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013577return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013578 ;
13579 return 0;
13580}
13581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013582if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013583 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013585rm -f core conftest.err conftest.$ac_objext \
13586 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013587 if test $py_cv_lib_readline = yes; then
13588 break
13589 fi
13590done
13591# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13592#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013593if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13595$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013596else
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13598$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013601
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013602fi
13603
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013604# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13606$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013607if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013609else
13610 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013611LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013613/* end confdefs.h. */
13614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013615/* Override any GCC internal prototype to avoid an error.
13616 Use char because int might match the return type of a GCC
13617 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013618#ifdef __cplusplus
13619extern "C"
13620#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013621char rl_callback_handler_install ();
13622int
13623main ()
13624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013625return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013626 ;
13627 return 0;
13628}
13629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013630if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013631 ac_cv_lib_readline_rl_callback_handler_install=yes
13632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013635rm -f core conftest.err conftest.$ac_objext \
13636 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013637LIBS=$ac_check_lib_save_LIBS
13638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13640$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013641if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013644
13645fi
13646
13647
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013648# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013650/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013651#include <readline/readline.h>
13652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013653if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013654 have_readline=yes
13655else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013656 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013657
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013658fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013659rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013660if test $have_readline = yes
13661then
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013663/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013664#include <readline/readline.h>
13665
13666_ACEOF
13667if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013669
Matthias Kloseb9621712010-04-24 17:59:49 +000013670$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013671
13672fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013673rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013676/* end confdefs.h. */
13677#include <readline/readline.h>
13678
13679_ACEOF
13680if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013681 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013682
Matthias Kloseb9621712010-04-24 17:59:49 +000013683$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013684
13685fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013686rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013687
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013688fi
13689
Martin v. Löwis0daad592001-09-30 21:09:59 +000013690# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13692$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013693if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013695else
Martin v. Löwis11437992002-04-12 09:54:03 +000013696 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013697LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013701/* Override any GCC internal prototype to avoid an error.
13702 Use char because int might match the return type of a GCC
13703 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013704#ifdef __cplusplus
13705extern "C"
13706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013707char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013708int
13709main ()
13710{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013711return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013712 ;
13713 return 0;
13714}
13715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013716if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013717 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013718else
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013721rm -f core conftest.err conftest.$ac_objext \
13722 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013723LIBS=$ac_check_lib_save_LIBS
13724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13726$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013727if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013730
Martin v. Löwis0daad592001-09-30 21:09:59 +000013731fi
13732
Michael W. Hudson54241132001-12-07 15:38:26 +000013733
Thomas Wouters89d996e2007-09-08 17:39:28 +000013734# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13736$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013737if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013739else
13740 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013741LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013743/* end confdefs.h. */
13744
13745/* Override any GCC internal prototype to avoid an error.
13746 Use char because int might match the return type of a GCC
13747 builtin and then its argument prototype would still apply. */
13748#ifdef __cplusplus
13749extern "C"
13750#endif
13751char rl_completion_display_matches_hook ();
13752int
13753main ()
13754{
13755return rl_completion_display_matches_hook ();
13756 ;
13757 return 0;
13758}
13759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013760if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013761 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013765rm -f core conftest.err conftest.$ac_objext \
13766 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013767LIBS=$ac_check_lib_save_LIBS
13768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13770$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013771if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013772
Matthias Kloseb9621712010-04-24 17:59:49 +000013773$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013774
13775fi
13776
13777
Martin v. Löwis0daad592001-09-30 21:09:59 +000013778# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13780$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013781if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013783else
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013785LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013789/* Override any GCC internal prototype to avoid an error.
13790 Use char because int might match the return type of a GCC
13791 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013792#ifdef __cplusplus
13793extern "C"
13794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013795char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013796int
13797main ()
13798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013799return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 ;
13801 return 0;
13802}
13803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013804if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013809rm -f core conftest.err conftest.$ac_objext \
13810 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013811LIBS=$ac_check_lib_save_LIBS
13812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13814$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013815if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013818
Guido van Rossum353ae582001-07-10 16:45:32 +000013819fi
13820
Jack Jansendd19cf82001-12-06 22:36:17 +000013821
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013822# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013824/* end confdefs.h. */
13825#include <readline/readline.h>
13826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013827if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013828 have_readline=yes
13829else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013830 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013831
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013832fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013833rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013834if test $have_readline = yes
13835then
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013837/* end confdefs.h. */
13838#include <readline/readline.h>
13839
13840_ACEOF
13841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013843
Matthias Kloseb9621712010-04-24 17:59:49 +000013844$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013845
13846fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013847rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013848
13849fi
13850
Martin v. Löwis82bca632006-02-10 20:49:30 +000013851# End of readline checks: restore LIBS
13852LIBS=$LIBS_no_readline
13853
Matthias Kloseb9621712010-04-24 17:59:49 +000013854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13855$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013856if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013858else
Martin v. Löwis11437992002-04-12 09:54:03 +000013859
Matthias Kloseb9621712010-04-24 17:59:49 +000013860if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013861 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013862else
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013864/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013865
13866int main()
13867{
13868 int val1 = nice(1);
13869 if (val1 != -1 && val1 == nice(2))
13870 exit(0);
13871 exit(1);
13872}
13873
Martin v. Löwis11437992002-04-12 09:54:03 +000013874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013875if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013876 ac_cv_broken_nice=yes
13877else
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013882fi
13883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884fi
13885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13887$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013888if test "$ac_cv_broken_nice" = yes
13889then
Martin v. Löwis11437992002-04-12 09:54:03 +000013890
Matthias Kloseb9621712010-04-24 17:59:49 +000013891$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013892
13893fi
13894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13896$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013897if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013899else
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013901 ac_cv_broken_poll=no
13902else
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013904/* end confdefs.h. */
13905
13906#include <poll.h>
13907
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013908int main()
13909{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013910 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013911 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013912
13913 close (42);
13914
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013915 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013916 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013917 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013918 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013919 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013920 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013921 return 1;
13922}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013923
13924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013925if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013926 ac_cv_broken_poll=yes
13927else
Matthias Kloseb9621712010-04-24 17:59:49 +000013928 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13931 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013934fi
13935
Matthias Kloseb9621712010-04-24 17:59:49 +000013936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13937$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013938if test "$ac_cv_broken_poll" = yes
13939then
13940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013942
13943fi
13944
Brett Cannon43802422005-02-10 20:48:03 +000013945# 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 +000013946# (which is not required by ISO C or UNIX spec) and/or if we support
13947# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013948ac_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 +000013949#include <$ac_cv_struct_tm>
13950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951"
Victor Stinnere0be4232011-10-25 13:06:09 +020013952if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013953
13954cat >>confdefs.h <<_ACEOF
13955#define HAVE_STRUCT_TM_TM_ZONE 1
13956_ACEOF
13957
13958
13959fi
13960
13961if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13962
Matthias Kloseb9621712010-04-24 17:59:49 +000013963$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013964
13965else
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13967"
Victor Stinnere0be4232011-10-25 13:06:09 +020013968if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013970else
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013972fi
13973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013974cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013975#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013976_ACEOF
13977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13979$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013980if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982else
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013984/* end confdefs.h. */
13985#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013986#if !HAVE_DECL_TZNAME
13987extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013988#endif
13989
13990int
13991main ()
13992{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013994 ;
13995 return 0;
13996}
13997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013998if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013999 ac_cv_var_tzname=yes
14000else
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014003rm -f core conftest.err conftest.$ac_objext \
14004 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14007$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014008 if test $ac_cv_var_tzname = yes; then
14009
Matthias Kloseb9621712010-04-24 17:59:49 +000014010$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014011
14012 fi
14013fi
14014
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014015
Martin v. Löwis1d459062005-03-14 21:23:33 +000014016# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14018$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014019if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014021else
14022
Matthias Kloseb9621712010-04-24 17:59:49 +000014023if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014024 ac_cv_working_tzset=no
14025else
Matthias Kloseb9621712010-04-24 17:59:49 +000014026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014027/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014028
14029#include <stdlib.h>
14030#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014031#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014032
14033#if HAVE_TZNAME
14034extern char *tzname[];
14035#endif
14036
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014037int main()
14038{
Brett Cannon18367812003-09-19 00:59:16 +000014039 /* Note that we need to ensure that not only does tzset(3)
14040 do 'something' with localtime, but it works as documented
14041 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014042 This includes making sure that tzname is set properly if
14043 tm->tm_zone does not exist since it is the alternative way
14044 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014045
14046 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014047 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014048 */
14049
Martin v. Löwis1d459062005-03-14 21:23:33 +000014050 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014051 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14052
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014053 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014054 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014055 if (localtime(&groundhogday)->tm_hour != 0)
14056 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014057#if HAVE_TZNAME
14058 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14059 if (strcmp(tzname[0], "UTC") ||
14060 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14061 exit(1);
14062#endif
Brett Cannon18367812003-09-19 00:59:16 +000014063
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014064 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014065 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014066 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014067 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014068#if HAVE_TZNAME
14069 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14070 exit(1);
14071#endif
Brett Cannon18367812003-09-19 00:59:16 +000014072
14073 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14074 tzset();
14075 if (localtime(&groundhogday)->tm_hour != 11)
14076 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014077#if HAVE_TZNAME
14078 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14079 exit(1);
14080#endif
14081
14082#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014083 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14084 exit(1);
14085 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14086 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014087#endif
Brett Cannon18367812003-09-19 00:59:16 +000014088
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014089 exit(0);
14090}
14091
14092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014093if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014094 ac_cv_working_tzset=yes
14095else
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14099 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014100fi
14101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014102fi
14103
Matthias Kloseb9621712010-04-24 17:59:49 +000014104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14105$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014106if test "$ac_cv_working_tzset" = yes
14107then
14108
Matthias Kloseb9621712010-04-24 17:59:49 +000014109$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014110
14111fi
14112
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014113# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14115$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014116if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014118else
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014120/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014121#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014122int
14123main ()
14124{
14125
14126struct stat st;
14127st.st_mtim.tv_nsec = 1;
14128
14129 ;
14130 return 0;
14131}
14132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014133if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014134 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014135else
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14139fi
14140
Matthias Kloseb9621712010-04-24 17:59:49 +000014141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14142$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014143if test "$ac_cv_stat_tv_nsec" = yes
14144then
14145
Matthias Kloseb9621712010-04-24 17:59:49 +000014146$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014147
14148fi
14149
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014150# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14152$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014153if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014154 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014155else
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014157/* end confdefs.h. */
14158#include <sys/stat.h>
14159int
14160main ()
14161{
14162
14163struct stat st;
14164st.st_mtimespec.tv_nsec = 1;
14165
14166 ;
14167 return 0;
14168}
14169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014170if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014171 ac_cv_stat_tv_nsec2=yes
14172else
Matthias Kloseb9621712010-04-24 17:59:49 +000014173 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14176fi
14177
Matthias Kloseb9621712010-04-24 17:59:49 +000014178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14179$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014180if test "$ac_cv_stat_tv_nsec2" = yes
14181then
14182
Matthias Kloseb9621712010-04-24 17:59:49 +000014183$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014184
14185fi
14186
Jack Jansen666b1e72001-10-31 12:11:48 +000014187# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14189$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014190if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014192else
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014194/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014195#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014196int
14197main ()
14198{
Jack Jansen666b1e72001-10-31 12:11:48 +000014199
14200 int rtn;
14201 rtn = mvwdelch(0,0,0);
14202
Martin v. Löwis11437992002-04-12 09:54:03 +000014203 ;
14204 return 0;
14205}
14206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014207if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014208 ac_cv_mvwdelch_is_expression=yes
14209else
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14213fi
14214
Matthias Kloseb9621712010-04-24 17:59:49 +000014215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14216$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014217
14218if test "$ac_cv_mvwdelch_is_expression" = yes
14219then
Martin v. Löwis11437992002-04-12 09:54:03 +000014220
Matthias Kloseb9621712010-04-24 17:59:49 +000014221$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014222
14223fi
14224
Matthias Kloseb9621712010-04-24 17:59:49 +000014225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14226$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014227if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014228 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014229else
Matthias Kloseb9621712010-04-24 17:59:49 +000014230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014231/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014232#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014233int
14234main ()
14235{
Jack Jansen666b1e72001-10-31 12:11:48 +000014236
14237 WINDOW *w;
14238 w->_flags = 0;
14239
Martin v. Löwis11437992002-04-12 09:54:03 +000014240 ;
14241 return 0;
14242}
14243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014244if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014245 ac_cv_window_has_flags=yes
14246else
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14250fi
14251
Matthias Kloseb9621712010-04-24 17:59:49 +000014252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14253$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014254
Jack Jansen666b1e72001-10-31 12:11:48 +000014255
14256if test "$ac_cv_window_has_flags" = yes
14257then
Martin v. Löwis11437992002-04-12 09:54:03 +000014258
Matthias Kloseb9621712010-04-24 17:59:49 +000014259$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014260
14261fi
14262
Matthias Kloseb9621712010-04-24 17:59:49 +000014263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14264$as_echo_n "checking for is_term_resized... " >&6; }
14265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014266/* end confdefs.h. */
14267#include <curses.h>
14268int
14269main ()
14270{
14271void *x=is_term_resized
14272 ;
14273 return 0;
14274}
14275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014276if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014279
Matthias Kloseb159a552010-04-25 21:00:44 +000014280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014281$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014282else
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14284$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014285
14286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14288
Matthias Kloseb9621712010-04-24 17:59:49 +000014289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14290$as_echo_n "checking for resize_term... " >&6; }
14291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014292/* end confdefs.h. */
14293#include <curses.h>
14294int
14295main ()
14296{
14297void *x=resize_term
14298 ;
14299 return 0;
14300}
14301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014302if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014305
Matthias Kloseb159a552010-04-25 21:00:44 +000014306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014307$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014308else
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14310$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014311
14312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14314
Matthias Kloseb9621712010-04-24 17:59:49 +000014315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14316$as_echo_n "checking for resizeterm... " >&6; }
14317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014318/* end confdefs.h. */
14319#include <curses.h>
14320int
14321main ()
14322{
14323void *x=resizeterm
14324 ;
14325 return 0;
14326}
14327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014328if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014329
Matthias Kloseb9621712010-04-24 17:59:49 +000014330$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014331
Matthias Kloseb159a552010-04-25 21:00:44 +000014332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014333$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014334else
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14336$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014337
14338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14340
Matthias Kloseb9621712010-04-24 17:59:49 +000014341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14342$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000014343
14344if test -r /dev/ptmx
14345then
Matthias Kloseb9621712010-04-24 17:59:49 +000014346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14347$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014348
Matthias Kloseb9621712010-04-24 17:59:49 +000014349$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014350
Thomas Wouters89f507f2006-12-13 04:49:30 +000014351else
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14353$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014354fi
14355
Matthias Kloseb9621712010-04-24 17:59:49 +000014356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14357$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000014358
14359if test -r /dev/ptc
14360then
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14362$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000014363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014365
Thomas Wouters89f507f2006-12-13 04:49:30 +000014366else
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14368$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000014369fi
14370
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014371if test "$have_long_long" = yes
14372then
Matthias Kloseb9621712010-04-24 17:59:49 +000014373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14374$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014375 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014376 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014377else
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014379 ac_cv_have_long_long_format="cross -- assuming no"
14380 if test x$GCC = xyes; then
14381 save_CFLAGS=$CFLAGS
14382 CFLAGS="$CFLAGS -Werror -Wformat"
14383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14384/* end confdefs.h. */
14385
14386 #include <stdio.h>
14387 #include <stddef.h>
14388
14389int
14390main ()
14391{
14392
14393 char *buffer;
14394 sprintf(buffer, "%lld", (long long)123);
14395 sprintf(buffer, "%lld", (long long)-123);
14396 sprintf(buffer, "%llu", (unsigned long long)123);
14397
14398 ;
14399 return 0;
14400}
14401_ACEOF
14402if ac_fn_c_try_compile "$LINENO"; then :
14403 ac_cv_have_long_long_format=yes
14404
14405fi
14406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14407 CFLAGS=$save_CFLAGS
14408 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014409else
Matthias Kloseb9621712010-04-24 17:59:49 +000014410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014411/* end confdefs.h. */
14412
14413 #include <stdio.h>
14414 #include <stddef.h>
14415 #include <string.h>
14416
14417 #ifdef HAVE_SYS_TYPES_H
14418 #include <sys/types.h>
14419 #endif
14420
14421 int main()
14422 {
14423 char buffer[256];
14424
14425 if (sprintf(buffer, "%lld", (long long)123) < 0)
14426 return 1;
14427 if (strcmp(buffer, "123"))
14428 return 1;
14429
14430 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14431 return 1;
14432 if (strcmp(buffer, "-123"))
14433 return 1;
14434
14435 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14436 return 1;
14437 if (strcmp(buffer, "123"))
14438 return 1;
14439
14440 return 0;
14441 }
14442
14443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014444if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014445 ac_cv_have_long_long_format=yes
14446else
Matthias Kloseb9621712010-04-24 17:59:49 +000014447 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14450 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014451fi
14452
14453
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014454fi
14455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14457$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014458fi
14459
Mark Dickinson89d7d412009-12-31 20:50:59 +000014460if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014461then
14462
Matthias Kloseb9621712010-04-24 17:59:49 +000014463$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014464
14465fi
14466
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014467if test $ac_sys_system = Darwin
14468then
14469 LIBS="$LIBS -framework CoreFoundation"
14470fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014471
Matthias Kloseb9621712010-04-24 17:59:49 +000014472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14473$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014474if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014476else
Matthias Kloseb9621712010-04-24 17:59:49 +000014477 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014478 ac_cv_have_size_t_format="cross -- assuming yes"
14479
Thomas Wouters477c8d52006-05-27 19:21:47 +000014480else
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014482/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014483
Thomas Wouters477c8d52006-05-27 19:21:47 +000014484#include <stdio.h>
14485#include <stddef.h>
14486#include <string.h>
14487
Christian Heimes2c181612007-12-17 20:04:13 +000014488#ifdef HAVE_SYS_TYPES_H
14489#include <sys/types.h>
14490#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014491
14492#ifdef HAVE_SSIZE_T
14493typedef ssize_t Py_ssize_t;
14494#elif SIZEOF_VOID_P == SIZEOF_LONG
14495typedef long Py_ssize_t;
14496#else
14497typedef int Py_ssize_t;
14498#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014499
Christian Heimes2c181612007-12-17 20:04:13 +000014500int main()
14501{
14502 char buffer[256];
14503
Thomas Wouters477c8d52006-05-27 19:21:47 +000014504 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14505 return 1;
14506
Thomas Wouters89f507f2006-12-13 04:49:30 +000014507 if (strcmp(buffer, "123"))
14508 return 1;
14509
14510 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14511 return 1;
14512
14513 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014514 return 1;
14515
14516 return 0;
14517}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014518
Thomas Wouters477c8d52006-05-27 19:21:47 +000014519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014520if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014521 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014522else
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14526 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014527fi
14528
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14531$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014532if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014533
Matthias Kloseb9621712010-04-24 17:59:49 +000014534$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014535
14536fi
14537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014539#ifdef HAVE_SYS_TYPES_H
14540#include <sys/types.h>
14541#endif
14542#ifdef HAVE_SYS_SOCKET_H
14543#include <sys/socket.h>
14544#endif
14545
Matthias Kloseb9621712010-04-24 17:59:49 +000014546"
Victor Stinnere0be4232011-10-25 13:06:09 +020014547if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014548
Martin v. Löwis11437992002-04-12 09:54:03 +000014549else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014550
Matthias Kloseb9621712010-04-24 17:59:49 +000014551$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014552
14553fi
14554
Michael W. Hudson54241132001-12-07 15:38:26 +000014555
Matthias Kloseb9621712010-04-24 17:59:49 +000014556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14557$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014558if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014560else
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014562 ac_cv_broken_mbstowcs=no
14563else
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014565/* end confdefs.h. */
14566
14567#include<stdlib.h>
14568int main() {
14569 size_t len = -1;
14570 const char *str = "text";
14571 len = mbstowcs(NULL, str, 0);
14572 return (len != 4);
14573}
14574
14575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014576if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014577 ac_cv_broken_mbstowcs=no
14578else
Matthias Kloseb9621712010-04-24 17:59:49 +000014579 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014580fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14582 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014583fi
14584
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014585fi
14586
Matthias Kloseb9621712010-04-24 17:59:49 +000014587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14588$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014589if test "$ac_cv_broken_mbstowcs" = yes
14590then
14591
Matthias Kloseb9621712010-04-24 17:59:49 +000014592$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014593
14594fi
14595
Antoine Pitroub52ec782009-01-25 16:34:23 +000014596# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14598$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014599
14600# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014601if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014602 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014603if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014604then
14605
Matthias Kloseb9621712010-04-24 17:59:49 +000014606$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014607
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14609$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014610fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014611if test "$withval" = no
14612then
14613
14614$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14615
Matthias Kloseb9621712010-04-24 17:59:49 +000014616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14617$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014618fi
14619
Antoine Pitrou042b1282010-08-13 21:15:58 +000014620else
14621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14622$as_echo "no value specified" >&6; }
14623fi
14624
Antoine Pitroub52ec782009-01-25 16:34:23 +000014625
Matthias Kloseb17289e2012-03-15 19:51:34 +010014626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14627$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14628if ${ac_cv_computed_gotos+:} false; then :
14629 $as_echo_n "(cached) " >&6
14630else
14631 if test "$cross_compiling" = yes; then :
14632 if test "${with_computed_gotos+set}" = set; then
14633 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14634 else
14635 ac_cv_computed_gotos=no
14636 fi
14637else
14638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14639/* end confdefs.h. */
14640
14641int main(int argc, char **argv)
14642{
14643 static void *targets[1] = { &&LABEL1 };
14644 goto LABEL2;
14645LABEL1:
14646 return 0;
14647LABEL2:
14648 goto *targets[0];
14649 return 1;
14650}
14651
14652_ACEOF
14653if ac_fn_c_try_run "$LINENO"; then :
14654 ac_cv_computed_gotos=yes
14655else
14656 ac_cv_computed_gotos=no
14657fi
14658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14659 conftest.$ac_objext conftest.beam conftest.$ac_ext
14660fi
14661
14662fi
14663
14664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14665$as_echo "$ac_cv_computed_gotos" >&6; }
14666case "$ac_cv_computed_gotos" in yes*)
14667
14668$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14669
14670esac
14671
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014672case $ac_sys_system in
14673AIX*)
14674
14675$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14676 ;;
14677esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014678
Michael W. Hudson54241132001-12-07 15:38:26 +000014679
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014680
14681
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014682for h in `(cd $srcdir;echo Python/thread_*.h)`
14683do
14684 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14685done
14686
Michael W. Hudson54241132001-12-07 15:38:26 +000014687
Neal Norwitzd24499d2005-12-18 21:36:39 +000014688SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14690$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014691for dir in $SRCDIRS; do
14692 if test ! -d $dir; then
14693 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014694 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014695done
Matthias Kloseb9621712010-04-24 17:59:49 +000014696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14697$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014698
Stefan Krah1919b7e2012-03-21 18:25:23 +010014699# Availability of -O2:
14700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14701$as_echo_n "checking for -O2... " >&6; }
14702saved_cflags="$CFLAGS"
14703CFLAGS="-O2"
14704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14705/* end confdefs.h. */
14706
14707int
14708main ()
14709{
14710
14711
14712 ;
14713 return 0;
14714}
14715_ACEOF
14716if ac_fn_c_try_compile "$LINENO"; then :
14717 have_O2=yes
14718else
14719 have_O2=no
14720fi
14721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14723$as_echo "$have_O2" >&6; }
14724CFLAGS="$saved_cflags"
14725
14726# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14727# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14729$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14730saved_cflags="$CFLAGS"
14731CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14732if test "$have_O2" = no; then
14733 CFLAGS=""
14734fi
14735if test "$cross_compiling" = yes; then :
14736 have_glibc_memmove_bug=undefined
14737else
14738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14739/* end confdefs.h. */
14740
14741#include <stdio.h>
14742#include <stdlib.h>
14743#include <string.h>
14744void foo(void *p, void *q) { memmove(p, q, 19); }
14745int main() {
14746 char a[32] = "123456789000000000";
14747 foo(&a[9], a);
14748 if (strcmp(a, "123456789123456789000000000") != 0)
14749 return 1;
14750 foo(a, &a[9]);
14751 if (strcmp(a, "123456789000000000") != 0)
14752 return 1;
14753 return 0;
14754}
14755
14756_ACEOF
14757if ac_fn_c_try_run "$LINENO"; then :
14758 have_glibc_memmove_bug=no
14759else
14760 have_glibc_memmove_bug=yes
14761fi
14762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14763 conftest.$ac_objext conftest.beam conftest.$ac_ext
14764fi
14765
14766CFLAGS="$saved_cflags"
14767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
14768$as_echo "$have_glibc_memmove_bug" >&6; }
14769if test "$have_glibc_memmove_bug" = yes; then
14770
14771$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
14772
14773fi
14774
14775if test "$have_gcc_asm_for_x87" = yes; then
14776 # Some versions of gcc miscompile inline asm:
14777 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
14778 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
14779 case $CC in
14780 *gcc*)
14781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
14782$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
14783 saved_cflags="$CFLAGS"
14784 CFLAGS="-O2"
14785 if test "$cross_compiling" = yes; then :
14786 have_ipa_pure_const_bug=undefined
14787else
14788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14789/* end confdefs.h. */
14790
14791 __attribute__((noinline)) int
14792 foo(int *p) {
14793 int r;
14794 asm ( "movl \$6, (%1)\n\t"
14795 "xorl %0, %0\n\t"
14796 : "=r" (r) : "r" (p) : "memory"
14797 );
14798 return r;
14799 }
14800 int main() {
14801 int p = 8;
14802 if ((foo(&p) ? : p) != 6)
14803 return 1;
14804 return 0;
14805 }
14806
14807_ACEOF
14808if ac_fn_c_try_run "$LINENO"; then :
14809 have_ipa_pure_const_bug=no
14810else
14811 have_ipa_pure_const_bug=yes
14812fi
14813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14814 conftest.$ac_objext conftest.beam conftest.$ac_ext
14815fi
14816
14817 CFLAGS="$saved_cflags"
14818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
14819$as_echo "$have_ipa_pure_const_bug" >&6; }
14820 if test "$have_ipa_pure_const_bug" = yes; then
14821
14822$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
14823
14824 fi
14825 ;;
14826 esac
14827fi
14828
Guido van Rossum627b2d71993-12-24 10:39:16 +000014829# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014830ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014831
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014832ac_config_files="$ac_config_files Modules/ld_so_aix"
14833
Martin v. Löwis11437992002-04-12 09:54:03 +000014834cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014835# This file is a shell script that caches the results of configure
14836# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014837# scripts and configure runs, see configure's option --config-cache.
14838# It is not useful on other systems. If it contains results you don't
14839# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014840#
Martin v. Löwis11437992002-04-12 09:54:03 +000014841# config.status only pays attention to the cache file if you give it
14842# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014843#
Skip Montanaro6dead952003-09-25 14:50:04 +000014844# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014845# loading this file, other *unset* `ac_cv_foo' will be assigned the
14846# following values.
14847
14848_ACEOF
14849
Guido van Rossumf78abae1997-01-21 22:02:36 +000014850# The following way of writing the cache mishandles newlines in values,
14851# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014852# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014853# Ultrix sh set writes to stderr and can't be redirected directly,
14854# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855(
14856 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14857 eval ac_val=\$$ac_var
14858 case $ac_val in #(
14859 *${as_nl}*)
14860 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014861 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14862$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863 esac
14864 case $ac_var in #(
14865 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14867 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014868 esac ;;
14869 esac
14870 done
14871
Martin v. Löwis11437992002-04-12 09:54:03 +000014872 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14874 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 # `set' does not quote correctly, so add quotes: double-quote
14876 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014877 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014878 "s/'/'\\\\''/g;
14879 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014880 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014881 *)
14882 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014885 esac |
14886 sort
14887) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014888 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014892 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14893 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14895 :end' >>confcache
14896if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14897 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014898 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014899 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14900$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020014901 if test ! -f "$cache_file" || test -h "$cache_file"; then
14902 cat confcache >"$cache_file"
14903 else
14904 case $cache_file in #(
14905 */* | ?:*)
14906 mv -f confcache "$cache_file"$$ &&
14907 mv -f "$cache_file"$$ "$cache_file" ;; #(
14908 *)
14909 mv -f confcache "$cache_file" ;;
14910 esac
14911 fi
14912 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014913 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014914 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14915$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014916 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014917fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014918rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014919
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014920test "x$prefix" = xNONE && prefix=$ac_default_prefix
14921# Let make expand exec_prefix.
14922test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014923
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014924DEFS=-DHAVE_CONFIG_H
14925
Skip Montanaro6dead952003-09-25 14:50:04 +000014926ac_libobjs=
14927ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014928U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014929for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14930 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014932 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14934 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14936 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014937done
14938LIBOBJS=$ac_libobjs
14939
14940LTLIBOBJS=$ac_ltlibobjs
14941
14942
Martin v. Löwis11437992002-04-12 09:54:03 +000014943
Matthias Kloseb9621712010-04-24 17:59:49 +000014944
Victor Stinnere0be4232011-10-25 13:06:09 +020014945: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014946ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014947ac_clean_files_save=$ac_clean_files
14948ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014949{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14950$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14951as_write_fail=0
14952cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014953#! $SHELL
14954# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014955# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014956# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014957# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014958
Martin v. Löwis11437992002-04-12 09:54:03 +000014959debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014960ac_cs_recheck=false
14961ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014962
Matthias Kloseb9621712010-04-24 17:59:49 +000014963SHELL=\${CONFIG_SHELL-$SHELL}
14964export SHELL
14965_ASEOF
14966cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14967## -------------------- ##
14968## M4sh Initialization. ##
14969## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971# Be more Bourne compatible
14972DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014973if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 emulate sh
14975 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014977 # is contrary to our usage. Disable this feature.
14978 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014979 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014980else
Matthias Kloseb9621712010-04-24 17:59:49 +000014981 case `(set -o) 2>/dev/null` in #(
14982 *posix*) :
14983 set -o posix ;; #(
14984 *) :
14985 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014986esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014987fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014988
14989
Matthias Kloseb9621712010-04-24 17:59:49 +000014990as_nl='
14991'
14992export as_nl
14993# Printing a long string crashes Solaris 7 /usr/bin/printf.
14994as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14995as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14996as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14997# Prefer a ksh shell builtin over an external printf program on Solaris,
14998# but without wasting forks for bash or zsh.
14999if test -z "$BASH_VERSION$ZSH_VERSION" \
15000 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15001 as_echo='print -r --'
15002 as_echo_n='print -rn --'
15003elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15004 as_echo='printf %s\n'
15005 as_echo_n='printf %s'
15006else
15007 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15008 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15009 as_echo_n='/usr/ucb/echo -n'
15010 else
15011 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15012 as_echo_n_body='eval
15013 arg=$1;
15014 case $arg in #(
15015 *"$as_nl"*)
15016 expr "X$arg" : "X\\(.*\\)$as_nl";
15017 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15018 esac;
15019 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15020 '
15021 export as_echo_n_body
15022 as_echo_n='sh -c $as_echo_n_body as_echo'
15023 fi
15024 export as_echo_body
15025 as_echo='sh -c $as_echo_body as_echo'
15026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015027
15028# The user is always right.
15029if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 PATH_SEPARATOR=:
15031 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15032 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15033 PATH_SEPARATOR=';'
15034 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037
15038# IFS
15039# We need space, tab and new line, in precisely that order. Quoting is
15040# there to prevent editors from complaining about space-tab.
15041# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15042# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043IFS=" "" $as_nl"
15044
15045# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015046as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015047case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048 *[\\/]* ) as_myself=$0 ;;
15049 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015050for as_dir in $PATH
15051do
15052 IFS=$as_save_IFS
15053 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15055 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058 ;;
15059esac
15060# We did not find ourselves, most probably we were run as `sh COMMAND'
15061# in which case we are not to be found in the path.
15062if test "x$as_myself" = x; then
15063 as_myself=$0
15064fi
15065if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015066 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15067 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068fi
15069
Matthias Kloseb9621712010-04-24 17:59:49 +000015070# Unset variables that we do not need and which cause bugs (e.g. in
15071# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15072# suppresses any "Segmentation fault" message there. '((' could
15073# trigger a bug in pdksh 5.2.14.
15074for as_var in BASH_ENV ENV MAIL MAILPATH
15075do eval test x\${$as_var+set} = xset \
15076 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015077done
15078PS1='$ '
15079PS2='> '
15080PS4='+ '
15081
15082# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015083LC_ALL=C
15084export LC_ALL
15085LANGUAGE=C
15086export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087
Matthias Kloseb9621712010-04-24 17:59:49 +000015088# CDPATH.
15089(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15090
15091
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015092# as_fn_error STATUS ERROR [LINENO LOG_FD]
15093# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015094# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15095# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015096# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015097as_fn_error ()
15098{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015099 as_status=$1; test $as_status -eq 0 && as_status=1
15100 if test "$4"; then
15101 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15102 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015103 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015104 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015105 as_fn_exit $as_status
15106} # as_fn_error
15107
15108
15109# as_fn_set_status STATUS
15110# -----------------------
15111# Set $? to STATUS, without forking.
15112as_fn_set_status ()
15113{
15114 return $1
15115} # as_fn_set_status
15116
15117# as_fn_exit STATUS
15118# -----------------
15119# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15120as_fn_exit ()
15121{
15122 set +e
15123 as_fn_set_status $1
15124 exit $1
15125} # as_fn_exit
15126
15127# as_fn_unset VAR
15128# ---------------
15129# Portably unset VAR.
15130as_fn_unset ()
15131{
15132 { eval $1=; unset $1;}
15133}
15134as_unset=as_fn_unset
15135# as_fn_append VAR VALUE
15136# ----------------------
15137# Append the text in VALUE to the end of the definition contained in VAR. Take
15138# advantage of any shell optimizations that allow amortized linear growth over
15139# repeated appends, instead of the typical quadratic growth present in naive
15140# implementations.
15141if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15142 eval 'as_fn_append ()
15143 {
15144 eval $1+=\$2
15145 }'
15146else
15147 as_fn_append ()
15148 {
15149 eval $1=\$$1\$2
15150 }
15151fi # as_fn_append
15152
15153# as_fn_arith ARG...
15154# ------------------
15155# Perform arithmetic evaluation on the ARGs, and store the result in the
15156# global $as_val. Take advantage of shells that can avoid forks. The arguments
15157# must be portable across $(()) and expr.
15158if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15159 eval 'as_fn_arith ()
15160 {
15161 as_val=$(( $* ))
15162 }'
15163else
15164 as_fn_arith ()
15165 {
15166 as_val=`expr "$@" || test $? -eq 1`
15167 }
15168fi # as_fn_arith
15169
15170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015171if expr a : '\(a\)' >/dev/null 2>&1 &&
15172 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15173 as_expr=expr
15174else
15175 as_expr=false
15176fi
15177
15178if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15179 as_basename=basename
15180else
15181 as_basename=false
15182fi
15183
Matthias Kloseb9621712010-04-24 17:59:49 +000015184if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15185 as_dirname=dirname
15186else
15187 as_dirname=false
15188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190as_me=`$as_basename -- "$0" ||
15191$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15192 X"$0" : 'X\(//\)$' \| \
15193 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015194$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015195 sed '/^.*\/\([^/][^/]*\)\/*$/{
15196 s//\1/
15197 q
15198 }
15199 /^X\/\(\/\/\)$/{
15200 s//\1/
15201 q
15202 }
15203 /^X\/\(\/\).*/{
15204 s//\1/
15205 q
15206 }
15207 s/.*/./; q'`
15208
Matthias Kloseb9621712010-04-24 17:59:49 +000015209# Avoid depending upon Character Ranges.
15210as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15211as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15212as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15213as_cr_digits='0123456789'
15214as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215
15216ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015217case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015219 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015221 xy) ECHO_C='\c';;
15222 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15223 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224 esac;;
15225*)
15226 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015227esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015228
Martin v. Löwis11437992002-04-12 09:54:03 +000015229rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230if test -d conf$$.dir; then
15231 rm -f conf$$.dir/conf$$.file
15232else
15233 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015236if (echo >conf$$.file) 2>/dev/null; then
15237 if ln -s conf$$.file conf$$ 2>/dev/null; then
15238 as_ln_s='ln -s'
15239 # ... but there are two gotchas:
15240 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15241 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015242 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015243 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015244 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 elif ln conf$$.file conf$$ 2>/dev/null; then
15246 as_ln_s=ln
15247 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015248 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015249 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015250else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015251 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000015252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15254rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015255
Matthias Kloseb9621712010-04-24 17:59:49 +000015256
15257# as_fn_mkdir_p
15258# -------------
15259# Create "$as_dir" as a directory, including parents if necessary.
15260as_fn_mkdir_p ()
15261{
15262
15263 case $as_dir in #(
15264 -*) as_dir=./$as_dir;;
15265 esac
15266 test -d "$as_dir" || eval $as_mkdir_p || {
15267 as_dirs=
15268 while :; do
15269 case $as_dir in #(
15270 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15271 *) as_qdir=$as_dir;;
15272 esac
15273 as_dirs="'$as_qdir' $as_dirs"
15274 as_dir=`$as_dirname -- "$as_dir" ||
15275$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15276 X"$as_dir" : 'X\(//\)[^/]' \| \
15277 X"$as_dir" : 'X\(//\)$' \| \
15278 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15279$as_echo X"$as_dir" |
15280 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15281 s//\1/
15282 q
15283 }
15284 /^X\(\/\/\)[^/].*/{
15285 s//\1/
15286 q
15287 }
15288 /^X\(\/\/\)$/{
15289 s//\1/
15290 q
15291 }
15292 /^X\(\/\).*/{
15293 s//\1/
15294 q
15295 }
15296 s/.*/./; q'`
15297 test -d "$as_dir" && break
15298 done
15299 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015300 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015301
15302
15303} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015304if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015305 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015306else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015307 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015308 as_mkdir_p=false
15309fi
15310
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015311if test -x / >/dev/null 2>&1; then
15312 as_test_x='test -x'
15313else
15314 if ls -dL / >/dev/null 2>&1; then
15315 as_ls_L_option=L
15316 else
15317 as_ls_L_option=
15318 fi
15319 as_test_x='
15320 eval sh -c '\''
15321 if test -d "$1"; then
15322 test -d "$1/.";
15323 else
15324 case $1 in #(
15325 -*)set "./$1";;
15326 esac;
15327 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15328 ???[sx]*):;;*)false;;esac;fi
15329 '\'' sh
15330 '
15331fi
15332as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000015333
15334# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015335as_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 +000015336
15337# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015338as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015339
15340
Martin v. Löwis11437992002-04-12 09:54:03 +000015341exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015342## ----------------------------------- ##
15343## Main body of $CONFIG_STATUS script. ##
15344## ----------------------------------- ##
15345_ASEOF
15346test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015347
Matthias Kloseb9621712010-04-24 17:59:49 +000015348cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15349# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015350# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351# values after options handling.
15352ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015353This file was extended by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015354generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015355
15356 CONFIG_FILES = $CONFIG_FILES
15357 CONFIG_HEADERS = $CONFIG_HEADERS
15358 CONFIG_LINKS = $CONFIG_LINKS
15359 CONFIG_COMMANDS = $CONFIG_COMMANDS
15360 $ $0 $@
15361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015362on `(hostname || uname -n) 2>/dev/null | sed 1q`
15363"
15364
Martin v. Löwis11437992002-04-12 09:54:03 +000015365_ACEOF
15366
Matthias Kloseb9621712010-04-24 17:59:49 +000015367case $ac_config_files in *"
15368"*) set x $ac_config_files; shift; ac_config_files=$*;;
15369esac
15370
15371case $ac_config_headers in *"
15372"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15373esac
15374
15375
15376cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015377# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015378config_files="$ac_config_files"
15379config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015382
Matthias Kloseb9621712010-04-24 17:59:49 +000015383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015384ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015385\`$as_me' instantiates files and other configuration actions
15386from templates according to the current configuration. Unless the files
15387and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015388
Matthias Kloseb9621712010-04-24 17:59:49 +000015389Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015390
15391 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015392 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015393 --config print configuration, then exit
15394 -q, --quiet, --silent
15395 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015396 -d, --debug don't remove temporary files
15397 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015398 --file=FILE[:TEMPLATE]
15399 instantiate the configuration file FILE
15400 --header=FILE[:TEMPLATE]
15401 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015402
15403Configuration files:
15404$config_files
15405
15406Configuration headers:
15407$config_headers
15408
Matthias Kloseb9621712010-04-24 17:59:49 +000015409Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015412cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15413ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015414ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015415python config.status 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015416configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015418
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015419Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015420This config.status script is free software; the Free Software Foundation
15421gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015422
15423ac_pwd='$ac_pwd'
15424srcdir='$srcdir'
15425INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015426MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015427test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015428_ACEOF
15429
Matthias Kloseb9621712010-04-24 17:59:49 +000015430cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15431# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015432ac_need_defaults=:
15433while test $# != 0
15434do
15435 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015436 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015437 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15438 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015439 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015440 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015441 --*=)
15442 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15443 ac_optarg=
15444 ac_shift=:
15445 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015447 ac_option=$1
15448 ac_optarg=$2
15449 ac_shift=shift
15450 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015451 esac
15452
Skip Montanaro6dead952003-09-25 14:50:04 +000015453 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015454 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015455 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15456 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015457 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015458 $as_echo "$ac_cs_version"; exit ;;
15459 --config | --confi | --conf | --con | --co | --c )
15460 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015462 debug=: ;;
15463 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015464 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015465 case $ac_optarg in
15466 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015467 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015468 esac
15469 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 ac_need_defaults=false;;
15471 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015472 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015473 case $ac_optarg in
15474 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15475 esac
15476 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015478 --he | --h)
15479 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015480 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015481Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015483 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015484 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15485 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15486 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015487
15488 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015489 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015490Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015491
Matthias Kloseb9621712010-04-24 17:59:49 +000015492 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015493 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015494
15495 esac
15496 shift
15497done
15498
Skip Montanaro6dead952003-09-25 14:50:04 +000015499ac_configure_extra_args=
15500
15501if $ac_cs_silent; then
15502 exec 6>/dev/null
15503 ac_configure_extra_args="$ac_configure_extra_args --silent"
15504fi
15505
15506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015507cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015508if \$ac_cs_recheck; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015509 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015510 shift
15511 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15512 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015513 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015514 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015515fi
15516
Martin v. Löwis11437992002-04-12 09:54:03 +000015517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015518cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015519exec 5>>config.log
15520{
15521 echo
15522 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15523## Running $as_me. ##
15524_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015525 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015529cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015530_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015531
Matthias Kloseb9621712010-04-24 17:59:49 +000015532cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533
15534# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015535for ac_config_target in $ac_config_targets
15536do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537 case $ac_config_target in
15538 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15539 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15540 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015541 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15542 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015543 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15544 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015545 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015546 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547
Victor Stinnere0be4232011-10-25 13:06:09 +020015548 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015549 esac
15550done
15551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015552
Martin v. Löwis11437992002-04-12 09:54:03 +000015553# If the user did not use the arguments to specify the items to instantiate,
15554# then the envvar interface is used. Set only those that are not.
15555# We use the long form for the default assignment because of an extremely
15556# bizarre bug on SunOS 4.1.3.
15557if $ac_need_defaults; then
15558 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15559 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15560fi
15561
Skip Montanaro6dead952003-09-25 14:50:04 +000015562# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015564# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565# Hook for its removal unless debugging.
15566# Note that there is a small window in which the directory will not be cleaned:
15567# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015568$debug ||
15569{
Victor Stinnere0be4232011-10-25 13:06:09 +020015570 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015572 : "${ac_tmp:=$tmp}"
15573 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015575 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015576}
Martin v. Löwis11437992002-04-12 09:54:03 +000015577# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015578
Martin v. Löwis11437992002-04-12 09:54:03 +000015579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015580 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015581 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015582} ||
15583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015584 tmp=./conf$$-$RANDOM
15585 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015586} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015587ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015588
Matthias Kloseb9621712010-04-24 17:59:49 +000015589# Set up the scripts for CONFIG_FILES section.
15590# No need to generate them if there are no CONFIG_FILES.
15591# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015592if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015593
Matthias Kloseb9621712010-04-24 17:59:49 +000015594
15595ac_cr=`echo X | tr X '\015'`
15596# On cygwin, bash can eat \r inside `` if the user requested igncr.
15597# But we know of no other shell where ac_cr would be empty at this
15598# point, so we can use a bashism as a fallback.
15599if test "x$ac_cr" = x; then
15600 eval ac_cr=\$\'\\r\'
15601fi
15602ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15603if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015604 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015605else
15606 ac_cs_awk_cr=$ac_cr
15607fi
15608
Victor Stinnere0be4232011-10-25 13:06:09 +020015609echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015610_ACEOF
15611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015612
Matthias Kloseb9621712010-04-24 17:59:49 +000015613{
15614 echo "cat >conf$$subs.awk <<_ACEOF" &&
15615 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15616 echo "_ACEOF"
15617} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015618 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15619ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620ac_delim='%!_!# '
15621for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015622 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015623 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15626 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015627 break
15628 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015629 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015630 else
15631 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015632 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633done
Matthias Kloseb9621712010-04-24 17:59:49 +000015634rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635
Matthias Kloseb9621712010-04-24 17:59:49 +000015636cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015637cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015639sed -n '
15640h
15641s/^/S["/; s/!.*/"]=/
15642p
15643g
15644s/^[^!]*!//
15645:repl
15646t repl
15647s/'"$ac_delim"'$//
15648t delim
15649:nl
15650h
15651s/\(.\{148\}\)..*/\1/
15652t more1
15653s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15654p
15655n
15656b repl
15657:more1
15658s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15659p
15660g
15661s/.\{148\}//
15662t nl
15663:delim
15664h
15665s/\(.\{148\}\)..*/\1/
15666t more2
15667s/["\\]/\\&/g; s/^/"/; s/$/"/
15668p
15669b
15670:more2
15671s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15672p
15673g
15674s/.\{148\}//
15675t delim
15676' <conf$$subs.awk | sed '
15677/^[^""]/{
15678 N
15679 s/\n//
15680}
15681' >>$CONFIG_STATUS || ac_write_fail=1
15682rm -f conf$$subs.awk
15683cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15684_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015685cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015686 for (key in S) S_is_set[key] = 1
15687 FS = ""
15688
15689}
15690{
15691 line = $ 0
15692 nfields = split(line, field, "@")
15693 substed = 0
15694 len = length(field[1])
15695 for (i = 2; i < nfields; i++) {
15696 key = field[i]
15697 keylen = length(key)
15698 if (S_is_set[key]) {
15699 value = S[key]
15700 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15701 len += length(value) + length(field[++i])
15702 substed = 1
15703 } else
15704 len += 1 + keylen
15705 }
15706
15707 print line
15708}
15709
15710_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015712cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15713if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15714 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15715else
15716 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015717fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015718 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015719_ACEOF
15720
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015721# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15722# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015723# trailing colons and then remove the whole line if VPATH becomes empty
15724# (actually we leave an empty line to preserve line numbers).
15725if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015726 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15727h
15728s///
15729s/^/:/
15730s/[ ]*$/:/
15731s/:\$(srcdir):/:/g
15732s/:\${srcdir}:/:/g
15733s/:@srcdir@:/:/g
15734s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015735s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015736x
15737s/\(=[ ]*\).*/\1/
15738G
15739s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015740s/^[^=]*=[ ]*$//
15741}'
15742fi
15743
Matthias Kloseb9621712010-04-24 17:59:49 +000015744cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015745fi # test -n "$CONFIG_FILES"
15746
Matthias Kloseb9621712010-04-24 17:59:49 +000015747# Set up the scripts for CONFIG_HEADERS section.
15748# No need to generate them if there are no CONFIG_HEADERS.
15749# This happens for instance with `./config.status Makefile'.
15750if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015751cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015752BEGIN {
15753_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015754
Matthias Kloseb9621712010-04-24 17:59:49 +000015755# Transform confdefs.h into an awk script `defines.awk', embedded as
15756# here-document in config.status, that substitutes the proper values into
15757# config.h.in to produce config.h.
15758
15759# Create a delimiter string that does not exist in confdefs.h, to ease
15760# handling of long lines.
15761ac_delim='%!_!# '
15762for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015763 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15764 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015765 break
15766 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015767 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015768 else
15769 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15770 fi
15771done
15772
15773# For the awk script, D is an array of macro values keyed by name,
15774# likewise P contains macro parameters if any. Preserve backslash
15775# newline sequences.
15776
15777ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15778sed -n '
15779s/.\{148\}/&'"$ac_delim"'/g
15780t rset
15781:rset
15782s/^[ ]*#[ ]*define[ ][ ]*/ /
15783t def
15784d
15785:def
15786s/\\$//
15787t bsnl
15788s/["\\]/\\&/g
15789s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15790D["\1"]=" \3"/p
15791s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15792d
15793:bsnl
15794s/["\\]/\\&/g
15795s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15796D["\1"]=" \3\\\\\\n"\\/p
15797t cont
15798s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15799t cont
15800d
15801:cont
15802n
15803s/.\{148\}/&'"$ac_delim"'/g
15804t clear
15805:clear
15806s/\\$//
15807t bsnlc
15808s/["\\]/\\&/g; s/^/"/; s/$/"/p
15809d
15810:bsnlc
15811s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15812b cont
15813' <confdefs.h | sed '
15814s/'"$ac_delim"'/"\\\
15815"/g' >>$CONFIG_STATUS || ac_write_fail=1
15816
15817cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15818 for (key in D) D_is_set[key] = 1
15819 FS = ""
15820}
15821/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15822 line = \$ 0
15823 split(line, arg, " ")
15824 if (arg[1] == "#") {
15825 defundef = arg[2]
15826 mac1 = arg[3]
15827 } else {
15828 defundef = substr(arg[1], 2)
15829 mac1 = arg[2]
15830 }
15831 split(mac1, mac2, "(") #)
15832 macro = mac2[1]
15833 prefix = substr(line, 1, index(line, defundef) - 1)
15834 if (D_is_set[macro]) {
15835 # Preserve the white space surrounding the "#".
15836 print prefix "define", macro P[macro] D[macro]
15837 next
15838 } else {
15839 # Replace #undef with comments. This is necessary, for example,
15840 # in the case of _POSIX_SOURCE, which is predefined and required
15841 # on some systems where configure will not decide to define it.
15842 if (defundef == "undef") {
15843 print "/*", prefix defundef, macro, "*/"
15844 next
15845 }
15846 }
15847}
15848{ print }
15849_ACAWK
15850_ACEOF
15851cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015852 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015853fi # test -n "$CONFIG_HEADERS"
15854
15855
15856eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15857shift
15858for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859do
15860 case $ac_tag in
15861 :[FHLC]) ac_mode=$ac_tag; continue;;
15862 esac
15863 case $ac_mode$ac_tag in
15864 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015865 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015866 :[FH]-) ac_tag=-:-;;
15867 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15868 esac
15869 ac_save_IFS=$IFS
15870 IFS=:
15871 set x $ac_tag
15872 IFS=$ac_save_IFS
15873 shift
15874 ac_file=$1
15875 shift
15876
15877 case $ac_mode in
15878 :L) ac_source=$1;;
15879 :[FH])
15880 ac_file_inputs=
15881 for ac_f
15882 do
15883 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015884 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015885 *) # Look for the file first in the build tree, then in the source tree
15886 # (if the path is not absolute). The absolute path cannot be DOS-style,
15887 # because $ac_f cannot contain `:'.
15888 test -f "$ac_f" ||
15889 case $ac_f in
15890 [\\/$]*) false;;
15891 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15892 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020015893 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015894 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015895 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15896 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015897 done
15898
15899 # Let's still pretend it is `configure' which instantiates (i.e., don't
15900 # use $as_me), people would be surprised to read:
15901 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015902 configure_input='Generated from '`
15903 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15904 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015905 if test x"$ac_file" != x-; then
15906 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015907 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15908$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015909 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015910 # Neutralize special characters interpreted by sed in replacement strings.
15911 case $configure_input in #(
15912 *\&* | *\|* | *\\* )
15913 ac_sed_conf_input=`$as_echo "$configure_input" |
15914 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15915 *) ac_sed_conf_input=$configure_input;;
15916 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015917
15918 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020015919 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15920 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015921 esac
15922 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015923 esac
15924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015925 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015926$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015927 X"$ac_file" : 'X\(//\)[^/]' \| \
15928 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015929 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015930$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015931 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15932 s//\1/
15933 q
15934 }
15935 /^X\(\/\/\)[^/].*/{
15936 s//\1/
15937 q
15938 }
15939 /^X\(\/\/\)$/{
15940 s//\1/
15941 q
15942 }
15943 /^X\(\/\).*/{
15944 s//\1/
15945 q
15946 }
15947 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015948 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 ac_builddir=.
15950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015951case "$ac_dir" in
15952.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15953*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015954 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015955 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015956 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015957 case $ac_top_builddir_sub in
15958 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15959 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15960 esac ;;
15961esac
15962ac_abs_top_builddir=$ac_pwd
15963ac_abs_builddir=$ac_pwd$ac_dir_suffix
15964# for backward compatibility:
15965ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015966
15967case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015968 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015969 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015970 ac_top_srcdir=$ac_top_builddir_sub
15971 ac_abs_top_srcdir=$ac_pwd ;;
15972 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974 ac_top_srcdir=$srcdir
15975 ac_abs_top_srcdir=$srcdir ;;
15976 *) # Relative name.
15977 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15978 ac_top_srcdir=$ac_top_build_prefix$srcdir
15979 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015980esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015981ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015982
Martin v. Löwis11437992002-04-12 09:54:03 +000015983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015984 case $ac_mode in
15985 :F)
15986 #
15987 # CONFIG_FILE
15988 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015989
15990 case $INSTALL in
15991 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015992 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015993 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010015994 ac_MKDIR_P=$MKDIR_P
15995 case $MKDIR_P in
15996 [\\/$]* | ?:[\\/]* ) ;;
15997 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15998 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015999_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016000
Matthias Kloseb9621712010-04-24 17:59:49 +000016001cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016002# If the template does not know about datarootdir, expand it.
16003# FIXME: This hack should be removed a few years after 2.60.
16004ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016005ac_sed_dataroot='
16006/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016007 p
16008 q
16009}
16010/@datadir@/p
16011/@docdir@/p
16012/@infodir@/p
16013/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016014/@mandir@/p'
16015case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016016*datarootdir*) ac_datarootdir_seen=yes;;
16017*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16019$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016021cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016022 ac_datarootdir_hack='
16023 s&@datadir@&$datadir&g
16024 s&@docdir@&$docdir&g
16025 s&@infodir@&$infodir&g
16026 s&@localedir@&$localedir&g
16027 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016028 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016029esac
16030_ACEOF
16031
16032# Neutralize VPATH when `$srcdir' = `.'.
16033# Shell code in configure.ac might set extrasub.
16034# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016035cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16036ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016037$extrasub
16038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016040:t
16041/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016042s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016043s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016044s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016045s&@srcdir@&$ac_srcdir&;t t
16046s&@abs_srcdir@&$ac_abs_srcdir&;t t
16047s&@top_srcdir@&$ac_top_srcdir&;t t
16048s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16049s&@builddir@&$ac_builddir&;t t
16050s&@abs_builddir@&$ac_abs_builddir&;t t
16051s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16052s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016053s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016054$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016055"
Victor Stinnere0be4232011-10-25 13:06:09 +020016056eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16057 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016059test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016060 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16061 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16062 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016063 { $as_echo "$as_me:${as_lineno-$LINENO}: 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" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016065$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016066which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016067
Victor Stinnere0be4232011-10-25 13:06:09 +020016068 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016069 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016070 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16071 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016072 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016073 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016074 ;;
16075 :H)
16076 #
16077 # CONFIG_HEADER
16078 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016080 {
16081 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016082 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16083 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016084 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016085 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016086 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16087$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016088 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016089 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016090 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016091 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 fi
16093 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016094 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016095 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016096 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016097 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016098 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016100
16101 esac
16102
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016103
16104 case $ac_file$ac_mode in
16105 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16106
16107 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016108done # for ac_tag
16109
Guido van Rossum627b2d71993-12-24 10:39:16 +000016110
Matthias Kloseb9621712010-04-24 17:59:49 +000016111as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016112_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016113ac_clean_files=$ac_clean_files_save
16114
Matthias Kloseb9621712010-04-24 17:59:49 +000016115test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016116 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016117
Martin v. Löwis11437992002-04-12 09:54:03 +000016118
16119# configure is writing to config.log, and then calls config.status.
16120# config.status does its own redirection, appending to config.log.
16121# Unfortunately, on DOS this fails, as config.log is still kept open
16122# by configure, so config.status won't be able to write to it; its
16123# output is simply discarded. So we exec the FD to /dev/null,
16124# effectively closing config.log, so it can be properly (re)opened and
16125# appended to by config.status. When coming back to configure, we
16126# need to make the FD available again.
16127if test "$no_create" != yes; then
16128 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016129 ac_config_status_args=
16130 test "$silent" = yes &&
16131 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016132 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016133 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 exec 5>>config.log
16135 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16136 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016137 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016138fi
16139if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16140 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16141$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016142fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016143
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016144
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016145echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016146if test ! -f Modules/Setup
16147then
16148 cp $srcdir/Modules/Setup.dist Modules/Setup
16149fi
16150
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016151echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016152if test ! -f Modules/Setup.local
16153then
16154 echo "# Edit this file for local setup changes" >Modules/Setup.local
16155fi
16156
16157echo "creating Makefile"
16158$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16159 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016160 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016161mv config.c Modules