blob: afbc986d990348e463c76f1ccb5e1940e5690f25 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020094as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200172test x\$exitcode = x0 || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 # Preserve -v and -x to the replacement shell.
221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000232fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: http://bugs.python.org/ about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246 fi
247 exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265 { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274 return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282 set +e
283 as_fn_set_status $1
284 exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367fi # as_fn_arith
368
369
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000375as_fn_error ()
376{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000381 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200382 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000383 as_fn_exit $as_status
384} # as_fn_error
385
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000386if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389else
390 as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395else
396 as_basename=false
397fi
398
Matthias Kloseb9621712010-04-24 17:59:49 +0000399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401else
402 as_dirname=false
403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000404
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000409$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430
431
Matthias Kloseb9621712010-04-24 17:59:49 +0000432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000446 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000452 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000453 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 # Exit status is that of the last command.
460 exit
461}
462
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000464case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000465-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000466 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 esac;;
472*)
473 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000475
Martin v. Löwis11437992002-04-12 09:54:03 +0000476rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000477if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479else
480 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000481 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000483if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200489 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200491 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200498 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000502
Skip Montanaro6dead952003-09-25 14:50:04 +0000503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000505else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000507 as_mkdir_p=false
508fi
509
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200510if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
521 test -d "$1/.";
522 else
523 case $1 in #(
524 -*)set "./$1";;
525 esac;
526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530fi
531as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000532
533# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000534as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
539
Matthias Kloseb9621712010-04-24 17:59:49 +0000540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
543# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
Martin v. Löwis11437992002-04-12 09:54:03 +0000548#
549# Initializations.
550#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000552ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000553ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000554LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000563PACKAGE_VERSION='3.3'
564PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000565PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000566PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000567
568ac_unique_file="Include/object.h"
569# Factoring default headers for most tests.
570ac_includes_default="\
571#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000573# include <sys/types.h>
574#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <sys/stat.h>
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000579# include <stdlib.h>
580# include <stddef.h>
581#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000582# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000583# include <stdlib.h>
584# endif
585#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_STRING_H
587# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <memory.h>
589# endif
590# include <string.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <strings.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef HAVE_STDINT_H
599# include <stdint.h>
600#endif
601#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <unistd.h>
603#endif"
604
Matthias Kloseb9621712010-04-24 17:59:49 +0000605ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000606SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000607THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000608SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000609LIBC
610LIBM
611HAVE_GETHOSTBYNAME
612HAVE_GETHOSTBYNAME_R
613HAVE_GETHOSTBYNAME_R_3_ARG
614HAVE_GETHOSTBYNAME_R_5_ARG
615HAVE_GETHOSTBYNAME_R_6_ARG
616LIBOBJS
617TRUE
618MACHDEP_OBJS
619DYNLOADFILE
620DLINCLDIR
621THREADOBJ
622LDLAST
623USE_THREAD_MODULE
624SIGNAL_OBJS
625USE_SIGNAL_MODULE
626LIBFFI_INCLUDEDIR
627PKG_CONFIG
628SHLIBS
629CFLAGSFORSHARED
630LINKFORSHARED
631CCSHARED
632BLDSHARED
633LDCXXSHARED
634LDSHARED
635SO
636LIBTOOL_CRUFT
637OTHER_LIBTOOL_OPT
638UNIVERSAL_ARCH_FLAGS
639BASECFLAGS
640OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000641ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100643MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500647HAS_PYTHON
648DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000649ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200650ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000651AR
652RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000653USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000654GNULD
655LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000656LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000657RUNSHARED
658INSTSONAME
659LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000660PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000661BLDLIBRARY
662DLLLIBRARY
663LDLIBRARY
664LIBRARY
665BUILDEXEEXT
666EGREP
667GREP
668CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200669NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200670ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000671MAINCC
672CXX
673OBJEXT
674EXEEXT
675ac_ct_CC
676CPPFLAGS
677LDFLAGS
678CFLAGS
679CC
680EXPORT_MACOSX_DEPLOYMENT_TARGET
681CONFIGURE_MACOSX_DEPLOYMENT_TARGET
682SGI_ABI
683MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000684FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000685FRAMEWORKUNIXTOOLSPREFIX
686FRAMEWORKALTINSTALLLAST
687FRAMEWORKALTINSTALLFIRST
688FRAMEWORKINSTALLLAST
689FRAMEWORKINSTALLFIRST
690PYTHONFRAMEWORKINSTALLDIR
691PYTHONFRAMEWORKPREFIX
692PYTHONFRAMEWORKDIR
693PYTHONFRAMEWORKIDENTIFIER
694PYTHONFRAMEWORK
695LIPO_32BIT_FLAGS
696ARCH_RUN_32BIT
697UNIVERSALSDK
698CONFIG_ARGS
699SOVERSION
700VERSION
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100701host_os
702host_vendor
703host_cpu
704host
705build_os
706build_vendor
707build_cpu
708build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500709HAS_HG
710HGBRANCH
711HGTAG
712HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000713target_alias
714host_alias
715build_alias
716LIBS
717ECHO_T
718ECHO_N
719ECHO_C
720DEFS
721mandir
722localedir
723libdir
724psdir
725pdfdir
726dvidir
727htmldir
728infodir
729docdir
730oldincludedir
731includedir
732localstatedir
733sharedstatedir
734sysconfdir
735datadir
736datarootdir
737libexecdir
738sbindir
739bindir
740program_transform_name
741prefix
742exec_prefix
743PACKAGE_URL
744PACKAGE_BUGREPORT
745PACKAGE_STRING
746PACKAGE_VERSION
747PACKAGE_TARNAME
748PACKAGE_NAME
749PATH_SEPARATOR
750SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000751ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000752ac_user_opts='
753enable_option_checking
754enable_universalsdk
755with_universal_archs
756with_framework_name
757enable_framework
758with_gcc
759with_cxx_main
760with_suffix
761enable_shared
762enable_profiling
763with_pydebug
764with_libs
765with_system_expat
766with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100767with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000768enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000769with_dbmliborder
770with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000771with_threads
772with_thread
773enable_ipv6
774with_doc_strings
775with_tsc
776with_pymalloc
777with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000778with_fpectl
779with_libm
780with_libc
781enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000782with_computed_gotos
783'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000784 ac_precious_vars='build_alias
785host_alias
786target_alias
787CC
788CFLAGS
789LDFLAGS
790LIBS
791CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200792CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000793
Guido van Rossum627b2d71993-12-24 10:39:16 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000796ac_init_help=
797ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000798ac_unrecognized_opts=
799ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800# The variables have the same names as the options, with
801# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000802cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000805no_recursion=
806prefix=NONE
807program_prefix=NONE
808program_suffix=NONE
809program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814x_includes=NONE
815x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000816
817# Installation directory options.
818# These are left unexpanded so users can "make install exec_prefix=/foo"
819# and all the variables that are supposed to be based on exec_prefix
820# by default will actually change.
821# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823bindir='${exec_prefix}/bin'
824sbindir='${exec_prefix}/sbin'
825libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826datarootdir='${prefix}/share'
827datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828sysconfdir='${prefix}/etc'
829sharedstatedir='${prefix}/com'
830localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000831includedir='${prefix}/include'
832oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
834infodir='${datarootdir}/info'
835htmldir='${docdir}'
836dvidir='${docdir}'
837pdfdir='${docdir}'
838psdir='${docdir}'
839libdir='${exec_prefix}/lib'
840localedir='${datarootdir}/locale'
841mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000842
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000846do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847 # If the previous option needs an argument, assign it.
848 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 ac_prev=
851 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200855 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
856 *=) ac_optarg= ;;
857 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860 # Accept the important Cygnus configure options, so we can diagnose typos.
861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 case $ac_dashdash$ac_option in
863 --)
864 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866 -bindir | --bindir | --bindi | --bind | --bin | --bi)
867 ac_prev=bindir ;;
868 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870
871 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000872 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000873 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000874 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876 -cache-file | --cache-file | --cache-fil | --cache-fi \
877 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
878 ac_prev=cache_file ;;
879 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
880 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000881 cache_file=$ac_optarg ;;
882
883 --config-cache | -C)
884 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000889 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
892 | --dataroo | --dataro | --datar)
893 ac_prev=datarootdir ;;
894 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
895 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
896 datarootdir=$ac_optarg ;;
897
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000899 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200902 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000903 ac_useropt_orig=$ac_useropt
904 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
905 case $ac_user_opts in
906 *"
907"enable_$ac_useropt"
908"*) ;;
909 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
910 ac_unrecognized_sep=', ';;
911 esac
912 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913
914 -docdir | --docdir | --docdi | --doc | --do)
915 ac_prev=docdir ;;
916 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
917 docdir=$ac_optarg ;;
918
919 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
920 ac_prev=dvidir ;;
921 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
922 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
924 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000925 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000927 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200928 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000929 ac_useropt_orig=$ac_useropt
930 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
931 case $ac_user_opts in
932 *"
933"enable_$ac_useropt"
934"*) ;;
935 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
936 ac_unrecognized_sep=', ';;
937 esac
938 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
941 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
942 | --exec | --exe | --ex)
943 ac_prev=exec_prefix ;;
944 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
945 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
946 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --with-gas.
951 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 -help | --help | --hel | --he | -h)
954 ac_init_help=long ;;
955 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
956 ac_init_help=recursive ;;
957 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
958 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
960 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000965 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
966 ac_prev=htmldir ;;
967 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
968 | --ht=*)
969 htmldir=$ac_optarg ;;
970
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971 -includedir | --includedir | --includedi | --included | --include \
972 | --includ | --inclu | --incl | --inc)
973 ac_prev=includedir ;;
974 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
975 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977
978 -infodir | --infodir | --infodi | --infod | --info | --inf)
979 ac_prev=infodir ;;
980 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
983 -libdir | --libdir | --libdi | --libd)
984 ac_prev=libdir ;;
985 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
988 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
989 | --libexe | --libex | --libe)
990 ac_prev=libexecdir ;;
991 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
992 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000995 -localedir | --localedir | --localedi | --localed | --locale)
996 ac_prev=localedir ;;
997 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
998 localedir=$ac_optarg ;;
999
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001001 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002 ac_prev=localstatedir ;;
1003 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001004 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001006
1007 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1008 ac_prev=mandir ;;
1009 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 # Obsolete; use --without-fp.
1014 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018 no_create=yes ;;
1019
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1021 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1022 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1025 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1026 | --oldin | --oldi | --old | --ol | --o)
1027 ac_prev=oldincludedir ;;
1028 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1029 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1030 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1034 ac_prev=prefix ;;
1035 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037
1038 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1039 | --program-pre | --program-pr | --program-p)
1040 ac_prev=program_prefix ;;
1041 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1042 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
1045 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1046 | --program-suf | --program-su | --program-s)
1047 ac_prev=program_suffix ;;
1048 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1049 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051
1052 -program-transform-name | --program-transform-name \
1053 | --program-transform-nam | --program-transform-na \
1054 | --program-transform-n | --program-transform- \
1055 | --program-transform | --program-transfor \
1056 | --program-transfo | --program-transf \
1057 | --program-trans | --program-tran \
1058 | --progr-tra | --program-tr | --program-t)
1059 ac_prev=program_transform_name ;;
1060 -program-transform-name=* | --program-transform-name=* \
1061 | --program-transform-nam=* | --program-transform-na=* \
1062 | --program-transform-n=* | --program-transform-=* \
1063 | --program-transform=* | --program-transfor=* \
1064 | --program-transfo=* | --program-transf=* \
1065 | --program-trans=* | --program-tran=* \
1066 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1070 ac_prev=pdfdir ;;
1071 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1072 pdfdir=$ac_optarg ;;
1073
1074 -psdir | --psdir | --psdi | --psd | --ps)
1075 ac_prev=psdir ;;
1076 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1077 psdir=$ac_optarg ;;
1078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1080 | -silent | --silent | --silen | --sile | --sil)
1081 silent=yes ;;
1082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1084 ac_prev=sbindir ;;
1085 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1086 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
1089 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1090 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1091 | --sharedst | --shareds | --shared | --share | --shar \
1092 | --sha | --sh)
1093 ac_prev=sharedstatedir ;;
1094 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1095 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1096 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1097 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001100 -site | --site | --sit)
1101 ac_prev=site ;;
1102 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001104
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1106 ac_prev=srcdir ;;
1107 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001110 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1111 | --syscon | --sysco | --sysc | --sys | --sy)
1112 ac_prev=sysconfdir ;;
1113 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1114 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
1122 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1123 verbose=yes ;;
1124
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 -version | --version | --versio | --versi | --vers | -V)
1126 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
1128 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001129 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001131 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001132 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001133 ac_useropt_orig=$ac_useropt
1134 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1135 case $ac_user_opts in
1136 *"
1137"with_$ac_useropt"
1138"*) ;;
1139 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1140 ac_unrecognized_sep=', ';;
1141 esac
1142 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
1144 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001145 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001146 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001147 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001148 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001149 ac_useropt_orig=$ac_useropt
1150 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1151 case $ac_user_opts in
1152 *"
1153"with_$ac_useropt"
1154"*) ;;
1155 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1156 ac_unrecognized_sep=', ';;
1157 esac
1158 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001160 --x)
1161 # Obsolete; use --with-x.
1162 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163
1164 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1165 | --x-incl | --x-inc | --x-in | --x-i)
1166 ac_prev=x_includes ;;
1167 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1168 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
1171 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1172 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1173 ac_prev=x_libraries ;;
1174 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1175 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001178 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1179Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180 ;;
1181
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 *=*)
1183 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1184 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 case $ac_envvar in #(
1186 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001187 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001189 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 export $ac_envvar ;;
1191
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001192 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001197 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198 ;;
1199
1200 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001201done
1202
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206fi
1207
Matthias Kloseb9621712010-04-24 17:59:49 +00001208if test -n "$ac_unrecognized_opts"; then
1209 case $enable_option_checking in
1210 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001211 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1213 esac
1214fi
1215
1216# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001217for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1218 datadir sysconfdir sharedstatedir localstatedir includedir \
1219 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1220 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001221do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001222 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 # Remove trailing slashes.
1224 case $ac_val in
1225 */ )
1226 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1227 eval $ac_var=\$ac_val;;
1228 esac
1229 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001231 [\\/$]* | ?:[\\/]* ) continue;;
1232 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001234 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001235done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236
Martin v. Löwis11437992002-04-12 09:54:03 +00001237# There might be people who depend on the old broken behavior: `$host'
1238# used to hold the argument of --host etc.
1239# FIXME: To remove some day.
1240build=$build_alias
1241host=$host_alias
1242target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001243
Martin v. Löwis11437992002-04-12 09:54:03 +00001244# FIXME: To remove some day.
1245if test "x$host_alias" != x; then
1246 if test "x$build_alias" = x; then
1247 cross_compiling=maybe
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001248 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1249 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 elif test "x$build_alias" != "x$host_alias"; then
1251 cross_compiling=yes
1252 fi
1253fi
1254
1255ac_tool_prefix=
1256test -n "$host_alias" && ac_tool_prefix=$host_alias-
1257
1258test "$silent" = yes && exec 6>/dev/null
1259
Guido van Rossum627b2d71993-12-24 10:39:16 +00001260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261ac_pwd=`pwd` && test -n "$ac_pwd" &&
1262ac_ls_di=`ls -di .` &&
1263ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267
1268
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269# Find the source files, if location was not specified.
1270if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 ac_confdir=`$as_dirname -- "$as_myself" ||
1274$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1275 X"$as_myself" : 'X\(//\)[^/]' \| \
1276 X"$as_myself" : 'X\(//\)$' \| \
1277 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1278$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1280 s//\1/
1281 q
1282 }
1283 /^X\(\/\/\)[^/].*/{
1284 s//\1/
1285 q
1286 }
1287 /^X\(\/\/\)$/{
1288 s//\1/
1289 q
1290 }
1291 /^X\(\/\).*/{
1292 s//\1/
1293 q
1294 }
1295 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001296 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001298 srcdir=..
1299 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300else
1301 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303if test ! -r "$srcdir/$ac_unique_file"; then
1304 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001305 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1308ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001309 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 pwd)`
1311# When building in place, set srcdir=.
1312if test "$ac_abs_confdir" = "$ac_pwd"; then
1313 srcdir=.
1314fi
1315# Remove unnecessary trailing slashes from srcdir.
1316# Double slashes in file names in object file debugging info
1317# mess up M-x gdb in Emacs.
1318case $srcdir in
1319*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1320esac
1321for ac_var in $ac_precious_vars; do
1322 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1323 eval ac_env_${ac_var}_value=\$${ac_var}
1324 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1325 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1326done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001327
Martin v. Löwis11437992002-04-12 09:54:03 +00001328#
1329# Report the --help message.
1330#
1331if test "$ac_init_help" = "long"; then
1332 # Omit some internal or obsolete options to make the list less imposing.
1333 # This message is too long to be a string in the A/UX 3.1 sh.
1334 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001335\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
1337Usage: $0 [OPTION]... [VAR=VALUE]...
1338
1339To assign environment variables (e.g., CC, CFLAGS...), specify them as
1340VAR=VALUE. See below for descriptions of some of the useful variables.
1341
1342Defaults for the options are specified in brackets.
1343
1344Configuration:
1345 -h, --help display this help and exit
1346 --help=short display options specific to this package
1347 --help=recursive display the short help of all the included packages
1348 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001349 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001350 --cache-file=FILE cache test results in FILE [disabled]
1351 -C, --config-cache alias for \`--cache-file=config.cache'
1352 -n, --no-create do not create output files
1353 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1354
Martin v. Löwis11437992002-04-12 09:54:03 +00001355Installation directories:
1356 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001357 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001358 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001359 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001360
1361By default, \`make install' will install all the files in
1362\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1363an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1364for instance \`--prefix=\$HOME'.
1365
1366For better control, use the options below.
1367
1368Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001369 --bindir=DIR user executables [EPREFIX/bin]
1370 --sbindir=DIR system admin executables [EPREFIX/sbin]
1371 --libexecdir=DIR program executables [EPREFIX/libexec]
1372 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1373 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1374 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1375 --libdir=DIR object code libraries [EPREFIX/lib]
1376 --includedir=DIR C header files [PREFIX/include]
1377 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1378 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1379 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1380 --infodir=DIR info documentation [DATAROOTDIR/info]
1381 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1382 --mandir=DIR man documentation [DATAROOTDIR/man]
1383 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1384 --htmldir=DIR html documentation [DOCDIR]
1385 --dvidir=DIR dvi documentation [DOCDIR]
1386 --pdfdir=DIR pdf documentation [DOCDIR]
1387 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001388_ACEOF
1389
1390 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001391
1392System types:
1393 --build=BUILD configure for building on BUILD [guessed]
1394 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001395_ACEOF
1396fi
1397
1398if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001399 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001400 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001401 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001402 cat <<\_ACEOF
1403
1404Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001405 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1407 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001408 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001409 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001410 --enable-framework[=INSTALLDIR]
1411 Build (MacOSX|Darwin) framework
1412 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001413 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001414 --enable-loadable-sqlite-extensions
1415 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --enable-ipv6 Enable ipv6 (with ipv4) support
1417 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001418 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001419 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420
1421Optional Packages:
1422 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1423 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001424 --with-universal-archs=ARCH
1425 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001426 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001427 --with-framework-name=FRAMEWORK
1428 specify an alternate name of the framework built
1429 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001431 --with-cxx-main=<compiler>
1432 compile main() and link python executable with C++
1433 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with-suffix=.exe set executable suffix
1435 --with-pydebug build with Py_DEBUG defined
1436 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001437 --with-system-expat build pyexpat module using an installed expat
1438 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001439 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001440 --with-system-libmpdec build _decimal module using an installed libmpdec
1441 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001442 --with-dbmliborder=db1:db2:...
1443 order to check db backends for dbm. Valid value is a
1444 colon separated string with the backend names
1445 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001447 --with(out)-threads[=DIRECTORY]
1448 disable/enable thread support
1449 --with(out)-thread[=DIRECTORY]
1450 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001451 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001452 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001454 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --with-fpectl enable SIGFPE catching
1456 --with-libm=STRING math library
1457 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001458 --with(out)-computed-gotos
1459 Use computed gotos in evaluation loop (enabled by
1460 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001461
1462Some influential environment variables:
1463 CC C compiler command
1464 CFLAGS C compiler flags
1465 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1466 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001467 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001468 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001469 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 CPP C preprocessor
1471
1472Use these variables to override the choices made by `configure' or to help
1473it to find libraries and programs with nonstandard names/locations.
1474
Georg Brandle2e15612009-05-20 18:25:10 +00001475Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001476_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001478fi
1479
1480if test "$ac_init_help" = "recursive"; then
1481 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001483 test -d "$ac_dir" ||
1484 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1485 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 ac_builddir=.
1487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001488case "$ac_dir" in
1489.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1490*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001493 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 case $ac_top_builddir_sub in
1495 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1496 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1497 esac ;;
1498esac
1499ac_abs_top_builddir=$ac_pwd
1500ac_abs_builddir=$ac_pwd$ac_dir_suffix
1501# for backward compatibility:
1502ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001503
1504case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001505 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001507 ac_top_srcdir=$ac_top_builddir_sub
1508 ac_abs_top_srcdir=$ac_pwd ;;
1509 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 ac_top_srcdir=$srcdir
1512 ac_abs_top_srcdir=$srcdir ;;
1513 *) # Relative name.
1514 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1515 ac_top_srcdir=$ac_top_build_prefix$srcdir
1516 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001517esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 cd "$ac_dir" || { ac_status=$?; continue; }
1521 # Check for guested configure.
1522 if test -f "$ac_srcdir/configure.gnu"; then
1523 echo &&
1524 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1525 elif test -f "$ac_srcdir/configure"; then
1526 echo &&
1527 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001528 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001529 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 fi || ac_status=$?
1531 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 done
1533fi
1534
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001535test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001536if $ac_init_version; then
1537 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001538python configure 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001539generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001541Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001542This configure script is free software; the Free Software Foundation
1543gives unlimited permission to copy, distribute and modify it.
1544_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001545 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001547
1548## ------------------------ ##
1549## Autoconf initialization. ##
1550## ------------------------ ##
1551
1552# ac_fn_c_try_compile LINENO
1553# --------------------------
1554# Try to compile conftest.$ac_ext, and return whether this succeeded.
1555ac_fn_c_try_compile ()
1556{
1557 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1558 rm -f conftest.$ac_objext
1559 if { { ac_try="$ac_compile"
1560case "(($ac_try" in
1561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1562 *) ac_try_echo=$ac_try;;
1563esac
1564eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1565$as_echo "$ac_try_echo"; } >&5
1566 (eval "$ac_compile") 2>conftest.err
1567 ac_status=$?
1568 if test -s conftest.err; then
1569 grep -v '^ *+' conftest.err >conftest.er1
1570 cat conftest.er1 >&5
1571 mv -f conftest.er1 conftest.err
1572 fi
1573 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1574 test $ac_status = 0; } && {
1575 test -z "$ac_c_werror_flag" ||
1576 test ! -s conftest.err
1577 } && test -s conftest.$ac_objext; then :
1578 ac_retval=0
1579else
1580 $as_echo "$as_me: failed program was:" >&5
1581sed 's/^/| /' conftest.$ac_ext >&5
1582
1583 ac_retval=1
1584fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001585 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 as_fn_set_status $ac_retval
1587
1588} # ac_fn_c_try_compile
1589
Matthias Kloseb9621712010-04-24 17:59:49 +00001590# ac_fn_c_try_link LINENO
1591# -----------------------
1592# Try to link conftest.$ac_ext, and return whether this succeeded.
1593ac_fn_c_try_link ()
1594{
1595 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1596 rm -f conftest.$ac_objext conftest$ac_exeext
1597 if { { ac_try="$ac_link"
1598case "(($ac_try" in
1599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1600 *) ac_try_echo=$ac_try;;
1601esac
1602eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1603$as_echo "$ac_try_echo"; } >&5
1604 (eval "$ac_link") 2>conftest.err
1605 ac_status=$?
1606 if test -s conftest.err; then
1607 grep -v '^ *+' conftest.err >conftest.er1
1608 cat conftest.er1 >&5
1609 mv -f conftest.er1 conftest.err
1610 fi
1611 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1612 test $ac_status = 0; } && {
1613 test -z "$ac_c_werror_flag" ||
1614 test ! -s conftest.err
1615 } && test -s conftest$ac_exeext && {
1616 test "$cross_compiling" = yes ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001617 $as_test_x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001618 }; then :
1619 ac_retval=0
1620else
1621 $as_echo "$as_me: failed program was:" >&5
1622sed 's/^/| /' conftest.$ac_ext >&5
1623
1624 ac_retval=1
1625fi
1626 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1627 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1628 # interfere with the next link command; also delete a directory that is
1629 # left behind by Apple's compiler. We do this before executing the actions.
1630 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001631 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001632 as_fn_set_status $ac_retval
1633
1634} # ac_fn_c_try_link
1635
Matthias Kloseb9621712010-04-24 17:59:49 +00001636# ac_fn_c_try_cpp LINENO
1637# ----------------------
1638# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1639ac_fn_c_try_cpp ()
1640{
1641 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1642 if { { ac_try="$ac_cpp conftest.$ac_ext"
1643case "(($ac_try" in
1644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1645 *) ac_try_echo=$ac_try;;
1646esac
1647eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1648$as_echo "$ac_try_echo"; } >&5
1649 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1650 ac_status=$?
1651 if test -s conftest.err; then
1652 grep -v '^ *+' conftest.err >conftest.er1
1653 cat conftest.er1 >&5
1654 mv -f conftest.er1 conftest.err
1655 fi
1656 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001657 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1659 test ! -s conftest.err
1660 }; then :
1661 ac_retval=0
1662else
1663 $as_echo "$as_me: failed program was:" >&5
1664sed 's/^/| /' conftest.$ac_ext >&5
1665
1666 ac_retval=1
1667fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001668 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 as_fn_set_status $ac_retval
1670
1671} # ac_fn_c_try_cpp
1672
1673# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1674# -------------------------------------------------------
1675# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1676# the include files in INCLUDES and setting the cache variable VAR
1677# accordingly.
1678ac_fn_c_check_header_mongrel ()
1679{
1680 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1683$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001684if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001685 $as_echo_n "(cached) " >&6
1686fi
1687eval ac_res=\$$3
1688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1689$as_echo "$ac_res" >&6; }
1690else
1691 # Is the header compilable?
1692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1693$as_echo_n "checking $2 usability... " >&6; }
1694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1695/* end confdefs.h. */
1696$4
1697#include <$2>
1698_ACEOF
1699if ac_fn_c_try_compile "$LINENO"; then :
1700 ac_header_compiler=yes
1701else
1702 ac_header_compiler=no
1703fi
1704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1706$as_echo "$ac_header_compiler" >&6; }
1707
1708# Is the header present?
1709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1710$as_echo_n "checking $2 presence... " >&6; }
1711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1712/* end confdefs.h. */
1713#include <$2>
1714_ACEOF
1715if ac_fn_c_try_cpp "$LINENO"; then :
1716 ac_header_preproc=yes
1717else
1718 ac_header_preproc=no
1719fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001720rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1722$as_echo "$ac_header_preproc" >&6; }
1723
1724# So? What about this header?
1725case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1726 yes:no: )
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1728$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1730$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1731 ;;
1732 no:yes:* )
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1734$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1736$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1738$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1740$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1742$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001743( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001744## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001745## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001746 ) | sed "s/^/$as_me: WARNING: /" >&2
1747 ;;
1748esac
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1750$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001751if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 $as_echo_n "(cached) " >&6
1753else
1754 eval "$3=\$ac_header_compiler"
1755fi
1756eval ac_res=\$$3
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1758$as_echo "$ac_res" >&6; }
1759fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001760 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001761
1762} # ac_fn_c_check_header_mongrel
1763
1764# ac_fn_c_try_run LINENO
1765# ----------------------
1766# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1767# that executables *can* be run.
1768ac_fn_c_try_run ()
1769{
1770 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1771 if { { ac_try="$ac_link"
1772case "(($ac_try" in
1773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1774 *) ac_try_echo=$ac_try;;
1775esac
1776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1777$as_echo "$ac_try_echo"; } >&5
1778 (eval "$ac_link") 2>&5
1779 ac_status=$?
1780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1781 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1782 { { case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785esac
1786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787$as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_try") 2>&5
1789 ac_status=$?
1790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1791 test $ac_status = 0; }; }; then :
1792 ac_retval=0
1793else
1794 $as_echo "$as_me: program exited with status $ac_status" >&5
1795 $as_echo "$as_me: failed program was:" >&5
1796sed 's/^/| /' conftest.$ac_ext >&5
1797
1798 ac_retval=$ac_status
1799fi
1800 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001801 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001802 as_fn_set_status $ac_retval
1803
1804} # ac_fn_c_try_run
1805
1806# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1807# -------------------------------------------------------
1808# Tests whether HEADER exists and can be compiled using the include files in
1809# INCLUDES, setting the cache variable VAR accordingly.
1810ac_fn_c_check_header_compile ()
1811{
1812 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1814$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001815if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001816 $as_echo_n "(cached) " >&6
1817else
1818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820$4
1821#include <$2>
1822_ACEOF
1823if ac_fn_c_try_compile "$LINENO"; then :
1824 eval "$3=yes"
1825else
1826 eval "$3=no"
1827fi
1828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1829fi
1830eval ac_res=\$$3
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1832$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001833 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001834
1835} # ac_fn_c_check_header_compile
1836
Matthias Kloseb9621712010-04-24 17:59:49 +00001837# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1838# -------------------------------------------
1839# Tests whether TYPE exists after having included INCLUDES, setting cache
1840# variable VAR accordingly.
1841ac_fn_c_check_type ()
1842{
1843 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1845$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001846if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001847 $as_echo_n "(cached) " >&6
1848else
1849 eval "$3=no"
1850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1851/* end confdefs.h. */
1852$4
1853int
1854main ()
1855{
1856if (sizeof ($2))
1857 return 0;
1858 ;
1859 return 0;
1860}
1861_ACEOF
1862if ac_fn_c_try_compile "$LINENO"; then :
1863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1864/* end confdefs.h. */
1865$4
1866int
1867main ()
1868{
1869if (sizeof (($2)))
1870 return 0;
1871 ;
1872 return 0;
1873}
1874_ACEOF
1875if ac_fn_c_try_compile "$LINENO"; then :
1876
1877else
1878 eval "$3=yes"
1879fi
1880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1881fi
1882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1883fi
1884eval ac_res=\$$3
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1886$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888
1889} # ac_fn_c_check_type
1890
1891# ac_fn_c_find_uintX_t LINENO BITS VAR
1892# ------------------------------------
1893# Finds an unsigned integer type with width BITS, setting cache variable VAR
1894# accordingly.
1895ac_fn_c_find_uintX_t ()
1896{
1897 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1899$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001900if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001901 $as_echo_n "(cached) " >&6
1902else
1903 eval "$3=no"
1904 # Order is important - never check a type that is potentially smaller
1905 # than half of the expected target width.
1906 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1907 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1909/* end confdefs.h. */
1910$ac_includes_default
1911int
1912main ()
1913{
1914static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001915test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001916
1917 ;
1918 return 0;
1919}
1920_ACEOF
1921if ac_fn_c_try_compile "$LINENO"; then :
1922 case $ac_type in #(
1923 uint$2_t) :
1924 eval "$3=yes" ;; #(
1925 *) :
1926 eval "$3=\$ac_type" ;;
1927esac
1928fi
1929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001930 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001931
1932else
1933 break
1934fi
1935 done
1936fi
1937eval ac_res=\$$3
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1939$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001940 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001941
1942} # ac_fn_c_find_uintX_t
1943
1944# ac_fn_c_find_intX_t LINENO BITS VAR
1945# -----------------------------------
1946# Finds a signed integer type with width BITS, setting cache variable VAR
1947# accordingly.
1948ac_fn_c_find_intX_t ()
1949{
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1952$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001953if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001954 $as_echo_n "(cached) " >&6
1955else
1956 eval "$3=no"
1957 # Order is important - never check a type that is potentially smaller
1958 # than half of the expected target width.
1959 for ac_type in int$2_t 'int' 'long int' \
1960 'long long int' 'short int' 'signed char'; do
1961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962/* end confdefs.h. */
1963$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001964 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001965int
1966main ()
1967{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001968static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001969test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001970
1971 ;
1972 return 0;
1973}
1974_ACEOF
1975if ac_fn_c_try_compile "$LINENO"; then :
1976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1977/* end confdefs.h. */
1978$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001979 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001980int
1981main ()
1982{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001983static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001984 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001985test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001986
1987 ;
1988 return 0;
1989}
1990_ACEOF
1991if ac_fn_c_try_compile "$LINENO"; then :
1992
1993else
1994 case $ac_type in #(
1995 int$2_t) :
1996 eval "$3=yes" ;; #(
1997 *) :
1998 eval "$3=\$ac_type" ;;
1999esac
2000fi
2001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2002fi
2003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002004 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006else
2007 break
2008fi
2009 done
2010fi
2011eval ac_res=\$$3
2012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2013$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002014 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002015
2016} # ac_fn_c_find_intX_t
2017
2018# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2019# --------------------------------------------
2020# Tries to find the compile-time value of EXPR in a program that includes
2021# INCLUDES, setting VAR accordingly. Returns whether the value could be
2022# computed
2023ac_fn_c_compute_int ()
2024{
2025 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2026 if test "$cross_compiling" = yes; then
2027 # Depending upon the size, compute the lo and hi bounds.
2028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031int
2032main ()
2033{
2034static int test_array [1 - 2 * !(($2) >= 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002035test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002036
2037 ;
2038 return 0;
2039}
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"; then :
2042 ac_lo=0 ac_mid=0
2043 while :; do
2044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045/* end confdefs.h. */
2046$4
2047int
2048main ()
2049{
2050static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002051test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002052
2053 ;
2054 return 0;
2055}
2056_ACEOF
2057if ac_fn_c_try_compile "$LINENO"; then :
2058 ac_hi=$ac_mid; break
2059else
2060 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2061 if test $ac_lo -le $ac_mid; then
2062 ac_lo= ac_hi=
2063 break
2064 fi
2065 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2066fi
2067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2068 done
2069else
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002077test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_hi=-1 ac_mid=-1
2085 while :; do
2086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2087/* end confdefs.h. */
2088$4
2089int
2090main ()
2091{
2092static int test_array [1 - 2 * !(($2) >= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002093test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002094
2095 ;
2096 return 0;
2097}
2098_ACEOF
2099if ac_fn_c_try_compile "$LINENO"; then :
2100 ac_lo=$ac_mid; break
2101else
2102 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2103 if test $ac_mid -le $ac_hi; then
2104 ac_lo= ac_hi=
2105 break
2106 fi
2107 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110 done
2111else
2112 ac_lo= ac_hi=
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115fi
2116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117# Binary search between lo and hi bounds.
2118while test "x$ac_lo" != "x$ac_hi"; do
2119 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123int
2124main ()
2125{
2126static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002127test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002128
2129 ;
2130 return 0;
2131}
2132_ACEOF
2133if ac_fn_c_try_compile "$LINENO"; then :
2134 ac_hi=$ac_mid
2135else
2136 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2137fi
2138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2139done
2140case $ac_lo in #((
2141?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2142'') ac_retval=1 ;;
2143esac
2144 else
2145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146/* end confdefs.h. */
2147$4
2148static long int longval () { return $2; }
2149static unsigned long int ulongval () { return $2; }
2150#include <stdio.h>
2151#include <stdlib.h>
2152int
2153main ()
2154{
2155
2156 FILE *f = fopen ("conftest.val", "w");
2157 if (! f)
2158 return 1;
2159 if (($2) < 0)
2160 {
2161 long int i = longval ();
2162 if (i != ($2))
2163 return 1;
2164 fprintf (f, "%ld", i);
2165 }
2166 else
2167 {
2168 unsigned long int i = ulongval ();
2169 if (i != ($2))
2170 return 1;
2171 fprintf (f, "%lu", i);
2172 }
2173 /* Do not output a trailing newline, as this causes \r\n confusion
2174 on some platforms. */
2175 return ferror (f) || fclose (f) != 0;
2176
2177 ;
2178 return 0;
2179}
2180_ACEOF
2181if ac_fn_c_try_run "$LINENO"; then :
2182 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2183else
2184 ac_retval=1
2185fi
2186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2187 conftest.$ac_objext conftest.beam conftest.$ac_ext
2188rm -f conftest.val
2189
2190 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002191 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002192 as_fn_set_status $ac_retval
2193
2194} # ac_fn_c_compute_int
2195
2196# ac_fn_c_check_func LINENO FUNC VAR
2197# ----------------------------------
2198# Tests whether FUNC exists, setting the cache variable VAR accordingly
2199ac_fn_c_check_func ()
2200{
2201 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2203$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002204if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002205 $as_echo_n "(cached) " >&6
2206else
2207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2208/* end confdefs.h. */
2209/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2210 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2211#define $2 innocuous_$2
2212
2213/* System header to define __stub macros and hopefully few prototypes,
2214 which can conflict with char $2 (); below.
2215 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2216 <limits.h> exists even on freestanding compilers. */
2217
2218#ifdef __STDC__
2219# include <limits.h>
2220#else
2221# include <assert.h>
2222#endif
2223
2224#undef $2
2225
2226/* Override any GCC internal prototype to avoid an error.
2227 Use char because int might match the return type of a GCC
2228 builtin and then its argument prototype would still apply. */
2229#ifdef __cplusplus
2230extern "C"
2231#endif
2232char $2 ();
2233/* The GNU C library defines this for functions which it implements
2234 to always fail with ENOSYS. Some functions are actually named
2235 something starting with __ and the normal name is an alias. */
2236#if defined __stub_$2 || defined __stub___$2
2237choke me
2238#endif
2239
2240int
2241main ()
2242{
2243return $2 ();
2244 ;
2245 return 0;
2246}
2247_ACEOF
2248if ac_fn_c_try_link "$LINENO"; then :
2249 eval "$3=yes"
2250else
2251 eval "$3=no"
2252fi
2253rm -f core conftest.err conftest.$ac_objext \
2254 conftest$ac_exeext conftest.$ac_ext
2255fi
2256eval ac_res=\$$3
2257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2258$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002259 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002260
2261} # ac_fn_c_check_func
2262
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002263# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2264# ---------------------------------------------
2265# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2266# accordingly.
2267ac_fn_c_check_decl ()
2268{
2269 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270 as_decl_name=`echo $2|sed 's/ *(.*//'`
2271 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2273$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2274if eval \${$3+:} false; then :
2275 $as_echo_n "(cached) " >&6
2276else
2277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h. */
2279$4
2280int
2281main ()
2282{
2283#ifndef $as_decl_name
2284#ifdef __cplusplus
2285 (void) $as_decl_use;
2286#else
2287 (void) $as_decl_name;
2288#endif
2289#endif
2290
2291 ;
2292 return 0;
2293}
2294_ACEOF
2295if ac_fn_c_try_compile "$LINENO"; then :
2296 eval "$3=yes"
2297else
2298 eval "$3=no"
2299fi
2300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301fi
2302eval ac_res=\$$3
2303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2304$as_echo "$ac_res" >&6; }
2305 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2306
2307} # ac_fn_c_check_decl
2308
Matthias Kloseb9621712010-04-24 17:59:49 +00002309# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2310# ----------------------------------------------------
2311# Tries to find if the field MEMBER exists in type AGGR, after including
2312# INCLUDES, setting cache variable VAR accordingly.
2313ac_fn_c_check_member ()
2314{
2315 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2317$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002318if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002319 $as_echo_n "(cached) " >&6
2320else
2321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2322/* end confdefs.h. */
2323$5
2324int
2325main ()
2326{
2327static $2 ac_aggr;
2328if (ac_aggr.$3)
2329return 0;
2330 ;
2331 return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_compile "$LINENO"; then :
2335 eval "$4=yes"
2336else
2337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2338/* end confdefs.h. */
2339$5
2340int
2341main ()
2342{
2343static $2 ac_aggr;
2344if (sizeof ac_aggr.$3)
2345return 0;
2346 ;
2347 return 0;
2348}
2349_ACEOF
2350if ac_fn_c_try_compile "$LINENO"; then :
2351 eval "$4=yes"
2352else
2353 eval "$4=no"
2354fi
2355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356fi
2357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2358fi
2359eval ac_res=\$$4
2360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2361$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002362 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002363
2364} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002366This file contains any messages produced by compilers while
2367running configure, to aid debugging if configure makes a mistake.
2368
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002369It was created by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002370generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002371
2372 $ $0 $@
2373
2374_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002375exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002376{
2377cat <<_ASUNAME
2378## --------- ##
2379## Platform. ##
2380## --------- ##
2381
2382hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2383uname -m = `(uname -m) 2>/dev/null || echo unknown`
2384uname -r = `(uname -r) 2>/dev/null || echo unknown`
2385uname -s = `(uname -s) 2>/dev/null || echo unknown`
2386uname -v = `(uname -v) 2>/dev/null || echo unknown`
2387
2388/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2389/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2390
2391/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2392/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2393/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002394/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002395/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2396/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2397/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2398
2399_ASUNAME
2400
2401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2402for as_dir in $PATH
2403do
2404 IFS=$as_save_IFS
2405 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002406 $as_echo "PATH: $as_dir"
2407 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002408IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002409
2410} >&5
2411
2412cat >&5 <<_ACEOF
2413
2414
2415## ----------- ##
2416## Core tests. ##
2417## ----------- ##
2418
2419_ACEOF
2420
2421
2422# Keep a trace of the command line.
2423# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002425# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002426# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002427ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002428ac_configure_args0=
2429ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002430ac_must_keep_next=false
2431for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002432do
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 for ac_arg
2434 do
2435 case $ac_arg in
2436 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2437 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2438 | -silent | --silent | --silen | --sile | --sil)
2439 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002440 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002441 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002442 esac
2443 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002444 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002448 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002450 case $ac_arg in
2451 *=* | --config-cache | -C | -disable-* | --disable-* \
2452 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2453 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2454 | -with-* | --with-* | -without-* | --without-* | --x)
2455 case "$ac_configure_args0 " in
2456 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2457 esac
2458 ;;
2459 -* ) ac_must_keep_next=true ;;
2460 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002463 ;;
2464 esac
2465 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002466done
Matthias Kloseb9621712010-04-24 17:59:49 +00002467{ ac_configure_args0=; unset ac_configure_args0;}
2468{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002469
2470# When interrupted or exit'd, cleanup temporary files, and complete
2471# config.log. We remove comments because anyway the quotes in there
2472# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473# WARNING: Use '\'' to represent an apostrophe within the trap.
2474# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002475trap 'exit_status=$?
2476 # Save into config.log some information that might help in debugging.
2477 {
2478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002480 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002481## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002482## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo
2484 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485(
2486 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2487 eval ac_val=\$$ac_var
2488 case $ac_val in #(
2489 *${as_nl}*)
2490 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2492$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 esac
2494 case $ac_var in #(
2495 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2497 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac ;;
2499 esac
2500 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002501 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2503 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 "s/'\''/'\''\\\\'\'''\''/g;
2506 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2507 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002508 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002510 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac |
2512 sort
2513)
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002515
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002517## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 echo
2520 for ac_var in $ac_subst_vars
2521 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 eval ac_val=\$$ac_var
2523 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 done | sort
2528 echo
2529
2530 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002534 echo
2535 for ac_var in $ac_subst_files
2536 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 eval ac_val=\$$ac_var
2538 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002542 done | sort
2543 echo
2544 fi
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002547 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002548## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002549## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 echo
2553 fi
2554 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002555 $as_echo "$as_me: caught signal $ac_signal"
2556 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 rm -f core *.core core.conftest.* &&
2559 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002562for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002563 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002564done
2565ac_signal=0
2566
2567# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002569
Matthias Kloseb9621712010-04-24 17:59:49 +00002570$as_echo "/* confdefs.h */" > confdefs.h
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572# Predefined preprocessor variables.
2573
2574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_NAME "$PACKAGE_NAME"
2576_ACEOF
2577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582cat >>confdefs.h <<_ACEOF
2583#define PACKAGE_VERSION "$PACKAGE_VERSION"
2584_ACEOF
2585
Martin v. Löwis11437992002-04-12 09:54:03 +00002586cat >>confdefs.h <<_ACEOF
2587#define PACKAGE_STRING "$PACKAGE_STRING"
2588_ACEOF
2589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590cat >>confdefs.h <<_ACEOF
2591#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2592_ACEOF
2593
Matthias Kloseb9621712010-04-24 17:59:49 +00002594cat >>confdefs.h <<_ACEOF
2595#define PACKAGE_URL "$PACKAGE_URL"
2596_ACEOF
2597
Martin v. Löwis11437992002-04-12 09:54:03 +00002598
2599# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002600# Prefer an explicitly selected file to automatically selected ones.
2601ac_site_file1=NONE
2602ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002604 # We do not want a PATH search for config.site.
2605 case $CONFIG_SITE in #((
2606 -*) ac_site_file1=./$CONFIG_SITE;;
2607 */*) ac_site_file1=$CONFIG_SITE;;
2608 *) ac_site_file1=./$CONFIG_SITE;;
2609 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 ac_site_file1=$prefix/share/config.site
2612 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613else
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 ac_site_file1=$ac_default_prefix/share/config.site
2615 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002617for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618do
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 test "x$ac_site_file" = xNONE && continue
2620 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2621 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2622$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002624 . "$ac_site_file" \
2625 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2627as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002628See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002629 fi
2630done
2631
2632if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 # Some versions of bash will fail to source /dev/null (special files
2634 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2635 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2637$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2640 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 esac
2642 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002643else
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2645$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 >$cache_file
2647fi
2648
2649# Check that the precious variables saved in the cache have kept the same
2650# value.
2651ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2654 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2656 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 case $ac_old_set,$ac_new_set in
2658 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2660$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 ac_cache_corrupted=: ;;
2662 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2664$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 ac_cache_corrupted=: ;;
2666 ,);;
2667 *)
2668 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 # differences in whitespace do not lead to failure.
2670 ac_old_val_w=`echo x $ac_old_val`
2671 ac_new_val_w=`echo x $ac_new_val`
2672 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2674$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2675 ac_cache_corrupted=:
2676 else
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2678$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2679 eval $ac_var=\$ac_old_val
2680 fi
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2682$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2684$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 fi;;
2686 esac
2687 # Pass precious variables to config.status.
2688 if test "$ac_new_set" = set; then
2689 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 *) ac_arg=$ac_var=$ac_new_val ;;
2692 esac
2693 case " $ac_configure_args " in
2694 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002695 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 esac
2697 fi
2698done
2699if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002700 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2703$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002704 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002706## -------------------- ##
2707## Main body of script. ##
2708## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709
Guido van Rossum7f43da71994-08-01 12:15:30 +00002710ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002712ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2713ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2714ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002715
Guido van Rossum627b2d71993-12-24 10:39:16 +00002716
Michael W. Hudson54241132001-12-07 15:38:26 +00002717
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718
2719
2720
2721
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002722if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723then
2724# Extract the first word of "hg", so it can be a program name with args.
2725set dummy hg; ac_word=$2
2726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2727$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002728if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729 $as_echo_n "(cached) " >&6
2730else
2731 if test -n "$HAS_HG"; then
2732 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2733else
2734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735for as_dir in $PATH
2736do
2737 IFS=$as_save_IFS
2738 test -z "$as_dir" && as_dir=.
2739 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002740 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741 ac_cv_prog_HAS_HG="found"
2742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2743 break 2
2744 fi
2745done
2746 done
2747IFS=$as_save_IFS
2748
2749 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2750fi
2751fi
2752HAS_HG=$ac_cv_prog_HAS_HG
2753if test -n "$HAS_HG"; then
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2755$as_echo "$HAS_HG" >&6; }
2756else
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2758$as_echo "no" >&6; }
2759fi
2760
2761
2762else
2763HAS_HG=no-repository
2764fi
2765if test $HAS_HG = found
2766then
2767 HGVERSION="hg id -i \$(srcdir)"
2768 HGTAG="hg id -t \$(srcdir)"
2769 HGBRANCH="hg id -b \$(srcdir)"
2770else
2771 HGVERSION=""
2772 HGTAG=""
2773 HGBRANCH=""
2774fi
2775
2776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002778
2779
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002780ac_aux_dir=
2781for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2782 if test -f "$ac_dir/install-sh"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/install-sh -c"
2785 break
2786 elif test -f "$ac_dir/install.sh"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/install.sh -c"
2789 break
2790 elif test -f "$ac_dir/shtool"; then
2791 ac_aux_dir=$ac_dir
2792 ac_install_sh="$ac_aux_dir/shtool install -c"
2793 break
2794 fi
2795done
2796if test -z "$ac_aux_dir"; then
2797 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2798fi
2799
2800# These three variables are undocumented and unsupported,
2801# and are intended to be withdrawn in a future Autoconf release.
2802# They can cause serious problems if a builder's source tree is in a directory
2803# whose full name contains unusual characters.
2804ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2805ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2806ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2807
2808
2809# Make sure we can run config.sub.
2810$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2811 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2812
2813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2814$as_echo_n "checking build system type... " >&6; }
2815if ${ac_cv_build+:} false; then :
2816 $as_echo_n "(cached) " >&6
2817else
2818 ac_build_alias=$build_alias
2819test "x$ac_build_alias" = x &&
2820 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2821test "x$ac_build_alias" = x &&
2822 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2823ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2824 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2825
2826fi
2827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2828$as_echo "$ac_cv_build" >&6; }
2829case $ac_cv_build in
2830*-*-*) ;;
2831*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2832esac
2833build=$ac_cv_build
2834ac_save_IFS=$IFS; IFS='-'
2835set x $ac_cv_build
2836shift
2837build_cpu=$1
2838build_vendor=$2
2839shift; shift
2840# Remember, the first character of IFS is used to create $*,
2841# except with old shells:
2842build_os=$*
2843IFS=$ac_save_IFS
2844case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2845
2846
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2848$as_echo_n "checking host system type... " >&6; }
2849if ${ac_cv_host+:} false; then :
2850 $as_echo_n "(cached) " >&6
2851else
2852 if test "x$host_alias" = x; then
2853 ac_cv_host=$ac_cv_build
2854else
2855 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2856 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2857fi
2858
2859fi
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2861$as_echo "$ac_cv_host" >&6; }
2862case $ac_cv_host in
2863*-*-*) ;;
2864*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2865esac
2866host=$ac_cv_host
2867ac_save_IFS=$IFS; IFS='-'
2868set x $ac_cv_host
2869shift
2870host_cpu=$1
2871host_vendor=$2
2872shift; shift
2873# Remember, the first character of IFS is used to create $*,
2874# except with old shells:
2875host_os=$*
2876IFS=$ac_save_IFS
2877case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2878
2879
2880
Martin v. Löwis11437992002-04-12 09:54:03 +00002881
Benjamin Petersond23f8222009-04-05 19:13:16 +00002882if test "$prefix" != "/"; then
2883 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2884fi
2885
2886
Martin v. Löwis11437992002-04-12 09:54:03 +00002887
2888
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002889# We don't use PACKAGE_ variables, and they cause conflicts
2890# with other autoconf-based packages that include Python.h
2891grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2892rm confdefs.h
2893mv confdefs.h.new confdefs.h
2894
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002895
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002896VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002897
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002898# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002899
2900SOVERSION=1.0
2901
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002902# The later defininition of _XOPEN_SOURCE disables certain features
2903# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2904
Matthias Kloseb9621712010-04-24 17:59:49 +00002905$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002906
2907
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002908# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2909# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2910# them.
2911
Matthias Kloseb9621712010-04-24 17:59:49 +00002912$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002913
2914
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002915# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2916# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2917# them.
2918
Matthias Kloseb9621712010-04-24 17:59:49 +00002919$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002920
2921
Martin v. Löwisd6320502004-08-12 13:45:08 +00002922# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2923# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2924
Matthias Kloseb9621712010-04-24 17:59:49 +00002925$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002926
2927
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002928# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2929# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2930# them.
2931
Matthias Kloseb9621712010-04-24 17:59:49 +00002932$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002933
2934
2935
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002936define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002937
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002938# Arguments passed to configure.
2939
2940CONFIG_ARGS="$ac_configure_args"
2941
Matthias Kloseb9621712010-04-24 17:59:49 +00002942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2943$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002944# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002945if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002946 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002947 case $enableval in
2948 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07002949 # Locate the best usable SDK, see Mac/README.txt for more
2950 # information
2951 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
2952 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002953 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07002954 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2955 if test ! -d "${enableval}"
2956 then
2957 enableval=/
2958 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002959 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002960 ;;
2961 esac
2962 case $enableval in
2963 no)
2964 UNIVERSALSDK=
2965 enable_universalsdk=
2966 ;;
2967 *)
2968 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002969 if test ! -d "${UNIVERSALSDK}"
2970 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002971 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002972 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002973 ;;
2974 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002976
Thomas Wouters477c8d52006-05-27 19:21:47 +00002977else
2978
2979 UNIVERSALSDK=
2980 enable_universalsdk=
2981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002982fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002983
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002984if test -n "${UNIVERSALSDK}"
2985then
Matthias Kloseb9621712010-04-24 17:59:49 +00002986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2987$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002988else
Matthias Kloseb9621712010-04-24 17:59:49 +00002989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2990$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002991fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002993
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002994
2995
Ned Deilycbfb9a52012-06-23 16:02:19 -07002996# For backward compatibility reasons we prefer to select '32-bit' if available,
2997# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002998UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07002999if test "`uname -s`" = "Darwin"
3000then
3001 if test -n "${UNIVERSALSDK}"
3002 then
3003 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3004 then
3005 UNIVERSAL_ARCHS="intel"
3006 fi
3007 fi
3008fi
3009
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3012$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003013
3014# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003015if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003016 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3018$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003019 UNIVERSAL_ARCHS="$withval"
3020
3021else
3022
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3024$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003025
3026fi
3027
3028
3029
3030
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003031
3032# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003033if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003034 withval=$with_framework_name;
3035 PYTHONFRAMEWORK=${withval}
3036 PYTHONFRAMEWORKDIR=${withval}.framework
3037 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3038
3039else
3040
3041 PYTHONFRAMEWORK=Python
3042 PYTHONFRAMEWORKDIR=Python.framework
3043 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3044
3045fi
3046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003048if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003050 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003051 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003052 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003053 esac
3054 case $enableval in
3055 no)
3056 PYTHONFRAMEWORK=
3057 PYTHONFRAMEWORKDIR=no-framework
3058 PYTHONFRAMEWORKPREFIX=
3059 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003060 FRAMEWORKINSTALLFIRST=
3061 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003062 FRAMEWORKALTINSTALLFIRST=
3063 FRAMEWORKALTINSTALLLAST=
3064 if test "x${prefix}" = "xNONE"; then
3065 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3066 else
3067 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3068 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003069 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003070 ;;
3071 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003072 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003073 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003074 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003075 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003076 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3077 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003078 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003080 if test "x${prefix}" = "xNONE" ; then
3081 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003082
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003083 else
3084 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3085 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003086
3087 case "${enableval}" in
3088 /System*)
3089 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3090 if test "${prefix}" = "NONE" ; then
3091 # See below
3092 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3093 fi
3094 ;;
3095
3096 /Library*)
3097 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3098 ;;
3099
3100 */Library/Frameworks)
3101 MDIR="`dirname "${enableval}"`"
3102 MDIR="`dirname "${MDIR}"`"
3103 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3104
3105 if test "${prefix}" = "NONE"; then
3106 # User hasn't specified the
3107 # --prefix option, but wants to install
3108 # the framework in a non-default location,
3109 # ensure that the compatibility links get
3110 # installed relative to that prefix as well
3111 # instead of in /usr/local.
3112 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3113 fi
3114 ;;
3115
3116 *)
3117 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3118 ;;
3119 esac
3120
Jack Jansen127e56e2001-09-11 14:41:54 +00003121 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003122
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003123 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003124 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003127 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003128
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003129 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3130
3131 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3132
Jack Jansene578a632001-08-15 01:27:14 +00003133 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003134
Guido van Rossum563e7081996-09-10 18:20:48 +00003135else
Martin v. Löwis11437992002-04-12 09:54:03 +00003136
Jack Jansene578a632001-08-15 01:27:14 +00003137 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003138 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003139 PYTHONFRAMEWORKPREFIX=
3140 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003141 FRAMEWORKINSTALLFIRST=
3142 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003143 FRAMEWORKALTINSTALLFIRST=
3144 FRAMEWORKALTINSTALLLAST=
3145 if test "x${prefix}" = "xNONE" ; then
3146 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3147 else
3148 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3149 fi
Jack Jansene578a632001-08-15 01:27:14 +00003150 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003151
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153fi
3154
Thomas Wouters477c8d52006-05-27 19:21:47 +00003155
3156
Michael W. Hudson54241132001-12-07 15:38:26 +00003157
3158
3159
3160
Jack Jansene578a632001-08-15 01:27:14 +00003161
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003162
3163
3164
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003165
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003166
Jack Jansene578a632001-08-15 01:27:14 +00003167##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003168## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003169## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003170##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003171# Set name for machine-dependent library files
3172
Matthias Kloseb9621712010-04-24 17:59:49 +00003173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3174$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003175if test -z "$MACHDEP"
3176then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003177 # avoid using uname for cross builds
3178 if test "$cross_compiling" = yes; then
3179 # ac_sys_system and ac_sys_release are only used for setting
3180 # `define_xopen_source' in the case statement below. For the
3181 # current supported cross builds, this macro is not adjusted.
3182 case "$host" in
3183 *-*-linux*)
3184 ac_sys_system=Linux
3185 ;;
3186 *-*-cygwin*)
3187 ac_sys_system=Cygwin
3188 ;;
3189 *)
3190 # for now, limit cross builds to known configurations
3191 MACHDEP="unknown"
3192 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3193 esac
3194 ac_sys_release=
3195 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003196 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003197 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003198 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003199 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003200 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003201 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003202 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003203 fi
3204 ac_md_system=`echo $ac_sys_system |
3205 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3206 ac_md_release=`echo $ac_sys_release |
3207 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3208 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003209
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003210 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003211 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003212 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003213 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003214 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003215 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003216 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003217fi
Guido van Rossum91922671997-10-09 20:24:13 +00003218
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003219# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3220# disable features if it is defined, without any means to access these
3221# features as extensions. For these systems, we skip the definition of
3222# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3223# some feature, make sure there is no alternative way to access this
3224# feature. Also, when using wildcards, make sure you have verified the
3225# need for not defining _XOPEN_SOURCE on all systems matching the
3226# wildcard, and that the wildcard does not include future systems
3227# (which may remove their limitations).
3228case $ac_sys_system/$ac_sys_release in
3229 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3230 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003231 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003232 # In addition, Stefan Krah confirms that issue #1244610 exists through
3233 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003234 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003235 define_xopen_source=no
3236 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3237 # also defined. This can be overridden by defining _BSD_SOURCE
3238 # As this has a different meaning on Linux, only define it on OpenBSD
3239
Matthias Kloseb9621712010-04-24 17:59:49 +00003240$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003241
3242 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003243 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003244 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3245 # also defined. This can be overridden by defining _BSD_SOURCE
3246 # As this has a different meaning on Linux, only define it on OpenBSD
3247
Matthias Kloseb9621712010-04-24 17:59:49 +00003248$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003249
3250 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003251 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3252 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3253 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003254 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003255 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003256 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3257 # request to enable features supported by the standard as a request
3258 # to disable features not supported by the standard. The best way
3259 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3260 # entirely and define __EXTENSIONS__ instead.
3261 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003262 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003263 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3264 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003265 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003266 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003267 define_xopen_source=no;;
3268 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003269 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003270 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003271 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003272 # On FreeBSD 4, the math functions C89 does not cover are never defined
3273 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3274 FreeBSD/4.*)
3275 define_xopen_source=no;;
3276 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3277 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3278 # identifies itself as Darwin/7.*
3279 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3280 # disables platform specific features beyond repair.
3281 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3282 # has no effect, don't bother defining them
3283 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003284 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003285 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003286 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003287 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3288 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3289 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003290 AIX/4)
3291 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003292 AIX/5)
3293 if test `uname -r` -eq 1; then
3294 define_xopen_source=no
3295 fi
3296 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003297 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3298 # defining NI_NUMERICHOST.
3299 QNX/6.3.2)
3300 define_xopen_source=no
3301 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003302
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003303esac
3304
3305if test $define_xopen_source = yes
3306then
Victor Stinner14d098d2011-09-07 22:29:43 +02003307 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003308
Victor Stinner14d098d2011-09-07 22:29:43 +02003309$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003310
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003311
3312 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3313 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3314 # several APIs are not declared. Since this is also needed in some
3315 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003316
Matthias Kloseb9621712010-04-24 17:59:49 +00003317$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003318
3319
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003320
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003321$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003322
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003323fi
3324
Guido van Rossum91922671997-10-09 20:24:13 +00003325#
3326# SGI compilers allow the specification of the both the ABI and the
3327# ISA on the command line. Depending on the values of these switches,
3328# different and often incompatable code will be generated.
3329#
3330# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3331# thus supply support for various ABI/ISA combinations. The MACHDEP
3332# variable is also adjusted.
3333#
3334
3335if test ! -z "$SGI_ABI"
3336then
3337 CC="cc $SGI_ABI"
3338 LDFLAGS="$SGI_ABI $LDFLAGS"
3339 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3342$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003343
Jack Jansen6b08a402004-06-03 12:41:45 +00003344# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3345# it may influence the way we can build extensions, so distutils
3346# needs to check it
3347
Thomas Wouters477c8d52006-05-27 19:21:47 +00003348
Jack Jansen6b08a402004-06-03 12:41:45 +00003349CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003350EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003351
Guido van Rossum627b2d71993-12-24 10:39:16 +00003352# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003353
3354# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3355# for debug/optimization stuff. BASECFLAGS is for flags that are required
3356# just to get things to compile and link. Users are free to override OPT
3357# when running configure or make. The build should not break if they do.
3358# BASECFLAGS should generally not be messed with, however.
3359
3360# XXX shouldn't some/most/all of this code be merged with the stuff later
3361# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3363$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003365# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003366if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003367 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003368 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003369 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003370 without_gcc=yes;;
3371 yes) CC=gcc
3372 without_gcc=no;;
3373 *) CC=$withval
3374 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003375 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003376else
Martin v. Löwis11437992002-04-12 09:54:03 +00003377
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003378 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003379 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003380 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003381 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003382 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003383fi
3384
Matthias Kloseb9621712010-04-24 17:59:49 +00003385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3386$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003387
Guido van Rossum8b131c51995-03-09 14:10:13 +00003388# If the user switches compilers, we can't believe the cache
3389if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3390then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003391 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003392(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003393fi
3394
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003395# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3396# when the compiler supports them, but we don't always want -O2, and
3397# we set -g later.
3398if test -z "$CFLAGS"; then
3399 CFLAGS=
3400fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003401
3402if test "$ac_sys_system" = "Darwin"
3403then
3404 # Compiler selection on MacOSX is more complicated than
3405 # AC_PROG_CC can handle, see Mac/README.txt for more
3406 # information
3407 if test -z "${CC}"
3408 then
3409 found_gcc=
3410 found_clang=
3411 as_save_IFS=$IFS; IFS=:
3412 for as_dir in $PATH
3413 do
3414 IFS=$as_save_IFS
3415 if test -x $as_dir/gcc; then
3416 if test -z "${found_gcc}"; then
3417 found_gcc=$as_dir/gcc
3418 fi
3419 fi
3420 if test -x $as_dir/clang; then
3421 if test -z "${found_clang}"; then
3422 found_clang=$as_dir/clang
3423 fi
3424 fi
3425 done
3426 IFS=$as_save_IFS
3427
3428 if test -n "$found_gcc" -a -n "$found_clang"
3429 then
3430 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3431 then
3432 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3433$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3434 CC="$found_clang"
3435 CXX="$found_clang++"
3436 fi
3437
3438
3439 elif test -z "$found_gcc" -a -n "$found_clang"
3440 then
3441 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3442$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3443 CC="$found_clang"
3444 CXX="$found_clang++"
3445
3446 elif test -z "$found_gcc" -a -z "$found_clang"
3447 then
3448 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3449 if test -n "${found_clang}"
3450 then
3451 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3452$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3453 CC="${found_clang}"
3454 CXX="`/usr/bin/xcrun -find clang++`"
3455
3456 # else: use default behaviour
3457 fi
3458 fi
3459 fi
3460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003461ac_ext=c
3462ac_cpp='$CPP $CPPFLAGS'
3463ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3464ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3465ac_compiler_gnu=$ac_cv_c_compiler_gnu
3466if test -n "$ac_tool_prefix"; then
3467 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3468set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3470$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003471if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003472 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003473else
3474 if test -n "$CC"; then
3475 ac_cv_prog_CC="$CC" # Let the user override the test.
3476else
Martin v. Löwis11437992002-04-12 09:54:03 +00003477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3478for as_dir in $PATH
3479do
3480 IFS=$as_save_IFS
3481 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003482 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003483 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003485 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003486 break 2
3487 fi
3488done
Matthias Kloseb9621712010-04-24 17:59:49 +00003489 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003490IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003491
Jack Jansendd19cf82001-12-06 22:36:17 +00003492fi
3493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003494CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003495if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3497$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003498else
Matthias Kloseb9621712010-04-24 17:59:49 +00003499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3500$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003501fi
3502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003503
Martin v. Löwis11437992002-04-12 09:54:03 +00003504fi
3505if test -z "$ac_cv_prog_CC"; then
3506 ac_ct_CC=$CC
3507 # Extract the first word of "gcc", so it can be a program name with args.
3508set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3510$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003511if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003512 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003513else
3514 if test -n "$ac_ct_CC"; then
3515 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3516else
3517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3518for as_dir in $PATH
3519do
3520 IFS=$as_save_IFS
3521 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003522 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003523 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003526 break 2
3527 fi
3528done
Matthias Kloseb9621712010-04-24 17:59:49 +00003529 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003531
3532fi
3533fi
3534ac_ct_CC=$ac_cv_prog_ac_ct_CC
3535if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3537$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003538else
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3540$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003541fi
3542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543 if test "x$ac_ct_CC" = x; then
3544 CC=""
3545 else
3546 case $cross_compiling:$ac_tool_warned in
3547yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003548{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3549$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550ac_tool_warned=yes ;;
3551esac
3552 CC=$ac_ct_CC
3553 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003554else
3555 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003556fi
3557
Jack Jansendd19cf82001-12-06 22:36:17 +00003558if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003559 if test -n "$ac_tool_prefix"; then
3560 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003561set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3563$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003564if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003565 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003566else
3567 if test -n "$CC"; then
3568 ac_cv_prog_CC="$CC" # Let the user override the test.
3569else
Martin v. Löwis11437992002-04-12 09:54:03 +00003570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3571for as_dir in $PATH
3572do
3573 IFS=$as_save_IFS
3574 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003575 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003576 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003578 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 break 2
3580 fi
3581done
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003584
3585fi
3586fi
3587CC=$ac_cv_prog_CC
3588if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3590$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003591else
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3593$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003594fi
3595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003596
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003598fi
3599if test -z "$CC"; then
3600 # Extract the first word of "cc", so it can be a program name with args.
3601set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3603$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003604if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003606else
3607 if test -n "$CC"; then
3608 ac_cv_prog_CC="$CC" # Let the user override the test.
3609else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003610 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3612for as_dir in $PATH
3613do
3614 IFS=$as_save_IFS
3615 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003617 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3619 ac_prog_rejected=yes
3620 continue
3621 fi
3622 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 break 2
3625 fi
3626done
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003629
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003630if test $ac_prog_rejected = yes; then
3631 # We found a bogon in the path, so make sure we never use it.
3632 set dummy $ac_cv_prog_CC
3633 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003635 # We chose a different compiler from the bogus one.
3636 # However, it has the same basename, so the bogon will be chosen
3637 # first if we set CC to just the basename; use the full file name.
3638 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003639 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003640 fi
3641fi
3642fi
3643fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003644CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003645if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3647$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003648else
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3650$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003651fi
3652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653
Martin v. Löwis11437992002-04-12 09:54:03 +00003654fi
3655if test -z "$CC"; then
3656 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 do
3659 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3660set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3662$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003663if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003665else
3666 if test -n "$CC"; then
3667 ac_cv_prog_CC="$CC" # Let the user override the test.
3668else
Martin v. Löwis11437992002-04-12 09:54:03 +00003669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3670for as_dir in $PATH
3671do
3672 IFS=$as_save_IFS
3673 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003675 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003676 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003678 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003679 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003680done
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003683
3684fi
3685fi
3686CC=$ac_cv_prog_CC
3687if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3689$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690else
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3692$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003693fi
3694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003695
Martin v. Löwis11437992002-04-12 09:54:03 +00003696 test -n "$CC" && break
3697 done
3698fi
3699if test -z "$CC"; then
3700 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003702do
3703 # Extract the first word of "$ac_prog", so it can be a program name with args.
3704set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3706$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003707if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003709else
3710 if test -n "$ac_ct_CC"; then
3711 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3712else
3713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3714for as_dir in $PATH
3715do
3716 IFS=$as_save_IFS
3717 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003719 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 break 2
3723 fi
3724done
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003727
Martin v. Löwis11437992002-04-12 09:54:03 +00003728fi
3729fi
3730ac_ct_CC=$ac_cv_prog_ac_ct_CC
3731if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3733$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003734else
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3736$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003737fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 test -n "$ac_ct_CC" && break
3741done
Michael W. Hudson54241132001-12-07 15:38:26 +00003742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743 if test "x$ac_ct_CC" = x; then
3744 CC=""
3745 else
3746 case $cross_compiling:$ac_tool_warned in
3747yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750ac_tool_warned=yes ;;
3751esac
3752 CC=$ac_ct_CC
3753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
3755
3756fi
3757
3758
Matthias Kloseb9621712010-04-24 17:59:49 +00003759test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003761as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003762See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003763
3764# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003765$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3766set X $ac_compile
3767ac_compiler=$2
3768for ac_option in --version -v -V -qversion; do
3769 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770case "(($ac_try" in
3771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3772 *) ac_try_echo=$ac_try;;
3773esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3775$as_echo "$ac_try_echo"; } >&5
3776 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 if test -s conftest.err; then
3779 sed '10a\
3780... rest of stderr output deleted ...
3781 10q' conftest.err >conftest.er1
3782 cat conftest.er1 >&5
3783 fi
3784 rm -f conftest.er1 conftest.err
3785 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3786 test $ac_status = 0; }
3787done
Martin v. Löwis11437992002-04-12 09:54:03 +00003788
Matthias Kloseb9621712010-04-24 17:59:49 +00003789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003790/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003791
Martin v. Löwis11437992002-04-12 09:54:03 +00003792int
3793main ()
3794{
3795
3796 ;
3797 return 0;
3798}
3799_ACEOF
3800ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003801ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003802# Try to create an executable without -o first, disregard a.out.
3803# It will help us diagnose broken compilers, and finding out an intuition
3804# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3806$as_echo_n "checking whether the C compiler works... " >&6; }
3807ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3808
3809# The possible output files:
3810ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812ac_rmfiles=
3813for ac_file in $ac_files
3814do
3815 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3818 esac
3819done
3820rm -f $ac_rmfiles
3821
Matthias Kloseb9621712010-04-24 17:59:49 +00003822if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823case "(($ac_try" in
3824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3825 *) ac_try_echo=$ac_try;;
3826esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3828$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3832 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3834# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3835# in a Makefile. We should not override ac_cv_exeext if it was cached,
3836# so that the user can short-circuit this test for compilers unknown to
3837# Autoconf.
3838for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003839do
3840 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003843 ;;
3844 [ab].out )
3845 # We found the default executable, but exeext='' is most
3846 # certainly right.
3847 break;;
3848 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850 then :; else
3851 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3852 fi
3853 # We set ac_cv_exeext here because the later test for it is not
3854 # safe: cross compilers may not add the suffix if given an `-o'
3855 # argument, so we may need to know it at that point already.
3856 # Even if this section looks crufty: it has the advantage of
3857 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003858 break;;
3859 * )
3860 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003861 esac
3862done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863test "$ac_cv_exeext" = no && ac_cv_exeext=
3864
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003865else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866 ac_file=''
3867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003868if test -z "$ac_file"; then :
3869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3870$as_echo "no" >&6; }
3871$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003872sed 's/^/| /' conftest.$ac_ext >&5
3873
Matthias Kloseb9621712010-04-24 17:59:49 +00003874{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003876as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003877See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003878else
3879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3880$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3883$as_echo_n "checking for C compiler default output file name... " >&6; }
3884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3885$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003886ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003887
Matthias Kloseb9621712010-04-24 17:59:49 +00003888rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003889ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3891$as_echo_n "checking for suffix of executables... " >&6; }
3892if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893case "(($ac_try" in
3894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3895 *) ac_try_echo=$ac_try;;
3896esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3898$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003900 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3902 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003903 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3904# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3905# work properly (i.e., refer to `conftest.exe'), while it won't with
3906# `rm'.
3907for ac_file in conftest.exe conftest conftest.*; do
3908 test -f "$ac_file" || continue
3909 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003911 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3912 break;;
3913 * ) break;;
3914 esac
3915done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003916else
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003919as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003920See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003922rm -f conftest conftest$ac_cv_exeext
3923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3924$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003925
3926rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003927EXEEXT=$ac_cv_exeext
3928ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3930/* end confdefs.h. */
3931#include <stdio.h>
3932int
3933main ()
3934{
3935FILE *f = fopen ("conftest.out", "w");
3936 return ferror (f) || fclose (f) != 0;
3937
3938 ;
3939 return 0;
3940}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003942ac_clean_files="$ac_clean_files conftest.out"
3943# Check that the compiler produces executables we can run. If not, either
3944# the compiler is broken, or we cross compile.
3945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3946$as_echo_n "checking whether we are cross compiling... " >&6; }
3947if test "$cross_compiling" != yes; then
3948 { { ac_try="$ac_link"
3949case "(($ac_try" in
3950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3951 *) ac_try_echo=$ac_try;;
3952esac
3953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3954$as_echo "$ac_try_echo"; } >&5
3955 (eval "$ac_link") 2>&5
3956 ac_status=$?
3957 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3958 test $ac_status = 0; }
3959 if { ac_try='./conftest$ac_cv_exeext'
3960 { { case "(($ac_try" in
3961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3962 *) ac_try_echo=$ac_try;;
3963esac
3964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3965$as_echo "$ac_try_echo"; } >&5
3966 (eval "$ac_try") 2>&5
3967 ac_status=$?
3968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3969 test $ac_status = 0; }; }; then
3970 cross_compiling=no
3971 else
3972 if test "$cross_compiling" = maybe; then
3973 cross_compiling=yes
3974 else
3975 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3976$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003977as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003978If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02003979See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 fi
3981 fi
3982fi
3983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3984$as_echo "$cross_compiling" >&6; }
3985
3986rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3987ac_clean_files=$ac_clean_files_save
3988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3989$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003990if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 $as_echo_n "(cached) " >&6
3992else
3993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003994/* end confdefs.h. */
3995
3996int
3997main ()
3998{
3999
4000 ;
4001 return 0;
4002}
4003_ACEOF
4004rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004005if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006case "(($ac_try" in
4007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4008 *) ac_try_echo=$ac_try;;
4009esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004010eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4011$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004013 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004014 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4015 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016 for ac_file in conftest.o conftest.obj conftest.*; do
4017 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004018 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004020 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4021 break;;
4022 esac
4023done
4024else
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004026sed 's/^/| /' conftest.$ac_ext >&5
4027
Matthias Kloseb9621712010-04-24 17:59:49 +00004028{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004030as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004031See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004032fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004033rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4036$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004037OBJEXT=$ac_cv_objext
4038ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4040$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004041if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004043else
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004046
Martin v. Löwis11437992002-04-12 09:54:03 +00004047int
4048main ()
4049{
4050#ifndef __GNUC__
4051 choke me
4052#endif
4053
4054 ;
4055 return 0;
4056}
4057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004058if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004059 ac_compiler_gnu=yes
4060else
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004064ac_cv_c_compiler_gnu=$ac_compiler_gnu
4065
4066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4068$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4069if test $ac_compiler_gnu = yes; then
4070 GCC=yes
4071else
4072 GCC=
4073fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004074ac_test_CFLAGS=${CFLAGS+set}
4075ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4077$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004078if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004080else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004081 ac_save_c_werror_flag=$ac_c_werror_flag
4082 ac_c_werror_flag=yes
4083 ac_cv_prog_cc_g=no
4084 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004087
Martin v. Löwis11437992002-04-12 09:54:03 +00004088int
4089main ()
4090{
4091
4092 ;
4093 return 0;
4094}
4095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004096if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004097 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004098else
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 CFLAGS=""
4100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101/* end confdefs.h. */
4102
4103int
4104main ()
4105{
4106
4107 ;
4108 return 0;
4109}
4110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004111if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004112
Matthias Kloseb9621712010-04-24 17:59:49 +00004113else
4114 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117/* end confdefs.h. */
4118
4119int
4120main ()
4121{
4122
4123 ;
4124 return 0;
4125}
4126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004127if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4135 ac_c_werror_flag=$ac_save_c_werror_flag
4136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4138$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004139if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004140 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004141elif test $ac_cv_prog_cc_g = yes; then
4142 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004143 CFLAGS="-g -O2"
4144 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004145 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004146 fi
4147else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004148 if test "$GCC" = yes; then
4149 CFLAGS="-O2"
4150 else
4151 CFLAGS=
4152 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004153fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4155$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004156if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004158else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004159 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004160ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004162/* end confdefs.h. */
4163#include <stdarg.h>
4164#include <stdio.h>
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004165#include <sys/types.h>
4166#include <sys/stat.h>
Skip Montanaro6dead952003-09-25 14:50:04 +00004167/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4168struct buf { int x; };
4169FILE * (*rcsopen) (struct buf *, struct stat *, int);
4170static char *e (p, i)
4171 char **p;
4172 int i;
4173{
4174 return p[i];
4175}
4176static char *f (char * (*g) (char **, int), char **p, ...)
4177{
4178 char *s;
4179 va_list v;
4180 va_start (v,p);
4181 s = g (p, va_arg (v,int));
4182 va_end (v);
4183 return s;
4184}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004185
4186/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4187 function prototypes and stuff, but not '\xHH' hex character constants.
4188 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004190 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4191 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004193int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4196 inside strings and character constants. */
4197#define FOO(x) 'x'
4198int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4199
Skip Montanaro6dead952003-09-25 14:50:04 +00004200int test (int i, double x);
4201struct s1 {int (*f) (int a);};
4202struct s2 {int (*f) (double a);};
4203int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4204int argc;
4205char **argv;
4206int
4207main ()
4208{
4209return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4210 ;
4211 return 0;
4212}
4213_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4215 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004216do
4217 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221rm -f core conftest.err conftest.$ac_objext
4222 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004223done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004225CC=$ac_save_CC
4226
4227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228# AC_CACHE_VAL
4229case "x$ac_cv_prog_cc_c89" in
4230 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4232$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4235$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004236 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4239$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004240esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004241if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004242
Matthias Kloseb9621712010-04-24 17:59:49 +00004243fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004244
Martin v. Löwis11437992002-04-12 09:54:03 +00004245ac_ext=c
4246ac_cpp='$CPP $CPPFLAGS'
4247ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4248ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4249ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004251
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004252
4253
Matthias Kloseb9621712010-04-24 17:59:49 +00004254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4255$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004256
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004258if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004260
4261 case $withval in
4262 no) with_cxx_main=no
4263 MAINCC='$(CC)';;
4264 yes) with_cxx_main=yes
4265 MAINCC='$(CXX)';;
4266 *) with_cxx_main=yes
4267 MAINCC=$withval
4268 if test -z "$CXX"
4269 then
4270 CXX=$withval
4271 fi;;
4272 esac
4273else
4274
4275 with_cxx_main=no
4276 MAINCC='$(CC)'
4277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278fi
4279
Matthias Kloseb9621712010-04-24 17:59:49 +00004280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4281$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004282
4283preset_cxx="$CXX"
4284if test -z "$CXX"
4285then
4286 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004287 gcc) if test -n "$ac_tool_prefix"; then
4288 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4289set dummy ${ac_tool_prefix}g++; ac_word=$2
4290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4291$as_echo_n "checking for $ac_word... " >&6; }
4292if ${ac_cv_path_CXX+:} false; then :
4293 $as_echo_n "(cached) " >&6
4294else
4295 case $CXX in
4296 [\\/]* | ?:[\\/]*)
4297 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4298 ;;
4299 *)
4300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4301for as_dir in notfound
4302do
4303 IFS=$as_save_IFS
4304 test -z "$as_dir" && as_dir=.
4305 for ac_exec_ext in '' $ac_executable_extensions; do
4306 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4307 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4308 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4309 break 2
4310 fi
4311done
4312 done
4313IFS=$as_save_IFS
4314
4315 ;;
4316esac
4317fi
4318CXX=$ac_cv_path_CXX
4319if test -n "$CXX"; then
4320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4321$as_echo "$CXX" >&6; }
4322else
4323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4324$as_echo "no" >&6; }
4325fi
4326
4327
4328fi
4329if test -z "$ac_cv_path_CXX"; then
4330 ac_pt_CXX=$CXX
4331 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004332set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4334$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004335if ${ac_cv_path_ac_pt_CXX+:} false; then :
4336 $as_echo_n "(cached) " >&6
4337else
4338 case $ac_pt_CXX in
4339 [\\/]* | ?:[\\/]*)
4340 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4341 ;;
4342 *)
4343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4344for as_dir in notfound
4345do
4346 IFS=$as_save_IFS
4347 test -z "$as_dir" && as_dir=.
4348 for ac_exec_ext in '' $ac_executable_extensions; do
4349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4350 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4352 break 2
4353 fi
4354done
4355 done
4356IFS=$as_save_IFS
4357
4358 ;;
4359esac
4360fi
4361ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4362if test -n "$ac_pt_CXX"; then
4363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4364$as_echo "$ac_pt_CXX" >&6; }
4365else
4366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4367$as_echo "no" >&6; }
4368fi
4369
4370 if test "x$ac_pt_CXX" = x; then
4371 CXX="g++"
4372 else
4373 case $cross_compiling:$ac_tool_warned in
4374yes:)
4375{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4376$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4377ac_tool_warned=yes ;;
4378esac
4379 CXX=$ac_pt_CXX
4380 fi
4381else
4382 CXX="$ac_cv_path_CXX"
4383fi
4384 ;;
4385 cc) if test -n "$ac_tool_prefix"; then
4386 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4387set dummy ${ac_tool_prefix}c++; ac_word=$2
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4389$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004390if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004391 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004392else
4393 case $CXX in
4394 [\\/]* | ?:[\\/]*)
4395 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4396 ;;
4397 *)
4398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4399for as_dir in notfound
4400do
4401 IFS=$as_save_IFS
4402 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004404 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004405 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004407 break 2
4408 fi
4409done
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004412
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004413 ;;
4414esac
4415fi
4416CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004417if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4419$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004420else
Matthias Kloseb9621712010-04-24 17:59:49 +00004421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4422$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004425
4426fi
4427if test -z "$ac_cv_path_CXX"; then
4428 ac_pt_CXX=$CXX
4429 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004430set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4432$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004433if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004434 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004435else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004436 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004437 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004438 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004439 ;;
4440 *)
4441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4442for as_dir in notfound
4443do
4444 IFS=$as_save_IFS
4445 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004446 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004447 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4448 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004449 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004450 break 2
4451 fi
4452done
Matthias Kloseb9621712010-04-24 17:59:49 +00004453 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004454IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004455
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004456 ;;
4457esac
4458fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004459ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4460if test -n "$ac_pt_CXX"; then
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4462$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004463else
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4465$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004467
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004468 if test "x$ac_pt_CXX" = x; then
4469 CXX="c++"
4470 else
4471 case $cross_compiling:$ac_tool_warned in
4472yes:)
4473{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4474$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4475ac_tool_warned=yes ;;
4476esac
4477 CXX=$ac_pt_CXX
4478 fi
4479else
4480 CXX="$ac_cv_path_CXX"
4481fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004482 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004483 clang|*/clang) if test -n "$ac_tool_prefix"; then
4484 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4485set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4487$as_echo_n "checking for $ac_word... " >&6; }
4488if ${ac_cv_path_CXX+:} false; then :
4489 $as_echo_n "(cached) " >&6
4490else
4491 case $CXX in
4492 [\\/]* | ?:[\\/]*)
4493 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4494 ;;
4495 *)
4496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4497for as_dir in notfound
4498do
4499 IFS=$as_save_IFS
4500 test -z "$as_dir" && as_dir=.
4501 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004502 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004503 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4504 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4505 break 2
4506 fi
4507done
4508 done
4509IFS=$as_save_IFS
4510
Ned Deilycbfb9a52012-06-23 16:02:19 -07004511 ;;
4512esac
4513fi
4514CXX=$ac_cv_path_CXX
4515if test -n "$CXX"; then
4516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4517$as_echo "$CXX" >&6; }
4518else
4519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4520$as_echo "no" >&6; }
4521fi
4522
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004523
4524fi
4525if test -z "$ac_cv_path_CXX"; then
4526 ac_pt_CXX=$CXX
4527 # Extract the first word of "clang++", so it can be a program name with args.
4528set dummy clang++; ac_word=$2
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
4531if ${ac_cv_path_ac_pt_CXX+:} false; then :
4532 $as_echo_n "(cached) " >&6
4533else
4534 case $ac_pt_CXX in
4535 [\\/]* | ?:[\\/]*)
4536 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4537 ;;
4538 *)
4539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in notfound
4541do
4542 IFS=$as_save_IFS
4543 test -z "$as_dir" && as_dir=.
4544 for ac_exec_ext in '' $ac_executable_extensions; do
4545 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4546 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4548 break 2
4549 fi
4550done
4551 done
4552IFS=$as_save_IFS
4553
4554 ;;
4555esac
4556fi
4557ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4558if test -n "$ac_pt_CXX"; then
4559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4560$as_echo "$ac_pt_CXX" >&6; }
4561else
4562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
4564fi
4565
4566 if test "x$ac_pt_CXX" = x; then
4567 CXX="clang++"
4568 else
4569 case $cross_compiling:$ac_tool_warned in
4570yes:)
4571{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4572$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4573ac_tool_warned=yes ;;
4574esac
4575 CXX=$ac_pt_CXX
4576 fi
4577else
4578 CXX="$ac_cv_path_CXX"
4579fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004580 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581 esac
4582 if test "$CXX" = "notfound"
4583 then
4584 CXX=""
4585 fi
4586fi
4587if test -z "$CXX"
4588then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004589 if test -n "$ac_tool_prefix"; then
4590 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4591 do
4592 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4593set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4595$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004596if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004597 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004598else
4599 if test -n "$CXX"; then
4600 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4601else
4602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4603for as_dir in $PATH
4604do
4605 IFS=$as_save_IFS
4606 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004607 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004608 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4609 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004611 break 2
4612 fi
4613done
Matthias Kloseb9621712010-04-24 17:59:49 +00004614 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004615IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004616
4617fi
4618fi
4619CXX=$ac_cv_prog_CXX
4620if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4622$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004623else
Matthias Kloseb9621712010-04-24 17:59:49 +00004624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4625$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004626fi
4627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004628
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004629 test -n "$CXX" && break
4630 done
4631fi
4632if test -z "$CXX"; then
4633 ac_ct_CXX=$CXX
4634 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4635do
4636 # Extract the first word of "$ac_prog", so it can be a program name with args.
4637set dummy $ac_prog; ac_word=$2
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4639$as_echo_n "checking for $ac_word... " >&6; }
4640if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4641 $as_echo_n "(cached) " >&6
4642else
4643 if test -n "$ac_ct_CXX"; then
4644 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4645else
4646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4647for as_dir in $PATH
4648do
4649 IFS=$as_save_IFS
4650 test -z "$as_dir" && as_dir=.
4651 for ac_exec_ext in '' $ac_executable_extensions; do
4652 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4653 ac_cv_prog_ac_ct_CXX="$ac_prog"
4654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4655 break 2
4656 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004657done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004658 done
4659IFS=$as_save_IFS
4660
4661fi
4662fi
4663ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4664if test -n "$ac_ct_CXX"; then
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4666$as_echo "$ac_ct_CXX" >&6; }
4667else
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4669$as_echo "no" >&6; }
4670fi
4671
4672
4673 test -n "$ac_ct_CXX" && break
4674done
4675
4676 if test "x$ac_ct_CXX" = x; then
4677 CXX="notfound"
4678 else
4679 case $cross_compiling:$ac_tool_warned in
4680yes:)
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4682$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4683ac_tool_warned=yes ;;
4684esac
4685 CXX=$ac_ct_CXX
4686 fi
4687fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004688
4689 if test "$CXX" = "notfound"
4690 then
4691 CXX=""
4692 fi
4693fi
4694if test "$preset_cxx" != "$CXX"
4695then
Matthias Kloseb9621712010-04-24 17:59:49 +00004696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004697
4698 By default, distutils will build C++ extension modules with \"$CXX\".
4699 If this is not intended, then set CXX on the configure command line.
4700 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004701$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004702
4703 By default, distutils will build C++ extension modules with \"$CXX\".
4704 If this is not intended, then set CXX on the configure command line.
4705 " >&2;}
4706fi
4707
4708
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4710$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4711save_LDFLAGS="$LDFLAGS"
4712LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004713
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4715/* end confdefs.h. */
4716
4717int
4718main ()
4719{
4720
4721 ;
4722 return 0;
4723}
4724_ACEOF
4725if ac_fn_c_try_link "$LINENO"; then :
4726 NO_AS_NEEDED="-Wl,--no-as-needed"
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4728$as_echo "yes" >&6; }
4729else
4730 NO_AS_NEEDED=""
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4732$as_echo "no" >&6; }
4733fi
4734rm -f core conftest.err conftest.$ac_objext \
4735 conftest$ac_exeext conftest.$ac_ext
4736LDFLAGS="$save_LDFLAGS"
4737
4738
4739
4740# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004741ac_ext=c
4742ac_cpp='$CPP $CPPFLAGS'
4743ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4744ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4745ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4747$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004748# On Suns, sometimes $CPP names a directory.
4749if test -n "$CPP" && test -d "$CPP"; then
4750 CPP=
4751fi
4752if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004753 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004755else
Martin v. Löwis11437992002-04-12 09:54:03 +00004756 # Double quotes because CPP needs to be expanded
4757 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4758 do
4759 ac_preproc_ok=false
4760for ac_c_preproc_warn_flag in '' yes
4761do
4762 # Use a header file that comes with gcc, so configuring glibc
4763 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004764 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4765 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004766 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004767 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004769/* end confdefs.h. */
4770#ifdef __STDC__
4771# include <limits.h>
4772#else
4773# include <assert.h>
4774#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004775 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004777if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004778
Matthias Kloseb9621712010-04-24 17:59:49 +00004779else
Martin v. Löwis11437992002-04-12 09:54:03 +00004780 # Broken: fails on valid input.
4781continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004782fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004783rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004785 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004786 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004789#include <ac_nonexistent.h>
4790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004791if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004792 # Broken: success on invalid input.
4793continue
4794else
Martin v. Löwis11437992002-04-12 09:54:03 +00004795 # Passes both tests.
4796ac_preproc_ok=:
4797break
4798fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004799rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004800
4801done
4802# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004803rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004804if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004805 break
4806fi
4807
4808 done
4809 ac_cv_prog_CPP=$CPP
4810
4811fi
4812 CPP=$ac_cv_prog_CPP
4813else
4814 ac_cv_prog_CPP=$CPP
4815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4817$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004818ac_preproc_ok=false
4819for ac_c_preproc_warn_flag in '' yes
4820do
4821 # Use a header file that comes with gcc, so configuring glibc
4822 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004823 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4824 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004825 # On the NeXT, cc -E runs the code through the compiler's parser,
4826 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004828/* end confdefs.h. */
4829#ifdef __STDC__
4830# include <limits.h>
4831#else
4832# include <assert.h>
4833#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004834 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004836if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004837
Matthias Kloseb9621712010-04-24 17:59:49 +00004838else
Martin v. Löwis11437992002-04-12 09:54:03 +00004839 # Broken: fails on valid input.
4840continue
4841fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004842rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004844 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004845 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004848#include <ac_nonexistent.h>
4849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004850if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004851 # Broken: success on invalid input.
4852continue
4853else
Martin v. Löwis11437992002-04-12 09:54:03 +00004854 # Passes both tests.
4855ac_preproc_ok=:
4856break
4857fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004858rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004859
4860done
4861# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004862rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004863if $ac_preproc_ok; then :
4864
Martin v. Löwis11437992002-04-12 09:54:03 +00004865else
Matthias Kloseb9621712010-04-24 17:59:49 +00004866 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004868as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004869See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004870fi
4871
4872ac_ext=c
4873ac_cpp='$CPP $CPPFLAGS'
4874ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4875ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4876ac_compiler_gnu=$ac_cv_c_compiler_gnu
4877
4878
Matthias Kloseb9621712010-04-24 17:59:49 +00004879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4880$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004881if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004882 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004883else
Matthias Kloseb9621712010-04-24 17:59:49 +00004884 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004885 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004886 # Loop through the user's path and test for each of PROGNAME-LIST
4887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004888for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4889do
4890 IFS=$as_save_IFS
4891 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 for ac_prog in grep ggrep; do
4893 for ac_exec_ext in '' $ac_executable_extensions; do
4894 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004895 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004896# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004897 # Check for GNU $ac_path_GREP
4898case `"$ac_path_GREP" --version 2>&1` in
4899*GNU*)
4900 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4901*)
4902 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004903 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004904 while :
4905 do
4906 cat "conftest.in" "conftest.in" >"conftest.tmp"
4907 mv "conftest.tmp" "conftest.in"
4908 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004909 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004910 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4911 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004912 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004913 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4914 # Best one so far, save it but keep looking for a better one
4915 ac_cv_path_GREP="$ac_path_GREP"
4916 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004917 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004918 # 10*(2^10) chars as input seems more than enough
4919 test $ac_count -gt 10 && break
4920 done
4921 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4922esac
4923
Matthias Kloseb9621712010-04-24 17:59:49 +00004924 $ac_path_GREP_found && break 3
4925 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004926 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004927 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004928IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004929 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004930 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004931 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004932else
4933 ac_cv_path_GREP=$GREP
4934fi
4935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4938$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004939 GREP="$ac_cv_path_GREP"
4940
4941
Matthias Kloseb9621712010-04-24 17:59:49 +00004942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4943$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004944if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004945 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004946else
4947 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4948 then ac_cv_path_EGREP="$GREP -E"
4949 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004950 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004951 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004952 # Loop through the user's path and test for each of PROGNAME-LIST
4953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004954for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4955do
4956 IFS=$as_save_IFS
4957 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004958 for ac_prog in egrep; do
4959 for ac_exec_ext in '' $ac_executable_extensions; do
4960 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004961 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004962# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004963 # Check for GNU $ac_path_EGREP
4964case `"$ac_path_EGREP" --version 2>&1` in
4965*GNU*)
4966 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4967*)
4968 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004969 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004970 while :
4971 do
4972 cat "conftest.in" "conftest.in" >"conftest.tmp"
4973 mv "conftest.tmp" "conftest.in"
4974 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004975 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004976 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4977 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004979 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4980 # Best one so far, save it but keep looking for a better one
4981 ac_cv_path_EGREP="$ac_path_EGREP"
4982 ac_path_EGREP_max=$ac_count
4983 fi
4984 # 10*(2^10) chars as input seems more than enough
4985 test $ac_count -gt 10 && break
4986 done
4987 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4988esac
4989
Matthias Kloseb9621712010-04-24 17:59:49 +00004990 $ac_path_EGREP_found && break 3
4991 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004992 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004993 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004994IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004996 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004997 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004998else
4999 ac_cv_path_EGREP=$EGREP
5000fi
5001
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005002 fi
5003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5005$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005006 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005007
5008
Matthias Kloseb9621712010-04-24 17:59:49 +00005009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5010$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005011if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005012 $as_echo_n "(cached) " >&6
5013else
5014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005015/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005016#include <stdlib.h>
5017#include <stdarg.h>
5018#include <string.h>
5019#include <float.h>
5020
5021int
5022main ()
5023{
5024
5025 ;
5026 return 0;
5027}
5028_ACEOF
5029if ac_fn_c_try_compile "$LINENO"; then :
5030 ac_cv_header_stdc=yes
5031else
5032 ac_cv_header_stdc=no
5033fi
5034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5035
5036if test $ac_cv_header_stdc = yes; then
5037 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5039/* end confdefs.h. */
5040#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005041
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005042_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005046else
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005048fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005049rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005050
Matthias Kloseb9621712010-04-24 17:59:49 +00005051fi
5052
5053if test $ac_cv_header_stdc = yes; then
5054 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5056/* end confdefs.h. */
5057#include <stdlib.h>
5058
5059_ACEOF
5060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5061 $EGREP "free" >/dev/null 2>&1; then :
5062
5063else
5064 ac_cv_header_stdc=no
5065fi
5066rm -f conftest*
5067
5068fi
5069
5070if test $ac_cv_header_stdc = yes; then
5071 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5072 if test "$cross_compiling" = yes; then :
5073 :
5074else
5075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5076/* end confdefs.h. */
5077#include <ctype.h>
5078#include <stdlib.h>
5079#if ((' ' & 0x0FF) == 0x020)
5080# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5081# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5082#else
5083# define ISLOWER(c) \
5084 (('a' <= (c) && (c) <= 'i') \
5085 || ('j' <= (c) && (c) <= 'r') \
5086 || ('s' <= (c) && (c) <= 'z'))
5087# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5088#endif
5089
5090#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5091int
5092main ()
5093{
5094 int i;
5095 for (i = 0; i < 256; i++)
5096 if (XOR (islower (i), ISLOWER (i))
5097 || toupper (i) != TOUPPER (i))
5098 return 2;
5099 return 0;
5100}
5101_ACEOF
5102if ac_fn_c_try_run "$LINENO"; then :
5103
5104else
5105 ac_cv_header_stdc=no
5106fi
5107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5108 conftest.$ac_objext conftest.beam conftest.$ac_ext
5109fi
5110
5111fi
5112fi
5113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5114$as_echo "$ac_cv_header_stdc" >&6; }
5115if test $ac_cv_header_stdc = yes; then
5116
5117$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5118
5119fi
5120
5121# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5122for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5123 inttypes.h stdint.h unistd.h
5124do :
5125 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5126ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5127"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005128if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 cat >>confdefs.h <<_ACEOF
5130#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5131_ACEOF
5132
5133fi
5134
5135done
5136
5137
5138
5139 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005140if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005141 MINIX=yes
5142else
5143 MINIX=
5144fi
5145
5146
5147 if test "$MINIX" = yes; then
5148
5149$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5150
5151
5152$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5153
5154
5155$as_echo "#define _MINIX 1" >>confdefs.h
5156
5157 fi
5158
5159
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5161$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005162if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005163 $as_echo_n "(cached) " >&6
5164else
5165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5166/* end confdefs.h. */
5167
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005168# define __EXTENSIONS__ 1
5169 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005170int
5171main ()
5172{
5173
5174 ;
5175 return 0;
5176}
5177_ACEOF
5178if ac_fn_c_try_compile "$LINENO"; then :
5179 ac_cv_safe_to_define___extensions__=yes
5180else
5181 ac_cv_safe_to_define___extensions__=no
5182fi
5183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5184fi
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5186$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5187 test $ac_cv_safe_to_define___extensions__ = yes &&
5188 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5189
5190 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5191
5192 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5193
5194 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5195
5196 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5197
5198
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200# Check for unsupported systems
5201case $ac_sys_system/$ac_sys_release in
5202atheos*|Linux*/1*)
5203 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5204 echo See README for details.
5205 exit 1;;
5206esac
5207
5208
Matthias Kloseb9621712010-04-24 17:59:49 +00005209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5210$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005211
5212# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005213if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005214 withval=$with_suffix;
5215 case $withval in
5216 no) EXEEXT=;;
5217 yes) EXEEXT=.exe;;
5218 *) EXEEXT=$withval;;
5219 esac
5220fi
5221
Matthias Kloseb9621712010-04-24 17:59:49 +00005222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5223$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005224
5225# Test whether we're running on a non-case-sensitive system, in which
5226# case we give a warning if no ext is given
5227
Matthias Kloseb9621712010-04-24 17:59:49 +00005228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5229$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005230if test ! -d CaseSensitiveTestDir; then
5231mkdir CaseSensitiveTestDir
5232fi
5233
5234if test -d casesensitivetestdir
5235then
Matthias Kloseb9621712010-04-24 17:59:49 +00005236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5237$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238 BUILDEXEEXT=.exe
5239else
Matthias Kloseb9621712010-04-24 17:59:49 +00005240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005242 BUILDEXEEXT=$EXEEXT
5243fi
5244rmdir CaseSensitiveTestDir
5245
5246case $MACHDEP in
5247bsdos*)
5248 case $CC in
5249 gcc) CC="$CC -D_HAVE_BSDI";;
5250 esac;;
5251esac
5252
5253case $ac_sys_system in
5254hp*|HP*)
5255 case $CC in
5256 cc|*/cc) CC="$CC -Ae";;
5257 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005258esac
5259
5260
5261
Matthias Kloseb9621712010-04-24 17:59:49 +00005262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5263$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005264if test -z "$LIBRARY"
5265then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005266 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5269$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005270
5271# LDLIBRARY is the name of the library to link against (as opposed to the
5272# name of the library into which to insert object files). BLDLIBRARY is also
5273# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5274# is blank as the main program is not linked directly against LDLIBRARY.
5275# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5276# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5277# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5278# DLLLIBRARY is the shared (i.e., DLL) library.
5279#
5280# RUNSHARED is used to run shared python without installed libraries
5281#
5282# INSTSONAME is the name of the shared library that will be use to install
5283# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005284#
5285# LDVERSION is the shared library version number, normally the Python version
5286# with the ABI build flags appended.
5287
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005288
5289
5290
5291
5292
5293
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005294
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295LDLIBRARY="$LIBRARY"
5296BLDLIBRARY='$(LDLIBRARY)'
5297INSTSONAME='$(LDLIBRARY)'
5298DLLLIBRARY=''
5299LDLIBRARYDIR=''
5300RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005301LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005302
5303# LINKCC is the command that links the python executable -- default is $(CC).
5304# If CXX is set, and if it is needed to link a main function that was
5305# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5306# python might then depend on the C++ runtime
5307# This is altered for AIX in order to build the export list before
5308# linking.
5309
Matthias Kloseb9621712010-04-24 17:59:49 +00005310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5311$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312if test -z "$LINKCC"
5313then
5314 LINKCC='$(PURIFY) $(MAINCC)'
5315 case $ac_sys_system in
5316 AIX*)
5317 exp_extra="\"\""
5318 if test $ac_sys_release -ge 5 -o \
5319 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5320 exp_extra="."
5321 fi
5322 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323 QNX*)
5324 # qcc must be used because the other compilers do not
5325 # support -N.
5326 LINKCC=qcc;;
5327 esac
5328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5330$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005331
5332# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5333# make sure we default having it set to "no": this is used by
5334# distutils.unixccompiler to know if it should add --enable-new-dtags
5335# to linker command lines, and failing to detect GNU ld simply results
5336# in the same bahaviour as before.
5337
Matthias Kloseb9621712010-04-24 17:59:49 +00005338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5339$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340ac_prog=ld
5341if test "$GCC" = yes; then
5342 ac_prog=`$CC -print-prog-name=ld`
5343fi
5344case `"$ac_prog" -V 2>&1 < /dev/null` in
5345 *GNU*)
5346 GNULD=yes;;
5347 *)
5348 GNULD=no;;
5349esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5351$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5354$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005355if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005356 $as_echo_n "(cached) " >&6
5357else
5358 ac_cv_c_inline=no
5359for ac_kw in inline __inline__ __inline; do
5360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5361/* end confdefs.h. */
5362#ifndef __cplusplus
5363typedef int foo_t;
5364static $ac_kw foo_t static_foo () {return 0; }
5365$ac_kw foo_t foo () {return 0; }
5366#endif
5367
5368_ACEOF
5369if ac_fn_c_try_compile "$LINENO"; then :
5370 ac_cv_c_inline=$ac_kw
5371fi
5372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5373 test "$ac_cv_c_inline" != no && break
5374done
5375
5376fi
5377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5378$as_echo "$ac_cv_c_inline" >&6; }
5379
5380case $ac_cv_c_inline in
5381 inline | yes) ;;
5382 *)
5383 case $ac_cv_c_inline in
5384 no) ac_val=;;
5385 *) ac_val=$ac_cv_c_inline;;
5386 esac
5387 cat >>confdefs.h <<_ACEOF
5388#ifndef __cplusplus
5389#define inline $ac_val
5390#endif
5391_ACEOF
5392 ;;
5393esac
5394
5395if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005396
5397$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005398
5399
5400fi
5401
5402
Matthias Kloseb9621712010-04-24 17:59:49 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5404$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005406if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407 enableval=$enable_shared;
5408fi
5409
5410
5411if test -z "$enable_shared"
5412then
5413 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005414 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415 enable_shared="yes";;
5416 *)
5417 enable_shared="no";;
5418 esac
5419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5421$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422
Matthias Kloseb9621712010-04-24 17:59:49 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5424$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005426if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005427 enableval=$enable_profiling;
5428fi
5429
5430if test "x$enable_profiling" = xyes; then
5431 ac_save_cc="$CC"
5432 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434/* end confdefs.h. */
5435int main() { return 0; }
5436_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005437if ac_fn_c_try_link "$LINENO"; then :
5438
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005440 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005442rm -f core conftest.err conftest.$ac_objext \
5443 conftest$ac_exeext conftest.$ac_ext
5444 CC="$ac_save_cc"
5445else
5446 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5449$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
doko@ubuntu.comba015832012-06-30 16:52:05 +02005451if test "x$enable_profiling" = xyes; then
5452 BASECFLAGS="-pg $BASECFLAGS"
5453 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005454fi
5455
Matthias Kloseb9621712010-04-24 17:59:49 +00005456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5457$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458
5459# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5460# library that we build, but we do not want to link against it (we
5461# will find it with a -framework option). For this reason there is an
5462# extra variable BLDLIBRARY against which Python and the extension
5463# modules are linked, BLDLIBRARY. This is normally the same as
5464# LDLIBRARY, but empty for MacOSX framework builds.
5465if test "$enable_framework"
5466then
5467 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5468 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5469 BLDLIBRARY=''
5470else
5471 BLDLIBRARY='$(LDLIBRARY)'
5472fi
5473
5474# Other platforms follow
5475if test $enable_shared = "yes"; then
5476
Matthias Kloseb9621712010-04-24 17:59:49 +00005477$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005478
5479 case $ac_sys_system in
5480 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005481 LDLIBRARY='libpython$(LDVERSION).dll.a'
5482 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005483 ;;
5484 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005485 LDLIBRARY='libpython$(LDVERSION).so'
5486 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005487 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5488 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005489 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005490 then
5491 PY3LIBRARY=libpython3.so
5492 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005494 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005495 LDLIBRARY='libpython$(LDVERSION).so'
5496 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5498 case $ac_sys_system in
5499 FreeBSD*)
5500 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5501 ;;
5502 esac
5503 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005504 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005505 then
5506 PY3LIBRARY=libpython3.so
5507 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508 ;;
5509 hp*|HP*)
5510 case `uname -m` in
5511 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005512 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513 ;;
5514 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005515 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516 ;;
5517 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005518 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005519 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5520 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005521 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005522 LDLIBRARY='libpython$(LDVERSION).dylib'
5523 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5525 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005526 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005527 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005528 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5529 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005530
5531 esac
5532else # shared is disabled
5533 case $ac_sys_system in
5534 CYGWIN*)
5535 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005536 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537 ;;
5538 esac
5539fi
5540
Matthias Kloseb9621712010-04-24 17:59:49 +00005541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5542$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543
5544if test -n "$ac_tool_prefix"; then
5545 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5546set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5548$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005549if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005550 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551else
5552 if test -n "$RANLIB"; then
5553 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5554else
5555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5556for as_dir in $PATH
5557do
5558 IFS=$as_save_IFS
5559 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005560 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005561 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005564 break 2
5565 fi
5566done
Matthias Kloseb9621712010-04-24 17:59:49 +00005567 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005568IFS=$as_save_IFS
5569
5570fi
5571fi
5572RANLIB=$ac_cv_prog_RANLIB
5573if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5575$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005576else
Matthias Kloseb9621712010-04-24 17:59:49 +00005577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5578$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579fi
5580
5581
5582fi
5583if test -z "$ac_cv_prog_RANLIB"; then
5584 ac_ct_RANLIB=$RANLIB
5585 # Extract the first word of "ranlib", so it can be a program name with args.
5586set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5588$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005589if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005590 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591else
5592 if test -n "$ac_ct_RANLIB"; then
5593 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5594else
5595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5596for as_dir in $PATH
5597do
5598 IFS=$as_save_IFS
5599 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005600 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005601 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604 break 2
5605 fi
5606done
Matthias Kloseb9621712010-04-24 17:59:49 +00005607 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608IFS=$as_save_IFS
5609
5610fi
5611fi
5612ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5613if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5615$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616else
Matthias Kloseb9621712010-04-24 17:59:49 +00005617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5618$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619fi
5620
5621 if test "x$ac_ct_RANLIB" = x; then
5622 RANLIB=":"
5623 else
5624 case $cross_compiling:$ac_tool_warned in
5625yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005626{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5627$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628ac_tool_warned=yes ;;
5629esac
5630 RANLIB=$ac_ct_RANLIB
5631 fi
5632else
5633 RANLIB="$ac_cv_prog_RANLIB"
5634fi
5635
5636
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005637if test -n "$ac_tool_prefix"; then
5638 for ac_prog in ar aal
5639 do
5640 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5641set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5643$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005644if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005645 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646else
5647 if test -n "$AR"; then
5648 ac_cv_prog_AR="$AR" # Let the user override the test.
5649else
5650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5651for as_dir in $PATH
5652do
5653 IFS=$as_save_IFS
5654 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005655 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005656 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5657 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659 break 2
5660 fi
5661done
Matthias Kloseb9621712010-04-24 17:59:49 +00005662 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663IFS=$as_save_IFS
5664
5665fi
5666fi
5667AR=$ac_cv_prog_AR
5668if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5670$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671else
Matthias Kloseb9621712010-04-24 17:59:49 +00005672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5673$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674fi
5675
5676
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005677 test -n "$AR" && break
5678 done
5679fi
5680if test -z "$AR"; then
5681 ac_ct_AR=$AR
5682 for ac_prog in ar aal
5683do
5684 # Extract the first word of "$ac_prog", so it can be a program name with args.
5685set dummy $ac_prog; ac_word=$2
5686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5687$as_echo_n "checking for $ac_word... " >&6; }
5688if ${ac_cv_prog_ac_ct_AR+:} false; then :
5689 $as_echo_n "(cached) " >&6
5690else
5691 if test -n "$ac_ct_AR"; then
5692 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5693else
5694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5695for as_dir in $PATH
5696do
5697 IFS=$as_save_IFS
5698 test -z "$as_dir" && as_dir=.
5699 for ac_exec_ext in '' $ac_executable_extensions; do
5700 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5701 ac_cv_prog_ac_ct_AR="$ac_prog"
5702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5703 break 2
5704 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005706 done
5707IFS=$as_save_IFS
5708
5709fi
5710fi
5711ac_ct_AR=$ac_cv_prog_ac_ct_AR
5712if test -n "$ac_ct_AR"; then
5713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5714$as_echo "$ac_ct_AR" >&6; }
5715else
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5717$as_echo "no" >&6; }
5718fi
5719
5720
5721 test -n "$ac_ct_AR" && break
5722done
5723
5724 if test "x$ac_ct_AR" = x; then
5725 AR="ar"
5726 else
5727 case $cross_compiling:$ac_tool_warned in
5728yes:)
5729{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5730$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5731ac_tool_warned=yes ;;
5732esac
5733 AR=$ac_ct_AR
5734 fi
5735fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736
5737
5738# tweak ARFLAGS only if the user didn't set it on the command line
5739
5740if test -z "$ARFLAGS"
5741then
5742 ARFLAGS="rc"
5743fi
5744
5745
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005746DISABLE_ASDLGEN=""
5747# Extract the first word of "python", so it can be a program name with args.
5748set dummy python; ac_word=$2
5749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5750$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005751if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005752 $as_echo_n "(cached) " >&6
5753else
5754 if test -n "$HAS_PYTHON"; then
5755 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5756else
5757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5758for as_dir in $PATH
5759do
5760 IFS=$as_save_IFS
5761 test -z "$as_dir" && as_dir=.
5762 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005763 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005764 ac_cv_prog_HAS_PYTHON="found"
5765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5766 break 2
5767 fi
5768done
5769 done
5770IFS=$as_save_IFS
5771
5772 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5773fi
5774fi
5775HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5776if test -n "$HAS_PYTHON"; then
5777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5778$as_echo "$HAS_PYTHON" >&6; }
5779else
5780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5781$as_echo "no" >&6; }
5782fi
5783
5784
5785if test $HAS_HG != found -o $HAS_PYTHON != found
5786then
5787 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5788fi
5789
5790
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791case $MACHDEP in
5792bsdos*|hp*|HP*)
5793 # install -d does not work on BSDI or HP-UX
5794 if test -z "$INSTALL"
5795 then
5796 INSTALL="${srcdir}/install-sh -c"
5797 fi
5798esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799# Find a good install program. We prefer a C program (faster),
5800# so one script is as good as another. But avoid the broken or
5801# incompatible versions:
5802# SysV /etc/install, /usr/sbin/install
5803# SunOS /usr/etc/install
5804# IRIX /sbin/install
5805# AIX /bin/install
5806# AmigaOS /C/install, which installs bootblocks on floppy discs
5807# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5808# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5809# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5810# OS/2's system install, which has a completely different semantic
5811# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005812# Reject install programs that cannot install multiple files.
5813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5814$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005816if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005817 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818else
5819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5820for as_dir in $PATH
5821do
5822 IFS=$as_save_IFS
5823 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005824 # Account for people who put trailing slashes in PATH elements.
5825case $as_dir/ in #((
5826 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005828 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829 /usr/ucb/* ) ;;
5830 *)
5831 # OSF1 and SCO ODT 3.0 have their own names for install.
5832 # Don't use installbsd from OSF since it installs stuff as root
5833 # by default.
5834 for ac_prog in ginstall scoinst install; do
5835 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005836 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837 if test $ac_prog = install &&
5838 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5839 # AIX install. It has an incompatible calling convention.
5840 :
5841 elif test $ac_prog = install &&
5842 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5843 # program-specific install script used by HP pwplus--don't use.
5844 :
5845 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005846 rm -rf conftest.one conftest.two conftest.dir
5847 echo one > conftest.one
5848 echo two > conftest.two
5849 mkdir conftest.dir
5850 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5851 test -s conftest.one && test -s conftest.two &&
5852 test -s conftest.dir/conftest.one &&
5853 test -s conftest.dir/conftest.two
5854 then
5855 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5856 break 3
5857 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858 fi
5859 fi
5860 done
5861 done
5862 ;;
5863esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005864
5865 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866IFS=$as_save_IFS
5867
Matthias Kloseb9621712010-04-24 17:59:49 +00005868rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869
5870fi
5871 if test "${ac_cv_path_install+set}" = set; then
5872 INSTALL=$ac_cv_path_install
5873 else
5874 # As a last resort, use the slow shell script. Don't cache a
5875 # value for INSTALL within a source directory, because that will
5876 # break other packages using the cache if that directory is
5877 # removed, or if the value is a relative name.
5878 INSTALL=$ac_install_sh
5879 fi
5880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5882$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883
5884# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5885# It thinks the first close brace ends the variable substitution.
5886test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5887
5888test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5889
5890test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5891
Matthias Klose93a0ef12012-03-15 18:08:34 +01005892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5893$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5894if test -z "$MKDIR_P"; then
5895 if ${ac_cv_path_mkdir+:} false; then :
5896 $as_echo_n "(cached) " >&6
5897else
5898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5899for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5900do
5901 IFS=$as_save_IFS
5902 test -z "$as_dir" && as_dir=.
5903 for ac_prog in mkdir gmkdir; do
5904 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005905 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01005906 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5907 'mkdir (GNU coreutils) '* | \
5908 'mkdir (coreutils) '* | \
5909 'mkdir (fileutils) '4.1*)
5910 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5911 break 3;;
5912 esac
5913 done
5914 done
5915 done
5916IFS=$as_save_IFS
5917
5918fi
5919
5920 test -d ./--version && rmdir ./--version
5921 if test "${ac_cv_path_mkdir+set}" = set; then
5922 MKDIR_P="$ac_cv_path_mkdir -p"
5923 else
5924 # As a last resort, use the slow shell script. Don't cache a
5925 # value for MKDIR_P within a source directory, because that will
5926 # break other packages using the cache if that directory is
5927 # removed, or if the value is a relative name.
5928 MKDIR_P="$ac_install_sh -d"
5929 fi
5930fi
5931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5932$as_echo "$MKDIR_P" >&6; }
5933
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934
5935# Not every filesystem supports hard links
5936
5937if test -z "$LN" ; then
5938 case $ac_sys_system in
5939 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 *) LN=ln;;
5941 esac
5942fi
5943
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005944# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005945
5946ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005947
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5950$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
5952# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005953if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 withval=$with_pydebug;
5955if test "$withval" != no
5956then
5957
Matthias Kloseb9621712010-04-24 17:59:49 +00005958$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5961$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005963 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005964else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5965$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966fi
5967else
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5969$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970fi
5971
5972
5973# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5974# merged with this chunk of code?
5975
5976# Optimizer/debugger flags
5977# ------------------------
5978# (The following bit of code is complicated enough - please keep things
5979# indented properly. Just pretend you're editing Python code. ;-)
5980
5981# There are two parallel sets of case statements below, one that checks to
5982# see if OPT was set and one that does BASECFLAGS setting based upon
5983# compiler and platform. BASECFLAGS tweaks need to be made even if the
5984# user set OPT.
5985
5986# tweak OPT based on compiler and platform, only if the user didn't set
5987# it on the command line
5988
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005989if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990then
5991 case $GCC in
5992 yes)
5993 if test "$CC" != 'g++' ; then
5994 STRICT_PROTO="-Wstrict-prototypes"
5995 fi
5996 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5997 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5998 WRAP="-fwrapv"
5999 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006000
6001 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006002 case $CC in
6003 *clang*) WRAP="-fwrapv"
6004 ;;
6005 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006006
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007 case $ac_cv_prog_cc_g in
6008 yes)
6009 if test "$Py_DEBUG" = 'true' ; then
6010 # Optimization messes up debuggers, so turn it off for
6011 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006012 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013 else
6014 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6015 fi
6016 ;;
6017 *)
6018 OPT="-O3 -Wall $STRICT_PROTO"
6019 ;;
6020 esac
6021 case $ac_sys_system in
6022 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6023 ;;
6024 esac
6025 ;;
6026
6027 *)
6028 OPT="-O"
6029 ;;
6030 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031fi
6032
6033
6034
6035# The -arch flags for universal builds on OSX
6036UNIVERSAL_ARCH_FLAGS=
6037
6038
6039# tweak BASECFLAGS based on compiler and platform
6040case $GCC in
6041yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006042 # Python doesn't violate C99 aliasing rules, but older versions of
6043 # GCC produce warnings for legal Python code. Enable
6044 # -fno-strict-aliasing on versions of GCC that support but produce
6045 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6047$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048 ac_save_cc="$CC"
6049 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006050 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006051 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006053else
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006056
Matthias Kloseb159a552010-04-25 21:00:44 +00006057
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006058int
6059main ()
6060{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006061
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006062 ;
6063 return 0;
6064}
Matthias Kloseb159a552010-04-25 21:00:44 +00006065
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006067if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006068
6069 CC="$ac_save_cc -fstrict-aliasing"
6070 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006072/* end confdefs.h. */
6073
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006074 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006075int
6076main ()
6077{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006078double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006079 ;
6080 return 0;
6081}
Matthias Kloseb159a552010-04-25 21:00:44 +00006082
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006084if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006085
6086 ac_cv_no_strict_aliasing=no
6087
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088else
Matthias Kloseb159a552010-04-25 21:00:44 +00006089
6090 ac_cv_no_strict_aliasing=yes
6091
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006092fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006094
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006095else
Matthias Kloseb159a552010-04-25 21:00:44 +00006096
6097 ac_cv_no_strict_aliasing=no
6098
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006101fi
6102
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006103 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006104 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6106$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006107 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006108 then
6109 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6110 fi
6111
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6113$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6114 ac_save_cc="$CC"
6115 CC="$CC -Wunused-result -Werror"
6116 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006117 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006118 $as_echo_n "(cached) " >&6
6119else
6120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6121/* end confdefs.h. */
6122
6123
6124int
6125main ()
6126{
6127
6128 ;
6129 return 0;
6130}
6131
6132_ACEOF
6133if ac_fn_c_try_compile "$LINENO"; then :
6134
6135 ac_cv_disable_unused_result_warning=yes
6136
6137else
6138
6139 ac_cv_disable_unused_result_warning=no
6140
6141fi
6142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6143fi
6144
6145 CFLAGS="$save_CFLAGS"
6146 CC="$ac_save_cc"
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6148$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6149
6150 if test $ac_cv_disable_unused_result_warning = yes
6151 then
6152 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6153 fi
6154
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6156 # support. Without this, treatment of subnormals doesn't follow
6157 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006158 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159 alpha*)
6160 BASECFLAGS="$BASECFLAGS -mieee"
6161 ;;
6162 esac
6163
6164 case $ac_sys_system in
6165 SCO_SV*)
6166 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6167 ;;
6168 # is there any other compiler on Darwin besides gcc?
6169 Darwin*)
6170 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6171 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006172 if test "${CC}" = gcc
6173 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6175$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006176 case "${UNIVERSALSDK}" in
6177 */MacOSX10.4u.sdk)
6178 # Build using 10.4 SDK, force usage of gcc when the
6179 # compiler is gcc, otherwise the user will get very
6180 # confusing error messages when building on OSX 10.6
6181 CC=gcc-4.0
6182 CPP=cpp-4.0
6183 ;;
6184 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6186$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006187 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188
6189
6190 if test "${enable_universalsdk}"; then
6191 UNIVERSAL_ARCH_FLAGS=""
6192 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6193 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6194 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006195 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6197 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006198 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006199 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200
6201 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6202 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006203 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006204 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006206 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6207 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006208 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006209 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006210
6211 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6212 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006213 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006214 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006215
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006216 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006217 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006218
6219 fi
6220
6221
Ronald Oussoren666028b2010-04-18 19:07:43 +00006222 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6223 if test "${UNIVERSALSDK}" != "/"
6224 then
6225 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6226 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006227 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228 fi
6229 fi
6230
6231 # Calculate the right deployment target for this build.
6232 #
6233 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006234 if test ${cur_target} '>' 10.2 && \
6235 test ${cur_target} '<' 10.6
6236 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006238 if test ${enable_universalsdk}; then
6239 if test "${UNIVERSAL_ARCHS}" = "all"; then
6240 # Ensure that the default platform for a
6241 # 4-way universal build is OSX 10.5,
6242 # that's the first OS release where
6243 # 4-way builds make sense.
6244 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006245
6246 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6247 cur_target='10.5'
6248
6249 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6250 cur_target='10.5'
6251
6252 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6253 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006254 fi
6255 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006256 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006257 # On Intel macs default to a deployment
6258 # target of 10.4, that's the first OSX
6259 # release with Intel support.
6260 cur_target="10.4"
6261 fi
6262 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263 fi
6264 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6265
6266 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6267 # environment with a value that is the same as what we'll use
6268 # in the Makefile to ensure that we'll get the same compiler
6269 # environment during configure and build time.
6270 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6271 export MACOSX_DEPLOYMENT_TARGET
6272 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6273
6274 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006275 esac
6276 ;;
6277
6278*)
6279 case $ac_sys_system in
6280 OpenUNIX*|UnixWare*)
6281 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6282 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283 SCO_SV*)
6284 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6285 ;;
6286 esac
6287 ;;
6288esac
6289
6290if test "$Py_DEBUG" = 'true'; then
6291 :
6292else
6293 OPT="-DNDEBUG $OPT"
6294fi
6295
6296if test "$ac_arch_flags"
6297then
6298 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6299fi
6300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301# Check whether GCC supports PyArg_ParseTuple format
6302if test "$GCC" = "yes"
6303then
Matthias Kloseb9621712010-04-24 17:59:49 +00006304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6305$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306 save_CFLAGS=$CFLAGS
6307 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309/* end confdefs.h. */
6310
6311 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312int
6313main ()
6314{
6315
6316 ;
6317 return 0;
6318}
Matthias Kloseb159a552010-04-25 21:00:44 +00006319
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006321if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322
Matthias Kloseb159a552010-04-25 21:00:44 +00006323
Matthias Kloseb9621712010-04-24 17:59:49 +00006324$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325
Matthias Kloseb159a552010-04-25 21:00:44 +00006326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006327$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006328
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329else
Matthias Kloseb159a552010-04-25 21:00:44 +00006330
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006332$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333
6334fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6336 CFLAGS=$save_CFLAGS
6337fi
6338
6339# On some compilers, pthreads are available without further options
6340# (e.g. MacOS X). On some of these systems, the compiler will not
6341# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6342# So we have to see first whether pthreads are available without
6343# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6345$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006346if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006347 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006348else
Matthias Kloseb9621712010-04-24 17:59:49 +00006349 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350 ac_cv_pthread_is_default=no
6351else
Matthias Kloseb9621712010-04-24 17:59:49 +00006352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006353/* end confdefs.h. */
6354
6355#include <pthread.h>
6356
6357void* routine(void* p){return NULL;}
6358
6359int main(){
6360 pthread_t p;
6361 if(pthread_create(&p,NULL,routine,NULL)!=0)
6362 return 1;
6363 (void)pthread_detach(p);
6364 return 0;
6365}
6366
6367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006368if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369
6370 ac_cv_pthread_is_default=yes
6371 ac_cv_kthread=no
6372 ac_cv_pthread=no
6373
6374else
Matthias Kloseb9621712010-04-24 17:59:49 +00006375 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6378 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379fi
6380
6381
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382fi
6383
Matthias Kloseb9621712010-04-24 17:59:49 +00006384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6385$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386
6387
6388if test $ac_cv_pthread_is_default = yes
6389then
6390 ac_cv_kpthread=no
6391else
6392# -Kpthread, if available, provides the right #defines
6393# and linker options to make pthread_create available
6394# Some compilers won't report that they do not support -Kpthread,
6395# so we need to run a program to see whether it really made the
6396# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6398$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006399if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006400 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401else
6402 ac_save_cc="$CC"
6403CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006404if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006405 ac_cv_kpthread=no
6406else
Matthias Kloseb9621712010-04-24 17:59:49 +00006407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408/* end confdefs.h. */
6409
6410#include <pthread.h>
6411
6412void* routine(void* p){return NULL;}
6413
6414int main(){
6415 pthread_t p;
6416 if(pthread_create(&p,NULL,routine,NULL)!=0)
6417 return 1;
6418 (void)pthread_detach(p);
6419 return 0;
6420}
6421
6422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006423if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424 ac_cv_kpthread=yes
6425else
Matthias Kloseb9621712010-04-24 17:59:49 +00006426 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6429 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006430fi
6431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006432CC="$ac_save_cc"
6433fi
6434
Matthias Kloseb9621712010-04-24 17:59:49 +00006435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6436$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437fi
6438
6439if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6440then
6441# -Kthread, if available, provides the right #defines
6442# and linker options to make pthread_create available
6443# Some compilers won't report that they do not support -Kthread,
6444# so we need to run a program to see whether it really made the
6445# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6447$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006448if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006449 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450else
6451 ac_save_cc="$CC"
6452CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006453if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006454 ac_cv_kthread=no
6455else
Matthias Kloseb9621712010-04-24 17:59:49 +00006456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006457/* end confdefs.h. */
6458
6459#include <pthread.h>
6460
6461void* routine(void* p){return NULL;}
6462
6463int main(){
6464 pthread_t p;
6465 if(pthread_create(&p,NULL,routine,NULL)!=0)
6466 return 1;
6467 (void)pthread_detach(p);
6468 return 0;
6469}
6470
6471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006472if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006473 ac_cv_kthread=yes
6474else
Matthias Kloseb9621712010-04-24 17:59:49 +00006475 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6478 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006479fi
6480
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006481CC="$ac_save_cc"
6482fi
6483
Matthias Kloseb9621712010-04-24 17:59:49 +00006484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6485$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006486fi
6487
6488if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6489then
6490# -pthread, if available, provides the right #defines
6491# and linker options to make pthread_create available
6492# Some compilers won't report that they do not support -pthread,
6493# so we need to run a program to see whether it really made the
6494# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6496$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006497if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006498 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006499else
6500 ac_save_cc="$CC"
6501CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006502if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006503 ac_cv_pthread=no
6504else
Matthias Kloseb9621712010-04-24 17:59:49 +00006505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006506/* end confdefs.h. */
6507
6508#include <pthread.h>
6509
6510void* routine(void* p){return NULL;}
6511
6512int main(){
6513 pthread_t p;
6514 if(pthread_create(&p,NULL,routine,NULL)!=0)
6515 return 1;
6516 (void)pthread_detach(p);
6517 return 0;
6518}
6519
6520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006521if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006522 ac_cv_pthread=yes
6523else
Matthias Kloseb9621712010-04-24 17:59:49 +00006524 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006526rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6527 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006528fi
6529
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530CC="$ac_save_cc"
6531fi
6532
Matthias Kloseb9621712010-04-24 17:59:49 +00006533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6534$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006535fi
6536
6537# If we have set a CC compiler flag for thread support then
6538# check if it works for CXX, too.
6539ac_cv_cxx_thread=no
6540if test ! -z "$CXX"
6541then
Matthias Kloseb9621712010-04-24 17:59:49 +00006542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6543$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006544ac_save_cxx="$CXX"
6545
6546if test "$ac_cv_kpthread" = "yes"
6547then
6548 CXX="$CXX -Kpthread"
6549 ac_cv_cxx_thread=yes
6550elif test "$ac_cv_kthread" = "yes"
6551then
6552 CXX="$CXX -Kthread"
6553 ac_cv_cxx_thread=yes
6554elif test "$ac_cv_pthread" = "yes"
6555then
6556 CXX="$CXX -pthread"
6557 ac_cv_cxx_thread=yes
6558fi
6559
6560if test $ac_cv_cxx_thread = yes
6561then
6562 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6563 $CXX -c conftest.$ac_ext 2>&5
6564 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6565 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6566 then
6567 ac_cv_cxx_thread=yes
6568 else
6569 ac_cv_cxx_thread=no
6570 fi
6571 rm -fr conftest*
6572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6574$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006575fi
6576CXX="$ac_save_cxx"
6577
6578
6579# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6581$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006582if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006583 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006584else
Matthias Kloseb9621712010-04-24 17:59:49 +00006585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006586/* end confdefs.h. */
6587#include <stdlib.h>
6588#include <stdarg.h>
6589#include <string.h>
6590#include <float.h>
6591
6592int
6593main ()
6594{
6595
6596 ;
6597 return 0;
6598}
6599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006600if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006601 ac_cv_header_stdc=yes
6602else
Matthias Kloseb9621712010-04-24 17:59:49 +00006603 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006604fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6606
6607if test $ac_cv_header_stdc = yes; then
6608 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610/* end confdefs.h. */
6611#include <string.h>
6612
6613_ACEOF
6614if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006615 $EGREP "memchr" >/dev/null 2>&1; then :
6616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006617else
6618 ac_cv_header_stdc=no
6619fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006620rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006621
6622fi
6623
6624if test $ac_cv_header_stdc = yes; then
6625 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006627/* end confdefs.h. */
6628#include <stdlib.h>
6629
6630_ACEOF
6631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006632 $EGREP "free" >/dev/null 2>&1; then :
6633
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006634else
6635 ac_cv_header_stdc=no
6636fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006637rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006638
6639fi
6640
6641if test $ac_cv_header_stdc = yes; then
6642 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006643 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644 :
6645else
Matthias Kloseb9621712010-04-24 17:59:49 +00006646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006647/* end confdefs.h. */
6648#include <ctype.h>
6649#include <stdlib.h>
6650#if ((' ' & 0x0FF) == 0x020)
6651# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6652# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6653#else
6654# define ISLOWER(c) \
6655 (('a' <= (c) && (c) <= 'i') \
6656 || ('j' <= (c) && (c) <= 'r') \
6657 || ('s' <= (c) && (c) <= 'z'))
6658# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6659#endif
6660
6661#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6662int
6663main ()
6664{
6665 int i;
6666 for (i = 0; i < 256; i++)
6667 if (XOR (islower (i), ISLOWER (i))
6668 || toupper (i) != TOUPPER (i))
6669 return 2;
6670 return 0;
6671}
6672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006673if ac_fn_c_try_run "$LINENO"; then :
6674
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006675else
Matthias Kloseb9621712010-04-24 17:59:49 +00006676 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6679 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006680fi
6681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006682fi
6683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6685$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686if test $ac_cv_header_stdc = yes; then
6687
Matthias Kloseb9621712010-04-24 17:59:49 +00006688$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006689
6690fi
6691
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006692for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006693fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006694ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006695sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006696unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006697poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006698sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006699sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006700sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006701sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006702sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006703libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006704bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006705do :
6706 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6707ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006708if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006709 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006710#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006711_ACEOF
6712
6713fi
6714
Guido van Rossum627b2d71993-12-24 10:39:16 +00006715done
6716
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006717ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006718for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006719 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6721$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006722if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006723 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006724else
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006726/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006727#include <sys/types.h>
6728#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006729
Martin v. Löwis11437992002-04-12 09:54:03 +00006730int
6731main ()
6732{
6733if ((DIR *) 0)
6734return 0;
6735 ;
6736 return 0;
6737}
6738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006739if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006740 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006741else
Matthias Kloseb9621712010-04-24 17:59:49 +00006742 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006746eval ac_res=\$$as_ac_Header
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6748$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006749if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006750 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006751#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006752_ACEOF
6753
6754ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006755fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006756
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006757done
6758# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6759if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6761$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006762if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006763 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006764else
Martin v. Löwis11437992002-04-12 09:54:03 +00006765 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006769/* Override any GCC internal prototype to avoid an error.
6770 Use char because int might match the return type of a GCC
6771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006772#ifdef __cplusplus
6773extern "C"
6774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006775char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006776int
6777main ()
6778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006779return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006780 ;
6781 return 0;
6782}
6783_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006784for ac_lib in '' dir; do
6785 if test -z "$ac_lib"; then
6786 ac_res="none required"
6787 else
6788 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006789 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006790 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006792 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006794rm -f core conftest.err conftest.$ac_objext \
6795 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006796 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006797 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799done
Victor Stinnere0be4232011-10-25 13:06:09 +02006800if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006802else
6803 ac_cv_search_opendir=no
6804fi
6805rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006806LIBS=$ac_func_search_save_LIBS
6807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6809$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006810ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006811if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006812 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006813
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006815
Michael W. Hudson54241132001-12-07 15:38:26 +00006816else
Matthias Kloseb9621712010-04-24 17:59:49 +00006817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6818$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006819if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006820 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006821else
6822 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006826/* Override any GCC internal prototype to avoid an error.
6827 Use char because int might match the return type of a GCC
6828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006829#ifdef __cplusplus
6830extern "C"
6831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006832char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006833int
6834main ()
6835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006836return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006837 ;
6838 return 0;
6839}
6840_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006841for ac_lib in '' x; do
6842 if test -z "$ac_lib"; then
6843 ac_res="none required"
6844 else
6845 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006846 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006847 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006851rm -f core conftest.err conftest.$ac_objext \
6852 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006853 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006854 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006856done
Victor Stinnere0be4232011-10-25 13:06:09 +02006857if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006859else
6860 ac_cv_search_opendir=no
6861fi
6862rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006863LIBS=$ac_func_search_save_LIBS
6864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6866$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006867ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006868if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006869 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006870
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006871fi
6872
6873fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006874
Matthias Kloseb9621712010-04-24 17:59:49 +00006875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6876$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006877if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006878 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006879else
Matthias Kloseb9621712010-04-24 17:59:49 +00006880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006881/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006882#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006883int
6884main ()
6885{
6886return makedev(0, 0);
6887 ;
6888 return 0;
6889}
6890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006892 ac_cv_header_sys_types_h_makedev=yes
6893else
Matthias Kloseb9621712010-04-24 17:59:49 +00006894 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006896rm -f core conftest.err conftest.$ac_objext \
6897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006898
6899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6901$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006902
6903if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006904ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006905if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006906
Matthias Kloseb9621712010-04-24 17:59:49 +00006907$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006908
6909fi
6910
6911
6912
6913 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006914 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006915if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006916
Matthias Kloseb9621712010-04-24 17:59:49 +00006917$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006918
6919fi
6920
6921
6922 fi
6923fi
6924
Michael W. Hudson54241132001-12-07 15:38:26 +00006925
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006926# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6927for ac_header in net/if.h
6928do :
6929 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6930#ifdef STDC_HEADERS
6931# include <stdlib.h>
6932# include <stddef.h>
6933#else
6934# ifdef HAVE_STDLIB_H
6935# include <stdlib.h>
6936# endif
6937#endif
6938#ifdef HAVE_SYS_SOCKET_H
6939# include <sys/socket.h>
6940#endif
6941
6942"
Victor Stinnere0be4232011-10-25 13:06:09 +02006943if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006944 cat >>confdefs.h <<_ACEOF
6945#define HAVE_NET_IF_H 1
6946_ACEOF
6947
6948fi
6949
6950done
6951
6952
6953
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006954# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006955for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006956do :
6957 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006958#ifdef HAVE_CURSES_H
6959#include <curses.h>
6960#endif
6961
Matthias Kloseb9621712010-04-24 17:59:49 +00006962"
Victor Stinnere0be4232011-10-25 13:06:09 +02006963if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006964 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006965#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006966_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006967
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006968fi
6969
6970done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006971
6972
Martin v. Löwis11017b12006-01-14 18:12:57 +00006973# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006974for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006975do :
6976 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006977#ifdef HAVE_ASM_TYPES_H
6978#include <asm/types.h>
6979#endif
6980#ifdef HAVE_SYS_SOCKET_H
6981#include <sys/socket.h>
6982#endif
6983
Matthias Kloseb9621712010-04-24 17:59:49 +00006984"
Victor Stinnere0be4232011-10-25 13:06:09 +02006985if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006986 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006987#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006988_ACEOF
6989
6990fi
6991
6992done
6993
6994
Charles-François Natali47413c12011-10-06 19:47:44 +02006995# On Linux, can.h and can/raw.h require sys/socket.h
6996for ac_header in linux/can.h linux/can/raw.h
6997do :
6998 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6999ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7000#ifdef HAVE_SYS_SOCKET_H
7001#include <sys/socket.h>
7002#endif
7003
7004"
7005if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7006 cat >>confdefs.h <<_ACEOF
7007#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7008_ACEOF
7009
7010fi
7011
7012done
7013
7014
Guido van Rossum627b2d71993-12-24 10:39:16 +00007015# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007016was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7018$as_echo_n "checking for clock_t in time.h... " >&6; }
7019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007020/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007021#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007022
7023_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007025 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007026 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007027else
Martin v. Löwis11437992002-04-12 09:54:03 +00007028
7029
Matthias Kloseb9621712010-04-24 17:59:49 +00007030$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007031
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007032
Guido van Rossum627b2d71993-12-24 10:39:16 +00007033fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007034rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007035
Matthias Kloseb9621712010-04-24 17:59:49 +00007036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7037$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007038
Matthias Kloseb9621712010-04-24 17:59:49 +00007039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7040$as_echo_n "checking for makedev... " >&6; }
7041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007042/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007043
Jesus Cea740f53a2010-04-28 11:35:30 +00007044#if defined(MAJOR_IN_MKDEV)
7045#include <sys/mkdev.h>
7046#elif defined(MAJOR_IN_SYSMACROS)
7047#include <sys/sysmacros.h>
7048#else
7049#include <sys/types.h>
7050#endif
7051
Neal Norwitz11690112002-07-30 01:08:28 +00007052int
7053main ()
7054{
Jesus Cea740f53a2010-04-28 11:35:30 +00007055
7056 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007057 ;
7058 return 0;
7059}
Matthias Kloseb159a552010-04-25 21:00:44 +00007060
Neal Norwitz11690112002-07-30 01:08:28 +00007061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007062if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007063 ac_cv_has_makedev=yes
7064else
Matthias Kloseb9621712010-04-24 17:59:49 +00007065 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007067rm -f core conftest.err conftest.$ac_objext \
7068 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7070$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007071if test "$ac_cv_has_makedev" = "yes"; then
7072
Matthias Kloseb9621712010-04-24 17:59:49 +00007073$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007074
7075fi
7076
Martin v. Löwis399a6892002-10-04 10:22:02 +00007077# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7078# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7079# defined, but the compiler does not support pragma redefine_extname,
7080# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7081# structures (such as rlimit64) without declaring them. As a
7082# work-around, disable LFS on such configurations
7083
7084use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7086$as_echo_n "checking Solaris LFS bug... " >&6; }
7087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007088/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007089
7090#define _LARGEFILE_SOURCE 1
7091#define _FILE_OFFSET_BITS 64
7092#include <sys/resource.h>
7093
Martin v. Löwis399a6892002-10-04 10:22:02 +00007094int
7095main ()
7096{
7097struct rlimit foo;
7098 ;
7099 return 0;
7100}
7101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007102if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007103 sol_lfs_bug=no
7104else
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7109$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007110if test "$sol_lfs_bug" = "yes"; then
7111 use_lfs=no
7112fi
7113
7114if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007115# Two defines needed to enable largefile support on various platforms
7116# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007117case $ac_sys_system/$ac_sys_release in
7118AIX*)
7119
7120$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7121
7122 ;;
7123esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007124
Matthias Kloseb9621712010-04-24 17:59:49 +00007125$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007126
7127
Matthias Kloseb9621712010-04-24 17:59:49 +00007128$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007129
Martin v. Löwis399a6892002-10-04 10:22:02 +00007130fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007131
Guido van Rossum84e7b241996-08-19 21:59:00 +00007132# Add some code to confdefs.h so that the test for off_t works on SCO
7133cat >> confdefs.h <<\EOF
7134#if defined(SCO_DS)
7135#undef _OFF_T
7136#endif
7137EOF
7138
Guido van Rossumef2255b2000-03-10 22:30:29 +00007139# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007140ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007141if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007142
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007143else
Martin v. Löwis11437992002-04-12 09:54:03 +00007144
7145cat >>confdefs.h <<_ACEOF
7146#define mode_t int
7147_ACEOF
7148
7149fi
7150
Matthias Kloseb9621712010-04-24 17:59:49 +00007151ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007152if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007153
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007154else
Martin v. Löwis11437992002-04-12 09:54:03 +00007155
7156cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007157#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007158_ACEOF
7159
7160fi
7161
Matthias Kloseb9621712010-04-24 17:59:49 +00007162ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007163if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007165else
Martin v. Löwis11437992002-04-12 09:54:03 +00007166
7167cat >>confdefs.h <<_ACEOF
7168#define pid_t int
7169_ACEOF
7170
7171fi
7172
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007173
Martin v. Löwis11437992002-04-12 09:54:03 +00007174cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007175#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007176_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007177
Matthias Kloseb9621712010-04-24 17:59:49 +00007178ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007179if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007180
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007181else
Martin v. Löwis11437992002-04-12 09:54:03 +00007182
7183cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007184#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007185_ACEOF
7186
7187fi
7188
Matthias Kloseb9621712010-04-24 17:59:49 +00007189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7190$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007191if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007193else
Matthias Kloseb9621712010-04-24 17:59:49 +00007194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007195/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007196#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007197
7198_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007200 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007201 ac_cv_type_uid_t=yes
7202else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007203 ac_cv_type_uid_t=no
7204fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007205rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007206
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7209$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007210if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007211
Matthias Kloseb9621712010-04-24 17:59:49 +00007212$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007213
7214
Matthias Kloseb9621712010-04-24 17:59:49 +00007215$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007216
7217fi
7218
Matthias Kloseb9621712010-04-24 17:59:49 +00007219ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7220case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007221 no|yes) ;; #(
7222 *)
7223
Matthias Kloseb9621712010-04-24 17:59:49 +00007224$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007225
7226
7227cat >>confdefs.h <<_ACEOF
7228#define uint32_t $ac_cv_c_uint32_t
7229_ACEOF
7230;;
7231 esac
7232
Matthias Kloseb9621712010-04-24 17:59:49 +00007233ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7234case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007235 no|yes) ;; #(
7236 *)
7237
Matthias Kloseb9621712010-04-24 17:59:49 +00007238$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007239
7240
7241cat >>confdefs.h <<_ACEOF
7242#define uint64_t $ac_cv_c_uint64_t
7243_ACEOF
7244;;
7245 esac
7246
Matthias Kloseb9621712010-04-24 17:59:49 +00007247ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7248case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007249 no|yes) ;; #(
7250 *)
7251
7252cat >>confdefs.h <<_ACEOF
7253#define int32_t $ac_cv_c_int32_t
7254_ACEOF
7255;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007256esac
7257
Matthias Kloseb9621712010-04-24 17:59:49 +00007258ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7259case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007260 no|yes) ;; #(
7261 *)
7262
7263cat >>confdefs.h <<_ACEOF
7264#define int64_t $ac_cv_c_int64_t
7265_ACEOF
7266;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007267esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007268
Matthias Kloseb9621712010-04-24 17:59:49 +00007269ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007270if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007271
Matthias Kloseb9621712010-04-24 17:59:49 +00007272$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007273
7274fi
7275
Stefan Krah1919b7e2012-03-21 18:25:23 +01007276ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7277if test "x$ac_cv_type___uint128_t" = xyes; then :
7278
7279$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7280
7281fi
7282
Jack Jansendd19cf82001-12-06 22:36:17 +00007283
Michael W. Hudson54241132001-12-07 15:38:26 +00007284# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007285# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007286# The cast to long int works around a bug in the HP C Compiler
7287# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7288# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7289# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7291$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007292if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007293 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007294else
Matthias Kloseb9621712010-04-24 17:59:49 +00007295 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007296
Martin v. Löwis11437992002-04-12 09:54:03 +00007297else
Matthias Kloseb9621712010-04-24 17:59:49 +00007298 if test "$ac_cv_type_int" = yes; then
7299 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007301as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007302See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007303 else
7304 ac_cv_sizeof_int=0
7305 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007307
Martin v. Löwis11437992002-04-12 09:54:03 +00007308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7310$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007311
7312
7313
Martin v. Löwis11437992002-04-12 09:54:03 +00007314cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007315#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007316_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007317
7318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007319# The cast to long int works around a bug in the HP C Compiler
7320# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7321# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7322# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7324$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007325if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007326 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007327else
Matthias Kloseb9621712010-04-24 17:59:49 +00007328 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007329
Martin v. Löwis11437992002-04-12 09:54:03 +00007330else
Matthias Kloseb9621712010-04-24 17:59:49 +00007331 if test "$ac_cv_type_long" = yes; then
7332 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007334as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007335See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007336 else
7337 ac_cv_sizeof_long=0
7338 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007340
Martin v. Löwis11437992002-04-12 09:54:03 +00007341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7343$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007344
7345
7346
Martin v. Löwis11437992002-04-12 09:54:03 +00007347cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007348#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007349_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007350
7351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007352# The cast to long int works around a bug in the HP C Compiler
7353# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7354# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7355# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7357$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007358if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007359 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007360else
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007362
Martin v. Löwis11437992002-04-12 09:54:03 +00007363else
Matthias Kloseb9621712010-04-24 17:59:49 +00007364 if test "$ac_cv_type_void_p" = yes; then
7365 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7366$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007367as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007368See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007369 else
7370 ac_cv_sizeof_void_p=0
7371 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007373
Martin v. Löwis11437992002-04-12 09:54:03 +00007374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7376$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007377
7378
7379
Martin v. Löwis11437992002-04-12 09:54:03 +00007380cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007381#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007382_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007383
7384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007385# The cast to long int works around a bug in the HP C Compiler
7386# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7387# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7388# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7390$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007391if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007393else
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007395
Martin v. Löwis11437992002-04-12 09:54:03 +00007396else
Matthias Kloseb9621712010-04-24 17:59:49 +00007397 if test "$ac_cv_type_short" = yes; then
7398 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7399$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007400as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007401See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007402 else
7403 ac_cv_sizeof_short=0
7404 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007406
Martin v. Löwis11437992002-04-12 09:54:03 +00007407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7409$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007410
7411
7412
Martin v. Löwis11437992002-04-12 09:54:03 +00007413cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007414#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007415_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007416
7417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007418# The cast to long int works around a bug in the HP C Compiler
7419# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7420# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7421# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7423$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007424if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007425 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007426else
Matthias Kloseb9621712010-04-24 17:59:49 +00007427 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007428
Martin v. Löwis11437992002-04-12 09:54:03 +00007429else
Matthias Kloseb9621712010-04-24 17:59:49 +00007430 if test "$ac_cv_type_float" = yes; then
7431 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7432$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007433as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007434See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007435 else
7436 ac_cv_sizeof_float=0
7437 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007439
Martin v. Löwis11437992002-04-12 09:54:03 +00007440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7442$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007443
7444
7445
Martin v. Löwis11437992002-04-12 09:54:03 +00007446cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007447#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007448_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007449
7450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007451# The cast to long int works around a bug in the HP C Compiler
7452# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7453# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7454# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7456$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007457if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007459else
Matthias Kloseb9621712010-04-24 17:59:49 +00007460 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007461
Martin v. Löwis11437992002-04-12 09:54:03 +00007462else
Matthias Kloseb9621712010-04-24 17:59:49 +00007463 if test "$ac_cv_type_double" = yes; then
7464 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7465$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007466as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007467See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007468 else
7469 ac_cv_sizeof_double=0
7470 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007472
Martin v. Löwis11437992002-04-12 09:54:03 +00007473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7475$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007476
7477
7478
Martin v. Löwis11437992002-04-12 09:54:03 +00007479cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007480#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007481_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007482
7483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007484# The cast to long int works around a bug in the HP C Compiler
7485# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7486# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7487# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7489$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007490if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007494
Martin v. Löwis11437992002-04-12 09:54:03 +00007495else
Matthias Kloseb9621712010-04-24 17:59:49 +00007496 if test "$ac_cv_type_fpos_t" = yes; then
7497 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007499as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007500See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007501 else
7502 ac_cv_sizeof_fpos_t=0
7503 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007505
Martin v. Löwis11437992002-04-12 09:54:03 +00007506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7508$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007509
7510
7511
Martin v. Löwis11437992002-04-12 09:54:03 +00007512cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007513#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007514_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007515
Michael W. Hudson54241132001-12-07 15:38:26 +00007516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007517# The cast to long int works around a bug in the HP C Compiler
7518# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7519# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7520# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7522$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007523if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007524 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007525else
Matthias Kloseb9621712010-04-24 17:59:49 +00007526 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00007527
Martin v. Löwis18e16552006-02-15 17:27:45 +00007528else
Matthias Kloseb9621712010-04-24 17:59:49 +00007529 if test "$ac_cv_type_size_t" = yes; then
7530 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7531$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007532as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007533See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007534 else
7535 ac_cv_sizeof_size_t=0
7536 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007538
Martin v. Löwis18e16552006-02-15 17:27:45 +00007539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7541$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007542
7543
7544
Martin v. Löwis18e16552006-02-15 17:27:45 +00007545cat >>confdefs.h <<_ACEOF
7546#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7547_ACEOF
7548
7549
Christian Heimes400adb02008-02-01 08:12:03 +00007550# The cast to long int works around a bug in the HP C Compiler
7551# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7552# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7553# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7555$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007556if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007558else
Matthias Kloseb9621712010-04-24 17:59:49 +00007559 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00007560
Christian Heimes400adb02008-02-01 08:12:03 +00007561else
Matthias Kloseb9621712010-04-24 17:59:49 +00007562 if test "$ac_cv_type_pid_t" = yes; then
7563 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7564$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007565as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007566See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007567 else
7568 ac_cv_sizeof_pid_t=0
7569 fi
7570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007571
Christian Heimes400adb02008-02-01 08:12:03 +00007572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7574$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007575
7576
7577
7578cat >>confdefs.h <<_ACEOF
7579#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7580_ACEOF
7581
7582
Michael W. Hudson54241132001-12-07 15:38:26 +00007583
Matthias Kloseb9621712010-04-24 17:59:49 +00007584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7585$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007586have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007588/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007589
Martin v. Löwis11437992002-04-12 09:54:03 +00007590int
7591main ()
7592{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007593long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007594 ;
7595 return 0;
7596}
7597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007598if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007599
7600
Matthias Kloseb9621712010-04-24 17:59:49 +00007601$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007602
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007603 have_long_long=yes
7604
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7608$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007609if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007610# The cast to long int works around a bug in the HP C Compiler
7611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7613# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7615$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007616if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007617 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007618else
Matthias Kloseb9621712010-04-24 17:59:49 +00007619 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007620
Martin v. Löwis11437992002-04-12 09:54:03 +00007621else
Matthias Kloseb9621712010-04-24 17:59:49 +00007622 if test "$ac_cv_type_long_long" = yes; then
7623 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7624$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007625as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007626See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007627 else
7628 ac_cv_sizeof_long_long=0
7629 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007631
Martin v. Löwis11437992002-04-12 09:54:03 +00007632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7634$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007635
7636
7637
Martin v. Löwis11437992002-04-12 09:54:03 +00007638cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007639#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007640_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007641
Michael W. Hudson54241132001-12-07 15:38:26 +00007642
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007643fi
7644
Matthias Kloseb9621712010-04-24 17:59:49 +00007645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7646$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007647have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007649/* end confdefs.h. */
7650
7651int
7652main ()
7653{
7654long double x; x = (long double)0;
7655 ;
7656 return 0;
7657}
7658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007659if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007660
7661
Matthias Kloseb9621712010-04-24 17:59:49 +00007662$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007663
7664 have_long_double=yes
7665
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007666fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7669$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007670if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007671# The cast to long int works around a bug in the HP C Compiler
7672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7674# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7676$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007677if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007679else
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007681
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007682else
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 if test "$ac_cv_type_long_double" = yes; then
7684 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007686as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007687See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007688 else
7689 ac_cv_sizeof_long_double=0
7690 fi
7691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007692
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7695$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007696
7697
7698
7699cat >>confdefs.h <<_ACEOF
7700#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7701_ACEOF
7702
7703
7704fi
7705
7706
Matthias Kloseb9621712010-04-24 17:59:49 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7708$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007709have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007711/* end confdefs.h. */
7712
7713int
7714main ()
7715{
7716_Bool x; x = (_Bool)0;
7717 ;
7718 return 0;
7719}
7720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007721if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007722
7723
Matthias Kloseb9621712010-04-24 17:59:49 +00007724$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007725
7726 have_c99_bool=yes
7727
Thomas Woutersb2137042007-02-01 18:02:27 +00007728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7731$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007732if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007733# The cast to long int works around a bug in the HP C Compiler
7734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7736# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7738$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007739if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007741else
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007743
Thomas Woutersb2137042007-02-01 18:02:27 +00007744else
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 if test "$ac_cv_type__Bool" = yes; then
7746 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007748as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007749See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750 else
7751 ac_cv_sizeof__Bool=0
7752 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007754
Thomas Woutersb2137042007-02-01 18:02:27 +00007755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7757$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758
7759
7760
Thomas Woutersb2137042007-02-01 18:02:27 +00007761cat >>confdefs.h <<_ACEOF
7762#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7763_ACEOF
7764
7765
7766fi
7767
Matthias Kloseb9621712010-04-24 17:59:49 +00007768ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007769 #include <stdint.h>
7770 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007771 #ifdef HAVE_INTTYPES_H
7772 #include <inttypes.h>
7773 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007774"
Victor Stinnere0be4232011-10-25 13:06:09 +02007775if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007776
7777cat >>confdefs.h <<_ACEOF
7778#define HAVE_UINTPTR_T 1
7779_ACEOF
7780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781# The cast to long int works around a bug in the HP C Compiler
7782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7784# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7786$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007787if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007789else
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007791
Martin v. Löwis11437992002-04-12 09:54:03 +00007792else
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 if test "$ac_cv_type_uintptr_t" = yes; then
7794 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007796as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007797See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798 else
7799 ac_cv_sizeof_uintptr_t=0
7800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007802
Martin v. Löwis11437992002-04-12 09:54:03 +00007803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7805$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806
7807
7808
Martin v. Löwis11437992002-04-12 09:54:03 +00007809cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007810#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007811_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007812
Michael W. Hudson54241132001-12-07 15:38:26 +00007813
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007814fi
7815
Thomas Wouters89f507f2006-12-13 04:49:30 +00007816
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007817# The cast to long int works around a bug in the HP C Compiler
7818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7820# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7822$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007823if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007825else
Matthias Kloseb9621712010-04-24 17:59:49 +00007826 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007827#ifdef HAVE_SYS_TYPES_H
7828#include <sys/types.h>
7829#endif
7830
Matthias Kloseb9621712010-04-24 17:59:49 +00007831"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007832
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007833else
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 if test "$ac_cv_type_off_t" = yes; then
7835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007837as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007838See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007839 else
7840 ac_cv_sizeof_off_t=0
7841 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007843
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7846$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007848
7849
Martin v. Löwis11437992002-04-12 09:54:03 +00007850cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007851#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007852_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007853
Michael W. Hudson54241132001-12-07 15:38:26 +00007854
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007855
Matthias Kloseb9621712010-04-24 17:59:49 +00007856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7857$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007858if test "$have_long_long" = yes
7859then
7860if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007861 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007862
Matthias Kloseb9621712010-04-24 17:59:49 +00007863$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007864
Matthias Kloseb9621712010-04-24 17:59:49 +00007865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7866$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007867else
Matthias Kloseb9621712010-04-24 17:59:49 +00007868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7869$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007870fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007871else
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7873$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007874fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007875
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007876# The cast to long int works around a bug in the HP C Compiler
7877# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7878# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7879# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7881$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007882if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007884else
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007886#ifdef HAVE_SYS_TYPES_H
7887#include <sys/types.h>
7888#endif
7889#ifdef HAVE_TIME_H
7890#include <time.h>
7891#endif
7892
Matthias Kloseb9621712010-04-24 17:59:49 +00007893"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007894
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007895else
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 if test "$ac_cv_type_time_t" = yes; then
7897 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007899as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007900See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007901 else
7902 ac_cv_sizeof_time_t=0
7903 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7908$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007909
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007910
7911
Martin v. Löwis11437992002-04-12 09:54:03 +00007912cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007913#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007914_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007915
Michael W. Hudson54241132001-12-07 15:38:26 +00007916
7917
Trent Mick635f6fb2000-08-23 21:33:05 +00007918# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007919ac_save_cc="$CC"
7920if test "$ac_cv_kpthread" = "yes"
7921then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007922elif test "$ac_cv_kthread" = "yes"
7923then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007924elif test "$ac_cv_pthread" = "yes"
7925then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007926fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007927
Matthias Kloseb9621712010-04-24 17:59:49 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7929$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007930have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007932/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007933
7934 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007935int
7936main ()
7937{
Guido van Rossum12580492000-09-24 16:47:19 +00007938pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 ;
7940 return 0;
7941}
Matthias Kloseb159a552010-04-25 21:00:44 +00007942
Martin v. Löwis11437992002-04-12 09:54:03 +00007943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007944if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007945 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7949$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007950if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007952# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7953# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7954# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7956$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007957if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007958 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007959else
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007961#ifdef HAVE_PTHREAD_H
7962#include <pthread.h>
7963#endif
7964
Matthias Kloseb9621712010-04-24 17:59:49 +00007965"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007966
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007967else
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 if test "$ac_cv_type_pthread_t" = yes; then
7969 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007971as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007972See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007973 else
7974 ac_cv_sizeof_pthread_t=0
7975 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977
Trent Mick635f6fb2000-08-23 21:33:05 +00007978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7980$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007981
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007982
7983
Martin v. Löwis11437992002-04-12 09:54:03 +00007984cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007985#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007986_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007987
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007988
Trent Mick635f6fb2000-08-23 21:33:05 +00007989fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007990CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007991
Michael W. Hudson54241132001-12-07 15:38:26 +00007992
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007993case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007994 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007995 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7996 ;;
7997 Darwin/*)
7998 OTHER_LIBTOOL_OPT=""
7999 ;;
8000esac
8001
8002
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008003ARCH_RUN_32BIT=""
8004
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008005case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008006 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008007 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8008 if test "${enable_universalsdk}"; then
8009 :
8010 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008011 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008012 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008013 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008014 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008015 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008016 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008017 if test ${gcc_version} '<' 4.0
8018 then
8019 LIBTOOL_CRUFT="-lcc_dynamic"
8020 else
8021 LIBTOOL_CRUFT=""
8022 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008024 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008025else
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008027/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008028
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008029 #include <unistd.h>
8030 int main(int argc, char*argv[])
8031 {
8032 if (sizeof(long) == 4) {
8033 return 0;
8034 } else {
8035 return 1;
8036 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008037 }
8038
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008040if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008041 ac_osx_32bit=yes
8042else
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8046 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008047fi
8048
8049
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008050 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008051 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008052 i386)
8053 MACOSX_DEFAULT_ARCH="i386"
8054 ;;
8055 ppc)
8056 MACOSX_DEFAULT_ARCH="ppc"
8057 ;;
8058 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008059 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008060 ;;
8061 esac
8062 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008063 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008064 i386)
8065 MACOSX_DEFAULT_ARCH="x86_64"
8066 ;;
8067 ppc)
8068 MACOSX_DEFAULT_ARCH="ppc64"
8069 ;;
8070 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008071 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008072 ;;
8073 esac
8074
8075 #ARCH_RUN_32BIT="true"
8076 fi
8077
8078 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008079 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008080 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008081esac
8082
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8084$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008085if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008086then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008087 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008089 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008090
Matthias Kloseb9621712010-04-24 17:59:49 +00008091$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008092
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8094$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008095 if test $enable_shared = "yes"
8096 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008097 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00008098 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008099else
Matthias Kloseb9621712010-04-24 17:59:49 +00008100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8101$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008102fi
8103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8105$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008106case $ac_sys_system/$ac_sys_release in
8107 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008108
Matthias Kloseb9621712010-04-24 17:59:49 +00008109$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008110
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8112$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008113 ;;
8114 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8116$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008117 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008118esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008119
Guido van Rossum0a516c91994-09-12 10:58:40 +00008120# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008121
Michael W. Hudson54241132001-12-07 15:38:26 +00008122
8123
8124
8125
Benjamin Peterson99f03762010-04-11 22:15:28 +00008126
Thomas Wouters477c8d52006-05-27 19:21:47 +00008127
Georg Brandlb1441c72009-01-03 22:33:39 +00008128
Thomas Wouters477c8d52006-05-27 19:21:47 +00008129cat >>confdefs.h <<_ACEOF
8130#define SHLIB_EXT "$SO"
8131_ACEOF
8132
Guido van Rossum0a516c91994-09-12 10:58:40 +00008133# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008134# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008135# (Shared libraries in this instance are shared modules to be loaded into
8136# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8138$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008139if test -z "$LDSHARED"
8140then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008141 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008142 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008143 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008144 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008145 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008146 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008147 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008149 if test "$GCC" = "yes" ; then
8150 LDSHARED='$(CC) -shared'
8151 LDCXXSHARED='$(CXX) -shared'
8152 else
8153 LDSHARED='$(CC) -G'
8154 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008155 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008156 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008157 if test "$GCC" = "yes" ; then
8158 LDSHARED='$(CC) -shared'
8159 LDCXXSHARED='$(CXX) -shared'
8160 else
8161 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008162 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008163 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008164 LDSHARED='$(CC) -bundle'
8165 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008166 if test "$enable_framework" ; then
8167 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008168 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8169 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008170 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008171 else
8172 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008173 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008174 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008175 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008176 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008177 LDSHARED='$(CC) -bundle'
8178 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008179 if test "$enable_framework" ; then
8180 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008181 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8182 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008183 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008184 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008185 # No framework, use the Python app as bundle-loader
8186 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008187 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008188 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008189 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008190 Darwin/*)
8191 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8192 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008193
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008194 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008195 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008196 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008197 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008198 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008199 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8200 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008201 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008202 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008203 LDSHARED='$(CC) -bundle'
8204 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008205 if test "$enable_framework" ; then
8206 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008207 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8208 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008209 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008210 else
8211 # No framework, use the Python app as bundle-loader
8212 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8213 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008214 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008215 fi
8216 fi
8217 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008218 Linux*|GNU*|QNX*)
8219 LDSHARED='$(CC) -shared'
8220 LDCXXSHARED='$(CXX) -shared';;
8221 BSD/OS*/4*)
8222 LDSHARED="gcc -shared"
8223 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008224 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008225 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008226 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008227 LDSHARED='$(CC) -shared'
8228 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008229 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008230 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008231 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008232 OpenBSD*)
8233 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8234 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008235 LDSHARED='$(CC) -shared $(CCSHARED)'
8236 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008237 else
8238 case `uname -r` in
8239 [01].* | 2.[0-7] | 2.[0-7].*)
8240 LDSHARED="ld -Bshareable ${LDFLAGS}"
8241 ;;
8242 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008243 LDSHARED='$(CC) -shared $(CCSHARED)'
8244 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008245 ;;
8246 esac
8247 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008248 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008249 LDSHARED='$(CC) -shared'
8250 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008251 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008252 if test "$GCC" = "yes" ; then
8253 LDSHARED='$(CC) -shared'
8254 LDCXXSHARED='$(CXX) -shared'
8255 else
8256 LDSHARED='$(CC) -G'
8257 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008258 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008259 SCO_SV*)
8260 LDSHARED='$(CC) -Wl,-G,-Bexport'
8261 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8262 CYGWIN*)
8263 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8264 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008265 *) LDSHARED="ld";;
8266 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8269$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008270LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008271BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008272# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008273# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8275$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008276if test -z "$CCSHARED"
8277then
Guido van Rossum07397971997-04-29 21:49:50 +00008278 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008279 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008280 then CCSHARED="-fPIC";
8281 elif test `uname -p` = sparc;
8282 then CCSHARED="-xcode=pic32";
8283 else CCSHARED="-Kpic";
8284 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008285 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008286 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008287 else CCSHARED="+z";
8288 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008289 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008290 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008291 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008292 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008293 if test "$GCC" = "yes"
8294 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008295 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008296 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008297 SCO_SV*)
8298 if test "$GCC" = "yes"
8299 then CCSHARED="-fPIC"
8300 else CCSHARED="-Kpic -belf"
8301 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008302 IRIX*/6*) case $CC in
8303 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008304 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008305 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008306 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8309$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008310# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008311# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8313$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008314if test -z "$LINKFORSHARED"
8315then
Guido van Rossum07397971997-04-29 21:49:50 +00008316 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008317 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008318 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008319 LINKFORSHARED="-Wl,-E -Wl,+s";;
8320# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008321 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008322 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008323 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008325 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008326 if test "$enable_framework"
8327 then
Jack Jansenda49e192005-01-07 13:08:22 +00008328 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008329 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008330 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008331 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008332 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008333 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008334 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008335 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8336 then
8337 LINKFORSHARED="-Wl,--export-dynamic"
8338 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008339 SunOS/5*) case $CC in
8340 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008341 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008342 then
8343 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008344 fi;;
8345 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008346 CYGWIN*)
8347 if test $enable_shared = "no"
8348 then
8349 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8350 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008351 QNX*)
8352 # -Wl,-E causes the symbols to be added to the dynamic
8353 # symbol table so that they can be found when a module
8354 # is loaded. -N 2048K causes the stack size to be set
8355 # to 2048 kilobytes so that the stack doesn't overflow
8356 # when running test_compile.py.
8357 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008358 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8361$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008362
Michael W. Hudson54241132001-12-07 15:38:26 +00008363
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008364
Matthias Kloseb9621712010-04-24 17:59:49 +00008365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8366$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008367if test ! "$LIBRARY" = "$LDLIBRARY"
8368then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008369 case $ac_sys_system in
8370 CYGWIN*)
8371 # Cygwin needs CCSHARED when building extension DLLs
8372 # but not when building the interpreter DLL.
8373 CFLAGSFORSHARED='';;
8374 *)
8375 CFLAGSFORSHARED='$(CCSHARED)'
8376 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008377fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8379$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008380
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008381# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8382# library (with --enable-shared).
8383# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008384# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8385# if it is not required, since it creates a dependency of the shared library
8386# to LIBS. This, in turn, means that applications linking the shared libpython
8387# don't need to link LIBS explicitly. The default should be only changed
8388# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008389
Matthias Kloseb9621712010-04-24 17:59:49 +00008390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8391$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008392case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008393 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008394 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008395esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8397$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008398
8399
Guido van Rossum627b2d71993-12-24 10:39:16 +00008400# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8402$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008403if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008404 $as_echo_n "(cached) " >&6
8405else
8406 ac_check_lib_save_LIBS=$LIBS
8407LIBS="-lsendfile $LIBS"
8408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8409/* end confdefs.h. */
8410
8411/* Override any GCC internal prototype to avoid an error.
8412 Use char because int might match the return type of a GCC
8413 builtin and then its argument prototype would still apply. */
8414#ifdef __cplusplus
8415extern "C"
8416#endif
8417char sendfile ();
8418int
8419main ()
8420{
8421return sendfile ();
8422 ;
8423 return 0;
8424}
8425_ACEOF
8426if ac_fn_c_try_link "$LINENO"; then :
8427 ac_cv_lib_sendfile_sendfile=yes
8428else
8429 ac_cv_lib_sendfile_sendfile=no
8430fi
8431rm -f core conftest.err conftest.$ac_objext \
8432 conftest$ac_exeext conftest.$ac_ext
8433LIBS=$ac_check_lib_save_LIBS
8434fi
8435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8436$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008437if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008438 cat >>confdefs.h <<_ACEOF
8439#define HAVE_LIBSENDFILE 1
8440_ACEOF
8441
8442 LIBS="-lsendfile $LIBS"
8443
8444fi
8445
Matthias Kloseb9621712010-04-24 17:59:49 +00008446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8447$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008448if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008450else
Martin v. Löwis11437992002-04-12 09:54:03 +00008451 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008452LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456/* Override any GCC internal prototype to avoid an error.
8457 Use char because int might match the return type of a GCC
8458 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008459#ifdef __cplusplus
8460extern "C"
8461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008462char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008463int
8464main ()
8465{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 ;
8468 return 0;
8469}
8470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008471if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008472 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008473else
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008476rm -f core conftest.err conftest.$ac_objext \
8477 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008478LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8481$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008482if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 cat >>confdefs.h <<_ACEOF
8484#define HAVE_LIBDL 1
8485_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008486
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008487 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008488
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008489fi
8490 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8492$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008493if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008495else
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008497LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501/* Override any GCC internal prototype to avoid an error.
8502 Use char because int might match the return type of a GCC
8503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008504#ifdef __cplusplus
8505extern "C"
8506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008507char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008508int
8509main ()
8510{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ;
8513 return 0;
8514}
8515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008516if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008517 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008518else
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008521rm -f core conftest.err conftest.$ac_objext \
8522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008523LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8526$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008527if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 cat >>confdefs.h <<_ACEOF
8529#define HAVE_LIBDLD 1
8530_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008531
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008532 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008534fi
8535 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008536
Georg Brandlb1441c72009-01-03 22:33:39 +00008537# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008538if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8540$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008541if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008543else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008544 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548/* Override any GCC internal prototype to avoid an error.
8549 Use char because int might match the return type of a GCC
8550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008551#ifdef __cplusplus
8552extern "C"
8553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008554char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008555int
8556main ()
8557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ;
8560 return 0;
8561}
8562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563for ac_lib in '' pthread rt posix4; do
8564 if test -z "$ac_lib"; then
8565 ac_res="none required"
8566 else
8567 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008568 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008573rm -f core conftest.err conftest.$ac_objext \
8574 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008575 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578done
Victor Stinnere0be4232011-10-25 13:06:09 +02008579if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581else
8582 ac_cv_search_sem_init=no
8583fi
8584rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008585LIBS=$ac_func_search_save_LIBS
8586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8588$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008590if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008592
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008593fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008594 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008595 # posix4 on Solaris 2.6
8596 # pthread (first!) on Linux
8597fi
8598
Martin v. Löwis19d17342003-06-14 21:03:05 +00008599# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8601$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008602if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008604else
8605 ac_check_lib_save_LIBS=$LIBS
8606LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008608/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610/* Override any GCC internal prototype to avoid an error.
8611 Use char because int might match the return type of a GCC
8612 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008613#ifdef __cplusplus
8614extern "C"
8615#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008616char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008617int
8618main ()
8619{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008621 ;
8622 return 0;
8623}
8624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008625if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008626 ac_cv_lib_intl_textdomain=yes
8627else
Matthias Kloseb9621712010-04-24 17:59:49 +00008628 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008630rm -f core conftest.err conftest.$ac_objext \
8631 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008632LIBS=$ac_check_lib_save_LIBS
8633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8635$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008636if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008637
Matthias Kloseb9621712010-04-24 17:59:49 +00008638$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008639
Brett Cannonc6d936e2009-06-07 20:09:53 +00008640 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008641fi
8642
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008643
8644# checks for system dependent C++ extensions support
8645case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008646 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8647$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008649/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008650
Georg Brandl59e87bd2011-02-15 19:48:59 +00008651 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008652int
8653main ()
8654{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008655loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 ;
8657 return 0;
8658}
Matthias Kloseb159a552010-04-25 21:00:44 +00008659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008661if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008662
Matthias Kloseb159a552010-04-25 21:00:44 +00008663
Matthias Kloseb9621712010-04-24 17:59:49 +00008664$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008665
Matthias Kloseb159a552010-04-25 21:00:44 +00008666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008667$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008668
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008669else
Matthias Kloseb159a552010-04-25 21:00:44 +00008670
8671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008672$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008673
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675rm -f core conftest.err conftest.$ac_objext \
8676 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008677 *) ;;
8678esac
8679
Guido van Rossum70c7f481998-03-26 18:44:10 +00008680# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8682$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008683if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008685else
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008687LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691/* Override any GCC internal prototype to avoid an error.
8692 Use char because int might match the return type of a GCC
8693 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008694#ifdef __cplusplus
8695extern "C"
8696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008697char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008698int
8699main ()
8700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008702 ;
8703 return 0;
8704}
8705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008706if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008708else
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711rm -f core conftest.err conftest.$ac_objext \
8712 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008713LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8716$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008717if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008718 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008719fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008720 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8722$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008723if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008724 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008725else
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008727LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731/* Override any GCC internal prototype to avoid an error.
8732 Use char because int might match the return type of a GCC
8733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008734#ifdef __cplusplus
8735extern "C"
8736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008737char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008741return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ;
8743 return 0;
8744}
8745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008746if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751rm -f core conftest.err conftest.$ac_objext \
8752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008753LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8756$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008757if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008758 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008759fi
8760 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008761
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8763$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008766if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008767 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8769$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008770LIBS="$withval $LIBS"
8771
8772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8774$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775fi
8776
Guido van Rossum7f43da71994-08-01 12:15:30 +00008777
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008778if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008779 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8780set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8782$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008783if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008785else
8786 case $PKG_CONFIG in
8787 [\\/]* | ?:[\\/]*)
8788 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8789 ;;
8790 *)
8791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8792for as_dir in $PATH
8793do
8794 IFS=$as_save_IFS
8795 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008797 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008798 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008800 break 2
8801 fi
8802done
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008804IFS=$as_save_IFS
8805
8806 ;;
8807esac
8808fi
8809PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8810if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8812$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008813else
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8815$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008816fi
8817
8818
8819fi
8820if test -z "$ac_cv_path_PKG_CONFIG"; then
8821 ac_pt_PKG_CONFIG=$PKG_CONFIG
8822 # Extract the first word of "pkg-config", so it can be a program name with args.
8823set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8825$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008826if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008828else
8829 case $ac_pt_PKG_CONFIG in
8830 [\\/]* | ?:[\\/]*)
8831 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8832 ;;
8833 *)
8834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8835for as_dir in $PATH
8836do
8837 IFS=$as_save_IFS
8838 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008840 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008841 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008843 break 2
8844 fi
8845done
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008847IFS=$as_save_IFS
8848
8849 ;;
8850esac
8851fi
8852ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8853if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8855$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008856else
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8858$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008859fi
8860
8861 if test "x$ac_pt_PKG_CONFIG" = x; then
8862 PKG_CONFIG=""
8863 else
8864 case $cross_compiling:$ac_tool_warned in
8865yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8867$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008868ac_tool_warned=yes ;;
8869esac
8870 PKG_CONFIG=$ac_pt_PKG_CONFIG
8871 fi
8872else
8873 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8874fi
8875
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008876
8877# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8879$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008880
8881# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008882if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008883 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008884else
8885 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008886fi
8887
8888
Matthias Kloseb9621712010-04-24 17:59:49 +00008889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8890$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008891
8892# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8894$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008895
8896# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008897if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008898 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008899else
8900 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008901fi
8902
8903
8904if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008905 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8906else
8907 LIBFFI_INCLUDEDIR=""
8908fi
8909
8910
Matthias Kloseb9621712010-04-24 17:59:49 +00008911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8912$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008913
Stefan Krah60187b52012-03-23 19:06:27 +01008914# Check for use of the system libmpdec library
8915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
8916$as_echo_n "checking for --with-system-libmpdec... " >&6; }
8917
8918# Check whether --with-system_libmpdec was given.
8919if test "${with_system_libmpdec+set}" = set; then :
8920 withval=$with_system_libmpdec;
8921else
8922 with_system_libmpdec="no"
8923fi
8924
8925
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
8927$as_echo "$with_system_libmpdec" >&6; }
8928
Benjamin Peterson076ed002010-10-31 17:11:02 +00008929# Check for support for loadable sqlite extensions
8930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8931$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8932# Check whether --enable-loadable-sqlite-extensions was given.
8933if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8934 enableval=$enable_loadable_sqlite_extensions;
8935else
8936 enable_loadable_sqlite_extensions="no"
8937fi
8938
8939
8940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8941$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8942
Matthias Klose55708cc2009-04-30 08:06:49 +00008943# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8945$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008946
8947# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008948if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008949 withval=$with_dbmliborder;
8950if test x$with_dbmliborder = xyes
8951then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008952as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008953else
8954 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8955 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8956 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008957 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008958 fi
8959 done
8960fi
8961fi
8962
Matthias Kloseb9621712010-04-24 17:59:49 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8964$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008965
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008966# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008967
8968
Matthias Kloseb9621712010-04-24 17:59:49 +00008969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8970$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008973if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974 withval=$with_signal_module;
8975fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008976
8977
8978if test -z "$with_signal_module"
8979then with_signal_module="yes"
8980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8982$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008983
8984if test "${with_signal_module}" = "yes"; then
8985 USE_SIGNAL_MODULE=""
8986 SIGNAL_OBJS=""
8987else
8988 USE_SIGNAL_MODULE="#"
8989 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8990fi
8991
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008992# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008993
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008994USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996
Martin v. Löwis11437992002-04-12 09:54:03 +00008997
8998# Templates for things AC_DEFINEd more than once.
8999# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009000
9001
Martin v. Löwis11437992002-04-12 09:54:03 +00009002
Matthias Kloseb9621712010-04-24 17:59:49 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9004$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009007if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009008 withval=$with_threads;
9009fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009010
9011
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009012# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009015if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009016 withval=$with_thread; with_threads=$with_thread
9017fi
9018
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009019
9020if test -z "$with_threads"
9021then with_threads="yes"
9022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9024$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009025
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009026
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009027if test "$with_threads" = "no"
9028then
9029 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009030elif test "$ac_cv_pthread_is_default" = yes
9031then
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009033
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009034 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009036
9037 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009039elif test "$ac_cv_kpthread" = "yes"
9040then
9041 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009042 if test "$ac_cv_cxx_thread" = "yes"; then
9043 CXX="$CXX -Kpthread"
9044 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009046
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009047 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009048 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009049elif test "$ac_cv_kthread" = "yes"
9050then
9051 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009052 if test "$ac_cv_cxx_thread" = "yes"; then
9053 CXX="$CXX -Kthread"
9054 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009056
9057 posix_threads=yes
9058 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009059elif test "$ac_cv_pthread" = "yes"
9060then
9061 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009062 if test "$ac_cv_cxx_thread" = "yes"; then
9063 CXX="$CXX -pthread"
9064 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009066
9067 posix_threads=yes
9068 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009069else
9070 if test ! -z "$with_threads" -a -d "$with_threads"
9071 then LDFLAGS="$LDFLAGS -L$with_threads"
9072 fi
9073 if test ! -z "$withval" -a -d "$withval"
9074 then LDFLAGS="$LDFLAGS -L$withval"
9075 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009076
9077 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009078 # define _POSIX_THREADS in unistd.h. Some apparently don't
9079 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9081$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009083/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009084
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009085#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009086#ifdef _POSIX_THREADS
9087yes
9088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009089
9090_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009092 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009093 unistd_defines_pthreads=yes
9094else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009095 unistd_defines_pthreads=no
9096fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009097rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009098
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9100$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009103
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009104 # Just looking for pthread_create in libpthread is not enough:
9105 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9106 # So we really have to include pthread.h, and then link.
9107 _libs=$LIBS
9108 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9110$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009112/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009113#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009114
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009115void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009116int
9117main ()
9118{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009119
9120pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 ;
9122 return 0;
9123}
9124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009125if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009126
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9128$as_echo "yes" >&6; }
9129 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009130
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009131 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009132 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009133else
Martin v. Löwis11437992002-04-12 09:54:03 +00009134
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009135 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009137if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009138 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009139
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009140 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009141 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009142else
Guido van Rossumad678af1998-10-02 14:42:15 +00009143
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9145$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009146if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009148else
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009150LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009154/* Override any GCC internal prototype to avoid an error.
9155 Use char because int might match the return type of a GCC
9156 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009157#ifdef __cplusplus
9158extern "C"
9159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009160char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009161int
9162main ()
9163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009164return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009165 ;
9166 return 0;
9167}
9168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009169if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009171else
Matthias Kloseb9621712010-04-24 17:59:49 +00009172 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009174rm -f core conftest.err conftest.$ac_objext \
9175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009176LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9179$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009180if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009181 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009182
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009183 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009184 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009185 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009186else
Greg Steinadf63d62000-07-05 10:38:09 +00009187
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9189$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009190if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009192else
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009194LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009197
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198/* Override any GCC internal prototype to avoid an error.
9199 Use char because int might match the return type of a GCC
9200 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009201#ifdef __cplusplus
9202extern "C"
9203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009204char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009205int
9206main ()
9207{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009208return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 ;
9210 return 0;
9211}
9212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009213if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009214 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009215else
Matthias Kloseb9621712010-04-24 17:59:49 +00009216 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009218rm -f core conftest.err conftest.$ac_objext \
9219 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009220LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009221fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9223$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009224if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009225 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009226
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009227 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009228 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009229 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009230else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009231
Matthias Kloseb9621712010-04-24 17:59:49 +00009232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9233$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009234if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009235 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009236else
Martin v. Löwis11437992002-04-12 09:54:03 +00009237 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009238LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009242/* Override any GCC internal prototype to avoid an error.
9243 Use char because int might match the return type of a GCC
9244 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009245#ifdef __cplusplus
9246extern "C"
9247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009248char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009249int
9250main ()
9251{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 ;
9254 return 0;
9255}
9256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009257if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009258 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009259else
Matthias Kloseb9621712010-04-24 17:59:49 +00009260 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009262rm -f core conftest.err conftest.$ac_objext \
9263 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009264LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9267$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009268if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009269 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009270
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009271 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009272 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009273 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009274else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009275
Matthias Kloseb9621712010-04-24 17:59:49 +00009276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9277$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009278if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009279 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009280else
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009282LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009286/* Override any GCC internal prototype to avoid an error.
9287 Use char because int might match the return type of a GCC
9288 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009289#ifdef __cplusplus
9290extern "C"
9291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009292char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009293int
9294main ()
9295{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 ;
9298 return 0;
9299}
9300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009301if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009302 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009303else
Matthias Kloseb9621712010-04-24 17:59:49 +00009304 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009306rm -f core conftest.err conftest.$ac_objext \
9307 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009308LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9311$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009312if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009313 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009314
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009315 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009316 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009317 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009318else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009319
Martin v. Löwis130fb172001-07-19 11:00:41 +00009320 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009321fi
9322
Guido van Rossum627b2d71993-12-24 10:39:16 +00009323
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009324fi
9325
Guido van Rossum0be3e491997-05-22 20:33:33 +00009326fi
9327
Guido van Rossum49545951997-12-02 19:28:29 +00009328fi
9329
Guido van Rossumb93a8621998-05-07 13:27:32 +00009330fi
9331
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009333rm -f core conftest.err conftest.$ac_objext \
9334 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009335
Matthias Kloseb9621712010-04-24 17:59:49 +00009336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9337$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009338if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009339 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009340else
Martin v. Löwis11437992002-04-12 09:54:03 +00009341 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009342LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009346/* Override any GCC internal prototype to avoid an error.
9347 Use char because int might match the return type of a GCC
9348 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009349#ifdef __cplusplus
9350extern "C"
9351#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009352char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009353int
9354main ()
9355{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 ;
9358 return 0;
9359}
9360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009361if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009362 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009363else
Matthias Kloseb9621712010-04-24 17:59:49 +00009364 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009366rm -f core conftest.err conftest.$ac_objext \
9367 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009368LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9371$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009372if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009373 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009374
Martin v. Löwis130fb172001-07-19 11:00:41 +00009375 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009376 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009377 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009378fi
9379
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009380
Neal Norwitza978ab02002-11-02 16:58:05 +00009381 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9383$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009384if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009385 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009386else
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009388LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009391
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009392/* Override any GCC internal prototype to avoid an error.
9393 Use char because int might match the return type of a GCC
9394 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009395#ifdef __cplusplus
9396extern "C"
9397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009398char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009399int
9400main ()
9401{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009402return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009403 ;
9404 return 0;
9405}
9406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009407if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009409else
Matthias Kloseb9621712010-04-24 17:59:49 +00009410 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009412rm -f core conftest.err conftest.$ac_objext \
9413 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009414LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9417$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009418if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009419 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009420
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009421 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009422 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009423 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009424fi
9425
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009426 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009427fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009428
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009429if test "$posix_threads" = "yes"; then
9430 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009431
Matthias Kloseb9621712010-04-24 17:59:49 +00009432$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009433
9434 fi
9435
9436 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9437 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009438 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009439$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009440
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009441 ;;
9442 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009443$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009444
9445 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009446 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009447$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009448
9449 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009450 esac
9451
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9453$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009454 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009455 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009456else
Matthias Kloseb9621712010-04-24 17:59:49 +00009457 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009458 ac_cv_pthread_system_supported=no
9459else
Matthias Kloseb9621712010-04-24 17:59:49 +00009460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009461/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009462#include <pthread.h>
9463 void *foo(void *parm) {
9464 return NULL;
9465 }
9466 main() {
9467 pthread_attr_t attr;
9468 pthread_t id;
9469 if (pthread_attr_init(&attr)) exit(-1);
9470 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9471 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9472 exit(0);
9473 }
9474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009475if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009476 ac_cv_pthread_system_supported=yes
9477else
Matthias Kloseb9621712010-04-24 17:59:49 +00009478 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9481 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009482fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009484
Guido van Rossum627b2d71993-12-24 10:39:16 +00009485fi
9486
Matthias Kloseb9621712010-04-24 17:59:49 +00009487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9488$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009489 if test "$ac_cv_pthread_system_supported" = "yes"; then
9490
Matthias Kloseb9621712010-04-24 17:59:49 +00009491$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009492
9493 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 for ac_func in pthread_sigmask
9495do :
9496 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009497if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009498 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009499#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009500_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009501 case $ac_sys_system in
9502 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009503
Matthias Kloseb9621712010-04-24 17:59:49 +00009504$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009505
9506 ;;
9507 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009508fi
9509done
9510
9511fi
9512
9513
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009514# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009515
Matthias Kloseb9621712010-04-24 17:59:49 +00009516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9517$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009519if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009520 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009521 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9523$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009524 ipv6=no
9525 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009526 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9527$as_echo "yes" >&6; }
9528 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009529
9530 ipv6=yes
9531 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009532 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009533else
Martin v. Löwis11437992002-04-12 09:54:03 +00009534
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009536
Matthias Kloseb9621712010-04-24 17:59:49 +00009537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009539 ipv6=no
9540
9541else
Matthias Kloseb9621712010-04-24 17:59:49 +00009542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009544 /* AF_INET6 available check */
9545#include <sys/types.h>
9546#include <sys/socket.h>
9547main()
9548{
9549 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9550 exit(1);
9551 else
9552 exit(0);
9553}
9554
Martin v. Löwis11437992002-04-12 09:54:03 +00009555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009556if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009557
Matthias Kloseb9621712010-04-24 17:59:49 +00009558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9559$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009560 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009561
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009562else
Matthias Kloseb159a552010-04-25 21:00:44 +00009563
Matthias Kloseb9621712010-04-24 17:59:49 +00009564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9565$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009566 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009567
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009569rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9570 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009571fi
9572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009574if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9576$as_echo_n "checking if RFC2553 API is available... " >&6; }
9577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009578/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009579
9580 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009581#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009582int
9583main ()
9584{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009585struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009586 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 ;
9588 return 0;
9589}
Matthias Kloseb159a552010-04-25 21:00:44 +00009590
Martin v. Löwis11437992002-04-12 09:54:03 +00009591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009592if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009593
9594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009595$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009596 ipv6=yes
9597
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009598else
Matthias Kloseb159a552010-04-25 21:00:44 +00009599
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009601$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009602 ipv6=no
9603
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009606fi
9607
9608if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009609 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009610
9611fi
9612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613fi
9614
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009615
9616ipv6type=unknown
9617ipv6lib=none
9618ipv6trylibc=no
9619
9620if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9622$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009623 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9624 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009625 case $i in
9626 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009628/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009629
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009630#include <netinet/in.h>
9631#ifdef IPV6_INRIA_VERSION
9632yes
9633#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009634_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009635if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009636 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009637 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009638fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009639rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009640
9641 ;;
9642 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009644/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009645
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009646#include <netinet/in.h>
9647#ifdef __KAME__
9648yes
9649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009650_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009651if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009652 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009653 ipv6type=$i;
9654 ipv6lib=inet6
9655 ipv6libdir=/usr/local/v6/lib
9656 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009657fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009658rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009659
9660 ;;
9661 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009664
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009665#include <features.h>
9666#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9667yes
9668#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009669_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009671 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009672 ipv6type=$i;
9673 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009674fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009675rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009676
9677 ;;
9678 linux-inet6)
9679 if test -d /usr/inet6; then
9680 ipv6type=$i
9681 ipv6lib=inet6
9682 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009683 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009684 fi
9685 ;;
9686 solaris)
9687 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009688 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009689 ipv6type=$i
9690 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009691 fi
9692 fi
9693 ;;
9694 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009696/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009697
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009698#include <sys/param.h>
9699#ifdef _TOSHIBA_INET6
9700yes
9701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009702_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009704 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009705 ipv6type=$i;
9706 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009707 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009708fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009709rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009710
9711 ;;
9712 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009714/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009715
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009716#include </usr/local/v6/include/sys/v6config.h>
9717#ifdef __V6D__
9718yes
9719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009720_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009723 ipv6type=$i;
9724 ipv6lib=v6;
9725 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009726 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009727fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009728rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009729
9730 ;;
9731 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009733/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009734
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009735#include <sys/param.h>
9736#ifdef _ZETA_MINAMI_INET6
9737yes
9738#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009739_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009740if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009741 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009742 ipv6type=$i;
9743 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009744 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009745fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009746rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009747
9748 ;;
9749 esac
9750 if test "$ipv6type" != "unknown"; then
9751 break
9752 fi
9753 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9755$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009756fi
9757
9758if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9759 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9760 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9761 echo "using lib$ipv6lib"
9762 else
9763 if test $ipv6trylibc = "yes"; then
9764 echo "using libc"
9765 else
9766 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9767 echo "You need to fetch lib$ipv6lib.a from appropriate"
9768 echo 'ipv6 kit and compile beforehand.'
9769 exit 1
9770 fi
9771 fi
9772fi
9773
Matthias Kloseb9621712010-04-24 17:59:49 +00009774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9775$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009777/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009778
9779 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009780int
9781main ()
9782{
9783FSIORefNum fRef = 0
9784 ;
9785 return 0;
9786}
Matthias Kloseb159a552010-04-25 21:00:44 +00009787
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009789if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009790
Matthias Kloseb159a552010-04-25 21:00:44 +00009791
Matthias Kloseb9621712010-04-24 17:59:49 +00009792$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009793
Matthias Kloseb9621712010-04-24 17:59:49 +00009794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9795$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009796
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009797else
Matthias Kloseb159a552010-04-25 21:00:44 +00009798
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9800$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009801
9802fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9804
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009805# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9807$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009810if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811 withval=$with_doc_strings;
9812fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009813
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009814
9815if test -z "$with_doc_strings"
9816then with_doc_strings="yes"
9817fi
9818if test "$with_doc_strings" != "no"
9819then
9820
Matthias Kloseb9621712010-04-24 17:59:49 +00009821$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009822
9823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9825$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009826
Antoine Pitrou042b1282010-08-13 21:15:58 +00009827# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9829$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009832if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009834if test "$withval" != no
9835then
9836
Matthias Kloseb9621712010-04-24 17:59:49 +00009837$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009838
Matthias Kloseb9621712010-04-24 17:59:49 +00009839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9840$as_echo "yes" >&6; }
9841else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9842$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009843fi
9844else
Matthias Kloseb9621712010-04-24 17:59:49 +00009845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9846$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847fi
9848
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009849
9850# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9852$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009855if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856 withval=$with_pymalloc;
9857fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009858
Neil Schemenauera35c6882001-02-27 04:45:05 +00009859
Neil Schemenauer16c22972002-03-22 15:34:49 +00009860if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009861then
9862 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009863fi
9864if test "$with_pymalloc" != "no"
9865then
Martin v. Löwis11437992002-04-12 09:54:03 +00009866
Matthias Kloseb9621712010-04-24 17:59:49 +00009867$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009868
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +02009869 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9872$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009873
Benjamin Peterson05159c42009-12-03 03:01:27 +00009874# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9876$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009877
9878# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009879if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009880 withval=$with_valgrind;
9881else
9882 with_valgrind=no
9883fi
9884
Matthias Kloseb9621712010-04-24 17:59:49 +00009885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9886$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009887if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02009889if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009890
Matthias Kloseb9621712010-04-24 17:59:49 +00009891$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009892
9893else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009894 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009895
9896fi
9897
9898
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009899 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009900fi
9901
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009902# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009903
Guido van Rossum98935bf2001-09-05 19:13:16 +00009904DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009905
Guido van Rossume97ee181999-12-20 21:27:22 +00009906# the dlopen() function means we might want to use dynload_shlib.o. some
9907# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009908for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009909do :
9910 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +02009911if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009912 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009913#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009914_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009915
Guido van Rossume97ee181999-12-20 21:27:22 +00009916fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009917done
Guido van Rossume97ee181999-12-20 21:27:22 +00009918
Michael W. Hudson54241132001-12-07 15:38:26 +00009919
Guido van Rossume97ee181999-12-20 21:27:22 +00009920# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9921# loading of modules.
9922
Matthias Kloseb9621712010-04-24 17:59:49 +00009923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9924$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009925if test -z "$DYNLOADFILE"
9926then
9927 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009928 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9929 if test "$ac_cv_func_dlopen" = yes
9930 then DYNLOADFILE="dynload_shlib.o"
9931 else DYNLOADFILE="dynload_aix.o"
9932 fi
9933 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009934 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009935 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9936 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009937 *)
9938 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9939 # out any dynamic loading
9940 if test "$ac_cv_func_dlopen" = yes
9941 then DYNLOADFILE="dynload_shlib.o"
9942 else DYNLOADFILE="dynload_stub.o"
9943 fi
9944 ;;
9945 esac
9946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9948$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009949if test "$DYNLOADFILE" != "dynload_stub.o"
9950then
Martin v. Löwis11437992002-04-12 09:54:03 +00009951
Matthias Kloseb9621712010-04-24 17:59:49 +00009952$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009953
9954fi
9955
Neil Schemenauer4e425612001-06-19 15:44:15 +00009956# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9957
Michael W. Hudson54241132001-12-07 15:38:26 +00009958
Matthias Kloseb9621712010-04-24 17:59:49 +00009959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9960$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009961if test -z "$MACHDEP_OBJS"
9962then
Jack Jansene578a632001-08-15 01:27:14 +00009963 MACHDEP_OBJS=$extra_machdep_objs
9964else
9965 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009966fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +02009967if test -z "$MACHDEP_OBJS"; then
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
9969$as_echo "none" >&6; }
9970else
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
9972$as_echo "$MACHDEP_OBJS" >&6; }
9973fi
Neil Schemenauer4e425612001-06-19 15:44:15 +00009974
Guido van Rossum627b2d71993-12-24 10:39:16 +00009975# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009976for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -08009977 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009978 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009979 futimens futimes gai_strerror \
9980 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009981 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009982 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +01009983 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
9984 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009985 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009986 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009987 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009988 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009989 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009990 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009991 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9992 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009993 sigaction sigaltstack siginterrupt sigpending sigrelse \
9994 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009995 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009996 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9997 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009998do :
9999 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10000ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010001if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010003#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010004_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010005
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010006fi
10007done
10008
Michael W. Hudson54241132001-12-07 15:38:26 +000010009
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010010ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10011 #include <dirent.h>
10012"
10013if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10014
10015$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10016
10017fi
10018
10019
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010020# For some functions, having a definition is not sufficient, since
10021# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10023$as_echo_n "checking for chroot... " >&6; }
10024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010025/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010026#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010027int
10028main ()
10029{
10030void *x=chroot
10031 ;
10032 return 0;
10033}
10034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010035if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010036
Matthias Kloseb9621712010-04-24 17:59:49 +000010037$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010038
Matthias Kloseb159a552010-04-25 21:00:44 +000010039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010040$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010041else
Matthias Kloseb9621712010-04-24 17:59:49 +000010042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10043$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010044
10045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10048$as_echo_n "checking for link... " >&6; }
10049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010050/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010051#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010052int
10053main ()
10054{
10055void *x=link
10056 ;
10057 return 0;
10058}
10059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010060if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010061
Matthias Kloseb9621712010-04-24 17:59:49 +000010062$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010063
Matthias Kloseb159a552010-04-25 21:00:44 +000010064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010065$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010066else
Matthias Kloseb9621712010-04-24 17:59:49 +000010067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10068$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010069
10070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10073$as_echo_n "checking for symlink... " >&6; }
10074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010075/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010076#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010077int
10078main ()
10079{
10080void *x=symlink
10081 ;
10082 return 0;
10083}
10084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010085if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010086
Matthias Kloseb9621712010-04-24 17:59:49 +000010087$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010088
Matthias Kloseb159a552010-04-25 21:00:44 +000010089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010090$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010091else
Matthias Kloseb9621712010-04-24 17:59:49 +000010092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10093$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010094
10095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10098$as_echo_n "checking for fchdir... " >&6; }
10099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010100/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010101#include <unistd.h>
10102int
10103main ()
10104{
10105void *x=fchdir
10106 ;
10107 return 0;
10108}
10109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010110if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010111
Matthias Kloseb9621712010-04-24 17:59:49 +000010112$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010113
Matthias Kloseb159a552010-04-25 21:00:44 +000010114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010115$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010116else
Matthias Kloseb9621712010-04-24 17:59:49 +000010117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010119
10120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10123$as_echo_n "checking for fsync... " >&6; }
10124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010125/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010126#include <unistd.h>
10127int
10128main ()
10129{
10130void *x=fsync
10131 ;
10132 return 0;
10133}
10134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010135if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010136
Matthias Kloseb9621712010-04-24 17:59:49 +000010137$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010138
Matthias Kloseb159a552010-04-25 21:00:44 +000010139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010140$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010141else
Matthias Kloseb9621712010-04-24 17:59:49 +000010142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10143$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010144
10145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10148$as_echo_n "checking for fdatasync... " >&6; }
10149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010150/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010151#include <unistd.h>
10152int
10153main ()
10154{
10155void *x=fdatasync
10156 ;
10157 return 0;
10158}
10159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010160if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010161
Matthias Kloseb9621712010-04-24 17:59:49 +000010162$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010163
Matthias Kloseb159a552010-04-25 21:00:44 +000010164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010165$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010166else
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10168$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010169
10170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10173$as_echo_n "checking for epoll... " >&6; }
10174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010175/* end confdefs.h. */
10176#include <sys/epoll.h>
10177int
10178main ()
10179{
10180void *x=epoll_create
10181 ;
10182 return 0;
10183}
10184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010185if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010186
Matthias Kloseb9621712010-04-24 17:59:49 +000010187$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010188
Matthias Kloseb159a552010-04-25 21:00:44 +000010189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010190$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010191else
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010194
10195fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10198$as_echo_n "checking for epoll_create1... " >&6; }
10199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10200/* end confdefs.h. */
10201#include <sys/epoll.h>
10202int
10203main ()
10204{
10205void *x=epoll_create1
10206 ;
10207 return 0;
10208}
10209_ACEOF
10210if ac_fn_c_try_compile "$LINENO"; then :
10211
10212$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10213
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10215$as_echo "yes" >&6; }
10216else
10217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10218$as_echo "no" >&6; }
10219
10220fi
10221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10223$as_echo_n "checking for kqueue... " >&6; }
10224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010225/* end confdefs.h. */
10226
10227#include <sys/types.h>
10228#include <sys/event.h>
10229
10230int
10231main ()
10232{
10233int x=kqueue()
10234 ;
10235 return 0;
10236}
10237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010238if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010239
Matthias Kloseb9621712010-04-24 17:59:49 +000010240$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010241
Matthias Kloseb159a552010-04-25 21:00:44 +000010242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010243$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010244else
Matthias Kloseb9621712010-04-24 17:59:49 +000010245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10246$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010247
10248fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010250# On some systems (eg. FreeBSD 5), we would find a definition of the
10251# functions ctermid_r, setgroups in the library, but no prototype
10252# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10253# address to avoid compiler warnings and potential miscompilations
10254# because of the missing prototypes.
10255
Matthias Kloseb9621712010-04-24 17:59:49 +000010256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10257$as_echo_n "checking for ctermid_r... " >&6; }
10258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010259/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010260
Martin v. Löwisd5843682002-11-21 20:41:28 +000010261#include <stdio.h>
10262
Martin v. Löwisd5843682002-11-21 20:41:28 +000010263int
10264main ()
10265{
10266void* p = ctermid_r
10267 ;
10268 return 0;
10269}
10270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010272
Matthias Kloseb9621712010-04-24 17:59:49 +000010273$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010274
Matthias Kloseb159a552010-04-25 21:00:44 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010276$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010277else
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010280
10281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10283
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10285$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010286if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010287 $as_echo_n "(cached) " >&6
10288else
10289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010290/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010291#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010292int
10293main ()
10294{
10295void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010296
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010297 ;
10298 return 0;
10299}
10300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010301if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010302 ac_cv_flock_decl=yes
10303else
10304 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010305
10306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010308
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010309fi
10310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10311$as_echo "$ac_cv_flock_decl" >&6; }
10312if test "x${ac_cv_flock_decl}" = xyes; then
10313 for ac_func in flock
10314do :
10315 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010316if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010317 cat >>confdefs.h <<_ACEOF
10318#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010319_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010320
Antoine Pitroua3000072010-09-07 14:52:42 +000010321else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010323$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010324if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010325 $as_echo_n "(cached) " >&6
10326else
10327 ac_check_lib_save_LIBS=$LIBS
10328LIBS="-lbsd $LIBS"
10329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10330/* end confdefs.h. */
10331
10332/* Override any GCC internal prototype to avoid an error.
10333 Use char because int might match the return type of a GCC
10334 builtin and then its argument prototype would still apply. */
10335#ifdef __cplusplus
10336extern "C"
10337#endif
10338char flock ();
10339int
10340main ()
10341{
10342return flock ();
10343 ;
10344 return 0;
10345}
10346_ACEOF
10347if ac_fn_c_try_link "$LINENO"; then :
10348 ac_cv_lib_bsd_flock=yes
10349else
10350 ac_cv_lib_bsd_flock=no
10351fi
10352rm -f core conftest.err conftest.$ac_objext \
10353 conftest$ac_exeext conftest.$ac_ext
10354LIBS=$ac_check_lib_save_LIBS
10355fi
10356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10357$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010358if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010359 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010360
10361
10362$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10363
10364
10365fi
10366
10367
10368fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010369done
10370
Antoine Pitroua3000072010-09-07 14:52:42 +000010371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372
Matthias Kloseb9621712010-04-24 17:59:49 +000010373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10374$as_echo_n "checking for getpagesize... " >&6; }
10375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010376/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010377
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010378#include <unistd.h>
10379
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010380int
10381main ()
10382{
10383void* p = getpagesize
10384 ;
10385 return 0;
10386}
10387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010389
Matthias Kloseb9621712010-04-24 17:59:49 +000010390$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010391
Matthias Kloseb159a552010-04-25 21:00:44 +000010392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010393$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010394else
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10396$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010397
10398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010400
Victor Stinner984890f2011-11-24 13:53:38 +010010401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10402$as_echo_n "checking for broken unsetenv... " >&6; }
10403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10404/* end confdefs.h. */
10405
10406#include <stdlib.h>
10407
10408int
10409main ()
10410{
10411int res = unsetenv("DUMMY")
10412 ;
10413 return 0;
10414}
10415_ACEOF
10416if ac_fn_c_try_compile "$LINENO"; then :
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
10419else
10420
10421$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10422
10423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10424$as_echo "yes" >&6; }
10425
10426fi
10427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10428
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010429for ac_prog in true
10430do
10431 # Extract the first word of "$ac_prog", so it can be a program name with args.
10432set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010435if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010437else
10438 if test -n "$TRUE"; then
10439 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10440else
10441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10442for as_dir in $PATH
10443do
10444 IFS=$as_save_IFS
10445 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +020010447 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 +000010448 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 $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 +000010450 break 2
10451 fi
10452done
Matthias Kloseb9621712010-04-24 17:59:49 +000010453 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010454IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010455
10456fi
10457fi
10458TRUE=$ac_cv_prog_TRUE
10459if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10461$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010462else
Matthias Kloseb9621712010-04-24 17:59:49 +000010463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10464$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010465fi
10466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010467
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010468 test -n "$TRUE" && break
10469done
10470test -n "$TRUE" || TRUE="/bin/true"
10471
10472
Matthias Kloseb9621712010-04-24 17:59:49 +000010473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10474$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010475if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010476 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010477else
10478 ac_check_lib_save_LIBS=$LIBS
10479LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010481/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010483/* Override any GCC internal prototype to avoid an error.
10484 Use char because int might match the return type of a GCC
10485 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010486#ifdef __cplusplus
10487extern "C"
10488#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010489char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010490int
10491main ()
10492{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010493return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010494 ;
10495 return 0;
10496}
10497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010498if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010499 ac_cv_lib_c_inet_aton=yes
10500else
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010503rm -f core conftest.err conftest.$ac_objext \
10504 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010505LIBS=$ac_check_lib_save_LIBS
10506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10508$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010509if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010510 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010511else
Matthias Kloseb9621712010-04-24 17:59:49 +000010512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10513$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010514if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010515 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010516else
10517 ac_check_lib_save_LIBS=$LIBS
10518LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010520/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010522/* Override any GCC internal prototype to avoid an error.
10523 Use char because int might match the return type of a GCC
10524 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010525#ifdef __cplusplus
10526extern "C"
10527#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010528char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010529int
10530main ()
10531{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010533 ;
10534 return 0;
10535}
10536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010537if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010538 ac_cv_lib_resolv_inet_aton=yes
10539else
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010542rm -f core conftest.err conftest.$ac_objext \
10543 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010544LIBS=$ac_check_lib_save_LIBS
10545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10547$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010548if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010549 cat >>confdefs.h <<_ACEOF
10550#define HAVE_LIBRESOLV 1
10551_ACEOF
10552
10553 LIBS="-lresolv $LIBS"
10554
10555fi
10556
10557
10558fi
10559
10560
Christian Heimesd0764e22007-12-04 15:00:33 +000010561# On Tru64, chflags seems to be present, but calling it will
10562# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10564$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010565if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010567else
Matthias Kloseb9621712010-04-24 17:59:49 +000010568 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010569 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010570else
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010572/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010573
Christian Heimesd0764e22007-12-04 15:00:33 +000010574#include <sys/stat.h>
10575#include <unistd.h>
10576int main(int argc, char*argv[])
10577{
10578 if(chflags(argv[0], 0) != 0)
10579 return 1;
10580 return 0;
10581}
Ned Deily3eb67d52011-06-28 00:00:28 -070010582
Christian Heimesd0764e22007-12-04 15:00:33 +000010583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010584if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010585 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010586else
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10590 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010591fi
10592
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10596$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010597if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010599if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010600 ac_cv_have_chflags="yes"
10601else
10602 ac_cv_have_chflags="no"
10603fi
10604
10605fi
10606if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010607
Matthias Kloseb9621712010-04-24 17:59:49 +000010608$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010609
10610fi
10611
Matthias Kloseb9621712010-04-24 17:59:49 +000010612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10613$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010614if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010616else
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010618 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010619else
Matthias Kloseb9621712010-04-24 17:59:49 +000010620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010621/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010622
Christian Heimesd0764e22007-12-04 15:00:33 +000010623#include <sys/stat.h>
10624#include <unistd.h>
10625int main(int argc, char*argv[])
10626{
10627 if(lchflags(argv[0], 0) != 0)
10628 return 1;
10629 return 0;
10630}
Ned Deily3eb67d52011-06-28 00:00:28 -070010631
Christian Heimesd0764e22007-12-04 15:00:33 +000010632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010633if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010634 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010635else
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10639 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010640fi
10641
10642
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10645$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010646if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010647 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010648if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010649 ac_cv_have_lchflags="yes"
10650else
10651 ac_cv_have_lchflags="no"
10652fi
10653
10654fi
10655if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010658
10659fi
10660
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010661case $ac_sys_system/$ac_sys_release in
10662Darwin/*)
10663 _CUR_CFLAGS="${CFLAGS}"
10664 _CUR_LDFLAGS="${LDFLAGS}"
10665 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10666 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10667 ;;
10668esac
10669
Matthias Kloseb9621712010-04-24 17:59:49 +000010670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10671$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010672if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010674else
10675 ac_check_lib_save_LIBS=$LIBS
10676LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010678/* end confdefs.h. */
10679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680/* Override any GCC internal prototype to avoid an error.
10681 Use char because int might match the return type of a GCC
10682 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010683#ifdef __cplusplus
10684extern "C"
10685#endif
10686char inflateCopy ();
10687int
10688main ()
10689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010691 ;
10692 return 0;
10693}
10694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010695if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010696 ac_cv_lib_z_inflateCopy=yes
10697else
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010700rm -f core conftest.err conftest.$ac_objext \
10701 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010702LIBS=$ac_check_lib_save_LIBS
10703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10705$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010706if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010707
Matthias Kloseb9621712010-04-24 17:59:49 +000010708$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010709
10710fi
10711
10712
10713case $ac_sys_system/$ac_sys_release in
10714Darwin/*)
10715 CFLAGS="${_CUR_CFLAGS}"
10716 LDFLAGS="${_CUR_LDFLAGS}"
10717 ;;
10718esac
10719
Matthias Kloseb9621712010-04-24 17:59:49 +000010720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10721$as_echo_n "checking for hstrerror... " >&6; }
10722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010723/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010724
Martin v. Löwise9416172003-05-03 10:12:45 +000010725#include <netdb.h>
10726
Martin v. Löwise9416172003-05-03 10:12:45 +000010727int
10728main ()
10729{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010730void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010731 ;
10732 return 0;
10733}
10734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010735if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010736
Matthias Kloseb9621712010-04-24 17:59:49 +000010737$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010738
Matthias Kloseb159a552010-04-25 21:00:44 +000010739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010740$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010741else
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10743$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010744
10745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010746rm -f core conftest.err conftest.$ac_objext \
10747 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10750$as_echo_n "checking for inet_aton... " >&6; }
10751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010752/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010753
Martin v. Löwis86d66262006-02-17 08:40:11 +000010754#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010755#include <sys/socket.h>
10756#include <netinet/in.h>
10757#include <arpa/inet.h>
10758
Martin v. Löwise9416172003-05-03 10:12:45 +000010759int
10760main ()
10761{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010762void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010763 ;
10764 return 0;
10765}
10766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010770
Matthias Kloseb159a552010-04-25 21:00:44 +000010771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010772$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010773else
Matthias Kloseb9621712010-04-24 17:59:49 +000010774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10775$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010776
10777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010778rm -f core conftest.err conftest.$ac_objext \
10779 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10782$as_echo_n "checking for inet_pton... " >&6; }
10783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010784/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010785
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010786#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010787#include <sys/socket.h>
10788#include <netinet/in.h>
10789#include <arpa/inet.h>
10790
Martin v. Löwise9416172003-05-03 10:12:45 +000010791int
10792main ()
10793{
10794void* p = inet_pton
10795 ;
10796 return 0;
10797}
10798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010799if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010800
Matthias Kloseb9621712010-04-24 17:59:49 +000010801$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010802
Matthias Kloseb159a552010-04-25 21:00:44 +000010803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010804$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010805else
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10807$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010808
10809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010811
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010812# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10814$as_echo_n "checking for setgroups... " >&6; }
10815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010816/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010817
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010818#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010819#ifdef HAVE_GRP_H
10820#include <grp.h>
10821#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010822
Martin v. Löwisd5843682002-11-21 20:41:28 +000010823int
10824main ()
10825{
10826void* p = setgroups
10827 ;
10828 return 0;
10829}
10830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010831if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010832
Matthias Kloseb9621712010-04-24 17:59:49 +000010833$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010834
Matthias Kloseb159a552010-04-25 21:00:44 +000010835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010836$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010837else
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10839$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010840
10841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010843
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010844# check for openpty and forkpty
10845
10846for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010847do :
10848 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010849if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010850 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010851#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010852_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010853
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010854else
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10856$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010857if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010859else
Martin v. Löwis11437992002-04-12 09:54:03 +000010860 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010861LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010865/* Override any GCC internal prototype to avoid an error.
10866 Use char because int might match the return type of a GCC
10867 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010868#ifdef __cplusplus
10869extern "C"
10870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010871char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010872int
10873main ()
10874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010875return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010876 ;
10877 return 0;
10878}
10879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010881 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010882else
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010885rm -f core conftest.err conftest.$ac_objext \
10886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010887LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10890$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010891if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010893 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010894else
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10896$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010897if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010899else
10900 ac_check_lib_save_LIBS=$LIBS
10901LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010903/* end confdefs.h. */
10904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905/* Override any GCC internal prototype to avoid an error.
10906 Use char because int might match the return type of a GCC
10907 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010908#ifdef __cplusplus
10909extern "C"
10910#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010911char openpty ();
10912int
10913main ()
10914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010915return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010916 ;
10917 return 0;
10918}
10919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010921 ac_cv_lib_bsd_openpty=yes
10922else
Matthias Kloseb9621712010-04-24 17:59:49 +000010923 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010925rm -f core conftest.err conftest.$ac_objext \
10926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010927LIBS=$ac_check_lib_save_LIBS
10928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10930$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010931if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010932 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010933 LIBS="$LIBS -lbsd"
10934fi
10935
10936
10937fi
10938
Fred Drake8cef4cf2000-06-28 16:40:38 +000010939
10940fi
10941done
10942
10943for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010944do :
10945 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010946if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010947 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010948#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010949_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010950
Fred Drake8cef4cf2000-06-28 16:40:38 +000010951else
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10953$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010954if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010956else
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010958LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962/* Override any GCC internal prototype to avoid an error.
10963 Use char because int might match the return type of a GCC
10964 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010965#ifdef __cplusplus
10966extern "C"
10967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010968char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010969int
10970main ()
10971{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 ;
10974 return 0;
10975}
10976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010977if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010979else
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010982rm -f core conftest.err conftest.$ac_objext \
10983 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010984LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10987$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010988if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010990 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010991else
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10993$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010994if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010996else
10997 ac_check_lib_save_LIBS=$LIBS
10998LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011000/* end confdefs.h. */
11001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002/* Override any GCC internal prototype to avoid an error.
11003 Use char because int might match the return type of a GCC
11004 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011005#ifdef __cplusplus
11006extern "C"
11007#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011008char forkpty ();
11009int
11010main ()
11011{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011012return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011013 ;
11014 return 0;
11015}
11016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011017if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011018 ac_cv_lib_bsd_forkpty=yes
11019else
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011022rm -f core conftest.err conftest.$ac_objext \
11023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011024LIBS=$ac_check_lib_save_LIBS
11025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11027$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011028if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011030 LIBS="$LIBS -lbsd"
11031fi
11032
11033
11034fi
11035
Fred Drake8cef4cf2000-06-28 16:40:38 +000011036
11037fi
11038done
11039
Jack Jansendd19cf82001-12-06 22:36:17 +000011040
Christian Heimesb186d002008-03-18 15:15:01 +000011041# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011042for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011043do :
11044 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011045if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011046 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011047#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011048_ACEOF
11049
11050fi
11051done
11052
11053
Michael W. Hudson54241132001-12-07 15:38:26 +000011054# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011055for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011056do :
11057 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11058ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011059if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011060 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011061#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011062_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011063
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011064fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011065done
11066
Michael W. Hudson54241132001-12-07 15:38:26 +000011067
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011068ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011069if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011070 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011071
Martin v. Löwis1142de32002-03-29 16:28:31 +000011072else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011074 *" dup2.$ac_objext "* ) ;;
11075 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011076 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011077esac
11078
Martin v. Löwis1142de32002-03-29 16:28:31 +000011079fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011080
11081ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011082if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011083 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11084
11085else
11086 case " $LIBOBJS " in
11087 *" getcwd.$ac_objext "* ) ;;
11088 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11089 ;;
11090esac
11091
11092fi
11093
11094ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011095if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011096 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11097
11098else
11099 case " $LIBOBJS " in
11100 *" strdup.$ac_objext "* ) ;;
11101 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11102 ;;
11103esac
11104
11105fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011106
11107
11108for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011109do :
11110 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011111if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011113#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011116/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011117#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011118int
11119main ()
11120{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011121getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 ;
11123 return 0;
11124}
11125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011126if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011127
Matthias Kloseb9621712010-04-24 17:59:49 +000011128$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011129
Guido van Rossum627b2d71993-12-24 10:39:16 +000011130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011132
Guido van Rossum627b2d71993-12-24 10:39:16 +000011133fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011134done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011135
Jack Jansen150753c2003-03-29 22:07:47 +000011136for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011137do :
11138 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011139if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011140 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011141#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011144/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011145#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011146int
11147main ()
11148{
11149setpgrp(0,0);
11150 ;
11151 return 0;
11152}
11153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011154if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011155
Matthias Kloseb9621712010-04-24 17:59:49 +000011156$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011157
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011160
11161fi
11162done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011163
Thomas Wouters3a584202000-08-05 23:28:51 +000011164for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011165do :
11166 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011167if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011168 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011169#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011172/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011173#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011174int
11175main ()
11176{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011177gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 ;
11179 return 0;
11180}
11181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011182if ac_fn_c_try_compile "$LINENO"; then :
11183
Guido van Rossum627b2d71993-12-24 10:39:16 +000011184else
Skip Montanaro6dead952003-09-25 14:50:04 +000011185
Matthias Kloseb9621712010-04-24 17:59:49 +000011186$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011187
Martin v. Löwis11437992002-04-12 09:54:03 +000011188
Guido van Rossum627b2d71993-12-24 10:39:16 +000011189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011191
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011192fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011193done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011194
Michael W. Hudson54241132001-12-07 15:38:26 +000011195
Victor Stinnere0be4232011-10-25 13:06:09 +020011196for ac_func in clock_gettime
11197do :
11198 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11199if test "x$ac_cv_func_clock_gettime" = xyes; then :
11200 cat >>confdefs.h <<_ACEOF
11201#define HAVE_CLOCK_GETTIME 1
11202_ACEOF
11203
11204else
11205
11206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11207$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11208if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11209 $as_echo_n "(cached) " >&6
11210else
11211 ac_check_lib_save_LIBS=$LIBS
11212LIBS="-lrt $LIBS"
11213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11214/* end confdefs.h. */
11215
11216/* Override any GCC internal prototype to avoid an error.
11217 Use char because int might match the return type of a GCC
11218 builtin and then its argument prototype would still apply. */
11219#ifdef __cplusplus
11220extern "C"
11221#endif
11222char clock_gettime ();
11223int
11224main ()
11225{
11226return clock_gettime ();
11227 ;
11228 return 0;
11229}
11230_ACEOF
11231if ac_fn_c_try_link "$LINENO"; then :
11232 ac_cv_lib_rt_clock_gettime=yes
11233else
11234 ac_cv_lib_rt_clock_gettime=no
11235fi
11236rm -f core conftest.err conftest.$ac_objext \
11237 conftest$ac_exeext conftest.$ac_ext
11238LIBS=$ac_check_lib_save_LIBS
11239fi
11240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11241$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11242if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11243
11244 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11245
11246
11247$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11248
11249
11250fi
11251
11252
11253fi
11254done
11255
11256
11257for ac_func in clock_getres
11258do :
11259 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11260if test "x$ac_cv_func_clock_getres" = xyes; then :
11261 cat >>confdefs.h <<_ACEOF
11262#define HAVE_CLOCK_GETRES 1
11263_ACEOF
11264
11265else
11266
11267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11268$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11269if ${ac_cv_lib_rt_clock_getres+:} false; then :
11270 $as_echo_n "(cached) " >&6
11271else
11272 ac_check_lib_save_LIBS=$LIBS
11273LIBS="-lrt $LIBS"
11274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11275/* end confdefs.h. */
11276
11277/* Override any GCC internal prototype to avoid an error.
11278 Use char because int might match the return type of a GCC
11279 builtin and then its argument prototype would still apply. */
11280#ifdef __cplusplus
11281extern "C"
11282#endif
11283char clock_getres ();
11284int
11285main ()
11286{
11287return clock_getres ();
11288 ;
11289 return 0;
11290}
11291_ACEOF
11292if ac_fn_c_try_link "$LINENO"; then :
11293 ac_cv_lib_rt_clock_getres=yes
11294else
11295 ac_cv_lib_rt_clock_getres=no
11296fi
11297rm -f core conftest.err conftest.$ac_objext \
11298 conftest$ac_exeext conftest.$ac_ext
11299LIBS=$ac_check_lib_save_LIBS
11300fi
11301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11302$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11303if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11304
11305 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11306
11307
11308fi
11309
11310
11311fi
11312done
11313
11314
Matthias Kloseb9621712010-04-24 17:59:49 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11316$as_echo_n "checking for major... " >&6; }
11317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011318/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011319
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011320#if defined(MAJOR_IN_MKDEV)
11321#include <sys/mkdev.h>
11322#elif defined(MAJOR_IN_SYSMACROS)
11323#include <sys/sysmacros.h>
11324#else
11325#include <sys/types.h>
11326#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011327
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011328int
11329main ()
11330{
11331
11332 makedev(major(0),minor(0));
11333
11334 ;
11335 return 0;
11336}
11337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011338if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011339
11340
Matthias Kloseb9621712010-04-24 17:59:49 +000011341$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011342
Matthias Kloseb9621712010-04-24 17:59:49 +000011343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11344$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011345
11346else
Skip Montanaro6dead952003-09-25 14:50:04 +000011347
Matthias Kloseb9621712010-04-24 17:59:49 +000011348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11349$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011350
11351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011352rm -f core conftest.err conftest.$ac_objext \
11353 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011354
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011355# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011356# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11358$as_echo_n "checking for getaddrinfo... " >&6; }
11359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011360/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011361
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011362#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011363#include <sys/socket.h>
11364#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011365#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011366
Martin v. Löwis11437992002-04-12 09:54:03 +000011367int
11368main ()
11369{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011370getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011371 ;
11372 return 0;
11373}
11374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011375if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011376 have_getaddrinfo=yes
11377else
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011380rm -f core conftest.err conftest.$ac_objext \
11381 conftest$ac_exeext conftest.$ac_ext
11382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11383$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011384if test $have_getaddrinfo = yes
11385then
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11387$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011388 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011389 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011390else
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011392
11393if test "${enable_ipv6+set}" = set; then
11394 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11395else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011396 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011397fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011398else
Matthias Kloseb9621712010-04-24 17:59:49 +000011399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011400/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011401
11402#include <sys/types.h>
11403#include <netdb.h>
11404#include <string.h>
11405#include <sys/socket.h>
11406#include <netinet/in.h>
11407
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011408int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011409{
11410 int passive, gaierr, inet4 = 0, inet6 = 0;
11411 struct addrinfo hints, *ai, *aitop;
11412 char straddr[INET6_ADDRSTRLEN], strport[16];
11413
11414 for (passive = 0; passive <= 1; passive++) {
11415 memset(&hints, 0, sizeof(hints));
11416 hints.ai_family = AF_UNSPEC;
11417 hints.ai_flags = passive ? AI_PASSIVE : 0;
11418 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011419 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011420 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11421 (void)gai_strerror(gaierr);
11422 goto bad;
11423 }
11424 for (ai = aitop; ai; ai = ai->ai_next) {
11425 if (ai->ai_addr == NULL ||
11426 ai->ai_addrlen == 0 ||
11427 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11428 straddr, sizeof(straddr), strport, sizeof(strport),
11429 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11430 goto bad;
11431 }
11432 switch (ai->ai_family) {
11433 case AF_INET:
11434 if (strcmp(strport, "54321") != 0) {
11435 goto bad;
11436 }
11437 if (passive) {
11438 if (strcmp(straddr, "0.0.0.0") != 0) {
11439 goto bad;
11440 }
11441 } else {
11442 if (strcmp(straddr, "127.0.0.1") != 0) {
11443 goto bad;
11444 }
11445 }
11446 inet4++;
11447 break;
11448 case AF_INET6:
11449 if (strcmp(strport, "54321") != 0) {
11450 goto bad;
11451 }
11452 if (passive) {
11453 if (strcmp(straddr, "::") != 0) {
11454 goto bad;
11455 }
11456 } else {
11457 if (strcmp(straddr, "::1") != 0) {
11458 goto bad;
11459 }
11460 }
11461 inet6++;
11462 break;
11463 case AF_UNSPEC:
11464 goto bad;
11465 break;
11466 default:
11467 /* another family support? */
11468 break;
11469 }
11470 }
11471 }
11472
11473 if (!(inet4 == 0 || inet4 == 2))
11474 goto bad;
11475 if (!(inet6 == 0 || inet6 == 2))
11476 goto bad;
11477
11478 if (aitop)
11479 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011480 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011481
11482 bad:
11483 if (aitop)
11484 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011485 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011486}
11487
Martin v. Löwis11437992002-04-12 09:54:03 +000011488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011489if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011490 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011491else
Matthias Kloseb9621712010-04-24 17:59:49 +000011492 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011498fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011499
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11503$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11504
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011505if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011506then
11507 if test $ipv6 = yes
11508 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011509 echo 'Fatal: You must get working getaddrinfo() function.'
11510 echo ' or you can specify "--disable-ipv6"'.
11511 exit 1
11512 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011513else
Martin v. Löwis11437992002-04-12 09:54:03 +000011514
Matthias Kloseb9621712010-04-24 17:59:49 +000011515$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011516
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011517fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011518
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011519for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011520do :
11521 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011522if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011524#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011525_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011526
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011527fi
11528done
11529
Michael W. Hudson54241132001-12-07 15:38:26 +000011530
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011531# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11533$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011534if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011536else
Matthias Kloseb9621712010-04-24 17:59:49 +000011537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011538/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011539#include <sys/types.h>
11540#include <sys/time.h>
11541#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011542
Martin v. Löwis11437992002-04-12 09:54:03 +000011543int
11544main ()
11545{
11546if ((struct tm *) 0)
11547return 0;
11548 ;
11549 return 0;
11550}
11551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011552if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011553 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011554else
Matthias Kloseb9621712010-04-24 17:59:49 +000011555 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11560$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011561if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011562
Matthias Kloseb9621712010-04-24 17:59:49 +000011563$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011564
11565fi
11566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11568$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011569if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011570 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011571else
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011573/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011574#include <sys/types.h>
11575#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011576
Martin v. Löwis11437992002-04-12 09:54:03 +000011577int
11578main ()
11579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011580struct tm tm;
11581 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011582 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 ;
11584 return 0;
11585}
11586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011587if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011588 ac_cv_struct_tm=time.h
11589else
Matthias Kloseb9621712010-04-24 17:59:49 +000011590 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11595$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011596if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011597
Matthias Kloseb9621712010-04-24 17:59:49 +000011598$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011599
11600fi
11601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602ac_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 +000011603#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011604
Matthias Kloseb9621712010-04-24 17:59:49 +000011605"
Victor Stinnere0be4232011-10-25 13:06:09 +020011606if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011607
11608cat >>confdefs.h <<_ACEOF
11609#define HAVE_STRUCT_TM_TM_ZONE 1
11610_ACEOF
11611
11612
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011613fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011614
Martin v. Löwis11437992002-04-12 09:54:03 +000011615if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11616
Matthias Kloseb9621712010-04-24 17:59:49 +000011617$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011618
11619else
Matthias Kloseb9621712010-04-24 17:59:49 +000011620 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11621"
Victor Stinnere0be4232011-10-25 13:06:09 +020011622if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624else
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011626fi
11627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011628cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011629#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011630_ACEOF
11631
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11633$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011634if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011635 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011636else
Matthias Kloseb9621712010-04-24 17:59:49 +000011637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011638/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011639#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011640#if !HAVE_DECL_TZNAME
11641extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011643
Martin v. Löwis11437992002-04-12 09:54:03 +000011644int
11645main ()
11646{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011647return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 ;
11649 return 0;
11650}
11651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011653 ac_cv_var_tzname=yes
11654else
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011657rm -f core conftest.err conftest.$ac_objext \
11658 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11661$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011662 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011665
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011666 fi
11667fi
11668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669ac_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 +020011670if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011671
11672cat >>confdefs.h <<_ACEOF
11673#define HAVE_STRUCT_STAT_ST_RDEV 1
11674_ACEOF
11675
11676
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011677fi
11678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679ac_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 +020011680if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011681
Martin v. Löwis11437992002-04-12 09:54:03 +000011682cat >>confdefs.h <<_ACEOF
11683#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11684_ACEOF
11685
11686
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011687fi
11688
Matthias Kloseb9621712010-04-24 17:59:49 +000011689ac_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 +020011690if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011691
11692cat >>confdefs.h <<_ACEOF
11693#define HAVE_STRUCT_STAT_ST_FLAGS 1
11694_ACEOF
11695
11696
11697fi
11698
Matthias Kloseb9621712010-04-24 17:59:49 +000011699ac_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 +020011700if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011701
11702cat >>confdefs.h <<_ACEOF
11703#define HAVE_STRUCT_STAT_ST_GEN 1
11704_ACEOF
11705
11706
11707fi
11708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709ac_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 +020011710if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011711
11712cat >>confdefs.h <<_ACEOF
11713#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11714_ACEOF
11715
11716
11717fi
11718
Matthias Kloseb9621712010-04-24 17:59:49 +000011719ac_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 +020011720if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011721
Martin v. Löwis11437992002-04-12 09:54:03 +000011722cat >>confdefs.h <<_ACEOF
11723#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11724_ACEOF
11725
11726
Matthias Kloseb9621712010-04-24 17:59:49 +000011727$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011728
11729else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011730 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011731 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011732 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11733 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011734esac
11735
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011736fi
11737
Michael W. Hudson54241132001-12-07 15:38:26 +000011738
Martin v. Löwis11437992002-04-12 09:54:03 +000011739
Matthias Kloseb9621712010-04-24 17:59:49 +000011740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11741$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011742if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011744else
Matthias Kloseb159a552010-04-25 21:00:44 +000011745
Matthias Kloseb9621712010-04-24 17:59:49 +000011746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011747/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011748#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011749int
11750main ()
11751{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011752return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011753 ;
11754 return 0;
11755}
11756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011757if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011758 ac_cv_header_time_altzone=yes
11759else
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011764fi
11765
Matthias Kloseb9621712010-04-24 17:59:49 +000011766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11767$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011768if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011769
Matthias Kloseb9621712010-04-24 17:59:49 +000011770$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011771
11772fi
11773
Guido van Rossumda88dad1995-01-26 00:46:29 +000011774was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11776$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011778/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011779
11780#include <sys/types.h>
11781#include <sys/select.h>
11782#include <sys/time.h>
11783
Martin v. Löwis11437992002-04-12 09:54:03 +000011784int
11785main ()
11786{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011787;
Martin v. Löwis11437992002-04-12 09:54:03 +000011788 ;
11789 return 0;
11790}
11791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011792if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011793
11794
Matthias Kloseb9621712010-04-24 17:59:49 +000011795$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011796
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011797 was_it_defined=yes
11798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11802$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011803
Matthias Kloseb9621712010-04-24 17:59:49 +000011804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11805$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011806if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011807 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011808else
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011810/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011811#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011812int
11813main ()
11814{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011815struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011816 ;
11817 return 0;
11818}
11819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011820if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011821 ac_cv_struct_addrinfo=yes
11822else
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11826fi
11827
Matthias Kloseb9621712010-04-24 17:59:49 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11829$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011830if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011833
11834fi
11835
Matthias Kloseb9621712010-04-24 17:59:49 +000011836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11837$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011838if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011840else
Matthias Kloseb9621712010-04-24 17:59:49 +000011841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011842/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011843
11844# include <sys/types.h>
11845# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011846int
11847main ()
11848{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011849struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011850 ;
11851 return 0;
11852}
11853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011854if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011855 ac_cv_struct_sockaddr_storage=yes
11856else
Matthias Kloseb9621712010-04-24 17:59:49 +000011857 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11860fi
11861
Matthias Kloseb9621712010-04-24 17:59:49 +000011862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11863$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011864if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011865
Matthias Kloseb9621712010-04-24 17:59:49 +000011866$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011867
11868fi
11869
Guido van Rossum627b2d71993-12-24 10:39:16 +000011870# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011871
Matthias Kloseb9621712010-04-24 17:59:49 +000011872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11873$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011874if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011876else
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011879$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011880int
11881main ()
11882{
11883static int test_array [1 - 2 * !(((char) -1) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011884test_array [0] = 0
Martin v. Löwis11437992002-04-12 09:54:03 +000011885
11886 ;
11887 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011888}
Martin v. Löwis11437992002-04-12 09:54:03 +000011889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011890if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011891 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011892else
Matthias Kloseb9621712010-04-24 17:59:49 +000011893 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11898$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011899if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011901
11902fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011903
Matthias Kloseb9621712010-04-24 17:59:49 +000011904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11905$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011906if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011908else
Matthias Kloseb9621712010-04-24 17:59:49 +000011909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011910/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011911
Martin v. Löwis11437992002-04-12 09:54:03 +000011912int
11913main ()
11914{
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011915/* FIXME: Include the comments suggested by Paul. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011916#ifndef __cplusplus
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011917 /* Ultrix mips cc rejects this. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 typedef int charset[2];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011919 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011920 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011921 char const *const *pcpcc;
11922 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011923 /* NEC SVR4.0.2 mips cc rejects this. */
11924 struct point {int x, y;};
11925 static struct point const zero = {0,0};
11926 /* AIX XL C 1.02.0.0 rejects this.
11927 It does not let you subtract one const X* pointer from another in
11928 an arm of an if-expression whose if-part is not a constant
11929 expression */
11930 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011931 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011932 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011933 ++pcpcc;
11934 ppc = (char**) pcpcc;
11935 pcpcc = (char const *const *) ppc;
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011936 { /* SCO 3.2v4 cc rejects this. */
11937 char *t;
Martin v. Löwis11437992002-04-12 09:54:03 +000011938 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011939
Martin v. Löwis11437992002-04-12 09:54:03 +000011940 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011941 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011942 }
11943 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11944 int x[] = {25, 17};
11945 const int *foo = &x[0];
11946 ++foo;
11947 }
11948 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11949 typedef const int *iptr;
11950 iptr p = 0;
11951 ++p;
11952 }
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011953 { /* AIX XL C 1.02.0.0 rejects this saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011954 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011955 struct s { int j; const int *ap[3]; };
11956 struct s *b; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011957 }
11958 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11959 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011960 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011961 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011962 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011963#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011964
Martin v. Löwis11437992002-04-12 09:54:03 +000011965 ;
11966 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011967}
Martin v. Löwis11437992002-04-12 09:54:03 +000011968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011969if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011970 ac_cv_c_const=yes
11971else
Matthias Kloseb9621712010-04-24 17:59:49 +000011972 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11977$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011978if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011979
Matthias Kloseb9621712010-04-24 17:59:49 +000011980$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011981
11982fi
11983
Michael W. Hudson54241132001-12-07 15:38:26 +000011984
Guido van Rossumda88dad1995-01-26 00:46:29 +000011985works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11987$as_echo_n "checking for working volatile... " >&6; }
11988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011989/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011990
Martin v. Löwis11437992002-04-12 09:54:03 +000011991int
11992main ()
11993{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011994volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011995 ;
11996 return 0;
11997}
11998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011999if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012000 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012001else
Skip Montanaro6dead952003-09-25 14:50:04 +000012002
Matthias Kloseb9621712010-04-24 17:59:49 +000012003$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012004
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012005
Guido van Rossum627b2d71993-12-24 10:39:16 +000012006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12009$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012010
Guido van Rossumda88dad1995-01-26 00:46:29 +000012011works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12013$as_echo_n "checking for working signed char... " >&6; }
12014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012015/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012016
Martin v. Löwis11437992002-04-12 09:54:03 +000012017int
12018main ()
12019{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012020signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012021 ;
12022 return 0;
12023}
12024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012025if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012026 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012027else
Skip Montanaro6dead952003-09-25 14:50:04 +000012028
Matthias Kloseb9621712010-04-24 17:59:49 +000012029$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012030
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012031
Guido van Rossum7f43da71994-08-01 12:15:30 +000012032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12035$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012036
Guido van Rossumda88dad1995-01-26 00:46:29 +000012037have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12039$as_echo_n "checking for prototypes... " >&6; }
12040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012041/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012042int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012043int
12044main ()
12045{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012046return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012047 ;
12048 return 0;
12049}
12050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012051if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012054
Matthias Kloseb159a552010-04-25 21:00:44 +000012055 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12059$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012060
Guido van Rossumda88dad1995-01-26 00:46:29 +000012061works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12063$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012065/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012066
12067#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012068int foo(int x, ...) {
12069 va_list va;
12070 va_start(va, x);
12071 va_arg(va, int);
12072 va_arg(va, char *);
12073 va_arg(va, double);
12074 return 0;
12075}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012076
Martin v. Löwis11437992002-04-12 09:54:03 +000012077int
12078main ()
12079{
Guido van Rossum90eea071996-08-30 20:58:57 +000012080return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012081 ;
12082 return 0;
12083}
12084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012085if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012086
12087
Matthias Kloseb9621712010-04-24 17:59:49 +000012088$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012089
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012090 works=yes
12091
Guido van Rossum627b2d71993-12-24 10:39:16 +000012092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12095$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012096
Martin v. Löwisd6320502004-08-12 13:45:08 +000012097# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12099$as_echo_n "checking for socketpair... " >&6; }
12100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012101/* end confdefs.h. */
12102
12103#include <sys/types.h>
12104#include <sys/socket.h>
12105
12106int
12107main ()
12108{
12109void *x=socketpair
12110 ;
12111 return 0;
12112}
12113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012115
Matthias Kloseb9621712010-04-24 17:59:49 +000012116$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012117
Matthias Kloseb159a552010-04-25 21:00:44 +000012118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012119$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12122$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012123
12124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012126
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012127# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12129$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012131/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012132#include <sys/types.h>
12133#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012134int
12135main ()
12136{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012137struct sockaddr x;
12138x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012139 ;
12140 return 0;
12141}
12142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012143if ac_fn_c_try_compile "$LINENO"; then :
12144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12145$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012146
Matthias Kloseb9621712010-04-24 17:59:49 +000012147$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012148
12149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12151$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012152
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012155
Guido van Rossumda88dad1995-01-26 00:46:29 +000012156va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12158$as_echo_n "checking whether va_list is an array... " >&6; }
12159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012160/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012161
12162#ifdef HAVE_STDARG_PROTOTYPES
12163#include <stdarg.h>
12164#else
12165#include <varargs.h>
12166#endif
12167
Martin v. Löwis11437992002-04-12 09:54:03 +000012168int
12169main ()
12170{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 ;
12173 return 0;
12174}
12175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012176if ac_fn_c_try_compile "$LINENO"; then :
12177
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012178else
Skip Montanaro6dead952003-09-25 14:50:04 +000012179
Martin v. Löwis11437992002-04-12 09:54:03 +000012180
Matthias Kloseb9621712010-04-24 17:59:49 +000012181$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012182
Guido van Rossumda88dad1995-01-26 00:46:29 +000012183 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012184
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12188$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012189
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012190# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012191
12192
Matthias Kloseb9621712010-04-24 17:59:49 +000012193ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012194if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012195
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012197
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12199$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012200 OLD_CFLAGS=$CFLAGS
12201 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012203/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012204
12205# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012206
Martin v. Löwis11437992002-04-12 09:54:03 +000012207int
12208main ()
12209{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012210
12211 char *name;
12212 struct hostent *he, *res;
12213 char buffer[2048];
12214 int buflen = 2048;
12215 int h_errnop;
12216
12217 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012218
12219 ;
12220 return 0;
12221}
12222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012223if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012224
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012226
Martin v. Löwis11437992002-04-12 09:54:03 +000012227
Matthias Kloseb9621712010-04-24 17:59:49 +000012228$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12231$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012232
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012233else
Skip Montanaro6dead952003-09-25 14:50:04 +000012234
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12236$as_echo "no" >&6; }
12237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12238$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012240/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012241
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012242# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012243
Martin v. Löwis11437992002-04-12 09:54:03 +000012244int
12245main ()
12246{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012247
12248 char *name;
12249 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012250 char buffer[2048];
12251 int buflen = 2048;
12252 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012253
Matthias Kloseb159a552010-04-25 21:00:44 +000012254 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
12256 ;
12257 return 0;
12258}
12259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012261
Matthias Kloseb9621712010-04-24 17:59:49 +000012262 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012263
Martin v. Löwis11437992002-04-12 09:54:03 +000012264
Matthias Kloseb159a552010-04-25 21:00:44 +000012265$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012266
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12268$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012270else
Skip Montanaro6dead952003-09-25 14:50:04 +000012271
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12273$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12275$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12277/* end confdefs.h. */
12278
12279# include <netdb.h>
12280
12281int
12282main ()
12283{
12284
12285 char *name;
12286 struct hostent *he;
12287 struct hostent_data data;
12288
12289 (void) gethostbyname_r(name, he, &data);
12290
12291 ;
12292 return 0;
12293}
12294_ACEOF
12295if ac_fn_c_try_compile "$LINENO"; then :
12296
12297 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12298
12299
12300$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12301
12302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12303$as_echo "yes" >&6; }
12304
12305else
12306
12307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12308$as_echo "no" >&6; }
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
Martin v. Löwis11437992002-04-12 09:54:03 +000012315
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012318 CFLAGS=$OLD_CFLAGS
12319
12320else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012321
Matthias Kloseb9621712010-04-24 17:59:49 +000012322 for ac_func in gethostbyname
12323do :
12324 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012325if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012326 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012327#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012328_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012329
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012330fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012331done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012332
Michael W. Hudson54241132001-12-07 15:38:26 +000012333
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012334fi
12335
Michael W. Hudson54241132001-12-07 15:38:26 +000012336
12337
12338
12339
12340
12341
Guido van Rossum627b2d71993-12-24 10:39:16 +000012342# checks for system services
12343# (none yet)
12344
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012345# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012346ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012347if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012348
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012349else
Matthias Kloseb9621712010-04-24 17:59:49 +000012350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12351$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012352if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012354else
Martin v. Löwis11437992002-04-12 09:54:03 +000012355 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012356LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360/* Override any GCC internal prototype to avoid an error.
12361 Use char because int might match the return type of a GCC
12362 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012363#ifdef __cplusplus
12364extern "C"
12365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012366char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012367int
12368main ()
12369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 ;
12372 return 0;
12373}
12374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012375if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012376 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012377else
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012380rm -f core conftest.err conftest.$ac_objext \
12381 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012382LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12385$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012386if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012387 cat >>confdefs.h <<_ACEOF
12388#define HAVE_LIBIEEE 1
12389_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012390
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012391 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012392
Guido van Rossum627b2d71993-12-24 10:39:16 +000012393fi
12394
Michael W. Hudson54241132001-12-07 15:38:26 +000012395
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012396fi
12397
Michael W. Hudson54241132001-12-07 15:38:26 +000012398
Guido van Rossum7f253911997-05-09 02:42:48 +000012399# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12401$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012403# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012404if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012405 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012406if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012407then
12408
Matthias Kloseb9621712010-04-24 17:59:49 +000012409$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12412$as_echo "yes" >&6; }
12413else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12414$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012415fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012416else
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12418$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419fi
12420
Guido van Rossum7f253911997-05-09 02:42:48 +000012421
Guido van Rossum7f43da71994-08-01 12:15:30 +000012422# check for --with-libm=...
12423
Guido van Rossum563e7081996-09-10 18:20:48 +000012424case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012425Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012426*) LIBM=-lm
12427esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12429$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012432if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012434if test "$withval" = no
12435then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12437$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012438elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012439then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12441$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012442else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012443fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012444else
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12446$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447fi
12448
Guido van Rossum7f43da71994-08-01 12:15:30 +000012449
12450# check for --with-libc=...
12451
Matthias Kloseb9621712010-04-24 17:59:49 +000012452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12453$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012456if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012458if test "$withval" = no
12459then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12461$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012462elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012463then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12465$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012466else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012467fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012468else
Matthias Kloseb9621712010-04-24 17:59:49 +000012469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12470$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471fi
12472
Guido van Rossum7f43da71994-08-01 12:15:30 +000012473
Stefan Krah1919b7e2012-03-21 18:25:23 +010012474# **************************************
12475# * Check for gcc x64 inline assembler *
12476# **************************************
12477
12478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12479$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12481/* end confdefs.h. */
12482
12483int
12484main ()
12485{
12486
12487 __asm__ __volatile__ ("movq %rcx, %rax");
12488
12489 ;
12490 return 0;
12491}
12492_ACEOF
12493if ac_fn_c_try_compile "$LINENO"; then :
12494 have_gcc_asm_for_x64=yes
12495else
12496 have_gcc_asm_for_x64=no
12497fi
12498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12500$as_echo "$have_gcc_asm_for_x64" >&6; }
12501if test "$have_gcc_asm_for_x64" = yes
12502then
12503
12504$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12505
12506fi
12507
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012508# **************************************************
12509# * Check for various properties of floating point *
12510# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012511
Matthias Kloseb9621712010-04-24 17:59:49 +000012512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12513$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012514if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012516else
12517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012519 ac_cv_little_endian_double=no
12520else
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012522/* end confdefs.h. */
12523
12524#include <string.h>
12525int main() {
12526 double x = 9006104071832581.0;
12527 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12528 return 0;
12529 else
12530 return 1;
12531}
12532
12533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012534if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012535 ac_cv_little_endian_double=yes
12536else
Matthias Kloseb9621712010-04-24 17:59:49 +000012537 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12540 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012541fi
12542
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012543fi
12544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12546$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012547if test "$ac_cv_little_endian_double" = yes
12548then
12549
Matthias Kloseb9621712010-04-24 17:59:49 +000012550$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012551
12552fi
12553
Matthias Kloseb9621712010-04-24 17:59:49 +000012554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12555$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012556if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012558else
12559
Matthias Kloseb9621712010-04-24 17:59:49 +000012560if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012561 ac_cv_big_endian_double=no
12562else
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012564/* end confdefs.h. */
12565
12566#include <string.h>
12567int main() {
12568 double x = 9006104071832581.0;
12569 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12570 return 0;
12571 else
12572 return 1;
12573}
12574
12575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012576if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012577 ac_cv_big_endian_double=yes
12578else
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012580fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12582 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012583fi
12584
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012585fi
12586
Matthias Kloseb9621712010-04-24 17:59:49 +000012587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12588$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012589if test "$ac_cv_big_endian_double" = yes
12590then
12591
Matthias Kloseb9621712010-04-24 17:59:49 +000012592$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012593
12594fi
12595
12596# Some ARM platforms use a mixed-endian representation for doubles.
12597# While Python doesn't currently have full support for these platforms
12598# (see e.g., issue 1762561), we can at least make sure that float <-> string
12599# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12601$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012602if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012604else
12605
Matthias Kloseb9621712010-04-24 17:59:49 +000012606if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012607 ac_cv_mixed_endian_double=no
12608else
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012610/* end confdefs.h. */
12611
12612#include <string.h>
12613int main() {
12614 double x = 9006104071832581.0;
12615 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12616 return 0;
12617 else
12618 return 1;
12619}
12620
12621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012622if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012623 ac_cv_mixed_endian_double=yes
12624else
Matthias Kloseb9621712010-04-24 17:59:49 +000012625 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12628 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012629fi
12630
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012631fi
12632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12634$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012635if test "$ac_cv_mixed_endian_double" = yes
12636then
12637
Matthias Kloseb9621712010-04-24 17:59:49 +000012638$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012639
12640fi
12641
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012642# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012643# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012644# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012645# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012646# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012647# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012648
12649# This inline assembler syntax may also work for suncc and icc,
12650# so we try it on all platforms.
12651
Matthias Kloseb9621712010-04-24 17:59:49 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12653$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012655/* end confdefs.h. */
12656
12657int
12658main ()
12659{
12660
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012661 unsigned short cw;
12662 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12663 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012664
12665 ;
12666 return 0;
12667}
12668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012669if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012670 have_gcc_asm_for_x87=yes
12671else
Matthias Kloseb9621712010-04-24 17:59:49 +000012672 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012673fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12676$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012677if test "$have_gcc_asm_for_x87" = yes
12678then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012679
Matthias Kloseb9621712010-04-24 17:59:49 +000012680$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012681
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012682fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012683
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012684# Detect whether system arithmetic is subject to x87-style double
12685# rounding issues. The result of this test has little meaning on non
12686# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12687# mode is round-to-nearest and double rounding issues are present, and
12688# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12690$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012691# $BASECFLAGS may affect the result
12692ac_save_cc="$CC"
12693CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012694if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012695 ac_cv_x87_double_rounding=no
12696else
Matthias Kloseb9621712010-04-24 17:59:49 +000012697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012698/* end confdefs.h. */
12699
12700#include <stdlib.h>
12701#include <math.h>
12702int main() {
12703 volatile double x, y, z;
12704 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12705 x = 0.99999999999999989; /* 1-2**-53 */
12706 y = 1./x;
12707 if (y != 1.)
12708 exit(0);
12709 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12710 x = 1e16;
12711 y = 2.99999;
12712 z = x + y;
12713 if (z != 1e16+4.)
12714 exit(0);
12715 /* both tests show evidence of double rounding */
12716 exit(1);
12717}
12718
12719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012720if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012721 ac_cv_x87_double_rounding=no
12722else
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12726 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012727fi
12728
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012729CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12731$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012732if test "$ac_cv_x87_double_rounding" = yes
12733then
12734
Matthias Kloseb9621712010-04-24 17:59:49 +000012735$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012736
12737fi
12738
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012739# ************************************
12740# * Check for mathematical functions *
12741# ************************************
12742
12743LIBS_SAVE=$LIBS
12744LIBS="$LIBS $LIBM"
12745
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012746for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12747do :
12748 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12749ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012750if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012751 cat >>confdefs.h <<_ACEOF
12752#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12753_ACEOF
12754
12755fi
12756done
12757
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012758for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012759do :
12760 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12761ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012762if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012763 cat >>confdefs.h <<_ACEOF
12764#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12765_ACEOF
12766
12767fi
12768done
12769
12770ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12771"
Victor Stinnere0be4232011-10-25 13:06:09 +020012772if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012773 ac_have_decl=1
12774else
12775 ac_have_decl=0
12776fi
12777
12778cat >>confdefs.h <<_ACEOF
12779#define HAVE_DECL_ISINF $ac_have_decl
12780_ACEOF
12781ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12782"
Victor Stinnere0be4232011-10-25 13:06:09 +020012783if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012784 ac_have_decl=1
12785else
12786 ac_have_decl=0
12787fi
12788
12789cat >>confdefs.h <<_ACEOF
12790#define HAVE_DECL_ISNAN $ac_have_decl
12791_ACEOF
12792ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12793"
Victor Stinnere0be4232011-10-25 13:06:09 +020012794if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012795 ac_have_decl=1
12796else
12797 ac_have_decl=0
12798fi
12799
12800cat >>confdefs.h <<_ACEOF
12801#define HAVE_DECL_ISFINITE $ac_have_decl
12802_ACEOF
12803
12804
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012805# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12806# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12808$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012809if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012811else
12812
Matthias Kloseb9621712010-04-24 17:59:49 +000012813if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012814 ac_cv_tanh_preserves_zero_sign=no
12815else
Matthias Kloseb9621712010-04-24 17:59:49 +000012816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012817/* end confdefs.h. */
12818
12819#include <math.h>
12820#include <stdlib.h>
12821int main() {
12822 /* return 0 if either negative zeros don't exist
12823 on this platform or if negative zeros exist
12824 and tanh(-0.) == -0. */
12825 if (atan2(0., -1.) == atan2(-0., -1.) ||
12826 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12827 else exit(1);
12828}
12829
12830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012831if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012832 ac_cv_tanh_preserves_zero_sign=yes
12833else
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012838fi
12839
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012840fi
12841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12843$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012844if test "$ac_cv_tanh_preserves_zero_sign" = yes
12845then
12846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012848
12849fi
12850
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012851if test "$ac_cv_func_log1p" = yes
12852then
12853 # On some versions of AIX, log1p(-0.) returns 0. instead of
12854 # -0. See issue #9920.
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12856$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012857 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012858 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012859else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012860
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012861 if test "$cross_compiling" = yes; then :
12862 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012863else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12865/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012866
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012867 #include <math.h>
12868 #include <stdlib.h>
12869 int main() {
12870 /* Fail if the signs of log1p(-0.) and -0. can be
12871 distinguished. */
12872 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12873 return 0;
12874 else
12875 return 1;
12876 }
12877
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012878_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012879if ac_fn_c_try_run "$LINENO"; then :
12880 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012881else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012882 ac_cv_log1p_drops_zero_sign=yes
12883fi
12884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012886fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012887
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012888fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012889
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12891$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12892fi
12893if test "$ac_cv_log1p_drops_zero_sign" = yes
12894then
12895
12896$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12897
12898fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012899
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012900LIBS=$LIBS_SAVE
12901
Mark Dickinsona614f042009-11-28 12:48:43 +000012902# For multiprocessing module, check that sem_open
12903# actually works. For FreeBSD versions <= 7.2,
12904# the kernel module that provides POSIX semaphores
12905# isn't loaded by default, so an attempt to call
12906# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12908$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012909if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012911else
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012913 ac_cv_posix_semaphores_enabled=yes
12914else
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012916/* end confdefs.h. */
12917
12918#include <unistd.h>
12919#include <fcntl.h>
12920#include <stdio.h>
12921#include <semaphore.h>
12922#include <sys/stat.h>
12923
12924int main(void) {
12925 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12926 if (a == SEM_FAILED) {
12927 perror("sem_open");
12928 return 1;
12929 }
12930 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012931 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012932 return 0;
12933}
12934
12935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012936if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012937 ac_cv_posix_semaphores_enabled=yes
12938else
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12942 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012943fi
12944
12945
Mark Dickinsona614f042009-11-28 12:48:43 +000012946fi
12947
Matthias Kloseb9621712010-04-24 17:59:49 +000012948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12949$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012950if test $ac_cv_posix_semaphores_enabled = no
12951then
12952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012954
12955fi
12956
Mark Dickinson10683072009-04-18 21:18:19 +000012957# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12959$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012960if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012962else
Matthias Kloseb9621712010-04-24 17:59:49 +000012963 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012964 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012965else
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012967/* end confdefs.h. */
12968
12969#include <unistd.h>
12970#include <fcntl.h>
12971#include <stdio.h>
12972#include <semaphore.h>
12973#include <sys/stat.h>
12974
12975int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012976 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012977 int count;
12978 int res;
12979 if(a==SEM_FAILED){
12980 perror("sem_open");
12981 return 1;
12982
12983 }
12984 res = sem_getvalue(a, &count);
12985 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012986 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012987 return res==-1 ? 1 : 0;
12988}
12989
Mark Dickinson10683072009-04-18 21:18:19 +000012990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012991if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012992 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012993else
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12997 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012998fi
12999
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013000
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013001fi
13002
Matthias Kloseb9621712010-04-24 17:59:49 +000013003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13004$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013005if test $ac_cv_broken_sem_getvalue = yes
13006then
13007
Matthias Kloseb9621712010-04-24 17:59:49 +000013008$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013009
13010fi
13011
Mark Dickinsonbd792642009-03-18 20:06:12 +000013012# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13014$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013015# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013016if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013017 enableval=$enable_big_digits; case $enable_big_digits in
13018yes)
13019 enable_big_digits=30 ;;
13020no)
13021 enable_big_digits=15 ;;
1302215|30)
13023 ;;
13024*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013025 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 +000013026esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13028$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013029
13030cat >>confdefs.h <<_ACEOF
13031#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13032_ACEOF
13033
13034
13035else
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13037$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013038fi
13039
13040
Guido van Rossumef2255b2000-03-10 22:30:29 +000013041# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013042ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013043if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013044
13045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013047
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013048 wchar_h="yes"
13049
Guido van Rossumef2255b2000-03-10 22:30:29 +000013050else
Martin v. Löwis11437992002-04-12 09:54:03 +000013051 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013052
13053fi
13054
Michael W. Hudson54241132001-12-07 15:38:26 +000013055
Martin v. Löwis11437992002-04-12 09:54:03 +000013056
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013057# determine wchar_t size
13058if test "$wchar_h" = yes
13059then
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013061# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13062# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13063# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13065$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013066if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013068else
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13070"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013071
Martin v. Löwis11437992002-04-12 09:54:03 +000013072else
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 if test "$ac_cv_type_wchar_t" = yes; then
13074 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13075$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013076as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013077See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013078 else
13079 ac_cv_sizeof_wchar_t=0
13080 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013082
Martin v. Löwis11437992002-04-12 09:54:03 +000013083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13085$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086
13087
13088
Martin v. Löwis11437992002-04-12 09:54:03 +000013089cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013090#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013091_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013092
Michael W. Hudson54241132001-12-07 15:38:26 +000013093
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013094fi
13095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13097$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013098have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013100/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013101
13102#include <tcl.h>
13103#if TCL_UTF_MAX != 6
13104# error "NOT UCS4_TCL"
13105#endif
13106int
13107main ()
13108{
13109
13110 ;
13111 return 0;
13112}
13113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013115
13116
Matthias Kloseb9621712010-04-24 17:59:49 +000013117$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013118
13119 have_ucs4_tcl=yes
13120
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13124$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013125
Skip Montanaro6dead952003-09-25 14:50:04 +000013126# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013127if test "$wchar_h" = yes
13128then
13129 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13131$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013132 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013134else
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013137 ac_cv_wchar_t_signed=yes
13138else
Matthias Kloseb9621712010-04-24 17:59:49 +000013139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013140/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013141
13142 #include <wchar.h>
13143 int main()
13144 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013145 /* Success: exit code 0 */
13146 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013147 }
13148
13149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013150if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013151 ac_cv_wchar_t_signed=yes
13152else
Matthias Kloseb9621712010-04-24 17:59:49 +000013153 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13156 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013157fi
13158
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013159fi
13160
Matthias Kloseb9621712010-04-24 17:59:49 +000013161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13162$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013163fi
13164
Georg Brandl52d168a2008-01-07 18:10:24 +000013165# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013166if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013167 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013168then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013169 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013172
Georg Brandl52d168a2008-01-07 18:10:24 +000013173else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013174 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013175fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13177$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013178
13179# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13181$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013182if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013184else
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 ac_cv_c_bigendian=unknown
13186 # See if we're dealing with a universal compiler.
13187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13188/* end confdefs.h. */
13189#ifndef __APPLE_CC__
13190 not a universal capable compiler
13191 #endif
13192 typedef int dummy;
13193
Skip Montanaro6dead952003-09-25 14:50:04 +000013194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013195if ac_fn_c_try_compile "$LINENO"; then :
13196
13197 # Check for potential -arch flags. It is not universal unless
13198 # there are at least two -arch flags with different values.
13199 ac_arch=
13200 ac_prev=
13201 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13202 if test -n "$ac_prev"; then
13203 case $ac_word in
13204 i?86 | x86_64 | ppc | ppc64)
13205 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13206 ac_arch=$ac_word
13207 else
13208 ac_cv_c_bigendian=universal
13209 break
13210 fi
13211 ;;
13212 esac
13213 ac_prev=
13214 elif test "x$ac_word" = "x-arch"; then
13215 ac_prev=arch
13216 fi
13217 done
13218fi
13219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13220 if test $ac_cv_c_bigendian = unknown; then
13221 # See if sys/param.h defines the BYTE_ORDER macro.
13222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013223/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013224#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013226
Martin v. Löwis11437992002-04-12 09:54:03 +000013227int
13228main ()
13229{
Matthias Kloseb9621712010-04-24 17:59:49 +000013230#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13231 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13232 && LITTLE_ENDIAN)
13233 bogus endian macros
13234 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013235
13236 ;
13237 return 0;
13238}
13239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013240if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013241 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013243/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013244#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013245 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013246
Martin v. Löwis11437992002-04-12 09:54:03 +000013247int
13248main ()
13249{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013250#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 not big endian
13252 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013253
13254 ;
13255 return 0;
13256}
13257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013258if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013259 ac_cv_c_bigendian=yes
13260else
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013264fi
13265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13266 fi
13267 if test $ac_cv_c_bigendian = unknown; then
13268 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013270/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013271#include <limits.h>
13272
Martin v. Löwis11437992002-04-12 09:54:03 +000013273int
13274main ()
13275{
Matthias Kloseb9621712010-04-24 17:59:49 +000013276#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13277 bogus endian macros
13278 #endif
13279
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 ;
13281 return 0;
13282}
13283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013284if ac_fn_c_try_compile "$LINENO"; then :
13285 # It does; now see whether it defined to _BIG_ENDIAN or not.
13286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13287/* end confdefs.h. */
13288#include <limits.h>
13289
13290int
13291main ()
13292{
13293#ifndef _BIG_ENDIAN
13294 not big endian
13295 #endif
13296
13297 ;
13298 return 0;
13299}
13300_ACEOF
13301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013302 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013303else
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13307fi
13308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13309 fi
13310 if test $ac_cv_c_bigendian = unknown; then
13311 # Compile a test program.
13312 if test "$cross_compiling" = yes; then :
13313 # Try to guess by grepping values from an object file.
13314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13315/* end confdefs.h. */
13316short int ascii_mm[] =
13317 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13318 short int ascii_ii[] =
13319 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13320 int use_ascii (int i) {
13321 return ascii_mm[i] + ascii_ii[i];
13322 }
13323 short int ebcdic_ii[] =
13324 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13325 short int ebcdic_mm[] =
13326 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13327 int use_ebcdic (int i) {
13328 return ebcdic_mm[i] + ebcdic_ii[i];
13329 }
13330 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331
Matthias Kloseb9621712010-04-24 17:59:49 +000013332int
13333main ()
13334{
13335return use_ascii (foo) == use_ebcdic (foo);
13336 ;
13337 return 0;
13338}
13339_ACEOF
13340if ac_fn_c_try_compile "$LINENO"; then :
13341 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13342 ac_cv_c_bigendian=yes
13343 fi
13344 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13345 if test "$ac_cv_c_bigendian" = unknown; then
13346 ac_cv_c_bigendian=no
13347 else
13348 # finding both strings is unlikely to happen, but who knows?
13349 ac_cv_c_bigendian=unknown
13350 fi
13351 fi
13352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013354else
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013356/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013357$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013358int
13359main ()
13360{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 /* Are we little or big endian? From Harbison&Steele. */
13363 union
13364 {
13365 long int l;
13366 char c[sizeof (long int)];
13367 } u;
13368 u.l = 1;
13369 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013370
13371 ;
13372 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013373}
Martin v. Löwis11437992002-04-12 09:54:03 +000013374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013375if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013376 ac_cv_c_bigendian=no
13377else
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13381 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13387$as_echo "$ac_cv_c_bigendian" >&6; }
13388 case $ac_cv_c_bigendian in #(
13389 yes)
13390 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13391;; #(
13392 no)
13393 ;; #(
13394 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013397
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 ;; #(
13399 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013400 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013401 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013402 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013403
Michael W. Hudson54241132001-12-07 15:38:26 +000013404
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013405# ABI version string for Python extension modules. This appears between the
13406# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13407# from the following attributes which affect the ABI of this Python build (in
13408# this order):
13409#
13410# * The Python implementation (always 'cpython-' for us)
13411# * The major and minor version numbers
13412# * --with-pydebug (adds a 'd')
13413# * --with-pymalloc (adds a 'm')
13414# * --with-wide-unicode (adds a 'u')
13415#
13416# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013417# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13418# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013419
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13421$as_echo_n "checking ABIFLAGS... " >&6; }
13422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13423$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13425$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013426SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13428$as_echo "$SOABI" >&6; }
13429
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13431$as_echo_n "checking LDVERSION... " >&6; }
13432LDVERSION='$(VERSION)$(ABIFLAGS)'
13433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13434$as_echo "$LDVERSION" >&6; }
13435
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013436# SO is the extension of shared libraries `(including the dot!)
13437# -- usually .so, .sl on HP-UX, .dll on Cygwin
13438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13439$as_echo_n "checking SO... " >&6; }
13440if test -z "$SO"
13441then
13442 case $ac_sys_system in
13443 hp*|HP*)
13444 case `uname -m` in
13445 ia64) SO=.so;;
13446 *) SO=.sl;;
13447 esac
13448 ;;
13449 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013450 Linux*|GNU*)
13451 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013452 *) SO=.so;;
13453 esac
13454else
13455 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013456 echo
13457 echo '====================================================================='
13458 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013459 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013460 echo '+ Do you really mean to change the extension for shared libraries? +'
13461 echo '+ Continuing in 10 seconds to let you to ponder. +'
13462 echo '+ +'
13463 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013464 sleep 10
13465fi
13466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13467$as_echo "$SO" >&6; }
13468
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013469# Check whether right shifting a negative integer extends the sign bit
13470# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13472$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013473if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013475else
Martin v. Löwis11437992002-04-12 09:54:03 +000013476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013478 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013479else
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013481/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013482
13483int main()
13484{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013485 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013486}
13487
Martin v. Löwis11437992002-04-12 09:54:03 +000013488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013489if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013490 ac_cv_rshift_extends_sign=yes
13491else
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013496fi
13497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013498fi
13499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13501$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013502if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013503then
Martin v. Löwis11437992002-04-12 09:54:03 +000013504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013506
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013507fi
13508
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013509# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13511$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013512if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013514else
Martin v. Löwis11437992002-04-12 09:54:03 +000013515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013517/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013518#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013519int
13520main ()
13521{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013522
13523 FILE *f = fopen("/dev/null", "r");
13524 flockfile(f);
13525 getc_unlocked(f);
13526 funlockfile(f);
13527
Martin v. Löwis11437992002-04-12 09:54:03 +000013528 ;
13529 return 0;
13530}
13531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013532if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013533 ac_cv_have_getc_unlocked=yes
13534else
Matthias Kloseb9621712010-04-24 17:59:49 +000013535 ac_cv_have_getc_unlocked=no
13536fi
13537rm -f core conftest.err conftest.$ac_objext \
13538 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13542$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013543if test "$ac_cv_have_getc_unlocked" = yes
13544then
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013547
13548fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013549
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013550# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013551# save the value of LIBS so we don't actually link Python with readline
13552LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013553
Gregory P. Smith18820942008-09-07 06:24:49 +000013554# On some systems we need to link readline to a termcap compatible
13555# library. NOTE: Keep the precedence of listed libraries synchronised
13556# with setup.py.
13557py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13559$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013560for py_libtermcap in "" ncursesw ncurses curses termcap; do
13561 if test -z "$py_libtermcap"; then
13562 READLINE_LIBS="-lreadline"
13563 else
13564 READLINE_LIBS="-lreadline -l$py_libtermcap"
13565 fi
13566 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013568/* end confdefs.h. */
13569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013570/* Override any GCC internal prototype to avoid an error.
13571 Use char because int might match the return type of a GCC
13572 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013573#ifdef __cplusplus
13574extern "C"
13575#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013576char readline ();
13577int
13578main ()
13579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013580return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013581 ;
13582 return 0;
13583}
13584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013585if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013586 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013588rm -f core conftest.err conftest.$ac_objext \
13589 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013590 if test $py_cv_lib_readline = yes; then
13591 break
13592 fi
13593done
13594# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13595#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013596if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13598$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013599else
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13601$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013604
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013605fi
13606
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013607# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13609$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013610if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013612else
13613 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013614LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013616/* end confdefs.h. */
13617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013618/* Override any GCC internal prototype to avoid an error.
13619 Use char because int might match the return type of a GCC
13620 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013621#ifdef __cplusplus
13622extern "C"
13623#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013624char rl_callback_handler_install ();
13625int
13626main ()
13627{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013629 ;
13630 return 0;
13631}
13632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013633if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013634 ac_cv_lib_readline_rl_callback_handler_install=yes
13635else
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013638rm -f core conftest.err conftest.$ac_objext \
13639 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013640LIBS=$ac_check_lib_save_LIBS
13641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13643$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013644if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013645
Matthias Kloseb9621712010-04-24 17:59:49 +000013646$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013647
13648fi
13649
13650
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013651# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013653/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013654#include <readline/readline.h>
13655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013656if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013657 have_readline=yes
13658else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013659 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013660
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013661fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013662rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013663if test $have_readline = yes
13664then
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013666/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013667#include <readline/readline.h>
13668
13669_ACEOF
13670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013671 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013674
13675fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013676rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013679/* end confdefs.h. */
13680#include <readline/readline.h>
13681
13682_ACEOF
13683if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013685
Matthias Kloseb9621712010-04-24 17:59:49 +000013686$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013687
13688fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013689rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013690
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013691fi
13692
Martin v. Löwis0daad592001-09-30 21:09:59 +000013693# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13695$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013696if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013698else
Martin v. Löwis11437992002-04-12 09:54:03 +000013699 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013700LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013704/* Override any GCC internal prototype to avoid an error.
13705 Use char because int might match the return type of a GCC
13706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013707#ifdef __cplusplus
13708extern "C"
13709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013710char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013711int
13712main ()
13713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013715 ;
13716 return 0;
13717}
13718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013720 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013721else
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013724rm -f core conftest.err conftest.$ac_objext \
13725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013726LIBS=$ac_check_lib_save_LIBS
13727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13729$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013730if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013731
Matthias Kloseb9621712010-04-24 17:59:49 +000013732$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013733
Martin v. Löwis0daad592001-09-30 21:09:59 +000013734fi
13735
Michael W. Hudson54241132001-12-07 15:38:26 +000013736
Thomas Wouters89d996e2007-09-08 17:39:28 +000013737# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13739$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013740if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013742else
13743 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013744LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013746/* end confdefs.h. */
13747
13748/* Override any GCC internal prototype to avoid an error.
13749 Use char because int might match the return type of a GCC
13750 builtin and then its argument prototype would still apply. */
13751#ifdef __cplusplus
13752extern "C"
13753#endif
13754char rl_completion_display_matches_hook ();
13755int
13756main ()
13757{
13758return rl_completion_display_matches_hook ();
13759 ;
13760 return 0;
13761}
13762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013763if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013764 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13765else
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013768rm -f core conftest.err conftest.$ac_objext \
13769 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013770LIBS=$ac_check_lib_save_LIBS
13771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13773$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013774if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013777
13778fi
13779
13780
Martin v. Löwis0daad592001-09-30 21:09:59 +000013781# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13783$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013784if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013786else
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013788LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792/* Override any GCC internal prototype to avoid an error.
13793 Use char because int might match the return type of a GCC
13794 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013795#ifdef __cplusplus
13796extern "C"
13797#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013798char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013799int
13800main ()
13801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013802return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 ;
13804 return 0;
13805}
13806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013807if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013808 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013809else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013812rm -f core conftest.err conftest.$ac_objext \
13813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013814LIBS=$ac_check_lib_save_LIBS
13815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13817$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013818if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013819
Matthias Kloseb9621712010-04-24 17:59:49 +000013820$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013821
Guido van Rossum353ae582001-07-10 16:45:32 +000013822fi
13823
Jack Jansendd19cf82001-12-06 22:36:17 +000013824
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013825# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013827/* end confdefs.h. */
13828#include <readline/readline.h>
13829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013830if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013831 have_readline=yes
13832else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013833 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013834
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013835fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013836rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013837if test $have_readline = yes
13838then
Matthias Kloseb9621712010-04-24 17:59:49 +000013839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013840/* end confdefs.h. */
13841#include <readline/readline.h>
13842
13843_ACEOF
13844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013845 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013846
Matthias Kloseb9621712010-04-24 17:59:49 +000013847$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013848
13849fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013850rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013851
13852fi
13853
Martin v. Löwis82bca632006-02-10 20:49:30 +000013854# End of readline checks: restore LIBS
13855LIBS=$LIBS_no_readline
13856
Matthias Kloseb9621712010-04-24 17:59:49 +000013857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13858$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013859if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013861else
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
Matthias Kloseb9621712010-04-24 17:59:49 +000013863if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013864 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013865else
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013867/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013868
13869int main()
13870{
13871 int val1 = nice(1);
13872 if (val1 != -1 && val1 == nice(2))
13873 exit(0);
13874 exit(1);
13875}
13876
Martin v. Löwis11437992002-04-12 09:54:03 +000013877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013878if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013879 ac_cv_broken_nice=yes
13880else
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013885fi
13886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013887fi
13888
Matthias Kloseb9621712010-04-24 17:59:49 +000013889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13890$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013891if test "$ac_cv_broken_nice" = yes
13892then
Martin v. Löwis11437992002-04-12 09:54:03 +000013893
Matthias Kloseb9621712010-04-24 17:59:49 +000013894$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013895
13896fi
13897
Matthias Kloseb9621712010-04-24 17:59:49 +000013898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13899$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013900if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013901 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013902else
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013904 ac_cv_broken_poll=no
13905else
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013907/* end confdefs.h. */
13908
13909#include <poll.h>
13910
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013911int main()
13912{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013913 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013914 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013915
13916 close (42);
13917
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013918 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013919 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013920 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013921 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013922 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013923 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013924 return 1;
13925}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013926
13927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013928if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013929 ac_cv_broken_poll=yes
13930else
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13934 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013937fi
13938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13940$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013941if test "$ac_cv_broken_poll" = yes
13942then
13943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013945
13946fi
13947
Brett Cannon43802422005-02-10 20:48:03 +000013948# 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 +000013949# (which is not required by ISO C or UNIX spec) and/or if we support
13950# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013951ac_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 +000013952#include <$ac_cv_struct_tm>
13953
Matthias Kloseb9621712010-04-24 17:59:49 +000013954"
Victor Stinnere0be4232011-10-25 13:06:09 +020013955if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013956
13957cat >>confdefs.h <<_ACEOF
13958#define HAVE_STRUCT_TM_TM_ZONE 1
13959_ACEOF
13960
13961
13962fi
13963
13964if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13965
Matthias Kloseb9621712010-04-24 17:59:49 +000013966$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013967
13968else
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13970"
Victor Stinnere0be4232011-10-25 13:06:09 +020013971if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013972 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013973else
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013975fi
13976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013977cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013978#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979_ACEOF
13980
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13982$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013983if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013987/* end confdefs.h. */
13988#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989#if !HAVE_DECL_TZNAME
13990extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013991#endif
13992
13993int
13994main ()
13995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013996return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013997 ;
13998 return 0;
13999}
14000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014001if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014002 ac_cv_var_tzname=yes
14003else
Matthias Kloseb9621712010-04-24 17:59:49 +000014004 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014006rm -f core conftest.err conftest.$ac_objext \
14007 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14010$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014011 if test $ac_cv_var_tzname = yes; then
14012
Matthias Kloseb9621712010-04-24 17:59:49 +000014013$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014014
14015 fi
14016fi
14017
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014018
Martin v. Löwis1d459062005-03-14 21:23:33 +000014019# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14021$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014022if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014023 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014024else
14025
Matthias Kloseb9621712010-04-24 17:59:49 +000014026if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014027 ac_cv_working_tzset=no
14028else
Matthias Kloseb9621712010-04-24 17:59:49 +000014029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014030/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014031
14032#include <stdlib.h>
14033#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014034#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014035
14036#if HAVE_TZNAME
14037extern char *tzname[];
14038#endif
14039
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014040int main()
14041{
Brett Cannon18367812003-09-19 00:59:16 +000014042 /* Note that we need to ensure that not only does tzset(3)
14043 do 'something' with localtime, but it works as documented
14044 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014045 This includes making sure that tzname is set properly if
14046 tm->tm_zone does not exist since it is the alternative way
14047 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014048
14049 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014050 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014051 */
14052
Martin v. Löwis1d459062005-03-14 21:23:33 +000014053 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014054 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14055
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014056 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014057 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014058 if (localtime(&groundhogday)->tm_hour != 0)
14059 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014060#if HAVE_TZNAME
14061 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14062 if (strcmp(tzname[0], "UTC") ||
14063 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14064 exit(1);
14065#endif
Brett Cannon18367812003-09-19 00:59:16 +000014066
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014067 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014068 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014069 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014070 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014071#if HAVE_TZNAME
14072 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14073 exit(1);
14074#endif
Brett Cannon18367812003-09-19 00:59:16 +000014075
14076 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14077 tzset();
14078 if (localtime(&groundhogday)->tm_hour != 11)
14079 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014080#if HAVE_TZNAME
14081 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14082 exit(1);
14083#endif
14084
14085#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014086 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14087 exit(1);
14088 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14089 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014090#endif
Brett Cannon18367812003-09-19 00:59:16 +000014091
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014092 exit(0);
14093}
14094
14095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014096if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014097 ac_cv_working_tzset=yes
14098else
Matthias Kloseb9621712010-04-24 17:59:49 +000014099 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14102 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014103fi
14104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014105fi
14106
Matthias Kloseb9621712010-04-24 17:59:49 +000014107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14108$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014109if test "$ac_cv_working_tzset" = yes
14110then
14111
Matthias Kloseb9621712010-04-24 17:59:49 +000014112$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014113
14114fi
14115
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014116# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14118$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014119if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014120 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014121else
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014123/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014124#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014125int
14126main ()
14127{
14128
14129struct stat st;
14130st.st_mtim.tv_nsec = 1;
14131
14132 ;
14133 return 0;
14134}
14135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014136if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014137 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014138else
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14142fi
14143
Matthias Kloseb9621712010-04-24 17:59:49 +000014144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14145$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014146if test "$ac_cv_stat_tv_nsec" = yes
14147then
14148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014150
14151fi
14152
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014153# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14155$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014156if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014157 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014158else
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014160/* end confdefs.h. */
14161#include <sys/stat.h>
14162int
14163main ()
14164{
14165
14166struct stat st;
14167st.st_mtimespec.tv_nsec = 1;
14168
14169 ;
14170 return 0;
14171}
14172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014173if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014174 ac_cv_stat_tv_nsec2=yes
14175else
Matthias Kloseb9621712010-04-24 17:59:49 +000014176 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14179fi
14180
Matthias Kloseb9621712010-04-24 17:59:49 +000014181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14182$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014183if test "$ac_cv_stat_tv_nsec2" = yes
14184then
14185
Matthias Kloseb9621712010-04-24 17:59:49 +000014186$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014187
14188fi
14189
Jack Jansen666b1e72001-10-31 12:11:48 +000014190# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14192$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014193if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014195else
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014197/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014198#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014199int
14200main ()
14201{
Jack Jansen666b1e72001-10-31 12:11:48 +000014202
14203 int rtn;
14204 rtn = mvwdelch(0,0,0);
14205
Martin v. Löwis11437992002-04-12 09:54:03 +000014206 ;
14207 return 0;
14208}
14209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014210if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014211 ac_cv_mvwdelch_is_expression=yes
14212else
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14216fi
14217
Matthias Kloseb9621712010-04-24 17:59:49 +000014218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14219$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014220
14221if test "$ac_cv_mvwdelch_is_expression" = yes
14222then
Martin v. Löwis11437992002-04-12 09:54:03 +000014223
Matthias Kloseb9621712010-04-24 17:59:49 +000014224$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014225
14226fi
14227
Matthias Kloseb9621712010-04-24 17:59:49 +000014228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14229$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014230if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014231 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014232else
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014234/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014235#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014236int
14237main ()
14238{
Jack Jansen666b1e72001-10-31 12:11:48 +000014239
14240 WINDOW *w;
14241 w->_flags = 0;
14242
Martin v. Löwis11437992002-04-12 09:54:03 +000014243 ;
14244 return 0;
14245}
14246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014247if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014248 ac_cv_window_has_flags=yes
14249else
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14253fi
14254
Matthias Kloseb9621712010-04-24 17:59:49 +000014255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14256$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014257
Jack Jansen666b1e72001-10-31 12:11:48 +000014258
14259if test "$ac_cv_window_has_flags" = yes
14260then
Martin v. Löwis11437992002-04-12 09:54:03 +000014261
Matthias Kloseb9621712010-04-24 17:59:49 +000014262$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014263
14264fi
14265
Matthias Kloseb9621712010-04-24 17:59:49 +000014266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14267$as_echo_n "checking for is_term_resized... " >&6; }
14268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014269/* end confdefs.h. */
14270#include <curses.h>
14271int
14272main ()
14273{
14274void *x=is_term_resized
14275 ;
14276 return 0;
14277}
14278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014279if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014280
Matthias Kloseb9621712010-04-24 17:59:49 +000014281$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014282
Matthias Kloseb159a552010-04-25 21:00:44 +000014283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014284$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014285else
Matthias Kloseb9621712010-04-24 17:59:49 +000014286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14287$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014288
14289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14291
Matthias Kloseb9621712010-04-24 17:59:49 +000014292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14293$as_echo_n "checking for resize_term... " >&6; }
14294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014295/* end confdefs.h. */
14296#include <curses.h>
14297int
14298main ()
14299{
14300void *x=resize_term
14301 ;
14302 return 0;
14303}
14304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014305if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014306
Matthias Kloseb9621712010-04-24 17:59:49 +000014307$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014308
Matthias Kloseb159a552010-04-25 21:00:44 +000014309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014310$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014311else
Matthias Kloseb9621712010-04-24 17:59:49 +000014312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14313$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014314
14315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14317
Matthias Kloseb9621712010-04-24 17:59:49 +000014318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14319$as_echo_n "checking for resizeterm... " >&6; }
14320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014321/* end confdefs.h. */
14322#include <curses.h>
14323int
14324main ()
14325{
14326void *x=resizeterm
14327 ;
14328 return 0;
14329}
14330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014331if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014332
Matthias Kloseb9621712010-04-24 17:59:49 +000014333$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014334
Matthias Kloseb159a552010-04-25 21:00:44 +000014335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014336$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014337else
Matthias Kloseb9621712010-04-24 17:59:49 +000014338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14339$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014340
14341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14343
Matthias Kloseb9621712010-04-24 17:59:49 +000014344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14345$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000014346
14347if test -r /dev/ptmx
14348then
Matthias Kloseb9621712010-04-24 17:59:49 +000014349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14350$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014351
Matthias Kloseb9621712010-04-24 17:59:49 +000014352$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014353
Thomas Wouters89f507f2006-12-13 04:49:30 +000014354else
Matthias Kloseb9621712010-04-24 17:59:49 +000014355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14356$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014357fi
14358
Matthias Kloseb9621712010-04-24 17:59:49 +000014359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14360$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000014361
14362if test -r /dev/ptc
14363then
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14365$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000014366
Matthias Kloseb9621712010-04-24 17:59:49 +000014367$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014368
Thomas Wouters89f507f2006-12-13 04:49:30 +000014369else
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14371$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000014372fi
14373
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014374if test "$have_long_long" = yes
14375then
Matthias Kloseb9621712010-04-24 17:59:49 +000014376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14377$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014378 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014380else
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014382 ac_cv_have_long_long_format="cross -- assuming no"
14383 if test x$GCC = xyes; then
14384 save_CFLAGS=$CFLAGS
14385 CFLAGS="$CFLAGS -Werror -Wformat"
14386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14387/* end confdefs.h. */
14388
14389 #include <stdio.h>
14390 #include <stddef.h>
14391
14392int
14393main ()
14394{
14395
14396 char *buffer;
14397 sprintf(buffer, "%lld", (long long)123);
14398 sprintf(buffer, "%lld", (long long)-123);
14399 sprintf(buffer, "%llu", (unsigned long long)123);
14400
14401 ;
14402 return 0;
14403}
14404_ACEOF
14405if ac_fn_c_try_compile "$LINENO"; then :
14406 ac_cv_have_long_long_format=yes
14407
14408fi
14409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14410 CFLAGS=$save_CFLAGS
14411 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014412else
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014414/* end confdefs.h. */
14415
14416 #include <stdio.h>
14417 #include <stddef.h>
14418 #include <string.h>
14419
14420 #ifdef HAVE_SYS_TYPES_H
14421 #include <sys/types.h>
14422 #endif
14423
14424 int main()
14425 {
14426 char buffer[256];
14427
14428 if (sprintf(buffer, "%lld", (long long)123) < 0)
14429 return 1;
14430 if (strcmp(buffer, "123"))
14431 return 1;
14432
14433 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14434 return 1;
14435 if (strcmp(buffer, "-123"))
14436 return 1;
14437
14438 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14439 return 1;
14440 if (strcmp(buffer, "123"))
14441 return 1;
14442
14443 return 0;
14444 }
14445
14446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014447if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014448 ac_cv_have_long_long_format=yes
14449else
Matthias Kloseb9621712010-04-24 17:59:49 +000014450 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14453 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014454fi
14455
14456
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014457fi
14458
Matthias Kloseb9621712010-04-24 17:59:49 +000014459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14460$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014461fi
14462
Mark Dickinson89d7d412009-12-31 20:50:59 +000014463if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014464then
14465
Matthias Kloseb9621712010-04-24 17:59:49 +000014466$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014467
14468fi
14469
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014470if test $ac_sys_system = Darwin
14471then
14472 LIBS="$LIBS -framework CoreFoundation"
14473fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014474
Matthias Kloseb9621712010-04-24 17:59:49 +000014475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14476$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014477if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014478 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014479else
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014481 ac_cv_have_size_t_format="cross -- assuming yes"
14482
Thomas Wouters477c8d52006-05-27 19:21:47 +000014483else
Matthias Kloseb9621712010-04-24 17:59:49 +000014484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014485/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014486
Thomas Wouters477c8d52006-05-27 19:21:47 +000014487#include <stdio.h>
14488#include <stddef.h>
14489#include <string.h>
14490
Christian Heimes2c181612007-12-17 20:04:13 +000014491#ifdef HAVE_SYS_TYPES_H
14492#include <sys/types.h>
14493#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014494
14495#ifdef HAVE_SSIZE_T
14496typedef ssize_t Py_ssize_t;
14497#elif SIZEOF_VOID_P == SIZEOF_LONG
14498typedef long Py_ssize_t;
14499#else
14500typedef int Py_ssize_t;
14501#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014502
Christian Heimes2c181612007-12-17 20:04:13 +000014503int main()
14504{
14505 char buffer[256];
14506
Thomas Wouters477c8d52006-05-27 19:21:47 +000014507 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14508 return 1;
14509
Thomas Wouters89f507f2006-12-13 04:49:30 +000014510 if (strcmp(buffer, "123"))
14511 return 1;
14512
14513 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14514 return 1;
14515
14516 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014517 return 1;
14518
14519 return 0;
14520}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014521
Thomas Wouters477c8d52006-05-27 19:21:47 +000014522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014523if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014524 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014525else
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14529 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014530fi
14531
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14534$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014535if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014536
Matthias Kloseb9621712010-04-24 17:59:49 +000014537$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014538
14539fi
14540
Matthias Kloseb9621712010-04-24 17:59:49 +000014541ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014542#ifdef HAVE_SYS_TYPES_H
14543#include <sys/types.h>
14544#endif
14545#ifdef HAVE_SYS_SOCKET_H
14546#include <sys/socket.h>
14547#endif
14548
Matthias Kloseb9621712010-04-24 17:59:49 +000014549"
Victor Stinnere0be4232011-10-25 13:06:09 +020014550if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014551
Martin v. Löwis11437992002-04-12 09:54:03 +000014552else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014555
14556fi
14557
Michael W. Hudson54241132001-12-07 15:38:26 +000014558
Matthias Kloseb9621712010-04-24 17:59:49 +000014559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14560$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014561if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014562 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014563else
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014565 ac_cv_broken_mbstowcs=no
14566else
Matthias Kloseb9621712010-04-24 17:59:49 +000014567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014568/* end confdefs.h. */
14569
14570#include<stdlib.h>
14571int main() {
14572 size_t len = -1;
14573 const char *str = "text";
14574 len = mbstowcs(NULL, str, 0);
14575 return (len != 4);
14576}
14577
14578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014579if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014580 ac_cv_broken_mbstowcs=no
14581else
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14585 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014586fi
14587
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014588fi
14589
Matthias Kloseb9621712010-04-24 17:59:49 +000014590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14591$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014592if test "$ac_cv_broken_mbstowcs" = yes
14593then
14594
Matthias Kloseb9621712010-04-24 17:59:49 +000014595$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014596
14597fi
14598
Antoine Pitroub52ec782009-01-25 16:34:23 +000014599# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14601$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014602
14603# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014604if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014605 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014606if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014607then
14608
Matthias Kloseb9621712010-04-24 17:59:49 +000014609$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014610
Matthias Kloseb9621712010-04-24 17:59:49 +000014611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14612$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014613fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014614if test "$withval" = no
14615then
14616
14617$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14618
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14620$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014621fi
14622
Antoine Pitrou042b1282010-08-13 21:15:58 +000014623else
14624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14625$as_echo "no value specified" >&6; }
14626fi
14627
Antoine Pitroub52ec782009-01-25 16:34:23 +000014628
Matthias Kloseb17289e2012-03-15 19:51:34 +010014629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14630$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14631if ${ac_cv_computed_gotos+:} false; then :
14632 $as_echo_n "(cached) " >&6
14633else
14634 if test "$cross_compiling" = yes; then :
14635 if test "${with_computed_gotos+set}" = set; then
14636 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14637 else
14638 ac_cv_computed_gotos=no
14639 fi
14640else
14641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14642/* end confdefs.h. */
14643
14644int main(int argc, char **argv)
14645{
14646 static void *targets[1] = { &&LABEL1 };
14647 goto LABEL2;
14648LABEL1:
14649 return 0;
14650LABEL2:
14651 goto *targets[0];
14652 return 1;
14653}
14654
14655_ACEOF
14656if ac_fn_c_try_run "$LINENO"; then :
14657 ac_cv_computed_gotos=yes
14658else
14659 ac_cv_computed_gotos=no
14660fi
14661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14662 conftest.$ac_objext conftest.beam conftest.$ac_ext
14663fi
14664
14665fi
14666
14667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14668$as_echo "$ac_cv_computed_gotos" >&6; }
14669case "$ac_cv_computed_gotos" in yes*)
14670
14671$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14672
14673esac
14674
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014675case $ac_sys_system in
14676AIX*)
14677
14678$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14679 ;;
14680esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014681
Michael W. Hudson54241132001-12-07 15:38:26 +000014682
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014683
14684
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014685for h in `(cd $srcdir;echo Python/thread_*.h)`
14686do
14687 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14688done
14689
Michael W. Hudson54241132001-12-07 15:38:26 +000014690
Neal Norwitzd24499d2005-12-18 21:36:39 +000014691SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14693$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014694for dir in $SRCDIRS; do
14695 if test ! -d $dir; then
14696 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014697 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014698done
Matthias Kloseb9621712010-04-24 17:59:49 +000014699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14700$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014701
Stefan Krah1919b7e2012-03-21 18:25:23 +010014702# Availability of -O2:
14703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14704$as_echo_n "checking for -O2... " >&6; }
14705saved_cflags="$CFLAGS"
14706CFLAGS="-O2"
14707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14708/* end confdefs.h. */
14709
14710int
14711main ()
14712{
14713
14714
14715 ;
14716 return 0;
14717}
14718_ACEOF
14719if ac_fn_c_try_compile "$LINENO"; then :
14720 have_O2=yes
14721else
14722 have_O2=no
14723fi
14724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14726$as_echo "$have_O2" >&6; }
14727CFLAGS="$saved_cflags"
14728
14729# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14730# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14732$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14733saved_cflags="$CFLAGS"
14734CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14735if test "$have_O2" = no; then
14736 CFLAGS=""
14737fi
14738if test "$cross_compiling" = yes; then :
14739 have_glibc_memmove_bug=undefined
14740else
14741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14742/* end confdefs.h. */
14743
14744#include <stdio.h>
14745#include <stdlib.h>
14746#include <string.h>
14747void foo(void *p, void *q) { memmove(p, q, 19); }
14748int main() {
14749 char a[32] = "123456789000000000";
14750 foo(&a[9], a);
14751 if (strcmp(a, "123456789123456789000000000") != 0)
14752 return 1;
14753 foo(a, &a[9]);
14754 if (strcmp(a, "123456789000000000") != 0)
14755 return 1;
14756 return 0;
14757}
14758
14759_ACEOF
14760if ac_fn_c_try_run "$LINENO"; then :
14761 have_glibc_memmove_bug=no
14762else
14763 have_glibc_memmove_bug=yes
14764fi
14765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14766 conftest.$ac_objext conftest.beam conftest.$ac_ext
14767fi
14768
14769CFLAGS="$saved_cflags"
14770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
14771$as_echo "$have_glibc_memmove_bug" >&6; }
14772if test "$have_glibc_memmove_bug" = yes; then
14773
14774$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
14775
14776fi
14777
14778if test "$have_gcc_asm_for_x87" = yes; then
14779 # Some versions of gcc miscompile inline asm:
14780 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
14781 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
14782 case $CC in
14783 *gcc*)
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
14785$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
14786 saved_cflags="$CFLAGS"
14787 CFLAGS="-O2"
14788 if test "$cross_compiling" = yes; then :
14789 have_ipa_pure_const_bug=undefined
14790else
14791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14792/* end confdefs.h. */
14793
14794 __attribute__((noinline)) int
14795 foo(int *p) {
14796 int r;
14797 asm ( "movl \$6, (%1)\n\t"
14798 "xorl %0, %0\n\t"
14799 : "=r" (r) : "r" (p) : "memory"
14800 );
14801 return r;
14802 }
14803 int main() {
14804 int p = 8;
14805 if ((foo(&p) ? : p) != 6)
14806 return 1;
14807 return 0;
14808 }
14809
14810_ACEOF
14811if ac_fn_c_try_run "$LINENO"; then :
14812 have_ipa_pure_const_bug=no
14813else
14814 have_ipa_pure_const_bug=yes
14815fi
14816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14817 conftest.$ac_objext conftest.beam conftest.$ac_ext
14818fi
14819
14820 CFLAGS="$saved_cflags"
14821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
14822$as_echo "$have_ipa_pure_const_bug" >&6; }
14823 if test "$have_ipa_pure_const_bug" = yes; then
14824
14825$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
14826
14827 fi
14828 ;;
14829 esac
14830fi
14831
Guido van Rossum627b2d71993-12-24 10:39:16 +000014832# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014833ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014834
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014835ac_config_files="$ac_config_files Modules/ld_so_aix"
14836
Martin v. Löwis11437992002-04-12 09:54:03 +000014837cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014838# This file is a shell script that caches the results of configure
14839# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014840# scripts and configure runs, see configure's option --config-cache.
14841# It is not useful on other systems. If it contains results you don't
14842# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014843#
Martin v. Löwis11437992002-04-12 09:54:03 +000014844# config.status only pays attention to the cache file if you give it
14845# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014846#
Skip Montanaro6dead952003-09-25 14:50:04 +000014847# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014848# loading this file, other *unset* `ac_cv_foo' will be assigned the
14849# following values.
14850
14851_ACEOF
14852
Guido van Rossumf78abae1997-01-21 22:02:36 +000014853# The following way of writing the cache mishandles newlines in values,
14854# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014856# Ultrix sh set writes to stderr and can't be redirected directly,
14857# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858(
14859 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14860 eval ac_val=\$$ac_var
14861 case $ac_val in #(
14862 *${as_nl}*)
14863 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014864 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14865$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866 esac
14867 case $ac_var in #(
14868 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14870 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871 esac ;;
14872 esac
14873 done
14874
Martin v. Löwis11437992002-04-12 09:54:03 +000014875 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14877 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014878 # `set' does not quote correctly, so add quotes: double-quote
14879 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014880 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014881 "s/'/'\\\\''/g;
14882 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 *)
14885 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888 esac |
14889 sort
14890) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014891 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014893 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14896 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14898 :end' >>confcache
14899if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14900 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014901 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14903$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020014904 if test ! -f "$cache_file" || test -h "$cache_file"; then
14905 cat confcache >"$cache_file"
14906 else
14907 case $cache_file in #(
14908 */* | ?:*)
14909 mv -f confcache "$cache_file"$$ &&
14910 mv -f "$cache_file"$$ "$cache_file" ;; #(
14911 *)
14912 mv -f confcache "$cache_file" ;;
14913 esac
14914 fi
14915 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014916 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14918$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014919 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014920fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014921rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014922
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014923test "x$prefix" = xNONE && prefix=$ac_default_prefix
14924# Let make expand exec_prefix.
14925test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014926
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014927DEFS=-DHAVE_CONFIG_H
14928
Skip Montanaro6dead952003-09-25 14:50:04 +000014929ac_libobjs=
14930ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014931U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014932for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14933 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14937 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14939 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014940done
14941LIBOBJS=$ac_libobjs
14942
14943LTLIBOBJS=$ac_ltlibobjs
14944
14945
Martin v. Löwis11437992002-04-12 09:54:03 +000014946
Matthias Kloseb9621712010-04-24 17:59:49 +000014947
Victor Stinnere0be4232011-10-25 13:06:09 +020014948: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014949ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014950ac_clean_files_save=$ac_clean_files
14951ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014952{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14953$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14954as_write_fail=0
14955cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014956#! $SHELL
14957# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014958# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014959# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014960# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014961
Martin v. Löwis11437992002-04-12 09:54:03 +000014962debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014963ac_cs_recheck=false
14964ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014965
Matthias Kloseb9621712010-04-24 17:59:49 +000014966SHELL=\${CONFIG_SHELL-$SHELL}
14967export SHELL
14968_ASEOF
14969cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14970## -------------------- ##
14971## M4sh Initialization. ##
14972## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014974# Be more Bourne compatible
14975DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014976if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014977 emulate sh
14978 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014980 # is contrary to our usage. Disable this feature.
14981 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014983else
Matthias Kloseb9621712010-04-24 17:59:49 +000014984 case `(set -o) 2>/dev/null` in #(
14985 *posix*) :
14986 set -o posix ;; #(
14987 *) :
14988 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014989esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014990fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014991
14992
Matthias Kloseb9621712010-04-24 17:59:49 +000014993as_nl='
14994'
14995export as_nl
14996# Printing a long string crashes Solaris 7 /usr/bin/printf.
14997as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14998as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14999as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15000# Prefer a ksh shell builtin over an external printf program on Solaris,
15001# but without wasting forks for bash or zsh.
15002if test -z "$BASH_VERSION$ZSH_VERSION" \
15003 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15004 as_echo='print -r --'
15005 as_echo_n='print -rn --'
15006elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15007 as_echo='printf %s\n'
15008 as_echo_n='printf %s'
15009else
15010 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15011 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15012 as_echo_n='/usr/ucb/echo -n'
15013 else
15014 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15015 as_echo_n_body='eval
15016 arg=$1;
15017 case $arg in #(
15018 *"$as_nl"*)
15019 expr "X$arg" : "X\\(.*\\)$as_nl";
15020 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15021 esac;
15022 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15023 '
15024 export as_echo_n_body
15025 as_echo_n='sh -c $as_echo_n_body as_echo'
15026 fi
15027 export as_echo_body
15028 as_echo='sh -c $as_echo_body as_echo'
15029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015030
15031# The user is always right.
15032if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 PATH_SEPARATOR=:
15034 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15035 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15036 PATH_SEPARATOR=';'
15037 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040
15041# IFS
15042# We need space, tab and new line, in precisely that order. Quoting is
15043# there to prevent editors from complaining about space-tab.
15044# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15045# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046IFS=" "" $as_nl"
15047
15048# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015049as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015050case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015051 *[\\/]* ) as_myself=$0 ;;
15052 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015053for as_dir in $PATH
15054do
15055 IFS=$as_save_IFS
15056 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15058 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015061 ;;
15062esac
15063# We did not find ourselves, most probably we were run as `sh COMMAND'
15064# in which case we are not to be found in the path.
15065if test "x$as_myself" = x; then
15066 as_myself=$0
15067fi
15068if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15070 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071fi
15072
Matthias Kloseb9621712010-04-24 17:59:49 +000015073# Unset variables that we do not need and which cause bugs (e.g. in
15074# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15075# suppresses any "Segmentation fault" message there. '((' could
15076# trigger a bug in pdksh 5.2.14.
15077for as_var in BASH_ENV ENV MAIL MAILPATH
15078do eval test x\${$as_var+set} = xset \
15079 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015080done
15081PS1='$ '
15082PS2='> '
15083PS4='+ '
15084
15085# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015086LC_ALL=C
15087export LC_ALL
15088LANGUAGE=C
15089export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090
Matthias Kloseb9621712010-04-24 17:59:49 +000015091# CDPATH.
15092(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15093
15094
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015095# as_fn_error STATUS ERROR [LINENO LOG_FD]
15096# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015097# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15098# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015099# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015100as_fn_error ()
15101{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015102 as_status=$1; test $as_status -eq 0 && as_status=1
15103 if test "$4"; then
15104 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15105 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015106 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015107 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015108 as_fn_exit $as_status
15109} # as_fn_error
15110
15111
15112# as_fn_set_status STATUS
15113# -----------------------
15114# Set $? to STATUS, without forking.
15115as_fn_set_status ()
15116{
15117 return $1
15118} # as_fn_set_status
15119
15120# as_fn_exit STATUS
15121# -----------------
15122# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15123as_fn_exit ()
15124{
15125 set +e
15126 as_fn_set_status $1
15127 exit $1
15128} # as_fn_exit
15129
15130# as_fn_unset VAR
15131# ---------------
15132# Portably unset VAR.
15133as_fn_unset ()
15134{
15135 { eval $1=; unset $1;}
15136}
15137as_unset=as_fn_unset
15138# as_fn_append VAR VALUE
15139# ----------------------
15140# Append the text in VALUE to the end of the definition contained in VAR. Take
15141# advantage of any shell optimizations that allow amortized linear growth over
15142# repeated appends, instead of the typical quadratic growth present in naive
15143# implementations.
15144if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15145 eval 'as_fn_append ()
15146 {
15147 eval $1+=\$2
15148 }'
15149else
15150 as_fn_append ()
15151 {
15152 eval $1=\$$1\$2
15153 }
15154fi # as_fn_append
15155
15156# as_fn_arith ARG...
15157# ------------------
15158# Perform arithmetic evaluation on the ARGs, and store the result in the
15159# global $as_val. Take advantage of shells that can avoid forks. The arguments
15160# must be portable across $(()) and expr.
15161if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15162 eval 'as_fn_arith ()
15163 {
15164 as_val=$(( $* ))
15165 }'
15166else
15167 as_fn_arith ()
15168 {
15169 as_val=`expr "$@" || test $? -eq 1`
15170 }
15171fi # as_fn_arith
15172
15173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174if expr a : '\(a\)' >/dev/null 2>&1 &&
15175 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15176 as_expr=expr
15177else
15178 as_expr=false
15179fi
15180
15181if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15182 as_basename=basename
15183else
15184 as_basename=false
15185fi
15186
Matthias Kloseb9621712010-04-24 17:59:49 +000015187if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15188 as_dirname=dirname
15189else
15190 as_dirname=false
15191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193as_me=`$as_basename -- "$0" ||
15194$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15195 X"$0" : 'X\(//\)$' \| \
15196 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015197$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015198 sed '/^.*\/\([^/][^/]*\)\/*$/{
15199 s//\1/
15200 q
15201 }
15202 /^X\/\(\/\/\)$/{
15203 s//\1/
15204 q
15205 }
15206 /^X\/\(\/\).*/{
15207 s//\1/
15208 q
15209 }
15210 s/.*/./; q'`
15211
Matthias Kloseb9621712010-04-24 17:59:49 +000015212# Avoid depending upon Character Ranges.
15213as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15214as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15215as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15216as_cr_digits='0123456789'
15217as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218
15219ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015220case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015222 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015223 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 xy) ECHO_C='\c';;
15225 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15226 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227 esac;;
15228*)
15229 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015230esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015231
Martin v. Löwis11437992002-04-12 09:54:03 +000015232rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233if test -d conf$$.dir; then
15234 rm -f conf$$.dir/conf$$.file
15235else
15236 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015237 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015239if (echo >conf$$.file) 2>/dev/null; then
15240 if ln -s conf$$.file conf$$ 2>/dev/null; then
15241 as_ln_s='ln -s'
15242 # ... but there are two gotchas:
15243 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15244 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015245 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015247 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015248 elif ln conf$$.file conf$$ 2>/dev/null; then
15249 as_ln_s=ln
15250 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015251 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015253else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015254 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000015255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015256rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15257rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015258
Matthias Kloseb9621712010-04-24 17:59:49 +000015259
15260# as_fn_mkdir_p
15261# -------------
15262# Create "$as_dir" as a directory, including parents if necessary.
15263as_fn_mkdir_p ()
15264{
15265
15266 case $as_dir in #(
15267 -*) as_dir=./$as_dir;;
15268 esac
15269 test -d "$as_dir" || eval $as_mkdir_p || {
15270 as_dirs=
15271 while :; do
15272 case $as_dir in #(
15273 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15274 *) as_qdir=$as_dir;;
15275 esac
15276 as_dirs="'$as_qdir' $as_dirs"
15277 as_dir=`$as_dirname -- "$as_dir" ||
15278$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15279 X"$as_dir" : 'X\(//\)[^/]' \| \
15280 X"$as_dir" : 'X\(//\)$' \| \
15281 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15282$as_echo X"$as_dir" |
15283 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15284 s//\1/
15285 q
15286 }
15287 /^X\(\/\/\)[^/].*/{
15288 s//\1/
15289 q
15290 }
15291 /^X\(\/\/\)$/{
15292 s//\1/
15293 q
15294 }
15295 /^X\(\/\).*/{
15296 s//\1/
15297 q
15298 }
15299 s/.*/./; q'`
15300 test -d "$as_dir" && break
15301 done
15302 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015303 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015304
15305
15306} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015307if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015308 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015309else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015310 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015311 as_mkdir_p=false
15312fi
15313
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015314if test -x / >/dev/null 2>&1; then
15315 as_test_x='test -x'
15316else
15317 if ls -dL / >/dev/null 2>&1; then
15318 as_ls_L_option=L
15319 else
15320 as_ls_L_option=
15321 fi
15322 as_test_x='
15323 eval sh -c '\''
15324 if test -d "$1"; then
15325 test -d "$1/.";
15326 else
15327 case $1 in #(
15328 -*)set "./$1";;
15329 esac;
15330 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15331 ???[sx]*):;;*)false;;esac;fi
15332 '\'' sh
15333 '
15334fi
15335as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000015336
15337# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015338as_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 +000015339
15340# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015341as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015342
15343
Martin v. Löwis11437992002-04-12 09:54:03 +000015344exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015345## ----------------------------------- ##
15346## Main body of $CONFIG_STATUS script. ##
15347## ----------------------------------- ##
15348_ASEOF
15349test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015350
Matthias Kloseb9621712010-04-24 17:59:49 +000015351cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15352# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015353# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354# values after options handling.
15355ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015356This file was extended by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015357generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015358
15359 CONFIG_FILES = $CONFIG_FILES
15360 CONFIG_HEADERS = $CONFIG_HEADERS
15361 CONFIG_LINKS = $CONFIG_LINKS
15362 CONFIG_COMMANDS = $CONFIG_COMMANDS
15363 $ $0 $@
15364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015365on `(hostname || uname -n) 2>/dev/null | sed 1q`
15366"
15367
Martin v. Löwis11437992002-04-12 09:54:03 +000015368_ACEOF
15369
Matthias Kloseb9621712010-04-24 17:59:49 +000015370case $ac_config_files in *"
15371"*) set x $ac_config_files; shift; ac_config_files=$*;;
15372esac
15373
15374case $ac_config_headers in *"
15375"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15376esac
15377
15378
15379cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015380# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015381config_files="$ac_config_files"
15382config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015385
Matthias Kloseb9621712010-04-24 17:59:49 +000015386cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015387ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015388\`$as_me' instantiates files and other configuration actions
15389from templates according to the current configuration. Unless the files
15390and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015391
Matthias Kloseb9621712010-04-24 17:59:49 +000015392Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015393
15394 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015395 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015396 --config print configuration, then exit
15397 -q, --quiet, --silent
15398 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 -d, --debug don't remove temporary files
15400 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015401 --file=FILE[:TEMPLATE]
15402 instantiate the configuration file FILE
15403 --header=FILE[:TEMPLATE]
15404 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015405
15406Configuration files:
15407$config_files
15408
15409Configuration headers:
15410$config_headers
15411
Matthias Kloseb9621712010-04-24 17:59:49 +000015412Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015415cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15416ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015417ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015418python config.status 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015419configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000015420 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015421
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015422Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015423This config.status script is free software; the Free Software Foundation
15424gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015425
15426ac_pwd='$ac_pwd'
15427srcdir='$srcdir'
15428INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015429MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015430test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015431_ACEOF
15432
Matthias Kloseb9621712010-04-24 17:59:49 +000015433cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15434# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015435ac_need_defaults=:
15436while test $# != 0
15437do
15438 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015439 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015440 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15441 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015442 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015443 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015444 --*=)
15445 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15446 ac_optarg=
15447 ac_shift=:
15448 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015449 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015450 ac_option=$1
15451 ac_optarg=$2
15452 ac_shift=shift
15453 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015454 esac
15455
Skip Montanaro6dead952003-09-25 14:50:04 +000015456 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015457 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015458 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15459 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015460 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015461 $as_echo "$ac_cs_version"; exit ;;
15462 --config | --confi | --conf | --con | --co | --c )
15463 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015464 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015465 debug=: ;;
15466 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015467 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015468 case $ac_optarg in
15469 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015470 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015471 esac
15472 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 ac_need_defaults=false;;
15474 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015475 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015476 case $ac_optarg in
15477 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15478 esac
15479 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015480 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015481 --he | --h)
15482 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015483 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015484Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015485 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015486 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015487 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15488 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15489 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015490
15491 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015492 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015493Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015494
Matthias Kloseb9621712010-04-24 17:59:49 +000015495 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015496 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015497
15498 esac
15499 shift
15500done
15501
Skip Montanaro6dead952003-09-25 14:50:04 +000015502ac_configure_extra_args=
15503
15504if $ac_cs_silent; then
15505 exec 6>/dev/null
15506 ac_configure_extra_args="$ac_configure_extra_args --silent"
15507fi
15508
15509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015511if \$ac_cs_recheck; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015512 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015513 shift
15514 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15515 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015516 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015518fi
15519
Martin v. Löwis11437992002-04-12 09:54:03 +000015520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015521cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522exec 5>>config.log
15523{
15524 echo
15525 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15526## Running $as_me. ##
15527_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015529} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015532cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015534
Matthias Kloseb9621712010-04-24 17:59:49 +000015535cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015536
15537# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015538for ac_config_target in $ac_config_targets
15539do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015540 case $ac_config_target in
15541 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15542 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15543 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015544 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15545 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015546 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15547 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015548 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015549 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015550
Victor Stinnere0be4232011-10-25 13:06:09 +020015551 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015552 esac
15553done
15554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555
Martin v. Löwis11437992002-04-12 09:54:03 +000015556# If the user did not use the arguments to specify the items to instantiate,
15557# then the envvar interface is used. Set only those that are not.
15558# We use the long form for the default assignment because of an extremely
15559# bizarre bug on SunOS 4.1.3.
15560if $ac_need_defaults; then
15561 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15562 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15563fi
15564
Skip Montanaro6dead952003-09-25 14:50:04 +000015565# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015566# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015567# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015568# Hook for its removal unless debugging.
15569# Note that there is a small window in which the directory will not be cleaned:
15570# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015571$debug ||
15572{
Victor Stinnere0be4232011-10-25 13:06:09 +020015573 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015575 : "${ac_tmp:=$tmp}"
15576 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015577' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015578 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015579}
Martin v. Löwis11437992002-04-12 09:54:03 +000015580# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015581
Martin v. Löwis11437992002-04-12 09:54:03 +000015582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015584 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015585} ||
15586{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015587 tmp=./conf$$-$RANDOM
15588 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015589} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015590ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015591
Matthias Kloseb9621712010-04-24 17:59:49 +000015592# Set up the scripts for CONFIG_FILES section.
15593# No need to generate them if there are no CONFIG_FILES.
15594# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015596
Matthias Kloseb9621712010-04-24 17:59:49 +000015597
15598ac_cr=`echo X | tr X '\015'`
15599# On cygwin, bash can eat \r inside `` if the user requested igncr.
15600# But we know of no other shell where ac_cr would be empty at this
15601# point, so we can use a bashism as a fallback.
15602if test "x$ac_cr" = x; then
15603 eval ac_cr=\$\'\\r\'
15604fi
15605ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15606if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015607 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015608else
15609 ac_cs_awk_cr=$ac_cr
15610fi
15611
Victor Stinnere0be4232011-10-25 13:06:09 +020015612echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015613_ACEOF
15614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015615
Matthias Kloseb9621712010-04-24 17:59:49 +000015616{
15617 echo "cat >conf$$subs.awk <<_ACEOF" &&
15618 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15619 echo "_ACEOF"
15620} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015621 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15622ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623ac_delim='%!_!# '
15624for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015626 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015627
Matthias Kloseb9621712010-04-24 17:59:49 +000015628 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15629 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015630 break
15631 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015632 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633 else
15634 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015635 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015636done
Matthias Kloseb9621712010-04-24 17:59:49 +000015637rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015638
Matthias Kloseb9621712010-04-24 17:59:49 +000015639cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015640cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015642sed -n '
15643h
15644s/^/S["/; s/!.*/"]=/
15645p
15646g
15647s/^[^!]*!//
15648:repl
15649t repl
15650s/'"$ac_delim"'$//
15651t delim
15652:nl
15653h
15654s/\(.\{148\}\)..*/\1/
15655t more1
15656s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15657p
15658n
15659b repl
15660:more1
15661s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15662p
15663g
15664s/.\{148\}//
15665t nl
15666:delim
15667h
15668s/\(.\{148\}\)..*/\1/
15669t more2
15670s/["\\]/\\&/g; s/^/"/; s/$/"/
15671p
15672b
15673:more2
15674s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15675p
15676g
15677s/.\{148\}//
15678t delim
15679' <conf$$subs.awk | sed '
15680/^[^""]/{
15681 N
15682 s/\n//
15683}
15684' >>$CONFIG_STATUS || ac_write_fail=1
15685rm -f conf$$subs.awk
15686cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15687_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015688cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 for (key in S) S_is_set[key] = 1
15690 FS = ""
15691
15692}
15693{
15694 line = $ 0
15695 nfields = split(line, field, "@")
15696 substed = 0
15697 len = length(field[1])
15698 for (i = 2; i < nfields; i++) {
15699 key = field[i]
15700 keylen = length(key)
15701 if (S_is_set[key]) {
15702 value = S[key]
15703 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15704 len += length(value) + length(field[++i])
15705 substed = 1
15706 } else
15707 len += 1 + keylen
15708 }
15709
15710 print line
15711}
15712
15713_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015715cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15716if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15717 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15718else
15719 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015720fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015721 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015722_ACEOF
15723
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015724# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15725# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726# trailing colons and then remove the whole line if VPATH becomes empty
15727# (actually we leave an empty line to preserve line numbers).
15728if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015729 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15730h
15731s///
15732s/^/:/
15733s/[ ]*$/:/
15734s/:\$(srcdir):/:/g
15735s/:\${srcdir}:/:/g
15736s/:@srcdir@:/:/g
15737s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015739x
15740s/\(=[ ]*\).*/\1/
15741G
15742s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015743s/^[^=]*=[ ]*$//
15744}'
15745fi
15746
Matthias Kloseb9621712010-04-24 17:59:49 +000015747cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015748fi # test -n "$CONFIG_FILES"
15749
Matthias Kloseb9621712010-04-24 17:59:49 +000015750# Set up the scripts for CONFIG_HEADERS section.
15751# No need to generate them if there are no CONFIG_HEADERS.
15752# This happens for instance with `./config.status Makefile'.
15753if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015754cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015755BEGIN {
15756_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015757
Matthias Kloseb9621712010-04-24 17:59:49 +000015758# Transform confdefs.h into an awk script `defines.awk', embedded as
15759# here-document in config.status, that substitutes the proper values into
15760# config.h.in to produce config.h.
15761
15762# Create a delimiter string that does not exist in confdefs.h, to ease
15763# handling of long lines.
15764ac_delim='%!_!# '
15765for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015766 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15767 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015768 break
15769 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015770 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015771 else
15772 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15773 fi
15774done
15775
15776# For the awk script, D is an array of macro values keyed by name,
15777# likewise P contains macro parameters if any. Preserve backslash
15778# newline sequences.
15779
15780ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15781sed -n '
15782s/.\{148\}/&'"$ac_delim"'/g
15783t rset
15784:rset
15785s/^[ ]*#[ ]*define[ ][ ]*/ /
15786t def
15787d
15788:def
15789s/\\$//
15790t bsnl
15791s/["\\]/\\&/g
15792s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15793D["\1"]=" \3"/p
15794s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15795d
15796:bsnl
15797s/["\\]/\\&/g
15798s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15799D["\1"]=" \3\\\\\\n"\\/p
15800t cont
15801s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15802t cont
15803d
15804:cont
15805n
15806s/.\{148\}/&'"$ac_delim"'/g
15807t clear
15808:clear
15809s/\\$//
15810t bsnlc
15811s/["\\]/\\&/g; s/^/"/; s/$/"/p
15812d
15813:bsnlc
15814s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15815b cont
15816' <confdefs.h | sed '
15817s/'"$ac_delim"'/"\\\
15818"/g' >>$CONFIG_STATUS || ac_write_fail=1
15819
15820cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15821 for (key in D) D_is_set[key] = 1
15822 FS = ""
15823}
15824/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15825 line = \$ 0
15826 split(line, arg, " ")
15827 if (arg[1] == "#") {
15828 defundef = arg[2]
15829 mac1 = arg[3]
15830 } else {
15831 defundef = substr(arg[1], 2)
15832 mac1 = arg[2]
15833 }
15834 split(mac1, mac2, "(") #)
15835 macro = mac2[1]
15836 prefix = substr(line, 1, index(line, defundef) - 1)
15837 if (D_is_set[macro]) {
15838 # Preserve the white space surrounding the "#".
15839 print prefix "define", macro P[macro] D[macro]
15840 next
15841 } else {
15842 # Replace #undef with comments. This is necessary, for example,
15843 # in the case of _POSIX_SOURCE, which is predefined and required
15844 # on some systems where configure will not decide to define it.
15845 if (defundef == "undef") {
15846 print "/*", prefix defundef, macro, "*/"
15847 next
15848 }
15849 }
15850}
15851{ print }
15852_ACAWK
15853_ACEOF
15854cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015855 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015856fi # test -n "$CONFIG_HEADERS"
15857
15858
15859eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15860shift
15861for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862do
15863 case $ac_tag in
15864 :[FHLC]) ac_mode=$ac_tag; continue;;
15865 esac
15866 case $ac_mode$ac_tag in
15867 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015868 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015869 :[FH]-) ac_tag=-:-;;
15870 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15871 esac
15872 ac_save_IFS=$IFS
15873 IFS=:
15874 set x $ac_tag
15875 IFS=$ac_save_IFS
15876 shift
15877 ac_file=$1
15878 shift
15879
15880 case $ac_mode in
15881 :L) ac_source=$1;;
15882 :[FH])
15883 ac_file_inputs=
15884 for ac_f
15885 do
15886 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015887 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015888 *) # Look for the file first in the build tree, then in the source tree
15889 # (if the path is not absolute). The absolute path cannot be DOS-style,
15890 # because $ac_f cannot contain `:'.
15891 test -f "$ac_f" ||
15892 case $ac_f in
15893 [\\/$]*) false;;
15894 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15895 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020015896 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015897 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015898 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15899 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015900 done
15901
15902 # Let's still pretend it is `configure' which instantiates (i.e., don't
15903 # use $as_me), people would be surprised to read:
15904 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015905 configure_input='Generated from '`
15906 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15907 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015908 if test x"$ac_file" != x-; then
15909 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015910 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15911$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015912 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015913 # Neutralize special characters interpreted by sed in replacement strings.
15914 case $configure_input in #(
15915 *\&* | *\|* | *\\* )
15916 ac_sed_conf_input=`$as_echo "$configure_input" |
15917 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15918 *) ac_sed_conf_input=$configure_input;;
15919 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015920
15921 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020015922 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15923 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015924 esac
15925 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015926 esac
15927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015928 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015929$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015930 X"$ac_file" : 'X\(//\)[^/]' \| \
15931 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015933$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015934 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15935 s//\1/
15936 q
15937 }
15938 /^X\(\/\/\)[^/].*/{
15939 s//\1/
15940 q
15941 }
15942 /^X\(\/\/\)$/{
15943 s//\1/
15944 q
15945 }
15946 /^X\(\/\).*/{
15947 s//\1/
15948 q
15949 }
15950 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015951 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 ac_builddir=.
15953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015954case "$ac_dir" in
15955.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15956*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015957 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015958 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015959 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015960 case $ac_top_builddir_sub in
15961 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15962 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15963 esac ;;
15964esac
15965ac_abs_top_builddir=$ac_pwd
15966ac_abs_builddir=$ac_pwd$ac_dir_suffix
15967# for backward compatibility:
15968ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015969
15970case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015971 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015972 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015973 ac_top_srcdir=$ac_top_builddir_sub
15974 ac_abs_top_srcdir=$ac_pwd ;;
15975 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015977 ac_top_srcdir=$srcdir
15978 ac_abs_top_srcdir=$srcdir ;;
15979 *) # Relative name.
15980 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15981 ac_top_srcdir=$ac_top_build_prefix$srcdir
15982 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015983esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015984ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015985
Martin v. Löwis11437992002-04-12 09:54:03 +000015986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015987 case $ac_mode in
15988 :F)
15989 #
15990 # CONFIG_FILE
15991 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015992
15993 case $INSTALL in
15994 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015995 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015996 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010015997 ac_MKDIR_P=$MKDIR_P
15998 case $MKDIR_P in
15999 [\\/$]* | ?:[\\/]* ) ;;
16000 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16001 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016002_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016003
Matthias Kloseb9621712010-04-24 17:59:49 +000016004cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016005# If the template does not know about datarootdir, expand it.
16006# FIXME: This hack should be removed a few years after 2.60.
16007ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016008ac_sed_dataroot='
16009/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016010 p
16011 q
16012}
16013/@datadir@/p
16014/@docdir@/p
16015/@infodir@/p
16016/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016017/@mandir@/p'
16018case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016019*datarootdir*) ac_datarootdir_seen=yes;;
16020*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016021 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16022$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016025 ac_datarootdir_hack='
16026 s&@datadir@&$datadir&g
16027 s&@docdir@&$docdir&g
16028 s&@infodir@&$infodir&g
16029 s&@localedir@&$localedir&g
16030 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016031 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016032esac
16033_ACEOF
16034
16035# Neutralize VPATH when `$srcdir' = `.'.
16036# Shell code in configure.ac might set extrasub.
16037# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16039ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016040$extrasub
16041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016042cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016043:t
16044/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016045s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016046s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016047s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016048s&@srcdir@&$ac_srcdir&;t t
16049s&@abs_srcdir@&$ac_abs_srcdir&;t t
16050s&@top_srcdir@&$ac_top_srcdir&;t t
16051s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16052s&@builddir@&$ac_builddir&;t t
16053s&@abs_builddir@&$ac_abs_builddir&;t t
16054s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16055s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016056s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016057$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016058"
Victor Stinnere0be4232011-10-25 13:06:09 +020016059eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16060 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016062test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016063 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16064 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16065 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016066 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016067which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016068$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016069which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016070
Victor Stinnere0be4232011-10-25 13:06:09 +020016071 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016072 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016073 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16074 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016075 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016076 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016077 ;;
16078 :H)
16079 #
16080 # CONFIG_HEADER
16081 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016082 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016083 {
16084 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016085 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16086 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016087 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016088 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016089 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16090$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016091 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016092 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016093 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016094 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016095 fi
16096 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016097 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016098 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016099 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016100 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016101 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016103
16104 esac
16105
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016106
16107 case $ac_file$ac_mode in
16108 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16109
16110 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016111done # for ac_tag
16112
Guido van Rossum627b2d71993-12-24 10:39:16 +000016113
Matthias Kloseb9621712010-04-24 17:59:49 +000016114as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016115_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016116ac_clean_files=$ac_clean_files_save
16117
Matthias Kloseb9621712010-04-24 17:59:49 +000016118test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016119 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016120
Martin v. Löwis11437992002-04-12 09:54:03 +000016121
16122# configure is writing to config.log, and then calls config.status.
16123# config.status does its own redirection, appending to config.log.
16124# Unfortunately, on DOS this fails, as config.log is still kept open
16125# by configure, so config.status won't be able to write to it; its
16126# output is simply discarded. So we exec the FD to /dev/null,
16127# effectively closing config.log, so it can be properly (re)opened and
16128# appended to by config.status. When coming back to configure, we
16129# need to make the FD available again.
16130if test "$no_create" != yes; then
16131 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016132 ac_config_status_args=
16133 test "$silent" = yes &&
16134 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016135 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016136 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016137 exec 5>>config.log
16138 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16139 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016140 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016141fi
16142if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16143 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16144$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016145fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016146
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016147
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016148echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016149if test ! -f Modules/Setup
16150then
16151 cp $srcdir/Modules/Setup.dist Modules/Setup
16152fi
16153
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016154echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016155if test ! -f Modules/Setup.local
16156then
16157 echo "# Edit this file for local setup changes" >Modules/Setup.local
16158fi
16159
16160echo "creating Makefile"
16161$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16162 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016163 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016164mv config.c Modules