blob: 7948862a249eb148df4b3e96782858804c9e192e [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnerd169fdc2011-09-08 00:56:17 +020094as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
Victor Stinnerd169fdc2011-09-08 00:56:17 +0200220 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
Victor Stinnerd169fdc2011-09-08 00:56:17 +0200225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000232fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: http://bugs.python.org/ about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246 fi
247 exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265 { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274 return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282 set +e
283 as_fn_set_status $1
284 exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367fi # as_fn_arith
368
369
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000375as_fn_error ()
376{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000381 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200382 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000383 as_fn_exit $as_status
384} # as_fn_error
385
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000386if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389else
390 as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395else
396 as_basename=false
397fi
398
Matthias Kloseb9621712010-04-24 17:59:49 +0000399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401else
402 as_dirname=false
403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000404
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000409$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430
431
Matthias Kloseb9621712010-04-24 17:59:49 +0000432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000446 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000452 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000453 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 # Exit status is that of the last command.
460 exit
461}
462
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000464case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000465-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000466 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 esac;;
472*)
473 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000475
Martin v. Löwis11437992002-04-12 09:54:03 +0000476rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000477if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479else
480 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000481 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000483if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489 # In both cases, we have to default to `cp -p'.
490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491 as_ln_s='cp -p'
492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
498 as_ln_s='cp -p'
499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000502
Skip Montanaro6dead952003-09-25 14:50:04 +0000503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000505else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000507 as_mkdir_p=false
508fi
509
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000510if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000523 case $1 in #(
524 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000525 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530fi
531as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000532
533# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000534as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
539
Matthias Kloseb9621712010-04-24 17:59:49 +0000540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
543# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
Martin v. Löwis11437992002-04-12 09:54:03 +0000548#
549# Initializations.
550#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000552ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000553ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000554LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000563PACKAGE_VERSION='3.3'
564PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000565PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000566PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000567
568ac_unique_file="Include/object.h"
569# Factoring default headers for most tests.
570ac_includes_default="\
571#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000573# include <sys/types.h>
574#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <sys/stat.h>
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000579# include <stdlib.h>
580# include <stddef.h>
581#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000582# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000583# include <stdlib.h>
584# endif
585#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_STRING_H
587# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <memory.h>
589# endif
590# include <string.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <strings.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef HAVE_STDINT_H
599# include <stdint.h>
600#endif
601#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <unistd.h>
603#endif"
604
Matthias Kloseb9621712010-04-24 17:59:49 +0000605ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000606SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000607THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000608SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000609LIBC
610LIBM
611HAVE_GETHOSTBYNAME
612HAVE_GETHOSTBYNAME_R
613HAVE_GETHOSTBYNAME_R_3_ARG
614HAVE_GETHOSTBYNAME_R_5_ARG
615HAVE_GETHOSTBYNAME_R_6_ARG
616LIBOBJS
617TRUE
618MACHDEP_OBJS
619DYNLOADFILE
620DLINCLDIR
621THREADOBJ
622LDLAST
623USE_THREAD_MODULE
624SIGNAL_OBJS
625USE_SIGNAL_MODULE
626LIBFFI_INCLUDEDIR
627PKG_CONFIG
628SHLIBS
629CFLAGSFORSHARED
630LINKFORSHARED
631CCSHARED
632BLDSHARED
633LDCXXSHARED
634LDSHARED
635SO
636LIBTOOL_CRUFT
637OTHER_LIBTOOL_OPT
638UNIVERSAL_ARCH_FLAGS
639BASECFLAGS
640OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000641ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LN
643INSTALL_DATA
644INSTALL_SCRIPT
645INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500646HAS_PYTHON
647DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000648ARFLAGS
649AR
650RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000651USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652GNULD
653LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000654LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000655RUNSHARED
656INSTSONAME
657LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000658PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000659BLDLIBRARY
660DLLLIBRARY
661LDLIBRARY
662LIBRARY
663BUILDEXEEXT
664EGREP
665GREP
666CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200667NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000668MAINCC
669CXX
670OBJEXT
671EXEEXT
672ac_ct_CC
673CPPFLAGS
674LDFLAGS
675CFLAGS
676CC
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CONFIGURE_MACOSX_DEPLOYMENT_TARGET
679SGI_ABI
680MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000681FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000682FRAMEWORKUNIXTOOLSPREFIX
683FRAMEWORKALTINSTALLLAST
684FRAMEWORKALTINSTALLFIRST
685FRAMEWORKINSTALLLAST
686FRAMEWORKINSTALLFIRST
687PYTHONFRAMEWORKINSTALLDIR
688PYTHONFRAMEWORKPREFIX
689PYTHONFRAMEWORKDIR
690PYTHONFRAMEWORKIDENTIFIER
691PYTHONFRAMEWORK
692LIPO_32BIT_FLAGS
693ARCH_RUN_32BIT
694UNIVERSALSDK
695CONFIG_ARGS
696SOVERSION
697VERSION
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500698HAS_HG
699HGBRANCH
700HGTAG
701HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702target_alias
703host_alias
704build_alias
705LIBS
706ECHO_T
707ECHO_N
708ECHO_C
709DEFS
710mandir
711localedir
712libdir
713psdir
714pdfdir
715dvidir
716htmldir
717infodir
718docdir
719oldincludedir
720includedir
721localstatedir
722sharedstatedir
723sysconfdir
724datadir
725datarootdir
726libexecdir
727sbindir
728bindir
729program_transform_name
730prefix
731exec_prefix
732PACKAGE_URL
733PACKAGE_BUGREPORT
734PACKAGE_STRING
735PACKAGE_VERSION
736PACKAGE_TARNAME
737PACKAGE_NAME
738PATH_SEPARATOR
739SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000741ac_user_opts='
742enable_option_checking
743enable_universalsdk
744with_universal_archs
745with_framework_name
746enable_framework
747with_gcc
748with_cxx_main
749with_suffix
750enable_shared
751enable_profiling
752with_pydebug
753with_libs
754with_system_expat
755with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000756enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000757with_dbmliborder
758with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000759with_threads
760with_thread
761enable_ipv6
762with_doc_strings
763with_tsc
764with_pymalloc
765with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000766with_fpectl
767with_libm
768with_libc
769enable_big_digits
770with_wide_unicode
771with_computed_gotos
772'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000773 ac_precious_vars='build_alias
774host_alias
775target_alias
776CC
777CFLAGS
778LDFLAGS
779LIBS
780CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200781CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000782
Guido van Rossum627b2d71993-12-24 10:39:16 +0000783
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785ac_init_help=
786ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000787ac_unrecognized_opts=
788ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789# The variables have the same names as the options, with
790# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000791cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794no_recursion=
795prefix=NONE
796program_prefix=NONE
797program_suffix=NONE
798program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803x_includes=NONE
804x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000805
806# Installation directory options.
807# These are left unexpanded so users can "make install exec_prefix=/foo"
808# and all the variables that are supposed to be based on exec_prefix
809# by default will actually change.
810# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812bindir='${exec_prefix}/bin'
813sbindir='${exec_prefix}/sbin'
814libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815datarootdir='${prefix}/share'
816datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817sysconfdir='${prefix}/etc'
818sharedstatedir='${prefix}/com'
819localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820includedir='${prefix}/include'
821oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
823infodir='${datarootdir}/info'
824htmldir='${docdir}'
825dvidir='${docdir}'
826pdfdir='${docdir}'
827psdir='${docdir}'
828libdir='${exec_prefix}/lib'
829localedir='${datarootdir}/locale'
830mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000835do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836 # If the previous option needs an argument, assign it.
837 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839 ac_prev=
840 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200844 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
845 *=) ac_optarg= ;;
846 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Accept the important Cygnus configure options, so we can diagnose typos.
850
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851 case $ac_dashdash$ac_option in
852 --)
853 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855 -bindir | --bindir | --bindi | --bind | --bin | --bi)
856 ac_prev=bindir ;;
857 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859
860 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865 -cache-file | --cache-file | --cache-fil | --cache-fi \
866 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
867 ac_prev=cache_file ;;
868 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
869 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 cache_file=$ac_optarg ;;
871
872 --config-cache | -C)
873 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000875 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
881 | --dataroo | --dataro | --datar)
882 ac_prev=datarootdir ;;
883 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
884 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
885 datarootdir=$ac_optarg ;;
886
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000888 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000890 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200891 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000892 ac_useropt_orig=$ac_useropt
893 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
894 case $ac_user_opts in
895 *"
896"enable_$ac_useropt"
897"*) ;;
898 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
899 ac_unrecognized_sep=', ';;
900 esac
901 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902
903 -docdir | --docdir | --docdi | --doc | --do)
904 ac_prev=docdir ;;
905 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
906 docdir=$ac_optarg ;;
907
908 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
909 ac_prev=dvidir ;;
910 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
911 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
913 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000914 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000916 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200917 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000918 ac_useropt_orig=$ac_useropt
919 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
920 case $ac_user_opts in
921 *"
922"enable_$ac_useropt"
923"*) ;;
924 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
925 ac_unrecognized_sep=', ';;
926 esac
927 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
930 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
931 | --exec | --exe | --ex)
932 ac_prev=exec_prefix ;;
933 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
934 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
935 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
938 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 # Obsolete; use --with-gas.
940 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 -help | --help | --hel | --he | -h)
943 ac_init_help=long ;;
944 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
945 ac_init_help=recursive ;;
946 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
947 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
955 ac_prev=htmldir ;;
956 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
957 | --ht=*)
958 htmldir=$ac_optarg ;;
959
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -includedir | --includedir | --includedi | --included | --include \
961 | --includ | --inclu | --incl | --inc)
962 ac_prev=includedir ;;
963 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
964 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
967 -infodir | --infodir | --infodi | --infod | --info | --inf)
968 ac_prev=infodir ;;
969 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
972 -libdir | --libdir | --libdi | --libd)
973 ac_prev=libdir ;;
974 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
977 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
978 | --libexe | --libex | --libe)
979 ac_prev=libexecdir ;;
980 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
981 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984 -localedir | --localedir | --localedi | --localed | --locale)
985 ac_prev=localedir ;;
986 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
987 localedir=$ac_optarg ;;
988
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991 ac_prev=localstatedir ;;
992 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
996 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
997 ac_prev=mandir ;;
998 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Obsolete; use --without-fp.
1003 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 no_create=yes ;;
1008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1010 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1011 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1014 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1015 | --oldin | --oldi | --old | --ol | --o)
1016 ac_prev=oldincludedir ;;
1017 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1018 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1019 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1023 ac_prev=prefix ;;
1024 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1028 | --program-pre | --program-pr | --program-p)
1029 ac_prev=program_prefix ;;
1030 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1031 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1035 | --program-suf | --program-su | --program-s)
1036 ac_prev=program_suffix ;;
1037 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1038 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -program-transform-name | --program-transform-name \
1042 | --program-transform-nam | --program-transform-na \
1043 | --program-transform-n | --program-transform- \
1044 | --program-transform | --program-transfor \
1045 | --program-transfo | --program-transf \
1046 | --program-trans | --program-tran \
1047 | --progr-tra | --program-tr | --program-t)
1048 ac_prev=program_transform_name ;;
1049 -program-transform-name=* | --program-transform-name=* \
1050 | --program-transform-nam=* | --program-transform-na=* \
1051 | --program-transform-n=* | --program-transform-=* \
1052 | --program-transform=* | --program-transfor=* \
1053 | --program-transfo=* | --program-transf=* \
1054 | --program-trans=* | --program-tran=* \
1055 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1059 ac_prev=pdfdir ;;
1060 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1061 pdfdir=$ac_optarg ;;
1062
1063 -psdir | --psdir | --psdi | --psd | --ps)
1064 ac_prev=psdir ;;
1065 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1066 psdir=$ac_optarg ;;
1067
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1069 | -silent | --silent | --silen | --sile | --sil)
1070 silent=yes ;;
1071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1073 ac_prev=sbindir ;;
1074 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1075 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
1078 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1079 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1080 | --sharedst | --shareds | --shared | --share | --shar \
1081 | --sha | --sh)
1082 ac_prev=sharedstatedir ;;
1083 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1084 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1085 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1086 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -site | --site | --sit)
1090 ac_prev=site ;;
1091 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1095 ac_prev=srcdir ;;
1096 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1100 | --syscon | --sysco | --sysc | --sys | --sy)
1101 ac_prev=sysconfdir ;;
1102 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1103 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1112 verbose=yes ;;
1113
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 -version | --version | --versio | --versi | --vers | -V)
1115 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001121 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 ac_useropt_orig=$ac_useropt
1123 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1124 case $ac_user_opts in
1125 *"
1126"with_$ac_useropt"
1127"*) ;;
1128 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1129 ac_unrecognized_sep=', ';;
1130 esac
1131 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001134 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001137 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001138 ac_useropt_orig=$ac_useropt
1139 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1140 case $ac_user_opts in
1141 *"
1142"with_$ac_useropt"
1143"*) ;;
1144 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1145 ac_unrecognized_sep=', ';;
1146 esac
1147 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149 --x)
1150 # Obsolete; use --with-x.
1151 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1154 | --x-incl | --x-inc | --x-in | --x-i)
1155 ac_prev=x_includes ;;
1156 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1157 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1161 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1162 ac_prev=x_libraries ;;
1163 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1164 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001167 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1168Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 ;;
1170
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 *=*)
1172 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1173 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 case $ac_envvar in #(
1175 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001176 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 export $ac_envvar ;;
1180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001186 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ;;
1188
1189 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001190done
1191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001194 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195fi
1196
Matthias Kloseb9621712010-04-24 17:59:49 +00001197if test -n "$ac_unrecognized_opts"; then
1198 case $enable_option_checking in
1199 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1202 esac
1203fi
1204
1205# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001206for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1207 datadir sysconfdir sharedstatedir localstatedir includedir \
1208 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1209 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 # Remove trailing slashes.
1213 case $ac_val in
1214 */ )
1215 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1216 eval $ac_var=\$ac_val;;
1217 esac
1218 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220 [\\/$]* | ?:[\\/]* ) continue;;
1221 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001224done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001225
Martin v. Löwis11437992002-04-12 09:54:03 +00001226# There might be people who depend on the old broken behavior: `$host'
1227# used to hold the argument of --host etc.
1228# FIXME: To remove some day.
1229build=$build_alias
1230host=$host_alias
1231target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232
Martin v. Löwis11437992002-04-12 09:54:03 +00001233# FIXME: To remove some day.
1234if test "x$host_alias" != x; then
1235 if test "x$build_alias" = x; then
1236 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001237 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1238 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 elif test "x$build_alias" != "x$host_alias"; then
1240 cross_compiling=yes
1241 fi
1242fi
1243
1244ac_tool_prefix=
1245test -n "$host_alias" && ac_tool_prefix=$host_alias-
1246
1247test "$silent" = yes && exec 6>/dev/null
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250ac_pwd=`pwd` && test -n "$ac_pwd" &&
1251ac_ls_di=`ls -di .` &&
1252ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256
1257
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258# Find the source files, if location was not specified.
1259if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 ac_confdir=`$as_dirname -- "$as_myself" ||
1263$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1264 X"$as_myself" : 'X\(//\)[^/]' \| \
1265 X"$as_myself" : 'X\(//\)$' \| \
1266 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1267$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\/\)[^/].*/{
1273 s//\1/
1274 q
1275 }
1276 /^X\(\/\/\)$/{
1277 s//\1/
1278 q
1279 }
1280 /^X\(\/\).*/{
1281 s//\1/
1282 q
1283 }
1284 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287 srcdir=..
1288 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289else
1290 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292if test ! -r "$srcdir/$ac_unique_file"; then
1293 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001294 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1297ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 pwd)`
1300# When building in place, set srcdir=.
1301if test "$ac_abs_confdir" = "$ac_pwd"; then
1302 srcdir=.
1303fi
1304# Remove unnecessary trailing slashes from srcdir.
1305# Double slashes in file names in object file debugging info
1306# mess up M-x gdb in Emacs.
1307case $srcdir in
1308*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1309esac
1310for ac_var in $ac_precious_vars; do
1311 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1312 eval ac_env_${ac_var}_value=\$${ac_var}
1313 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1314 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1315done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317#
1318# Report the --help message.
1319#
1320if test "$ac_init_help" = "long"; then
1321 # Omit some internal or obsolete options to make the list less imposing.
1322 # This message is too long to be a string in the A/UX 3.1 sh.
1323 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001324\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001325
1326Usage: $0 [OPTION]... [VAR=VALUE]...
1327
1328To assign environment variables (e.g., CC, CFLAGS...), specify them as
1329VAR=VALUE. See below for descriptions of some of the useful variables.
1330
1331Defaults for the options are specified in brackets.
1332
1333Configuration:
1334 -h, --help display this help and exit
1335 --help=short display options specific to this package
1336 --help=recursive display the short help of all the included packages
1337 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --cache-file=FILE cache test results in FILE [disabled]
1340 -C, --config-cache alias for \`--cache-file=config.cache'
1341 -n, --no-create do not create output files
1342 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1343
Martin v. Löwis11437992002-04-12 09:54:03 +00001344Installation directories:
1345 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001347 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001349
1350By default, \`make install' will install all the files in
1351\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1352an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1353for instance \`--prefix=\$HOME'.
1354
1355For better control, use the options below.
1356
1357Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001358 --bindir=DIR user executables [EPREFIX/bin]
1359 --sbindir=DIR system admin executables [EPREFIX/sbin]
1360 --libexecdir=DIR program executables [EPREFIX/libexec]
1361 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1362 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1363 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1364 --libdir=DIR object code libraries [EPREFIX/lib]
1365 --includedir=DIR C header files [PREFIX/include]
1366 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1367 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1368 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1369 --infodir=DIR info documentation [DATAROOTDIR/info]
1370 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1371 --mandir=DIR man documentation [DATAROOTDIR/man]
1372 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1373 --htmldir=DIR html documentation [DOCDIR]
1374 --dvidir=DIR dvi documentation [DOCDIR]
1375 --pdfdir=DIR pdf documentation [DOCDIR]
1376 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001377_ACEOF
1378
1379 cat <<\_ACEOF
1380_ACEOF
1381fi
1382
1383if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001384 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001385 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001386 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 cat <<\_ACEOF
1388
1389Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001390 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1392 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001393 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001394 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --enable-framework[=INSTALLDIR]
1396 Build (MacOSX|Darwin) framework
1397 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001398 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001399 --enable-loadable-sqlite-extensions
1400 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --enable-ipv6 Enable ipv6 (with ipv4) support
1402 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001403 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001404 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Optional Packages:
1407 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1408 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001409 --with-universal-archs=ARCH
1410 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001411 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001412 --with-framework-name=FRAMEWORK
1413 specify an alternate name of the framework built
1414 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001416 --with-cxx-main=<compiler>
1417 compile main() and link python executable with C++
1418 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-suffix=.exe set executable suffix
1420 --with-pydebug build with Py_DEBUG defined
1421 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001422 --with-system-expat build pyexpat module using an installed expat
1423 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001424 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001425 --with-dbmliborder=db1:db2:...
1426 order to check db backends for dbm. Valid value is a
1427 colon separated string with the backend names
1428 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with(out)-threads[=DIRECTORY]
1431 disable/enable thread support
1432 --with(out)-thread[=DIRECTORY]
1433 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001435 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001437 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with-fpectl enable SIGFPE catching
1439 --with-libm=STRING math library
1440 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001441 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001442 --with(out)-computed-gotos
1443 Use computed gotos in evaluation loop (enabled by
1444 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
1446Some influential environment variables:
1447 CC C compiler command
1448 CFLAGS C compiler flags
1449 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1450 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 CPP C preprocessor
1455
1456Use these variables to override the choices made by `configure' or to help
1457it to find libraries and programs with nonstandard names/locations.
1458
Georg Brandle2e15612009-05-20 18:25:10 +00001459Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001462fi
1463
1464if test "$ac_init_help" = "recursive"; then
1465 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 test -d "$ac_dir" ||
1468 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1469 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 ac_builddir=.
1471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472case "$ac_dir" in
1473.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1474*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 case $ac_top_builddir_sub in
1479 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1480 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1481 esac ;;
1482esac
1483ac_abs_top_builddir=$ac_pwd
1484ac_abs_builddir=$ac_pwd$ac_dir_suffix
1485# for backward compatibility:
1486ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491 ac_top_srcdir=$ac_top_builddir_sub
1492 ac_abs_top_srcdir=$ac_pwd ;;
1493 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 ac_top_srcdir=$srcdir
1496 ac_abs_top_srcdir=$srcdir ;;
1497 *) # Relative name.
1498 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1499 ac_top_srcdir=$ac_top_build_prefix$srcdir
1500 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001501esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 cd "$ac_dir" || { ac_status=$?; continue; }
1505 # Check for guested configure.
1506 if test -f "$ac_srcdir/configure.gnu"; then
1507 echo &&
1508 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1509 elif test -f "$ac_srcdir/configure"; then
1510 echo &&
1511 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001513 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514 fi || ac_status=$?
1515 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 done
1517fi
1518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001520if $ac_init_version; then
1521 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001522python configure 3.3
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001523generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001524
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001525Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526This configure script is free software; the Free Software Foundation
1527gives unlimited permission to copy, distribute and modify it.
1528_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001531
1532## ------------------------ ##
1533## Autoconf initialization. ##
1534## ------------------------ ##
1535
1536# ac_fn_c_try_compile LINENO
1537# --------------------------
1538# Try to compile conftest.$ac_ext, and return whether this succeeded.
1539ac_fn_c_try_compile ()
1540{
1541 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1542 rm -f conftest.$ac_objext
1543 if { { ac_try="$ac_compile"
1544case "(($ac_try" in
1545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1546 *) ac_try_echo=$ac_try;;
1547esac
1548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1549$as_echo "$ac_try_echo"; } >&5
1550 (eval "$ac_compile") 2>conftest.err
1551 ac_status=$?
1552 if test -s conftest.err; then
1553 grep -v '^ *+' conftest.err >conftest.er1
1554 cat conftest.er1 >&5
1555 mv -f conftest.er1 conftest.err
1556 fi
1557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1558 test $ac_status = 0; } && {
1559 test -z "$ac_c_werror_flag" ||
1560 test ! -s conftest.err
1561 } && test -s conftest.$ac_objext; then :
1562 ac_retval=0
1563else
1564 $as_echo "$as_me: failed program was:" >&5
1565sed 's/^/| /' conftest.$ac_ext >&5
1566
1567 ac_retval=1
1568fi
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001569 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001570 as_fn_set_status $ac_retval
1571
1572} # ac_fn_c_try_compile
1573
Matthias Kloseb9621712010-04-24 17:59:49 +00001574# ac_fn_c_try_link LINENO
1575# -----------------------
1576# Try to link conftest.$ac_ext, and return whether this succeeded.
1577ac_fn_c_try_link ()
1578{
1579 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1580 rm -f conftest.$ac_objext conftest$ac_exeext
1581 if { { ac_try="$ac_link"
1582case "(($ac_try" in
1583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1584 *) ac_try_echo=$ac_try;;
1585esac
1586eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1587$as_echo "$ac_try_echo"; } >&5
1588 (eval "$ac_link") 2>conftest.err
1589 ac_status=$?
1590 if test -s conftest.err; then
1591 grep -v '^ *+' conftest.err >conftest.er1
1592 cat conftest.er1 >&5
1593 mv -f conftest.er1 conftest.err
1594 fi
1595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1596 test $ac_status = 0; } && {
1597 test -z "$ac_c_werror_flag" ||
1598 test ! -s conftest.err
1599 } && test -s conftest$ac_exeext && {
1600 test "$cross_compiling" = yes ||
1601 $as_test_x conftest$ac_exeext
1602 }; then :
1603 ac_retval=0
1604else
1605 $as_echo "$as_me: failed program was:" >&5
1606sed 's/^/| /' conftest.$ac_ext >&5
1607
1608 ac_retval=1
1609fi
1610 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1611 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1612 # interfere with the next link command; also delete a directory that is
1613 # left behind by Apple's compiler. We do this before executing the actions.
1614 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001615 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001616 as_fn_set_status $ac_retval
1617
1618} # ac_fn_c_try_link
1619
Matthias Kloseb9621712010-04-24 17:59:49 +00001620# ac_fn_c_try_cpp LINENO
1621# ----------------------
1622# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1623ac_fn_c_try_cpp ()
1624{
1625 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1626 if { { ac_try="$ac_cpp conftest.$ac_ext"
1627case "(($ac_try" in
1628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1629 *) ac_try_echo=$ac_try;;
1630esac
1631eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1632$as_echo "$ac_try_echo"; } >&5
1633 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1634 ac_status=$?
1635 if test -s conftest.err; then
1636 grep -v '^ *+' conftest.err >conftest.er1
1637 cat conftest.er1 >&5
1638 mv -f conftest.er1 conftest.err
1639 fi
1640 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001641 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001642 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1643 test ! -s conftest.err
1644 }; then :
1645 ac_retval=0
1646else
1647 $as_echo "$as_me: failed program was:" >&5
1648sed 's/^/| /' conftest.$ac_ext >&5
1649
1650 ac_retval=1
1651fi
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001652 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001653 as_fn_set_status $ac_retval
1654
1655} # ac_fn_c_try_cpp
1656
1657# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1658# -------------------------------------------------------
1659# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1660# the include files in INCLUDES and setting the cache variable VAR
1661# accordingly.
1662ac_fn_c_check_header_mongrel ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001665 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1667$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001668if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 $as_echo_n "(cached) " >&6
1670fi
1671eval ac_res=\$$3
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1673$as_echo "$ac_res" >&6; }
1674else
1675 # Is the header compilable?
1676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1677$as_echo_n "checking $2 usability... " >&6; }
1678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1679/* end confdefs.h. */
1680$4
1681#include <$2>
1682_ACEOF
1683if ac_fn_c_try_compile "$LINENO"; then :
1684 ac_header_compiler=yes
1685else
1686 ac_header_compiler=no
1687fi
1688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1690$as_echo "$ac_header_compiler" >&6; }
1691
1692# Is the header present?
1693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1694$as_echo_n "checking $2 presence... " >&6; }
1695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1696/* end confdefs.h. */
1697#include <$2>
1698_ACEOF
1699if ac_fn_c_try_cpp "$LINENO"; then :
1700 ac_header_preproc=yes
1701else
1702 ac_header_preproc=no
1703fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001704rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1706$as_echo "$ac_header_preproc" >&6; }
1707
1708# So? What about this header?
1709case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1710 yes:no: )
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1712$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1714$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1715 ;;
1716 no:yes:* )
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1718$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1720$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1722$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1724$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1726$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001727( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001728## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001729## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 ) | sed "s/^/$as_me: WARNING: /" >&2
1731 ;;
1732esac
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1734$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001735if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001736 $as_echo_n "(cached) " >&6
1737else
1738 eval "$3=\$ac_header_compiler"
1739fi
1740eval ac_res=\$$3
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1742$as_echo "$ac_res" >&6; }
1743fi
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001744 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001745
1746} # ac_fn_c_check_header_mongrel
1747
1748# ac_fn_c_try_run LINENO
1749# ----------------------
1750# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1751# that executables *can* be run.
1752ac_fn_c_try_run ()
1753{
1754 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1755 if { { ac_try="$ac_link"
1756case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759esac
1760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761$as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_link") 2>&5
1763 ac_status=$?
1764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1765 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1766 { { case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1771$as_echo "$ac_try_echo"; } >&5
1772 (eval "$ac_try") 2>&5
1773 ac_status=$?
1774 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1775 test $ac_status = 0; }; }; then :
1776 ac_retval=0
1777else
1778 $as_echo "$as_me: program exited with status $ac_status" >&5
1779 $as_echo "$as_me: failed program was:" >&5
1780sed 's/^/| /' conftest.$ac_ext >&5
1781
1782 ac_retval=$ac_status
1783fi
1784 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001786 as_fn_set_status $ac_retval
1787
1788} # ac_fn_c_try_run
1789
1790# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1791# -------------------------------------------------------
1792# Tests whether HEADER exists and can be compiled using the include files in
1793# INCLUDES, setting the cache variable VAR accordingly.
1794ac_fn_c_check_header_compile ()
1795{
1796 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1798$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001799if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001800 $as_echo_n "(cached) " >&6
1801else
1802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804$4
1805#include <$2>
1806_ACEOF
1807if ac_fn_c_try_compile "$LINENO"; then :
1808 eval "$3=yes"
1809else
1810 eval "$3=no"
1811fi
1812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1813fi
1814eval ac_res=\$$3
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1816$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001818
1819} # ac_fn_c_check_header_compile
1820
Matthias Kloseb9621712010-04-24 17:59:49 +00001821# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1822# -------------------------------------------
1823# Tests whether TYPE exists after having included INCLUDES, setting cache
1824# variable VAR accordingly.
1825ac_fn_c_check_type ()
1826{
1827 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1829$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001830if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 $as_echo_n "(cached) " >&6
1832else
1833 eval "$3=no"
1834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1835/* end confdefs.h. */
1836$4
1837int
1838main ()
1839{
1840if (sizeof ($2))
1841 return 0;
1842 ;
1843 return 0;
1844}
1845_ACEOF
1846if ac_fn_c_try_compile "$LINENO"; then :
1847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1848/* end confdefs.h. */
1849$4
1850int
1851main ()
1852{
1853if (sizeof (($2)))
1854 return 0;
1855 ;
1856 return 0;
1857}
1858_ACEOF
1859if ac_fn_c_try_compile "$LINENO"; then :
1860
1861else
1862 eval "$3=yes"
1863fi
1864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1865fi
1866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1867fi
1868eval ac_res=\$$3
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1870$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001872
1873} # ac_fn_c_check_type
1874
1875# ac_fn_c_find_uintX_t LINENO BITS VAR
1876# ------------------------------------
1877# Finds an unsigned integer type with width BITS, setting cache variable VAR
1878# accordingly.
1879ac_fn_c_find_uintX_t ()
1880{
1881 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1883$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001884if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001885 $as_echo_n "(cached) " >&6
1886else
1887 eval "$3=no"
1888 # Order is important - never check a type that is potentially smaller
1889 # than half of the expected target width.
1890 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1891 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894$ac_includes_default
1895int
1896main ()
1897{
1898static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1899test_array [0] = 0
1900
1901 ;
1902 return 0;
1903}
1904_ACEOF
1905if ac_fn_c_try_compile "$LINENO"; then :
1906 case $ac_type in #(
1907 uint$2_t) :
1908 eval "$3=yes" ;; #(
1909 *) :
1910 eval "$3=\$ac_type" ;;
1911esac
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001914 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001915
1916else
1917 break
1918fi
1919 done
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_find_uintX_t
1927
1928# ac_fn_c_find_intX_t LINENO BITS VAR
1929# -----------------------------------
1930# Finds a signed integer type with width BITS, setting cache variable VAR
1931# accordingly.
1932ac_fn_c_find_intX_t ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1936$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 # Order is important - never check a type that is potentially smaller
1942 # than half of the expected target width.
1943 for ac_type in int$2_t 'int' 'long int' \
1944 'long long int' 'short int' 'signed char'; do
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001948 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001949int
1950main ()
1951{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001952static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001953test_array [0] = 0
1954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001963 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001964int
1965main ()
1966{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001967static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001968 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1969test_array [0] = 0
1970
1971 ;
1972 return 0;
1973}
1974_ACEOF
1975if ac_fn_c_try_compile "$LINENO"; then :
1976
1977else
1978 case $ac_type in #(
1979 int$2_t) :
1980 eval "$3=yes" ;; #(
1981 *) :
1982 eval "$3=\$ac_type" ;;
1983esac
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001988 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001989
1990else
1991 break
1992fi
1993 done
1994fi
1995eval ac_res=\$$3
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1997$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001998 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000} # ac_fn_c_find_intX_t
2001
2002# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2003# --------------------------------------------
2004# Tries to find the compile-time value of EXPR in a program that includes
2005# INCLUDES, setting VAR accordingly. Returns whether the value could be
2006# computed
2007ac_fn_c_compute_int ()
2008{
2009 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010 if test "$cross_compiling" = yes; then
2011 # Depending upon the size, compute the lo and hi bounds.
2012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) >= 0)];
2019test_array [0] = 0
2020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_lo=0 ac_mid=0
2027 while :; do
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031int
2032main ()
2033{
2034static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2035test_array [0] = 0
2036
2037 ;
2038 return 0;
2039}
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"; then :
2042 ac_hi=$ac_mid; break
2043else
2044 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2045 if test $ac_lo -le $ac_mid; then
2046 ac_lo= ac_hi=
2047 break
2048 fi
2049 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2050fi
2051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2052 done
2053else
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) < 0)];
2061test_array [0] = 0
2062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_hi=-1 ac_mid=-1
2069 while :; do
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2077test_array [0] = 0
2078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_lo=$ac_mid; break
2085else
2086 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2087 if test $ac_mid -le $ac_hi; then
2088 ac_lo= ac_hi=
2089 break
2090 fi
2091 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094 done
2095else
2096 ac_lo= ac_hi=
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101# Binary search between lo and hi bounds.
2102while test "x$ac_lo" != "x$ac_hi"; do
2103 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2111test_array [0] = 0
2112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=$ac_mid
2119else
2120 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123done
2124case $ac_lo in #((
2125?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2126'') ac_retval=1 ;;
2127esac
2128 else
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132static long int longval () { return $2; }
2133static unsigned long int ulongval () { return $2; }
2134#include <stdio.h>
2135#include <stdlib.h>
2136int
2137main ()
2138{
2139
2140 FILE *f = fopen ("conftest.val", "w");
2141 if (! f)
2142 return 1;
2143 if (($2) < 0)
2144 {
2145 long int i = longval ();
2146 if (i != ($2))
2147 return 1;
2148 fprintf (f, "%ld", i);
2149 }
2150 else
2151 {
2152 unsigned long int i = ulongval ();
2153 if (i != ($2))
2154 return 1;
2155 fprintf (f, "%lu", i);
2156 }
2157 /* Do not output a trailing newline, as this causes \r\n confusion
2158 on some platforms. */
2159 return ferror (f) || fclose (f) != 0;
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_run "$LINENO"; then :
2166 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2167else
2168 ac_retval=1
2169fi
2170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2171 conftest.$ac_objext conftest.beam conftest.$ac_ext
2172rm -f conftest.val
2173
2174 fi
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002175 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 as_fn_set_status $ac_retval
2177
2178} # ac_fn_c_compute_int
2179
2180# ac_fn_c_check_func LINENO FUNC VAR
2181# ----------------------------------
2182# Tests whether FUNC exists, setting the cache variable VAR accordingly
2183ac_fn_c_check_func ()
2184{
2185 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2187$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002188if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002189 $as_echo_n "(cached) " >&6
2190else
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192/* end confdefs.h. */
2193/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2194 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2195#define $2 innocuous_$2
2196
2197/* System header to define __stub macros and hopefully few prototypes,
2198 which can conflict with char $2 (); below.
2199 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2200 <limits.h> exists even on freestanding compilers. */
2201
2202#ifdef __STDC__
2203# include <limits.h>
2204#else
2205# include <assert.h>
2206#endif
2207
2208#undef $2
2209
2210/* Override any GCC internal prototype to avoid an error.
2211 Use char because int might match the return type of a GCC
2212 builtin and then its argument prototype would still apply. */
2213#ifdef __cplusplus
2214extern "C"
2215#endif
2216char $2 ();
2217/* The GNU C library defines this for functions which it implements
2218 to always fail with ENOSYS. Some functions are actually named
2219 something starting with __ and the normal name is an alias. */
2220#if defined __stub_$2 || defined __stub___$2
2221choke me
2222#endif
2223
2224int
2225main ()
2226{
2227return $2 ();
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_link "$LINENO"; then :
2233 eval "$3=yes"
2234else
2235 eval "$3=no"
2236fi
2237rm -f core conftest.err conftest.$ac_objext \
2238 conftest$ac_exeext conftest.$ac_ext
2239fi
2240eval ac_res=\$$3
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2242$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002243 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002244
2245} # ac_fn_c_check_func
2246
2247# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2248# ----------------------------------------------------
2249# Tries to find if the field MEMBER exists in type AGGR, after including
2250# INCLUDES, setting cache variable VAR accordingly.
2251ac_fn_c_check_member ()
2252{
2253 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2255$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002256if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002257 $as_echo_n "(cached) " >&6
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$5
2262int
2263main ()
2264{
2265static $2 ac_aggr;
2266if (ac_aggr.$3)
2267return 0;
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"; then :
2273 eval "$4=yes"
2274else
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277$5
2278int
2279main ()
2280{
2281static $2 ac_aggr;
2282if (sizeof ac_aggr.$3)
2283return 0;
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_compile "$LINENO"; then :
2289 eval "$4=yes"
2290else
2291 eval "$4=no"
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296fi
2297eval ac_res=\$$4
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002300 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002301
2302} # ac_fn_c_check_member
2303
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002304# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2305# ---------------------------------------------
2306# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2307# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002308ac_fn_c_check_decl ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002311 as_decl_name=`echo $2|sed 's/ *(.*//'`
2312 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2314$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002315if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002316 $as_echo_n "(cached) " >&6
2317else
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h. */
2320$4
2321int
2322main ()
2323{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002324#ifndef $as_decl_name
2325#ifdef __cplusplus
2326 (void) $as_decl_use;
2327#else
2328 (void) $as_decl_name;
2329#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002330#endif
2331
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336if ac_fn_c_try_compile "$LINENO"; then :
2337 eval "$3=yes"
2338else
2339 eval "$3=no"
2340fi
2341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342fi
2343eval ac_res=\$$3
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2345$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002346 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002347
2348} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002350This file contains any messages produced by compilers while
2351running configure, to aid debugging if configure makes a mistake.
2352
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002353It was created by python $as_me 3.3, which was
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002354generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002355
2356 $ $0 $@
2357
2358_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002360{
2361cat <<_ASUNAME
2362## --------- ##
2363## Platform. ##
2364## --------- ##
2365
2366hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2367uname -m = `(uname -m) 2>/dev/null || echo unknown`
2368uname -r = `(uname -r) 2>/dev/null || echo unknown`
2369uname -s = `(uname -s) 2>/dev/null || echo unknown`
2370uname -v = `(uname -v) 2>/dev/null || echo unknown`
2371
2372/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2373/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2374
2375/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2376/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2377/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002379/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2380/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2381/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2382
2383_ASUNAME
2384
2385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2386for as_dir in $PATH
2387do
2388 IFS=$as_save_IFS
2389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002390 $as_echo "PATH: $as_dir"
2391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394} >&5
2395
2396cat >&5 <<_ACEOF
2397
2398
2399## ----------- ##
2400## Core tests. ##
2401## ----------- ##
2402
2403_ACEOF
2404
2405
2406# Keep a trace of the command line.
2407# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002411ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_configure_args0=
2413ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002414ac_must_keep_next=false
2415for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002416do
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 for ac_arg
2418 do
2419 case $ac_arg in
2420 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2421 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2422 | -silent | --silent | --silen | --sile | --sil)
2423 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 esac
2427 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002434 case $ac_arg in
2435 *=* | --config-cache | -C | -disable-* | --disable-* \
2436 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2437 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2438 | -with-* | --with-* | -without-* | --without-* | --x)
2439 case "$ac_configure_args0 " in
2440 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2441 esac
2442 ;;
2443 -* ) ac_must_keep_next=true ;;
2444 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 ;;
2448 esac
2449 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002450done
Matthias Kloseb9621712010-04-24 17:59:49 +00002451{ ac_configure_args0=; unset ac_configure_args0;}
2452{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454# When interrupted or exit'd, cleanup temporary files, and complete
2455# config.log. We remove comments because anyway the quotes in there
2456# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457# WARNING: Use '\'' to represent an apostrophe within the trap.
2458# 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 +00002459trap 'exit_status=$?
2460 # Save into config.log some information that might help in debugging.
2461 {
2462 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002463
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002464 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002465## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002466## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 echo
2468 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469(
2470 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2471 eval ac_val=\$$ac_var
2472 case $ac_val in #(
2473 *${as_nl}*)
2474 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2476$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 esac
2478 case $ac_var in #(
2479 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2481 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac ;;
2483 esac
2484 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2487 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 "s/'\''/'\''\\\\'\'''\''/g;
2490 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2491 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002494 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac |
2496 sort
2497)
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002499
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_vars
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513
2514 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002515 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 echo
2519 for ac_var in $ac_subst_files
2520 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 eval ac_val=\$$ac_var
2522 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 done | sort
2527 echo
2528 fi
2529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002532## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
2537 fi
2538 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 $as_echo "$as_me: caught signal $ac_signal"
2540 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 rm -f core *.core core.conftest.* &&
2543 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002546for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002547 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
2549ac_signal=0
2550
2551# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002553
Matthias Kloseb9621712010-04-24 17:59:49 +00002554$as_echo "/* confdefs.h */" > confdefs.h
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556# Predefined preprocessor variables.
2557
2558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_NAME "$PACKAGE_NAME"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_VERSION "$PACKAGE_VERSION"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_STRING "$PACKAGE_STRING"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2576_ACEOF
2577
Matthias Kloseb9621712010-04-24 17:59:49 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_URL "$PACKAGE_URL"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582
2583# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002584# Prefer an explicitly selected file to automatically selected ones.
2585ac_site_file1=NONE
2586ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 # We do not want a PATH search for config.site.
2589 case $CONFIG_SITE in #((
2590 -*) ac_site_file1=./$CONFIG_SITE;;
2591 */*) ac_site_file1=$CONFIG_SITE;;
2592 *) ac_site_file1=./$CONFIG_SITE;;
2593 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 ac_site_file1=$prefix/share/config.site
2596 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597else
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 ac_site_file1=$ac_default_prefix/share/config.site
2599 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002601for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602do
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 test "x$ac_site_file" = xNONE && continue
2604 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2606$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002608 . "$ac_site_file" \
2609 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2611as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002612See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613 fi
2614done
2615
2616if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 # Some versions of bash will fail to source /dev/null (special files
2618 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2619 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2621$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2624 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 esac
2626 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627else
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2629$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 >$cache_file
2631fi
2632
2633# Check that the precious variables saved in the cache have kept the same
2634# value.
2635ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2638 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2640 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 case $ac_old_set,$ac_new_set in
2642 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2644$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 +00002645 ac_cache_corrupted=: ;;
2646 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2648$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_cache_corrupted=: ;;
2650 ,);;
2651 *)
2652 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 # differences in whitespace do not lead to failure.
2654 ac_old_val_w=`echo x $ac_old_val`
2655 ac_new_val_w=`echo x $ac_new_val`
2656 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2658$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2659 ac_cache_corrupted=:
2660 else
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2662$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2663 eval $ac_var=\$ac_old_val
2664 fi
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2666$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2668$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 fi;;
2670 esac
2671 # Pass precious variables to config.status.
2672 if test "$ac_new_set" = set; then
2673 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 *) ac_arg=$ac_var=$ac_new_val ;;
2676 esac
2677 case " $ac_configure_args " in
2678 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 esac
2681 fi
2682done
2683if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2687$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002688 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002690## -------------------- ##
2691## Main body of script. ##
2692## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693
Guido van Rossum7f43da71994-08-01 12:15:30 +00002694ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2698ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699
Guido van Rossum627b2d71993-12-24 10:39:16 +00002700
Michael W. Hudson54241132001-12-07 15:38:26 +00002701
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002702
2703
2704
2705
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002706if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002707then
2708# Extract the first word of "hg", so it can be a program name with args.
2709set dummy hg; ac_word=$2
2710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2711$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002712if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713 $as_echo_n "(cached) " >&6
2714else
2715 if test -n "$HAS_HG"; then
2716 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2717else
2718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2719for as_dir in $PATH
2720do
2721 IFS=$as_save_IFS
2722 test -z "$as_dir" && as_dir=.
2723 for ac_exec_ext in '' $ac_executable_extensions; do
2724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2725 ac_cv_prog_HAS_HG="found"
2726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2727 break 2
2728 fi
2729done
2730 done
2731IFS=$as_save_IFS
2732
2733 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2734fi
2735fi
2736HAS_HG=$ac_cv_prog_HAS_HG
2737if test -n "$HAS_HG"; then
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2739$as_echo "$HAS_HG" >&6; }
2740else
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2742$as_echo "no" >&6; }
2743fi
2744
2745
2746else
2747HAS_HG=no-repository
2748fi
2749if test $HAS_HG = found
2750then
2751 HGVERSION="hg id -i \$(srcdir)"
2752 HGTAG="hg id -t \$(srcdir)"
2753 HGBRANCH="hg id -b \$(srcdir)"
2754else
2755 HGVERSION=""
2756 HGTAG=""
2757 HGBRANCH=""
2758fi
2759
2760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002761ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002762
2763
Martin v. Löwis11437992002-04-12 09:54:03 +00002764
Benjamin Petersond23f8222009-04-05 19:13:16 +00002765if test "$prefix" != "/"; then
2766 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2767fi
2768
2769
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
2771
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002772# We don't use PACKAGE_ variables, and they cause conflicts
2773# with other autoconf-based packages that include Python.h
2774grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2775rm confdefs.h
2776mv confdefs.h.new confdefs.h
2777
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002778
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002779VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002780
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002781# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002782
2783SOVERSION=1.0
2784
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002785# The later defininition of _XOPEN_SOURCE disables certain features
2786# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2787
Matthias Kloseb9621712010-04-24 17:59:49 +00002788$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002789
2790
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002791# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2792# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2793# them.
2794
Matthias Kloseb9621712010-04-24 17:59:49 +00002795$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002796
2797
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002798# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2799# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2800# them.
2801
Matthias Kloseb9621712010-04-24 17:59:49 +00002802$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002803
2804
Martin v. Löwisd6320502004-08-12 13:45:08 +00002805# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2806# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2807
Matthias Kloseb9621712010-04-24 17:59:49 +00002808$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002809
2810
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002811# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2812# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2813# them.
2814
Matthias Kloseb9621712010-04-24 17:59:49 +00002815$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002816
2817
2818
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002819define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002820
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002821# Arguments passed to configure.
2822
2823CONFIG_ARGS="$ac_configure_args"
2824
Matthias Kloseb9621712010-04-24 17:59:49 +00002825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2826$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002828if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002829 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002830 case $enableval in
2831 yes)
2832 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002833 if test ! -d "${enableval}"
2834 then
2835 enableval=/
2836 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002837 ;;
2838 esac
2839 case $enableval in
2840 no)
2841 UNIVERSALSDK=
2842 enable_universalsdk=
2843 ;;
2844 *)
2845 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002846 if test ! -d "${UNIVERSALSDK}"
2847 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002848 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002849 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002850 ;;
2851 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002852
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002853
Thomas Wouters477c8d52006-05-27 19:21:47 +00002854else
2855
2856 UNIVERSALSDK=
2857 enable_universalsdk=
2858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002859fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002860
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002861if test -n "${UNIVERSALSDK}"
2862then
Matthias Kloseb9621712010-04-24 17:59:49 +00002863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2864$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002865else
Matthias Kloseb9621712010-04-24 17:59:49 +00002866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2867$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002868fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002870
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002871
2872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002873UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002874
Matthias Kloseb9621712010-04-24 17:59:49 +00002875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2876$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002877
2878# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002879if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002880 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2882$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002883 UNIVERSAL_ARCHS="$withval"
2884
2885else
2886
Matthias Kloseb9621712010-04-24 17:59:49 +00002887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2888$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002889
2890fi
2891
2892
2893
2894
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002895
2896# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002897if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002898 withval=$with_framework_name;
2899 PYTHONFRAMEWORK=${withval}
2900 PYTHONFRAMEWORKDIR=${withval}.framework
2901 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2902
2903else
2904
2905 PYTHONFRAMEWORK=Python
2906 PYTHONFRAMEWORKDIR=Python.framework
2907 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2908
2909fi
2910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002911# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002912if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002913 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002914 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002916 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002917 esac
2918 case $enableval in
2919 no)
2920 PYTHONFRAMEWORK=
2921 PYTHONFRAMEWORKDIR=no-framework
2922 PYTHONFRAMEWORKPREFIX=
2923 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924 FRAMEWORKINSTALLFIRST=
2925 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002926 FRAMEWORKALTINSTALLFIRST=
2927 FRAMEWORKALTINSTALLLAST=
2928 if test "x${prefix}" = "xNONE"; then
2929 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2930 else
2931 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2932 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002933 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002934 ;;
2935 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002936 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002937 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002938 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002939 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002940 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2941 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002942 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002943
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002944 if test "x${prefix}" = "xNONE" ; then
2945 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002946
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002947 else
2948 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2949 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002950
2951 case "${enableval}" in
2952 /System*)
2953 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2954 if test "${prefix}" = "NONE" ; then
2955 # See below
2956 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2957 fi
2958 ;;
2959
2960 /Library*)
2961 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2962 ;;
2963
2964 */Library/Frameworks)
2965 MDIR="`dirname "${enableval}"`"
2966 MDIR="`dirname "${MDIR}"`"
2967 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2968
2969 if test "${prefix}" = "NONE"; then
2970 # User hasn't specified the
2971 # --prefix option, but wants to install
2972 # the framework in a non-default location,
2973 # ensure that the compatibility links get
2974 # installed relative to that prefix as well
2975 # instead of in /usr/local.
2976 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2977 fi
2978 ;;
2979
2980 *)
2981 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2982 ;;
2983 esac
2984
Jack Jansen127e56e2001-09-11 14:41:54 +00002985 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002986
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002987 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002988 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002992
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002993 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2994
2995 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2996
Jack Jansene578a632001-08-15 01:27:14 +00002997 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
Guido van Rossum563e7081996-09-10 18:20:48 +00002999else
Martin v. Löwis11437992002-04-12 09:54:03 +00003000
Jack Jansene578a632001-08-15 01:27:14 +00003001 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003002 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003003 PYTHONFRAMEWORKPREFIX=
3004 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003005 FRAMEWORKINSTALLFIRST=
3006 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003007 FRAMEWORKALTINSTALLFIRST=
3008 FRAMEWORKALTINSTALLLAST=
3009 if test "x${prefix}" = "xNONE" ; then
3010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3011 else
3012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3013 fi
Jack Jansene578a632001-08-15 01:27:14 +00003014 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003015
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003017fi
3018
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019
3020
Michael W. Hudson54241132001-12-07 15:38:26 +00003021
3022
3023
3024
Jack Jansene578a632001-08-15 01:27:14 +00003025
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003026
3027
3028
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003029
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003030
Jack Jansene578a632001-08-15 01:27:14 +00003031##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003032## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003033## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003034##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003035# Set name for machine-dependent library files
3036
Matthias Kloseb9621712010-04-24 17:59:49 +00003037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3038$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003039if test -z "$MACHDEP"
3040then
Guido van Rossum563e7081996-09-10 18:20:48 +00003041 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003042 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003043 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003044 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003045 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003046 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003047 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003048 ac_md_system=`echo $ac_sys_system |
3049 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3050 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003051 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003052 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003053
Guido van Rossum07397971997-04-29 21:49:50 +00003054 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003055 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003056 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003057 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003058 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003059 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003060 esac
3061fi
Guido van Rossum91922671997-10-09 20:24:13 +00003062
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003063# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3064# disable features if it is defined, without any means to access these
3065# features as extensions. For these systems, we skip the definition of
3066# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3067# some feature, make sure there is no alternative way to access this
3068# feature. Also, when using wildcards, make sure you have verified the
3069# need for not defining _XOPEN_SOURCE on all systems matching the
3070# wildcard, and that the wildcard does not include future systems
3071# (which may remove their limitations).
3072case $ac_sys_system/$ac_sys_release in
3073 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3074 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003075 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003076 # In addition, Stefan Krah confirms that issue #1244610 exists through
3077 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003078 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003079 define_xopen_source=no
3080 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3081 # also defined. This can be overridden by defining _BSD_SOURCE
3082 # As this has a different meaning on Linux, only define it on OpenBSD
3083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003085
3086 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003087 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003088 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3089 # also defined. This can be overridden by defining _BSD_SOURCE
3090 # As this has a different meaning on Linux, only define it on OpenBSD
3091
Matthias Kloseb9621712010-04-24 17:59:49 +00003092$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003093
3094 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003095 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3096 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3097 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003098 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 +00003099 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003100 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3101 # request to enable features supported by the standard as a request
3102 # to disable features not supported by the standard. The best way
3103 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3104 # entirely and define __EXTENSIONS__ instead.
3105 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003106 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003107 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3108 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003109 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003110 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003111 define_xopen_source=no;;
3112 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003113 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003114 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003115 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003116 # On FreeBSD 4, the math functions C89 does not cover are never defined
3117 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3118 FreeBSD/4.*)
3119 define_xopen_source=no;;
3120 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3121 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3122 # identifies itself as Darwin/7.*
3123 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3124 # disables platform specific features beyond repair.
3125 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3126 # has no effect, don't bother defining them
3127 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003128 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003129 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003130 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003131 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3132 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3133 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003134 AIX/4)
3135 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003136 AIX/5)
3137 if test `uname -r` -eq 1; then
3138 define_xopen_source=no
3139 fi
3140 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003141 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3142 # defining NI_NUMERICHOST.
3143 QNX/6.3.2)
3144 define_xopen_source=no
3145 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003146
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003147esac
3148
3149if test $define_xopen_source = yes
3150then
Victor Stinner14d098d2011-09-07 22:29:43 +02003151 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003152
Victor Stinner14d098d2011-09-07 22:29:43 +02003153$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003154
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003155
3156 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3157 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3158 # several APIs are not declared. Since this is also needed in some
3159 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003160
Matthias Kloseb9621712010-04-24 17:59:49 +00003161$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003162
3163
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003164
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003165$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003166
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003167fi
3168
Guido van Rossum91922671997-10-09 20:24:13 +00003169#
3170# SGI compilers allow the specification of the both the ABI and the
3171# ISA on the command line. Depending on the values of these switches,
3172# different and often incompatable code will be generated.
3173#
3174# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3175# thus supply support for various ABI/ISA combinations. The MACHDEP
3176# variable is also adjusted.
3177#
3178
3179if test ! -z "$SGI_ABI"
3180then
3181 CC="cc $SGI_ABI"
3182 LDFLAGS="$SGI_ABI $LDFLAGS"
3183 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3186$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003187
Jack Jansen6b08a402004-06-03 12:41:45 +00003188# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3189# it may influence the way we can build extensions, so distutils
3190# needs to check it
3191
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Jack Jansen6b08a402004-06-03 12:41:45 +00003193CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003195
Matthias Kloseb9621712010-04-24 17:59:49 +00003196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3197$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003198ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3200$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003201
Guido van Rossum627b2d71993-12-24 10:39:16 +00003202# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003203
3204# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3205# for debug/optimization stuff. BASECFLAGS is for flags that are required
3206# just to get things to compile and link. Users are free to override OPT
3207# when running configure or make. The build should not break if they do.
3208# BASECFLAGS should generally not be messed with, however.
3209
3210# XXX shouldn't some/most/all of this code be merged with the stuff later
3211# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3213$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003216if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003218 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003219 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003220 without_gcc=yes;;
3221 yes) CC=gcc
3222 without_gcc=no;;
3223 *) CC=$withval
3224 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003225 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003226else
Martin v. Löwis11437992002-04-12 09:54:03 +00003227
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003229 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003230 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003231 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003232 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233fi
3234
Matthias Kloseb9621712010-04-24 17:59:49 +00003235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3236$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003237
Guido van Rossum8b131c51995-03-09 14:10:13 +00003238# If the user switches compilers, we can't believe the cache
3239if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3240then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003241 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003242(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003243fi
3244
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003245# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3246# when the compiler supports them, but we don't always want -O2, and
3247# we set -g later.
3248if test -z "$CFLAGS"; then
3249 CFLAGS=
3250fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003251ac_ext=c
3252ac_cpp='$CPP $CPPFLAGS'
3253ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3254ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3255ac_compiler_gnu=$ac_cv_c_compiler_gnu
3256if test -n "$ac_tool_prefix"; then
3257 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3258set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3260$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003261if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003262 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003263else
3264 if test -n "$CC"; then
3265 ac_cv_prog_CC="$CC" # Let the user override the test.
3266else
Martin v. Löwis11437992002-04-12 09:54:03 +00003267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268for as_dir in $PATH
3269do
3270 IFS=$as_save_IFS
3271 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003272 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273 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 +00003274 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003275 $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 +00003276 break 2
3277 fi
3278done
Matthias Kloseb9621712010-04-24 17:59:49 +00003279 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003281
Jack Jansendd19cf82001-12-06 22:36:17 +00003282fi
3283fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003284CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003285if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3287$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003288else
Matthias Kloseb9621712010-04-24 17:59:49 +00003289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3290$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003291fi
3292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003293
Martin v. Löwis11437992002-04-12 09:54:03 +00003294fi
3295if test -z "$ac_cv_prog_CC"; then
3296 ac_ct_CC=$CC
3297 # Extract the first word of "gcc", so it can be a program name with args.
3298set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3300$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003301if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003303else
3304 if test -n "$ac_ct_CC"; then
3305 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3306else
3307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3308for as_dir in $PATH
3309do
3310 IFS=$as_save_IFS
3311 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003312 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003313 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 +00003314 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003315 $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 +00003316 break 2
3317 fi
3318done
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003320IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003321
3322fi
3323fi
3324ac_ct_CC=$ac_cv_prog_ac_ct_CC
3325if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3327$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003328else
Matthias Kloseb9621712010-04-24 17:59:49 +00003329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3330$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003331fi
3332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003333 if test "x$ac_ct_CC" = x; then
3334 CC=""
3335 else
3336 case $cross_compiling:$ac_tool_warned in
3337yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003338{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3339$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003340ac_tool_warned=yes ;;
3341esac
3342 CC=$ac_ct_CC
3343 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003344else
3345 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003346fi
3347
Jack Jansendd19cf82001-12-06 22:36:17 +00003348if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003349 if test -n "$ac_tool_prefix"; then
3350 # 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 +00003351set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3353$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003354if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003355 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003356else
3357 if test -n "$CC"; then
3358 ac_cv_prog_CC="$CC" # Let the user override the test.
3359else
Martin v. Löwis11437992002-04-12 09:54:03 +00003360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3361for as_dir in $PATH
3362do
3363 IFS=$as_save_IFS
3364 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003365 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003366 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 +00003367 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003368 $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 +00003369 break 2
3370 fi
3371done
Matthias Kloseb9621712010-04-24 17:59:49 +00003372 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003373IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003374
3375fi
3376fi
3377CC=$ac_cv_prog_CC
3378if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3380$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003381else
Matthias Kloseb9621712010-04-24 17:59:49 +00003382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3383$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003384fi
3385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003386
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003388fi
3389if test -z "$CC"; then
3390 # Extract the first word of "cc", so it can be a program name with args.
3391set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3393$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003394if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003396else
3397 if test -n "$CC"; then
3398 ac_cv_prog_CC="$CC" # Let the user override the test.
3399else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003400 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3402for as_dir in $PATH
3403do
3404 IFS=$as_save_IFS
3405 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003406 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003407 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 +00003408 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3409 ac_prog_rejected=yes
3410 continue
3411 fi
3412 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003413 $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 +00003414 break 2
3415 fi
3416done
Matthias Kloseb9621712010-04-24 17:59:49 +00003417 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003418IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003419
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003420if test $ac_prog_rejected = yes; then
3421 # We found a bogon in the path, so make sure we never use it.
3422 set dummy $ac_cv_prog_CC
3423 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003425 # We chose a different compiler from the bogus one.
3426 # However, it has the same basename, so the bogon will be chosen
3427 # first if we set CC to just the basename; use the full file name.
3428 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003429 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003430 fi
3431fi
3432fi
3433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003434CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003435if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3437$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003438else
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3440$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003441fi
3442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003443
Martin v. Löwis11437992002-04-12 09:54:03 +00003444fi
3445if test -z "$CC"; then
3446 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 do
3449 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3450set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3452$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003453if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003454 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003455else
3456 if test -n "$CC"; then
3457 ac_cv_prog_CC="$CC" # Let the user override the test.
3458else
Martin v. Löwis11437992002-04-12 09:54:03 +00003459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3460for as_dir in $PATH
3461do
3462 IFS=$as_save_IFS
3463 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003464 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465 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 +00003466 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003467 $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 +00003468 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003470done
Matthias Kloseb9621712010-04-24 17:59:49 +00003471 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003472IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003473
3474fi
3475fi
3476CC=$ac_cv_prog_CC
3477if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3479$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003480else
Matthias Kloseb9621712010-04-24 17:59:49 +00003481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3482$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003483fi
3484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485
Martin v. Löwis11437992002-04-12 09:54:03 +00003486 test -n "$CC" && break
3487 done
3488fi
3489if test -z "$CC"; then
3490 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003492do
3493 # Extract the first word of "$ac_prog", so it can be a program name with args.
3494set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3496$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003497if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003498 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003499else
3500 if test -n "$ac_ct_CC"; then
3501 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3502else
3503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3504for as_dir in $PATH
3505do
3506 IFS=$as_save_IFS
3507 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003508 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509 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 +00003510 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003511 $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 +00003512 break 2
3513 fi
3514done
Matthias Kloseb9621712010-04-24 17:59:49 +00003515 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003516IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003517
Martin v. Löwis11437992002-04-12 09:54:03 +00003518fi
3519fi
3520ac_ct_CC=$ac_cv_prog_ac_ct_CC
3521if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3523$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003524else
Matthias Kloseb9621712010-04-24 17:59:49 +00003525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3526$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003527fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 test -n "$ac_ct_CC" && break
3531done
Michael W. Hudson54241132001-12-07 15:38:26 +00003532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533 if test "x$ac_ct_CC" = x; then
3534 CC=""
3535 else
3536 case $cross_compiling:$ac_tool_warned in
3537yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003538{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3539$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003540ac_tool_warned=yes ;;
3541esac
3542 CC=$ac_ct_CC
3543 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003544fi
3545
3546fi
3547
3548
Matthias Kloseb9621712010-04-24 17:59:49 +00003549test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003551as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003552See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003553
3554# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003555$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3556set X $ac_compile
3557ac_compiler=$2
3558for ac_option in --version -v -V -qversion; do
3559 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560case "(($ac_try" in
3561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3562 *) ac_try_echo=$ac_try;;
3563esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003564eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3565$as_echo "$ac_try_echo"; } >&5
3566 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 if test -s conftest.err; then
3569 sed '10a\
3570... rest of stderr output deleted ...
3571 10q' conftest.err >conftest.er1
3572 cat conftest.er1 >&5
3573 fi
3574 rm -f conftest.er1 conftest.err
3575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3576 test $ac_status = 0; }
3577done
Martin v. Löwis11437992002-04-12 09:54:03 +00003578
Matthias Kloseb9621712010-04-24 17:59:49 +00003579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003580/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582int
3583main ()
3584{
3585
3586 ;
3587 return 0;
3588}
3589_ACEOF
3590ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003591ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003592# Try to create an executable without -o first, disregard a.out.
3593# It will help us diagnose broken compilers, and finding out an intuition
3594# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3596$as_echo_n "checking whether the C compiler works... " >&6; }
3597ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3598
3599# The possible output files:
3600ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602ac_rmfiles=
3603for ac_file in $ac_files
3604do
3605 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3608 esac
3609done
3610rm -f $ac_rmfiles
3611
Matthias Kloseb9621712010-04-24 17:59:49 +00003612if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613case "(($ac_try" in
3614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3615 *) ac_try_echo=$ac_try;;
3616esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003617eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3618$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3622 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3624# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3625# in a Makefile. We should not override ac_cv_exeext if it was cached,
3626# so that the user can short-circuit this test for compilers unknown to
3627# Autoconf.
3628for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003629do
3630 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003633 ;;
3634 [ab].out )
3635 # We found the default executable, but exeext='' is most
3636 # certainly right.
3637 break;;
3638 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003640 then :; else
3641 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3642 fi
3643 # We set ac_cv_exeext here because the later test for it is not
3644 # safe: cross compilers may not add the suffix if given an `-o'
3645 # argument, so we may need to know it at that point already.
3646 # Even if this section looks crufty: it has the advantage of
3647 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003648 break;;
3649 * )
3650 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003651 esac
3652done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653test "$ac_cv_exeext" = no && ac_cv_exeext=
3654
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003655else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656 ac_file=''
3657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003658if test -z "$ac_file"; then :
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
3661$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003662sed 's/^/| /' conftest.$ac_ext >&5
3663
Matthias Kloseb9621712010-04-24 17:59:49 +00003664{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003666as_fn_error 77 "C compiler cannot create executables
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003667See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003668else
3669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3670$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3673$as_echo_n "checking for C compiler default output file name... " >&6; }
3674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3675$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003676ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003677
Matthias Kloseb9621712010-04-24 17:59:49 +00003678rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003679ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3681$as_echo_n "checking for suffix of executables... " >&6; }
3682if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683case "(($ac_try" in
3684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3685 *) ac_try_echo=$ac_try;;
3686esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3688$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3692 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003693 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3694# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3695# work properly (i.e., refer to `conftest.exe'), while it won't with
3696# `rm'.
3697for ac_file in conftest.exe conftest conftest.*; do
3698 test -f "$ac_file" || continue
3699 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003701 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3702 break;;
3703 * ) break;;
3704 esac
3705done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003706else
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003709as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003710See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003712rm -f conftest conftest$ac_cv_exeext
3713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3714$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003715
3716rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003717EXEEXT=$ac_cv_exeext
3718ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3720/* end confdefs.h. */
3721#include <stdio.h>
3722int
3723main ()
3724{
3725FILE *f = fopen ("conftest.out", "w");
3726 return ferror (f) || fclose (f) != 0;
3727
3728 ;
3729 return 0;
3730}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003732ac_clean_files="$ac_clean_files conftest.out"
3733# Check that the compiler produces executables we can run. If not, either
3734# the compiler is broken, or we cross compile.
3735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3736$as_echo_n "checking whether we are cross compiling... " >&6; }
3737if test "$cross_compiling" != yes; then
3738 { { ac_try="$ac_link"
3739case "(($ac_try" in
3740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3741 *) ac_try_echo=$ac_try;;
3742esac
3743eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3744$as_echo "$ac_try_echo"; } >&5
3745 (eval "$ac_link") 2>&5
3746 ac_status=$?
3747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3748 test $ac_status = 0; }
3749 if { ac_try='./conftest$ac_cv_exeext'
3750 { { case "(($ac_try" in
3751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3752 *) ac_try_echo=$ac_try;;
3753esac
3754eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3755$as_echo "$ac_try_echo"; } >&5
3756 (eval "$ac_try") 2>&5
3757 ac_status=$?
3758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3759 test $ac_status = 0; }; }; then
3760 cross_compiling=no
3761 else
3762 if test "$cross_compiling" = maybe; then
3763 cross_compiling=yes
3764 else
3765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003767as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003768If you meant to cross compile, use \`--host'.
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003769See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 fi
3771 fi
3772fi
3773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3774$as_echo "$cross_compiling" >&6; }
3775
3776rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3777ac_clean_files=$ac_clean_files_save
3778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3779$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003780if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $as_echo_n "(cached) " >&6
3782else
3783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003784/* end confdefs.h. */
3785
3786int
3787main ()
3788{
3789
3790 ;
3791 return 0;
3792}
3793_ACEOF
3794rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003795if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796case "(($ac_try" in
3797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3798 *) ac_try_echo=$ac_try;;
3799esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003800eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3801$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003803 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3805 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806 for ac_file in conftest.o conftest.obj conftest.*; do
3807 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3811 break;;
3812 esac
3813done
3814else
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003816sed 's/^/| /' conftest.$ac_ext >&5
3817
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003820as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003821See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003822fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003823rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3826$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003827OBJEXT=$ac_cv_objext
3828ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3830$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003831if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003833else
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003835/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003836
Martin v. Löwis11437992002-04-12 09:54:03 +00003837int
3838main ()
3839{
3840#ifndef __GNUC__
3841 choke me
3842#endif
3843
3844 ;
3845 return 0;
3846}
3847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003848if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 ac_compiler_gnu=yes
3850else
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003854ac_cv_c_compiler_gnu=$ac_compiler_gnu
3855
3856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3858$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3859if test $ac_compiler_gnu = yes; then
3860 GCC=yes
3861else
3862 GCC=
3863fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003864ac_test_CFLAGS=${CFLAGS+set}
3865ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3867$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003868if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003869 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003870else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871 ac_save_c_werror_flag=$ac_c_werror_flag
3872 ac_c_werror_flag=yes
3873 ac_cv_prog_cc_g=no
3874 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003877
Martin v. Löwis11437992002-04-12 09:54:03 +00003878int
3879main ()
3880{
3881
3882 ;
3883 return 0;
3884}
3885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003886if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003887 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003888else
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 CFLAGS=""
3890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891/* end confdefs.h. */
3892
3893int
3894main ()
3895{
3896
3897 ;
3898 return 0;
3899}
3900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003901if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902
Matthias Kloseb9621712010-04-24 17:59:49 +00003903else
3904 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907/* end confdefs.h. */
3908
3909int
3910main ()
3911{
3912
3913 ;
3914 return 0;
3915}
3916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003917if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3925 ac_c_werror_flag=$ac_save_c_werror_flag
3926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3928$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003929if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003930 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003931elif test $ac_cv_prog_cc_g = yes; then
3932 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003933 CFLAGS="-g -O2"
3934 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003935 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003936 fi
3937else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003938 if test "$GCC" = yes; then
3939 CFLAGS="-O2"
3940 else
3941 CFLAGS=
3942 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3945$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003946if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003948else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003950ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003952/* end confdefs.h. */
3953#include <stdarg.h>
3954#include <stdio.h>
3955#include <sys/types.h>
3956#include <sys/stat.h>
3957/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3958struct buf { int x; };
3959FILE * (*rcsopen) (struct buf *, struct stat *, int);
3960static char *e (p, i)
3961 char **p;
3962 int i;
3963{
3964 return p[i];
3965}
3966static char *f (char * (*g) (char **, int), char **p, ...)
3967{
3968 char *s;
3969 va_list v;
3970 va_start (v,p);
3971 s = g (p, va_arg (v,int));
3972 va_end (v);
3973 return s;
3974}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003975
3976/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3977 function prototypes and stuff, but not '\xHH' hex character constants.
3978 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003980 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3981 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003983int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3986 inside strings and character constants. */
3987#define FOO(x) 'x'
3988int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3989
Skip Montanaro6dead952003-09-25 14:50:04 +00003990int test (int i, double x);
3991struct s1 {int (*f) (int a);};
3992struct s2 {int (*f) (double a);};
3993int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3994int argc;
3995char **argv;
3996int
3997main ()
3998{
3999return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4000 ;
4001 return 0;
4002}
4003_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004004for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4005 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004006do
4007 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004008 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004011rm -f core conftest.err conftest.$ac_objext
4012 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004013done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004015CC=$ac_save_CC
4016
4017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018# AC_CACHE_VAL
4019case "x$ac_cv_prog_cc_c89" in
4020 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4022$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004023 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4025$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004026 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4029$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004030esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004031if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004032
Matthias Kloseb9621712010-04-24 17:59:49 +00004033fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004034
Martin v. Löwis11437992002-04-12 09:54:03 +00004035ac_ext=c
4036ac_cpp='$CPP $CPPFLAGS'
4037ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4038ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4039ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004040
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004041
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004042
4043
Matthias Kloseb9621712010-04-24 17:59:49 +00004044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4045$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004047# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004048if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004049 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004050
4051 case $withval in
4052 no) with_cxx_main=no
4053 MAINCC='$(CC)';;
4054 yes) with_cxx_main=yes
4055 MAINCC='$(CXX)';;
4056 *) with_cxx_main=yes
4057 MAINCC=$withval
4058 if test -z "$CXX"
4059 then
4060 CXX=$withval
4061 fi;;
4062 esac
4063else
4064
4065 with_cxx_main=no
4066 MAINCC='$(CC)'
4067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004068fi
4069
Matthias Kloseb9621712010-04-24 17:59:49 +00004070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4071$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004072
4073preset_cxx="$CXX"
4074if test -z "$CXX"
4075then
4076 case "$CC" in
4077 gcc) # Extract the first word of "g++", so it can be a program name with args.
4078set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4080$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004081if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004083else
4084 case $CXX in
4085 [\\/]* | ?:[\\/]*)
4086 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4087 ;;
4088 *)
4089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4090for as_dir in notfound
4091do
4092 IFS=$as_save_IFS
4093 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004094 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004095 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 +00004096 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004098 break 2
4099 fi
4100done
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004102IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004103
4104 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4105 ;;
4106esac
4107fi
4108CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004109if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4111$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004112else
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4114$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004117 ;;
4118 cc) # Extract the first word of "c++", so it can be a program name with args.
4119set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4121$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004122if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124else
4125 case $CXX in
4126 [\\/]* | ?:[\\/]*)
4127 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4128 ;;
4129 *)
4130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4131for as_dir in notfound
4132do
4133 IFS=$as_save_IFS
4134 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136 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 +00004137 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004139 break 2
4140 fi
4141done
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004143IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004144
4145 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4146 ;;
4147esac
4148fi
4149CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004150if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4152$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4155$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004157
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004158 ;;
4159 esac
4160 if test "$CXX" = "notfound"
4161 then
4162 CXX=""
4163 fi
4164fi
4165if test -z "$CXX"
4166then
4167 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4168do
4169 # Extract the first word of "$ac_prog", so it can be a program name with args.
4170set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4172$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004173if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004175else
4176 if test -n "$CXX"; then
4177 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4178else
4179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4180for as_dir in $PATH
4181do
4182 IFS=$as_save_IFS
4183 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185 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 +00004186 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004188 break 2
4189 fi
4190done
Matthias Kloseb9621712010-04-24 17:59:49 +00004191 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004193
4194fi
4195fi
4196CXX=$ac_cv_prog_CXX
4197if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4199$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004200else
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4202$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004203fi
4204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004206 test -n "$CXX" && break
4207done
4208test -n "$CXX" || CXX="notfound"
4209
4210 if test "$CXX" = "notfound"
4211 then
4212 CXX=""
4213 fi
4214fi
4215if test "$preset_cxx" != "$CXX"
4216then
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004218
4219 By default, distutils will build C++ extension modules with \"$CXX\".
4220 If this is not intended, then set CXX on the configure command line.
4221 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004222$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004223
4224 By default, distutils will build C++ extension modules with \"$CXX\".
4225 If this is not intended, then set CXX on the configure command line.
4226 " >&2;}
4227fi
4228
4229
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4231$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4232save_LDFLAGS="$LDFLAGS"
4233LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004234
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4236/* end confdefs.h. */
4237
4238int
4239main ()
4240{
4241
4242 ;
4243 return 0;
4244}
4245_ACEOF
4246if ac_fn_c_try_link "$LINENO"; then :
4247 NO_AS_NEEDED="-Wl,--no-as-needed"
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4249$as_echo "yes" >&6; }
4250else
4251 NO_AS_NEEDED=""
4252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4253$as_echo "no" >&6; }
4254fi
4255rm -f core conftest.err conftest.$ac_objext \
4256 conftest$ac_exeext conftest.$ac_ext
4257LDFLAGS="$save_LDFLAGS"
4258
4259
4260
4261# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004262ac_ext=c
4263ac_cpp='$CPP $CPPFLAGS'
4264ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4265ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4266ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4268$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004269# On Suns, sometimes $CPP names a directory.
4270if test -n "$CPP" && test -d "$CPP"; then
4271 CPP=
4272fi
4273if test -z "$CPP"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004274 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004275 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004276else
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 # Double quotes because CPP needs to be expanded
4278 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4279 do
4280 ac_preproc_ok=false
4281for ac_c_preproc_warn_flag in '' yes
4282do
4283 # Use a header file that comes with gcc, so configuring glibc
4284 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004285 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4286 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004287 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004288 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004290/* end confdefs.h. */
4291#ifdef __STDC__
4292# include <limits.h>
4293#else
4294# include <assert.h>
4295#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004296 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004298if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004299
Matthias Kloseb9621712010-04-24 17:59:49 +00004300else
Martin v. Löwis11437992002-04-12 09:54:03 +00004301 # Broken: fails on valid input.
4302continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004303fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004304rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004307 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004310#include <ac_nonexistent.h>
4311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004312if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004313 # Broken: success on invalid input.
4314continue
4315else
Martin v. Löwis11437992002-04-12 09:54:03 +00004316 # Passes both tests.
4317ac_preproc_ok=:
4318break
4319fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004320rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004321
4322done
4323# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004324rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004325if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004326 break
4327fi
4328
4329 done
4330 ac_cv_prog_CPP=$CPP
4331
4332fi
4333 CPP=$ac_cv_prog_CPP
4334else
4335 ac_cv_prog_CPP=$CPP
4336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4338$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004339ac_preproc_ok=false
4340for ac_c_preproc_warn_flag in '' yes
4341do
4342 # Use a header file that comes with gcc, so configuring glibc
4343 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004344 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4345 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004346 # On the NeXT, cc -E runs the code through the compiler's parser,
4347 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004349/* end confdefs.h. */
4350#ifdef __STDC__
4351# include <limits.h>
4352#else
4353# include <assert.h>
4354#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004355 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004357if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004358
Matthias Kloseb9621712010-04-24 17:59:49 +00004359else
Martin v. Löwis11437992002-04-12 09:54:03 +00004360 # Broken: fails on valid input.
4361continue
4362fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004363rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004366 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004369#include <ac_nonexistent.h>
4370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004371if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004372 # Broken: success on invalid input.
4373continue
4374else
Martin v. Löwis11437992002-04-12 09:54:03 +00004375 # Passes both tests.
4376ac_preproc_ok=:
4377break
4378fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004379rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004380
4381done
4382# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004383rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004384if $ac_preproc_ok; then :
4385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386else
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4388$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004389as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004390See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004391fi
4392
4393ac_ext=c
4394ac_cpp='$CPP $CPPFLAGS'
4395ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4397ac_compiler_gnu=$ac_cv_c_compiler_gnu
4398
4399
Matthias Kloseb9621712010-04-24 17:59:49 +00004400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4401$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004402if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004404else
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 # Loop through the user's path and test for each of PROGNAME-LIST
4408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4410do
4411 IFS=$as_save_IFS
4412 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004413 for ac_prog in grep ggrep; do
4414 for ac_exec_ext in '' $ac_executable_extensions; do
4415 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4416 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4417# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 # Check for GNU $ac_path_GREP
4419case `"$ac_path_GREP" --version 2>&1` in
4420*GNU*)
4421 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4422*)
4423 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425 while :
4426 do
4427 cat "conftest.in" "conftest.in" >"conftest.tmp"
4428 mv "conftest.tmp" "conftest.in"
4429 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004430 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4432 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004433 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4435 # Best one so far, save it but keep looking for a better one
4436 ac_cv_path_GREP="$ac_path_GREP"
4437 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004438 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439 # 10*(2^10) chars as input seems more than enough
4440 test $ac_count -gt 10 && break
4441 done
4442 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4443esac
4444
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 $ac_path_GREP_found && break 3
4446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004448 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004449IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004450 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004451 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 +00004452 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004453else
4454 ac_cv_path_GREP=$GREP
4455fi
4456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4459$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004460 GREP="$ac_cv_path_GREP"
4461
4462
Matthias Kloseb9621712010-04-24 17:59:49 +00004463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4464$as_echo_n "checking for egrep... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004465if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004466 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004467else
4468 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4469 then ac_cv_path_EGREP="$GREP -E"
4470 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004471 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004472 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004473 # Loop through the user's path and test for each of PROGNAME-LIST
4474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004475for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4476do
4477 IFS=$as_save_IFS
4478 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004479 for ac_prog in egrep; do
4480 for ac_exec_ext in '' $ac_executable_extensions; do
4481 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4482 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4483# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004484 # Check for GNU $ac_path_EGREP
4485case `"$ac_path_EGREP" --version 2>&1` in
4486*GNU*)
4487 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4488*)
4489 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004490 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491 while :
4492 do
4493 cat "conftest.in" "conftest.in" >"conftest.tmp"
4494 mv "conftest.tmp" "conftest.in"
4495 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004496 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004497 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4498 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004499 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004500 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4501 # Best one so far, save it but keep looking for a better one
4502 ac_cv_path_EGREP="$ac_path_EGREP"
4503 ac_path_EGREP_max=$ac_count
4504 fi
4505 # 10*(2^10) chars as input seems more than enough
4506 test $ac_count -gt 10 && break
4507 done
4508 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4509esac
4510
Matthias Kloseb9621712010-04-24 17:59:49 +00004511 $ac_path_EGREP_found && break 3
4512 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004513 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004514 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004515IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004517 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 +00004518 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004519else
4520 ac_cv_path_EGREP=$EGREP
4521fi
4522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004523 fi
4524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4526$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004527 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004528
4529
Matthias Kloseb9621712010-04-24 17:59:49 +00004530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4531$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004532if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004533 $as_echo_n "(cached) " >&6
4534else
4535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004536/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004537#include <stdlib.h>
4538#include <stdarg.h>
4539#include <string.h>
4540#include <float.h>
4541
4542int
4543main ()
4544{
4545
4546 ;
4547 return 0;
4548}
4549_ACEOF
4550if ac_fn_c_try_compile "$LINENO"; then :
4551 ac_cv_header_stdc=yes
4552else
4553 ac_cv_header_stdc=no
4554fi
4555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4556
4557if test $ac_cv_header_stdc = yes; then
4558 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4560/* end confdefs.h. */
4561#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004562
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004563_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004565 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004566
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004567else
Matthias Kloseb9621712010-04-24 17:59:49 +00004568 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004569fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004570rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004571
Matthias Kloseb9621712010-04-24 17:59:49 +00004572fi
4573
4574if test $ac_cv_header_stdc = yes; then
4575 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4577/* end confdefs.h. */
4578#include <stdlib.h>
4579
4580_ACEOF
4581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4582 $EGREP "free" >/dev/null 2>&1; then :
4583
4584else
4585 ac_cv_header_stdc=no
4586fi
4587rm -f conftest*
4588
4589fi
4590
4591if test $ac_cv_header_stdc = yes; then
4592 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4593 if test "$cross_compiling" = yes; then :
4594 :
4595else
4596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4597/* end confdefs.h. */
4598#include <ctype.h>
4599#include <stdlib.h>
4600#if ((' ' & 0x0FF) == 0x020)
4601# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4602# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4603#else
4604# define ISLOWER(c) \
4605 (('a' <= (c) && (c) <= 'i') \
4606 || ('j' <= (c) && (c) <= 'r') \
4607 || ('s' <= (c) && (c) <= 'z'))
4608# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4609#endif
4610
4611#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4612int
4613main ()
4614{
4615 int i;
4616 for (i = 0; i < 256; i++)
4617 if (XOR (islower (i), ISLOWER (i))
4618 || toupper (i) != TOUPPER (i))
4619 return 2;
4620 return 0;
4621}
4622_ACEOF
4623if ac_fn_c_try_run "$LINENO"; then :
4624
4625else
4626 ac_cv_header_stdc=no
4627fi
4628rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4629 conftest.$ac_objext conftest.beam conftest.$ac_ext
4630fi
4631
4632fi
4633fi
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4635$as_echo "$ac_cv_header_stdc" >&6; }
4636if test $ac_cv_header_stdc = yes; then
4637
4638$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4639
4640fi
4641
4642# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4643for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4644 inttypes.h stdint.h unistd.h
4645do :
4646 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4647ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4648"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004649if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004650 cat >>confdefs.h <<_ACEOF
4651#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4652_ACEOF
4653
4654fi
4655
4656done
4657
4658
4659
4660 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004661if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004662 MINIX=yes
4663else
4664 MINIX=
4665fi
4666
4667
4668 if test "$MINIX" = yes; then
4669
4670$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4671
4672
4673$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4674
4675
4676$as_echo "#define _MINIX 1" >>confdefs.h
4677
4678 fi
4679
4680
4681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4682$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004683if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004684 $as_echo_n "(cached) " >&6
4685else
4686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4687/* end confdefs.h. */
4688
4689# define __EXTENSIONS__ 1
4690 $ac_includes_default
4691int
4692main ()
4693{
4694
4695 ;
4696 return 0;
4697}
4698_ACEOF
4699if ac_fn_c_try_compile "$LINENO"; then :
4700 ac_cv_safe_to_define___extensions__=yes
4701else
4702 ac_cv_safe_to_define___extensions__=no
4703fi
4704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4705fi
4706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4707$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4708 test $ac_cv_safe_to_define___extensions__ = yes &&
4709 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4710
4711 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4712
4713 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4714
4715 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4716
4717 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4718
4719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004721# Check for unsupported systems
4722case $ac_sys_system/$ac_sys_release in
4723atheos*|Linux*/1*)
4724 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4725 echo See README for details.
4726 exit 1;;
4727esac
4728
4729
Matthias Kloseb9621712010-04-24 17:59:49 +00004730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4731$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004732
4733# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004734if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735 withval=$with_suffix;
4736 case $withval in
4737 no) EXEEXT=;;
4738 yes) EXEEXT=.exe;;
4739 *) EXEEXT=$withval;;
4740 esac
4741fi
4742
Matthias Kloseb9621712010-04-24 17:59:49 +00004743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4744$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745
4746# Test whether we're running on a non-case-sensitive system, in which
4747# case we give a warning if no ext is given
4748
Matthias Kloseb9621712010-04-24 17:59:49 +00004749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4750$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751if test ! -d CaseSensitiveTestDir; then
4752mkdir CaseSensitiveTestDir
4753fi
4754
4755if test -d casesensitivetestdir
4756then
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4758$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759 BUILDEXEEXT=.exe
4760else
Matthias Kloseb9621712010-04-24 17:59:49 +00004761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004763 BUILDEXEEXT=$EXEEXT
4764fi
4765rmdir CaseSensitiveTestDir
4766
4767case $MACHDEP in
4768bsdos*)
4769 case $CC in
4770 gcc) CC="$CC -D_HAVE_BSDI";;
4771 esac;;
4772esac
4773
4774case $ac_sys_system in
4775hp*|HP*)
4776 case $CC in
4777 cc|*/cc) CC="$CC -Ae";;
4778 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779esac
4780
4781
4782
Matthias Kloseb9621712010-04-24 17:59:49 +00004783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4784$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004785if test -z "$LIBRARY"
4786then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004787 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4790$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004791
4792# LDLIBRARY is the name of the library to link against (as opposed to the
4793# name of the library into which to insert object files). BLDLIBRARY is also
4794# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4795# is blank as the main program is not linked directly against LDLIBRARY.
4796# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4797# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4798# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4799# DLLLIBRARY is the shared (i.e., DLL) library.
4800#
4801# RUNSHARED is used to run shared python without installed libraries
4802#
4803# INSTSONAME is the name of the shared library that will be use to install
4804# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004805#
4806# LDVERSION is the shared library version number, normally the Python version
4807# with the ABI build flags appended.
4808
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809
4810
4811
4812
4813
4814
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004815
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004816LDLIBRARY="$LIBRARY"
4817BLDLIBRARY='$(LDLIBRARY)'
4818INSTSONAME='$(LDLIBRARY)'
4819DLLLIBRARY=''
4820LDLIBRARYDIR=''
4821RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004822LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823
4824# LINKCC is the command that links the python executable -- default is $(CC).
4825# If CXX is set, and if it is needed to link a main function that was
4826# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4827# python might then depend on the C++ runtime
4828# This is altered for AIX in order to build the export list before
4829# linking.
4830
Matthias Kloseb9621712010-04-24 17:59:49 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4832$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833if test -z "$LINKCC"
4834then
4835 LINKCC='$(PURIFY) $(MAINCC)'
4836 case $ac_sys_system in
4837 AIX*)
4838 exp_extra="\"\""
4839 if test $ac_sys_release -ge 5 -o \
4840 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4841 exp_extra="."
4842 fi
4843 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844 QNX*)
4845 # qcc must be used because the other compilers do not
4846 # support -N.
4847 LINKCC=qcc;;
4848 esac
4849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4851$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852
4853# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4854# make sure we default having it set to "no": this is used by
4855# distutils.unixccompiler to know if it should add --enable-new-dtags
4856# to linker command lines, and failing to detect GNU ld simply results
4857# in the same bahaviour as before.
4858
Matthias Kloseb9621712010-04-24 17:59:49 +00004859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4860$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861ac_prog=ld
4862if test "$GCC" = yes; then
4863 ac_prog=`$CC -print-prog-name=ld`
4864fi
4865case `"$ac_prog" -V 2>&1 < /dev/null` in
4866 *GNU*)
4867 GNULD=yes;;
4868 *)
4869 GNULD=no;;
4870esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4872$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4875$as_echo_n "checking for inline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004876if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004877 $as_echo_n "(cached) " >&6
4878else
4879 ac_cv_c_inline=no
4880for ac_kw in inline __inline__ __inline; do
4881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4882/* end confdefs.h. */
4883#ifndef __cplusplus
4884typedef int foo_t;
4885static $ac_kw foo_t static_foo () {return 0; }
4886$ac_kw foo_t foo () {return 0; }
4887#endif
4888
4889_ACEOF
4890if ac_fn_c_try_compile "$LINENO"; then :
4891 ac_cv_c_inline=$ac_kw
4892fi
4893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4894 test "$ac_cv_c_inline" != no && break
4895done
4896
4897fi
4898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4899$as_echo "$ac_cv_c_inline" >&6; }
4900
4901case $ac_cv_c_inline in
4902 inline | yes) ;;
4903 *)
4904 case $ac_cv_c_inline in
4905 no) ac_val=;;
4906 *) ac_val=$ac_cv_c_inline;;
4907 esac
4908 cat >>confdefs.h <<_ACEOF
4909#ifndef __cplusplus
4910#define inline $ac_val
4911#endif
4912_ACEOF
4913 ;;
4914esac
4915
4916if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004917
4918$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004919
4920
4921fi
4922
4923
Matthias Kloseb9621712010-04-24 17:59:49 +00004924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4925$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004927if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 enableval=$enable_shared;
4929fi
4930
4931
4932if test -z "$enable_shared"
4933then
4934 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004935 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936 enable_shared="yes";;
4937 *)
4938 enable_shared="no";;
4939 esac
4940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4942$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943
Matthias Kloseb9621712010-04-24 17:59:49 +00004944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4945$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004947if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948 enableval=$enable_profiling; ac_save_cc="$CC"
4949 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004950 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 ac_enable_profiling="no"
4952else
Matthias Kloseb9621712010-04-24 17:59:49 +00004953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954/* end confdefs.h. */
4955int main() { return 0; }
4956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004957if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958 ac_enable_profiling="yes"
4959else
Matthias Kloseb9621712010-04-24 17:59:49 +00004960 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4963 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964fi
4965
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004966 CC="$ac_save_cc"
4967fi
4968
Matthias Kloseb9621712010-04-24 17:59:49 +00004969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4970$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971
4972case "$ac_enable_profiling" in
4973 "yes")
4974 BASECFLAGS="-pg $BASECFLAGS"
4975 LDFLAGS="-pg $LDFLAGS"
4976 ;;
4977esac
4978
Matthias Kloseb9621712010-04-24 17:59:49 +00004979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4980$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981
4982# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4983# library that we build, but we do not want to link against it (we
4984# will find it with a -framework option). For this reason there is an
4985# extra variable BLDLIBRARY against which Python and the extension
4986# modules are linked, BLDLIBRARY. This is normally the same as
4987# LDLIBRARY, but empty for MacOSX framework builds.
4988if test "$enable_framework"
4989then
4990 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4991 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4992 BLDLIBRARY=''
4993else
4994 BLDLIBRARY='$(LDLIBRARY)'
4995fi
4996
4997# Other platforms follow
4998if test $enable_shared = "yes"; then
4999
Matthias Kloseb9621712010-04-24 17:59:49 +00005000$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005001
5002 case $ac_sys_system in
5003 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005004 LDLIBRARY='libpython$(LDVERSION).dll.a'
5005 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005006 ;;
5007 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005008 LDLIBRARY='libpython$(LDVERSION).so'
5009 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5011 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005012 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005013 then
5014 PY3LIBRARY=libpython3.so
5015 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005016 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005017 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005018 LDLIBRARY='libpython$(LDVERSION).so'
5019 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005020 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5021 case $ac_sys_system in
5022 FreeBSD*)
5023 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5024 ;;
5025 esac
5026 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005027 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005028 then
5029 PY3LIBRARY=libpython3.so
5030 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005031 ;;
5032 hp*|HP*)
5033 case `uname -m` in
5034 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005035 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036 ;;
5037 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005038 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005039 ;;
5040 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005041 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5043 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005045 LDLIBRARY='libpython$(LDVERSION).dylib'
5046 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5048 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005049 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005050 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005051 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5052 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053
5054 esac
5055else # shared is disabled
5056 case $ac_sys_system in
5057 CYGWIN*)
5058 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005059 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060 ;;
5061 esac
5062fi
5063
Matthias Kloseb9621712010-04-24 17:59:49 +00005064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5065$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066
5067if test -n "$ac_tool_prefix"; then
5068 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5069set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5071$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005072if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074else
5075 if test -n "$RANLIB"; then
5076 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5077else
5078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081 IFS=$as_save_IFS
5082 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5085 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087 break 2
5088 fi
5089done
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005091IFS=$as_save_IFS
5092
5093fi
5094fi
5095RANLIB=$ac_cv_prog_RANLIB
5096if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5098$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005099else
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005102fi
5103
5104
5105fi
5106if test -z "$ac_cv_prog_RANLIB"; then
5107 ac_ct_RANLIB=$RANLIB
5108 # Extract the first word of "ranlib", so it can be a program name with args.
5109set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5111$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005112if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005114else
5115 if test -n "$ac_ct_RANLIB"; then
5116 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5117else
5118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5119for as_dir in $PATH
5120do
5121 IFS=$as_save_IFS
5122 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5125 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005127 break 2
5128 fi
5129done
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131IFS=$as_save_IFS
5132
5133fi
5134fi
5135ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5136if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5138$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005139else
Matthias Kloseb9621712010-04-24 17:59:49 +00005140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5141$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142fi
5143
5144 if test "x$ac_ct_RANLIB" = x; then
5145 RANLIB=":"
5146 else
5147 case $cross_compiling:$ac_tool_warned in
5148yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151ac_tool_warned=yes ;;
5152esac
5153 RANLIB=$ac_ct_RANLIB
5154 fi
5155else
5156 RANLIB="$ac_cv_prog_RANLIB"
5157fi
5158
5159
5160for ac_prog in ar aal
5161do
5162 # Extract the first word of "$ac_prog", so it can be a program name with args.
5163set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5165$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005166if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005167 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168else
5169 if test -n "$AR"; then
5170 ac_cv_prog_AR="$AR" # Let the user override the test.
5171else
5172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173for as_dir in $PATH
5174do
5175 IFS=$as_save_IFS
5176 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005177 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5179 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005181 break 2
5182 fi
5183done
Matthias Kloseb9621712010-04-24 17:59:49 +00005184 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005185IFS=$as_save_IFS
5186
5187fi
5188fi
5189AR=$ac_cv_prog_AR
5190if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5192$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005193else
Matthias Kloseb9621712010-04-24 17:59:49 +00005194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5195$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005196fi
5197
5198
5199 test -n "$AR" && break
5200done
5201test -n "$AR" || AR="ar"
5202
5203
5204# tweak ARFLAGS only if the user didn't set it on the command line
5205
5206if test -z "$ARFLAGS"
5207then
5208 ARFLAGS="rc"
5209fi
5210
5211
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005212DISABLE_ASDLGEN=""
5213# Extract the first word of "python", so it can be a program name with args.
5214set dummy python; ac_word=$2
5215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5216$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005217if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005218 $as_echo_n "(cached) " >&6
5219else
5220 if test -n "$HAS_PYTHON"; then
5221 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5222else
5223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5224for as_dir in $PATH
5225do
5226 IFS=$as_save_IFS
5227 test -z "$as_dir" && as_dir=.
5228 for ac_exec_ext in '' $ac_executable_extensions; do
5229 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5230 ac_cv_prog_HAS_PYTHON="found"
5231 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5232 break 2
5233 fi
5234done
5235 done
5236IFS=$as_save_IFS
5237
5238 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5239fi
5240fi
5241HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5242if test -n "$HAS_PYTHON"; then
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5244$as_echo "$HAS_PYTHON" >&6; }
5245else
5246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5247$as_echo "no" >&6; }
5248fi
5249
5250
5251if test $HAS_HG != found -o $HAS_PYTHON != found
5252then
5253 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5254fi
5255
5256
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005257case $MACHDEP in
5258bsdos*|hp*|HP*)
5259 # install -d does not work on BSDI or HP-UX
5260 if test -z "$INSTALL"
5261 then
5262 INSTALL="${srcdir}/install-sh -c"
5263 fi
5264esac
5265ac_aux_dir=
5266for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005267 if test -f "$ac_dir/install-sh"; then
5268 ac_aux_dir=$ac_dir
5269 ac_install_sh="$ac_aux_dir/install-sh -c"
5270 break
5271 elif test -f "$ac_dir/install.sh"; then
5272 ac_aux_dir=$ac_dir
5273 ac_install_sh="$ac_aux_dir/install.sh -c"
5274 break
5275 elif test -f "$ac_dir/shtool"; then
5276 ac_aux_dir=$ac_dir
5277 ac_install_sh="$ac_aux_dir/shtool install -c"
5278 break
5279 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005280done
5281if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005282 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005283fi
5284
5285# These three variables are undocumented and unsupported,
5286# and are intended to be withdrawn in a future Autoconf release.
5287# They can cause serious problems if a builder's source tree is in a directory
5288# whose full name contains unusual characters.
5289ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5290ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5291ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5292
5293
5294# Find a good install program. We prefer a C program (faster),
5295# so one script is as good as another. But avoid the broken or
5296# incompatible versions:
5297# SysV /etc/install, /usr/sbin/install
5298# SunOS /usr/etc/install
5299# IRIX /sbin/install
5300# AIX /bin/install
5301# AmigaOS /C/install, which installs bootblocks on floppy discs
5302# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5303# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5304# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5305# OS/2's system install, which has a completely different semantic
5306# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005307# Reject install programs that cannot install multiple files.
5308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5309$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310if test -z "$INSTALL"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005311if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005312 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313else
5314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5315for as_dir in $PATH
5316do
5317 IFS=$as_save_IFS
5318 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005319 # Account for people who put trailing slashes in PATH elements.
5320case $as_dir/ in #((
5321 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005323 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324 /usr/ucb/* ) ;;
5325 *)
5326 # OSF1 and SCO ODT 3.0 have their own names for install.
5327 # Don't use installbsd from OSF since it installs stuff as root
5328 # by default.
5329 for ac_prog in ginstall scoinst install; do
5330 for ac_exec_ext in '' $ac_executable_extensions; do
5331 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5332 if test $ac_prog = install &&
5333 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5334 # AIX install. It has an incompatible calling convention.
5335 :
5336 elif test $ac_prog = install &&
5337 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5338 # program-specific install script used by HP pwplus--don't use.
5339 :
5340 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005341 rm -rf conftest.one conftest.two conftest.dir
5342 echo one > conftest.one
5343 echo two > conftest.two
5344 mkdir conftest.dir
5345 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5346 test -s conftest.one && test -s conftest.two &&
5347 test -s conftest.dir/conftest.one &&
5348 test -s conftest.dir/conftest.two
5349 then
5350 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5351 break 3
5352 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005353 fi
5354 fi
5355 done
5356 done
5357 ;;
5358esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005359
5360 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005361IFS=$as_save_IFS
5362
Matthias Kloseb9621712010-04-24 17:59:49 +00005363rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364
5365fi
5366 if test "${ac_cv_path_install+set}" = set; then
5367 INSTALL=$ac_cv_path_install
5368 else
5369 # As a last resort, use the slow shell script. Don't cache a
5370 # value for INSTALL within a source directory, because that will
5371 # break other packages using the cache if that directory is
5372 # removed, or if the value is a relative name.
5373 INSTALL=$ac_install_sh
5374 fi
5375fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5377$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005378
5379# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5380# It thinks the first close brace ends the variable substitution.
5381test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5382
5383test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5384
5385test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5386
5387
5388# Not every filesystem supports hard links
5389
5390if test -z "$LN" ; then
5391 case $ac_sys_system in
5392 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393 *) LN=ln;;
5394 esac
5395fi
5396
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005397# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005398
5399ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5403$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404
5405# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005406if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407 withval=$with_pydebug;
5408if test "$withval" != no
5409then
5410
Matthias Kloseb9621712010-04-24 17:59:49 +00005411$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5414$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005416 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005417else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5418$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419fi
5420else
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5422$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005423fi
5424
5425
5426# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5427# merged with this chunk of code?
5428
5429# Optimizer/debugger flags
5430# ------------------------
5431# (The following bit of code is complicated enough - please keep things
5432# indented properly. Just pretend you're editing Python code. ;-)
5433
5434# There are two parallel sets of case statements below, one that checks to
5435# see if OPT was set and one that does BASECFLAGS setting based upon
5436# compiler and platform. BASECFLAGS tweaks need to be made even if the
5437# user set OPT.
5438
5439# tweak OPT based on compiler and platform, only if the user didn't set
5440# it on the command line
5441
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005442if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443then
5444 case $GCC in
5445 yes)
5446 if test "$CC" != 'g++' ; then
5447 STRICT_PROTO="-Wstrict-prototypes"
5448 fi
5449 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5450 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5451 WRAP="-fwrapv"
5452 fi
5453 case $ac_cv_prog_cc_g in
5454 yes)
5455 if test "$Py_DEBUG" = 'true' ; then
5456 # Optimization messes up debuggers, so turn it off for
5457 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005458 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459 else
5460 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5461 fi
5462 ;;
5463 *)
5464 OPT="-O3 -Wall $STRICT_PROTO"
5465 ;;
5466 esac
5467 case $ac_sys_system in
5468 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5469 ;;
5470 esac
5471 ;;
5472
5473 *)
5474 OPT="-O"
5475 ;;
5476 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477fi
5478
5479
5480
5481# The -arch flags for universal builds on OSX
5482UNIVERSAL_ARCH_FLAGS=
5483
5484
5485# tweak BASECFLAGS based on compiler and platform
5486case $GCC in
5487yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005488 # Python doesn't violate C99 aliasing rules, but older versions of
5489 # GCC produce warnings for legal Python code. Enable
5490 # -fno-strict-aliasing on versions of GCC that support but produce
5491 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5493$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494 ac_save_cc="$CC"
5495 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005496 save_CFLAGS="$CFLAGS"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005497 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005498 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005499else
Matthias Kloseb9621712010-04-24 17:59:49 +00005500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005502
Matthias Kloseb159a552010-04-25 21:00:44 +00005503
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005504int
5505main ()
5506{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005507
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005508 ;
5509 return 0;
5510}
Matthias Kloseb159a552010-04-25 21:00:44 +00005511
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005513if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005514
5515 CC="$ac_save_cc -fstrict-aliasing"
5516 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005518/* end confdefs.h. */
5519
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005520 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005521int
5522main ()
5523{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005524double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005525 ;
5526 return 0;
5527}
Matthias Kloseb159a552010-04-25 21:00:44 +00005528
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005530if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005531
5532 ac_cv_no_strict_aliasing=no
5533
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005534else
Matthias Kloseb159a552010-04-25 21:00:44 +00005535
5536 ac_cv_no_strict_aliasing=yes
5537
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005538fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005540
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005541else
Matthias Kloseb159a552010-04-25 21:00:44 +00005542
5543 ac_cv_no_strict_aliasing=no
5544
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005547fi
5548
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005549 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5552$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005553 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554 then
5555 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5556 fi
5557
5558 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5559 # support. Without this, treatment of subnormals doesn't follow
5560 # the standard.
5561 case $ac_sys_machine in
5562 alpha*)
5563 BASECFLAGS="$BASECFLAGS -mieee"
5564 ;;
5565 esac
5566
5567 case $ac_sys_system in
5568 SCO_SV*)
5569 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5570 ;;
5571 # is there any other compiler on Darwin besides gcc?
5572 Darwin*)
5573 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5574 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005575 if test "${CC}" = gcc
5576 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5578$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005579 case "${UNIVERSALSDK}" in
5580 */MacOSX10.4u.sdk)
5581 # Build using 10.4 SDK, force usage of gcc when the
5582 # compiler is gcc, otherwise the user will get very
5583 # confusing error messages when building on OSX 10.6
5584 CC=gcc-4.0
5585 CPP=cpp-4.0
5586 ;;
5587 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5589$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005590 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591
5592
5593 if test "${enable_universalsdk}"; then
5594 UNIVERSAL_ARCH_FLAGS=""
5595 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5596 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5597 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005598 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5600 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005601 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005602 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603
5604 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5605 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005606 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005607 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005609 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5610 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005611 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005612 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005613
5614 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5615 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005616 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005617 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005620 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 +00005621
5622 fi
5623
5624
Ronald Oussoren666028b2010-04-18 19:07:43 +00005625 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5626 if test "${UNIVERSALSDK}" != "/"
5627 then
5628 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5629 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005630 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631 fi
5632 fi
5633
5634 # Calculate the right deployment target for this build.
5635 #
5636 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5637 if test ${cur_target} '>' 10.2; then
5638 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005639 if test ${enable_universalsdk}; then
5640 if test "${UNIVERSAL_ARCHS}" = "all"; then
5641 # Ensure that the default platform for a
5642 # 4-way universal build is OSX 10.5,
5643 # that's the first OS release where
5644 # 4-way builds make sense.
5645 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005646
5647 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5648 cur_target='10.5'
5649
5650 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5651 cur_target='10.5'
5652
5653 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5654 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005655 fi
5656 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005657 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005658 # On Intel macs default to a deployment
5659 # target of 10.4, that's the first OSX
5660 # release with Intel support.
5661 cur_target="10.4"
5662 fi
5663 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664 fi
5665 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5666
5667 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5668 # environment with a value that is the same as what we'll use
5669 # in the Makefile to ensure that we'll get the same compiler
5670 # environment during configure and build time.
5671 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5672 export MACOSX_DEPLOYMENT_TARGET
5673 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5674
5675 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 esac
5677 ;;
5678
5679*)
5680 case $ac_sys_system in
5681 OpenUNIX*|UnixWare*)
5682 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5683 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 SCO_SV*)
5685 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5686 ;;
5687 esac
5688 ;;
5689esac
5690
5691if test "$Py_DEBUG" = 'true'; then
5692 :
5693else
5694 OPT="-DNDEBUG $OPT"
5695fi
5696
5697if test "$ac_arch_flags"
5698then
5699 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5700fi
5701
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702# Check whether GCC supports PyArg_ParseTuple format
5703if test "$GCC" = "yes"
5704then
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5706$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707 save_CFLAGS=$CFLAGS
5708 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710/* end confdefs.h. */
5711
5712 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713int
5714main ()
5715{
5716
5717 ;
5718 return 0;
5719}
Matthias Kloseb159a552010-04-25 21:00:44 +00005720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005722if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723
Matthias Kloseb159a552010-04-25 21:00:44 +00005724
Matthias Kloseb9621712010-04-24 17:59:49 +00005725$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726
Matthias Kloseb159a552010-04-25 21:00:44 +00005727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005728$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005729
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730else
Matthias Kloseb159a552010-04-25 21:00:44 +00005731
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005733$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734
5735fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5737 CFLAGS=$save_CFLAGS
5738fi
5739
5740# On some compilers, pthreads are available without further options
5741# (e.g. MacOS X). On some of these systems, the compiler will not
5742# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5743# So we have to see first whether pthreads are available without
5744# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5746$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005747if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005748 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749else
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751 ac_cv_pthread_is_default=no
5752else
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754/* end confdefs.h. */
5755
5756#include <pthread.h>
5757
5758void* routine(void* p){return NULL;}
5759
5760int main(){
5761 pthread_t p;
5762 if(pthread_create(&p,NULL,routine,NULL)!=0)
5763 return 1;
5764 (void)pthread_detach(p);
5765 return 0;
5766}
5767
5768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005769if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770
5771 ac_cv_pthread_is_default=yes
5772 ac_cv_kthread=no
5773 ac_cv_pthread=no
5774
5775else
Matthias Kloseb9621712010-04-24 17:59:49 +00005776 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5779 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780fi
5781
5782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783fi
5784
Matthias Kloseb9621712010-04-24 17:59:49 +00005785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5786$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787
5788
5789if test $ac_cv_pthread_is_default = yes
5790then
5791 ac_cv_kpthread=no
5792else
5793# -Kpthread, if available, provides the right #defines
5794# and linker options to make pthread_create available
5795# Some compilers won't report that they do not support -Kpthread,
5796# so we need to run a program to see whether it really made the
5797# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5799$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005800if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005801 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802else
5803 ac_save_cc="$CC"
5804CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005805if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806 ac_cv_kpthread=no
5807else
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809/* end confdefs.h. */
5810
5811#include <pthread.h>
5812
5813void* routine(void* p){return NULL;}
5814
5815int main(){
5816 pthread_t p;
5817 if(pthread_create(&p,NULL,routine,NULL)!=0)
5818 return 1;
5819 (void)pthread_detach(p);
5820 return 0;
5821}
5822
5823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005824if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825 ac_cv_kpthread=yes
5826else
Matthias Kloseb9621712010-04-24 17:59:49 +00005827 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831fi
5832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833CC="$ac_save_cc"
5834fi
5835
Matthias Kloseb9621712010-04-24 17:59:49 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5837$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838fi
5839
5840if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5841then
5842# -Kthread, if available, provides the right #defines
5843# and linker options to make pthread_create available
5844# Some compilers won't report that they do not support -Kthread,
5845# so we need to run a program to see whether it really made the
5846# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5848$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005849if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005850 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851else
5852 ac_save_cc="$CC"
5853CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005854if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855 ac_cv_kthread=no
5856else
Matthias Kloseb9621712010-04-24 17:59:49 +00005857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858/* end confdefs.h. */
5859
5860#include <pthread.h>
5861
5862void* routine(void* p){return NULL;}
5863
5864int main(){
5865 pthread_t p;
5866 if(pthread_create(&p,NULL,routine,NULL)!=0)
5867 return 1;
5868 (void)pthread_detach(p);
5869 return 0;
5870}
5871
5872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005873if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874 ac_cv_kthread=yes
5875else
Matthias Kloseb9621712010-04-24 17:59:49 +00005876 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5879 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880fi
5881
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882CC="$ac_save_cc"
5883fi
5884
Matthias Kloseb9621712010-04-24 17:59:49 +00005885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5886$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887fi
5888
5889if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5890then
5891# -pthread, if available, provides the right #defines
5892# and linker options to make pthread_create available
5893# Some compilers won't report that they do not support -pthread,
5894# so we need to run a program to see whether it really made the
5895# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5897$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005898if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005899 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900else
5901 ac_save_cc="$CC"
5902CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005903if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ac_cv_pthread=no
5905else
Matthias Kloseb9621712010-04-24 17:59:49 +00005906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907/* end confdefs.h. */
5908
5909#include <pthread.h>
5910
5911void* routine(void* p){return NULL;}
5912
5913int main(){
5914 pthread_t p;
5915 if(pthread_create(&p,NULL,routine,NULL)!=0)
5916 return 1;
5917 (void)pthread_detach(p);
5918 return 0;
5919}
5920
5921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005922if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ac_cv_pthread=yes
5924else
Matthias Kloseb9621712010-04-24 17:59:49 +00005925 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5928 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929fi
5930
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931CC="$ac_save_cc"
5932fi
5933
Matthias Kloseb9621712010-04-24 17:59:49 +00005934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5935$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936fi
5937
5938# If we have set a CC compiler flag for thread support then
5939# check if it works for CXX, too.
5940ac_cv_cxx_thread=no
5941if test ! -z "$CXX"
5942then
Matthias Kloseb9621712010-04-24 17:59:49 +00005943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5944$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945ac_save_cxx="$CXX"
5946
5947if test "$ac_cv_kpthread" = "yes"
5948then
5949 CXX="$CXX -Kpthread"
5950 ac_cv_cxx_thread=yes
5951elif test "$ac_cv_kthread" = "yes"
5952then
5953 CXX="$CXX -Kthread"
5954 ac_cv_cxx_thread=yes
5955elif test "$ac_cv_pthread" = "yes"
5956then
5957 CXX="$CXX -pthread"
5958 ac_cv_cxx_thread=yes
5959fi
5960
5961if test $ac_cv_cxx_thread = yes
5962then
5963 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5964 $CXX -c conftest.$ac_ext 2>&5
5965 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5966 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5967 then
5968 ac_cv_cxx_thread=yes
5969 else
5970 ac_cv_cxx_thread=no
5971 fi
5972 rm -fr conftest*
5973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5975$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976fi
5977CXX="$ac_save_cxx"
5978
5979
5980# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5982$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005983if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985else
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987/* end confdefs.h. */
5988#include <stdlib.h>
5989#include <stdarg.h>
5990#include <string.h>
5991#include <float.h>
5992
5993int
5994main ()
5995{
5996
5997 ;
5998 return 0;
5999}
6000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006001if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002 ac_cv_header_stdc=yes
6003else
Matthias Kloseb9621712010-04-24 17:59:49 +00006004 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6007
6008if test $ac_cv_header_stdc = yes; then
6009 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011/* end confdefs.h. */
6012#include <string.h>
6013
6014_ACEOF
6015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 $EGREP "memchr" >/dev/null 2>&1; then :
6017
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018else
6019 ac_cv_header_stdc=no
6020fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006021rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022
6023fi
6024
6025if test $ac_cv_header_stdc = yes; then
6026 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028/* end confdefs.h. */
6029#include <stdlib.h>
6030
6031_ACEOF
6032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 $EGREP "free" >/dev/null 2>&1; then :
6034
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035else
6036 ac_cv_header_stdc=no
6037fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006038rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039
6040fi
6041
6042if test $ac_cv_header_stdc = yes; then
6043 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045 :
6046else
Matthias Kloseb9621712010-04-24 17:59:49 +00006047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048/* end confdefs.h. */
6049#include <ctype.h>
6050#include <stdlib.h>
6051#if ((' ' & 0x0FF) == 0x020)
6052# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6053# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6054#else
6055# define ISLOWER(c) \
6056 (('a' <= (c) && (c) <= 'i') \
6057 || ('j' <= (c) && (c) <= 'r') \
6058 || ('s' <= (c) && (c) <= 'z'))
6059# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6060#endif
6061
6062#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6063int
6064main ()
6065{
6066 int i;
6067 for (i = 0; i < 256; i++)
6068 if (XOR (islower (i), ISLOWER (i))
6069 || toupper (i) != TOUPPER (i))
6070 return 2;
6071 return 0;
6072}
6073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006074if ac_fn_c_try_run "$LINENO"; then :
6075
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076else
Matthias Kloseb9621712010-04-24 17:59:49 +00006077 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6080 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081fi
6082
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083fi
6084fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6086$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087if test $ac_cv_header_stdc = yes; then
6088
Matthias Kloseb9621712010-04-24 17:59:49 +00006089$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090
6091fi
6092
Benjamin Peterson799bd802011-08-31 22:15:17 -04006093for ac_header in asm/types.h attr/xattr.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006094fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006095ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006096sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006097unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006098sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6099sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006100sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6101sys/stat.h sys/termio.h sys/time.h \
6102sys/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 -07006103libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006104bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006105do :
6106 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6107ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006108if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006109 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006110#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006111_ACEOF
6112
6113fi
6114
Guido van Rossum627b2d71993-12-24 10:39:16 +00006115done
6116
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006117ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006118for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006119 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6121$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006122if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006124else
Matthias Kloseb9621712010-04-24 17:59:49 +00006125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006126/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006127#include <sys/types.h>
6128#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006129
Martin v. Löwis11437992002-04-12 09:54:03 +00006130int
6131main ()
6132{
6133if ((DIR *) 0)
6134return 0;
6135 ;
6136 return 0;
6137}
6138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006139if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006140 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006141else
Matthias Kloseb9621712010-04-24 17:59:49 +00006142 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006146eval ac_res=\$$as_ac_Header
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6148$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006149if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006150 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006151#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006152_ACEOF
6153
6154ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006155fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006156
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006157done
6158# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6159if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6161$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006162if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006163 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006164else
Martin v. Löwis11437992002-04-12 09:54:03 +00006165 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006168
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006169/* Override any GCC internal prototype to avoid an error.
6170 Use char because int might match the return type of a GCC
6171 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006172#ifdef __cplusplus
6173extern "C"
6174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006175char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006176int
6177main ()
6178{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006179return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006180 ;
6181 return 0;
6182}
6183_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184for ac_lib in '' dir; do
6185 if test -z "$ac_lib"; then
6186 ac_res="none required"
6187 else
6188 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006189 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006192 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006194rm -f core conftest.err conftest.$ac_objext \
6195 conftest$ac_exeext
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006196 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006197 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006199done
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006200if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006201
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006202else
6203 ac_cv_search_opendir=no
6204fi
6205rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006206LIBS=$ac_func_search_save_LIBS
6207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6209$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006210ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006211if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006212 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006213
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006215
Michael W. Hudson54241132001-12-07 15:38:26 +00006216else
Matthias Kloseb9621712010-04-24 17:59:49 +00006217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6218$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006219if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006220 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006221else
6222 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006226/* Override any GCC internal prototype to avoid an error.
6227 Use char because int might match the return type of a GCC
6228 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006229#ifdef __cplusplus
6230extern "C"
6231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006232char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006233int
6234main ()
6235{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006236return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006237 ;
6238 return 0;
6239}
6240_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241for ac_lib in '' x; do
6242 if test -z "$ac_lib"; then
6243 ac_res="none required"
6244 else
6245 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006246 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006247 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006248 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006249 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006251rm -f core conftest.err conftest.$ac_objext \
6252 conftest$ac_exeext
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006253 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006254 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006256done
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006257if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006259else
6260 ac_cv_search_opendir=no
6261fi
6262rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006263LIBS=$ac_func_search_save_LIBS
6264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6266$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006267ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006268if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006269 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006270
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006271fi
6272
6273fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006274
Matthias Kloseb9621712010-04-24 17:59:49 +00006275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6276$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006277if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006278 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279else
Matthias Kloseb9621712010-04-24 17:59:49 +00006280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006281/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283int
6284main ()
6285{
6286return makedev(0, 0);
6287 ;
6288 return 0;
6289}
6290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006291if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292 ac_cv_header_sys_types_h_makedev=yes
6293else
Matthias Kloseb9621712010-04-24 17:59:49 +00006294 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006296rm -f core conftest.err conftest.$ac_objext \
6297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006298
6299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6301$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302
6303if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006304ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006305if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006306
Matthias Kloseb9621712010-04-24 17:59:49 +00006307$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308
6309fi
6310
6311
6312
6313 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006314 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006315if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006316
Matthias Kloseb9621712010-04-24 17:59:49 +00006317$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006318
6319fi
6320
6321
6322 fi
6323fi
6324
Michael W. Hudson54241132001-12-07 15:38:26 +00006325
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006326# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6327for ac_header in net/if.h
6328do :
6329 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6330#ifdef STDC_HEADERS
6331# include <stdlib.h>
6332# include <stddef.h>
6333#else
6334# ifdef HAVE_STDLIB_H
6335# include <stdlib.h>
6336# endif
6337#endif
6338#ifdef HAVE_SYS_SOCKET_H
6339# include <sys/socket.h>
6340#endif
6341
6342"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006343if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006344 cat >>confdefs.h <<_ACEOF
6345#define HAVE_NET_IF_H 1
6346_ACEOF
6347
6348fi
6349
6350done
6351
6352
6353
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006354# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006355for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006356do :
6357 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006358#ifdef HAVE_CURSES_H
6359#include <curses.h>
6360#endif
6361
Matthias Kloseb9621712010-04-24 17:59:49 +00006362"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006363if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006364 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006365#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006366_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006367
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006368fi
6369
6370done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006371
6372
Martin v. Löwis11017b12006-01-14 18:12:57 +00006373# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006374for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006375do :
6376 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 +00006377#ifdef HAVE_ASM_TYPES_H
6378#include <asm/types.h>
6379#endif
6380#ifdef HAVE_SYS_SOCKET_H
6381#include <sys/socket.h>
6382#endif
6383
Matthias Kloseb9621712010-04-24 17:59:49 +00006384"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006385if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006386 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006387#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006388_ACEOF
6389
6390fi
6391
6392done
6393
6394
Guido van Rossum627b2d71993-12-24 10:39:16 +00006395# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006396was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6398$as_echo_n "checking for clock_t in time.h... " >&6; }
6399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006400/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006401#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006402
6403_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006405 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006406 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006407else
Martin v. Löwis11437992002-04-12 09:54:03 +00006408
6409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006411
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006412
Guido van Rossum627b2d71993-12-24 10:39:16 +00006413fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006414rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006415
Matthias Kloseb9621712010-04-24 17:59:49 +00006416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6417$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006418
Matthias Kloseb9621712010-04-24 17:59:49 +00006419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6420$as_echo_n "checking for makedev... " >&6; }
6421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006422/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006423
Jesus Cea740f53a2010-04-28 11:35:30 +00006424#if defined(MAJOR_IN_MKDEV)
6425#include <sys/mkdev.h>
6426#elif defined(MAJOR_IN_SYSMACROS)
6427#include <sys/sysmacros.h>
6428#else
6429#include <sys/types.h>
6430#endif
6431
Neal Norwitz11690112002-07-30 01:08:28 +00006432int
6433main ()
6434{
Jesus Cea740f53a2010-04-28 11:35:30 +00006435
6436 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006437 ;
6438 return 0;
6439}
Matthias Kloseb159a552010-04-25 21:00:44 +00006440
Neal Norwitz11690112002-07-30 01:08:28 +00006441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006442if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006443 ac_cv_has_makedev=yes
6444else
Matthias Kloseb9621712010-04-24 17:59:49 +00006445 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006447rm -f core conftest.err conftest.$ac_objext \
6448 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6450$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006451if test "$ac_cv_has_makedev" = "yes"; then
6452
Matthias Kloseb9621712010-04-24 17:59:49 +00006453$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006454
6455fi
6456
Martin v. Löwis399a6892002-10-04 10:22:02 +00006457# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6458# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6459# defined, but the compiler does not support pragma redefine_extname,
6460# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6461# structures (such as rlimit64) without declaring them. As a
6462# work-around, disable LFS on such configurations
6463
6464use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6466$as_echo_n "checking Solaris LFS bug... " >&6; }
6467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006468/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006469
6470#define _LARGEFILE_SOURCE 1
6471#define _FILE_OFFSET_BITS 64
6472#include <sys/resource.h>
6473
Martin v. Löwis399a6892002-10-04 10:22:02 +00006474int
6475main ()
6476{
6477struct rlimit foo;
6478 ;
6479 return 0;
6480}
6481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006482if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006483 sol_lfs_bug=no
6484else
Matthias Kloseb9621712010-04-24 17:59:49 +00006485 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6489$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006490if test "$sol_lfs_bug" = "yes"; then
6491 use_lfs=no
6492fi
6493
6494if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006495# Two defines needed to enable largefile support on various platforms
6496# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006497case $ac_sys_system/$ac_sys_release in
6498AIX*)
6499
6500$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6501
6502 ;;
6503esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006504
Matthias Kloseb9621712010-04-24 17:59:49 +00006505$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006506
6507
Matthias Kloseb9621712010-04-24 17:59:49 +00006508$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006509
Martin v. Löwis399a6892002-10-04 10:22:02 +00006510fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006511
Guido van Rossum84e7b241996-08-19 21:59:00 +00006512# Add some code to confdefs.h so that the test for off_t works on SCO
6513cat >> confdefs.h <<\EOF
6514#if defined(SCO_DS)
6515#undef _OFF_T
6516#endif
6517EOF
6518
Guido van Rossumef2255b2000-03-10 22:30:29 +00006519# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006520ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006521if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006522
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006523else
Martin v. Löwis11437992002-04-12 09:54:03 +00006524
6525cat >>confdefs.h <<_ACEOF
6526#define mode_t int
6527_ACEOF
6528
6529fi
6530
Matthias Kloseb9621712010-04-24 17:59:49 +00006531ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006532if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006534else
Martin v. Löwis11437992002-04-12 09:54:03 +00006535
6536cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006537#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006538_ACEOF
6539
6540fi
6541
Matthias Kloseb9621712010-04-24 17:59:49 +00006542ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006543if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006544
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006545else
Martin v. Löwis11437992002-04-12 09:54:03 +00006546
6547cat >>confdefs.h <<_ACEOF
6548#define pid_t int
6549_ACEOF
6550
6551fi
6552
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006553
Martin v. Löwis11437992002-04-12 09:54:03 +00006554cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006555#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006556_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006557
Matthias Kloseb9621712010-04-24 17:59:49 +00006558ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006559if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006560
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006561else
Martin v. Löwis11437992002-04-12 09:54:03 +00006562
6563cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006564#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006565_ACEOF
6566
6567fi
6568
Matthias Kloseb9621712010-04-24 17:59:49 +00006569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6570$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006571if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006572 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006573else
Matthias Kloseb9621712010-04-24 17:59:49 +00006574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006575/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006576#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006577
6578_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006579if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006580 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006581 ac_cv_type_uid_t=yes
6582else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006583 ac_cv_type_uid_t=no
6584fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006585rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006586
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6589$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006590if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006591
Matthias Kloseb9621712010-04-24 17:59:49 +00006592$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006593
6594
Matthias Kloseb9621712010-04-24 17:59:49 +00006595$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006596
6597fi
6598
Matthias Kloseb9621712010-04-24 17:59:49 +00006599ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6600case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006601 no|yes) ;; #(
6602 *)
6603
Matthias Kloseb9621712010-04-24 17:59:49 +00006604$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006605
6606
6607cat >>confdefs.h <<_ACEOF
6608#define uint32_t $ac_cv_c_uint32_t
6609_ACEOF
6610;;
6611 esac
6612
Matthias Kloseb9621712010-04-24 17:59:49 +00006613ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6614case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006615 no|yes) ;; #(
6616 *)
6617
Matthias Kloseb9621712010-04-24 17:59:49 +00006618$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006619
6620
6621cat >>confdefs.h <<_ACEOF
6622#define uint64_t $ac_cv_c_uint64_t
6623_ACEOF
6624;;
6625 esac
6626
Matthias Kloseb9621712010-04-24 17:59:49 +00006627ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6628case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006629 no|yes) ;; #(
6630 *)
6631
6632cat >>confdefs.h <<_ACEOF
6633#define int32_t $ac_cv_c_int32_t
6634_ACEOF
6635;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006636esac
6637
Matthias Kloseb9621712010-04-24 17:59:49 +00006638ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6639case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006640 no|yes) ;; #(
6641 *)
6642
6643cat >>confdefs.h <<_ACEOF
6644#define int64_t $ac_cv_c_int64_t
6645_ACEOF
6646;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006647esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006648
Matthias Kloseb9621712010-04-24 17:59:49 +00006649ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006650if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006651
Matthias Kloseb9621712010-04-24 17:59:49 +00006652$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006653
6654fi
6655
Jack Jansendd19cf82001-12-06 22:36:17 +00006656
Michael W. Hudson54241132001-12-07 15:38:26 +00006657# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006658# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006659# The cast to long int works around a bug in the HP C Compiler
6660# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6661# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6662# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6664$as_echo_n "checking size of int... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006665if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006666 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006667else
Matthias Kloseb9621712010-04-24 17:59:49 +00006668 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 +00006669
Martin v. Löwis11437992002-04-12 09:54:03 +00006670else
Matthias Kloseb9621712010-04-24 17:59:49 +00006671 if test "$ac_cv_type_int" = yes; then
6672 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006674as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006675See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006676 else
6677 ac_cv_sizeof_int=0
6678 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006680
Martin v. Löwis11437992002-04-12 09:54:03 +00006681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6683$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006684
6685
6686
Martin v. Löwis11437992002-04-12 09:54:03 +00006687cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006688#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006689_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006690
6691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006692# The cast to long int works around a bug in the HP C Compiler
6693# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6694# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6695# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6697$as_echo_n "checking size of long... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006698if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006699 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006700else
Matthias Kloseb9621712010-04-24 17:59:49 +00006701 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 +00006702
Martin v. Löwis11437992002-04-12 09:54:03 +00006703else
Matthias Kloseb9621712010-04-24 17:59:49 +00006704 if test "$ac_cv_type_long" = yes; then
6705 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006707as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006708See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006709 else
6710 ac_cv_sizeof_long=0
6711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006713
Martin v. Löwis11437992002-04-12 09:54:03 +00006714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6716$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006717
6718
6719
Martin v. Löwis11437992002-04-12 09:54:03 +00006720cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006721#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006722_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006723
6724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006725# The cast to long int works around a bug in the HP C Compiler
6726# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6727# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6728# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6730$as_echo_n "checking size of void *... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006731if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006732 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006733else
Matthias Kloseb9621712010-04-24 17:59:49 +00006734 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 +00006735
Martin v. Löwis11437992002-04-12 09:54:03 +00006736else
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 if test "$ac_cv_type_void_p" = yes; then
6738 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006740as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006741See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006742 else
6743 ac_cv_sizeof_void_p=0
6744 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006746
Martin v. Löwis11437992002-04-12 09:54:03 +00006747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6749$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006750
6751
6752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006754#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006755_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006756
6757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006758# The cast to long int works around a bug in the HP C Compiler
6759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6761# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6763$as_echo_n "checking size of short... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006764if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006765 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006766else
Matthias Kloseb9621712010-04-24 17:59:49 +00006767 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 +00006768
Martin v. Löwis11437992002-04-12 09:54:03 +00006769else
Matthias Kloseb9621712010-04-24 17:59:49 +00006770 if test "$ac_cv_type_short" = yes; then
6771 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6772$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006773as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006774See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006775 else
6776 ac_cv_sizeof_short=0
6777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006779
Martin v. Löwis11437992002-04-12 09:54:03 +00006780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6782$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006783
6784
6785
Martin v. Löwis11437992002-04-12 09:54:03 +00006786cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006787#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006788_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006789
6790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006791# The cast to long int works around a bug in the HP C Compiler
6792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6794# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6796$as_echo_n "checking size of float... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006797if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006799else
Matthias Kloseb9621712010-04-24 17:59:49 +00006800 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 +00006801
Martin v. Löwis11437992002-04-12 09:54:03 +00006802else
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 if test "$ac_cv_type_float" = yes; then
6804 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006806as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006807See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006808 else
6809 ac_cv_sizeof_float=0
6810 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006812
Martin v. Löwis11437992002-04-12 09:54:03 +00006813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6815$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006816
6817
6818
Martin v. Löwis11437992002-04-12 09:54:03 +00006819cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006820#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006821_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006822
6823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006824# The cast to long int works around a bug in the HP C Compiler
6825# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6826# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6827# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6829$as_echo_n "checking size of double... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006830if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006832else
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 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 +00006834
Martin v. Löwis11437992002-04-12 09:54:03 +00006835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 if test "$ac_cv_type_double" = yes; then
6837 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006839as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006840See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006841 else
6842 ac_cv_sizeof_double=0
6843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006845
Martin v. Löwis11437992002-04-12 09:54:03 +00006846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6848$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849
6850
6851
Martin v. Löwis11437992002-04-12 09:54:03 +00006852cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006853#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006854_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006855
6856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006857# The cast to long int works around a bug in the HP C Compiler
6858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6860# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6862$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006863if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006865else
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 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 +00006867
Martin v. Löwis11437992002-04-12 09:54:03 +00006868else
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 if test "$ac_cv_type_fpos_t" = yes; then
6870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006872as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006873See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006874 else
6875 ac_cv_sizeof_fpos_t=0
6876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006878
Martin v. Löwis11437992002-04-12 09:54:03 +00006879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6881$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006882
6883
6884
Martin v. Löwis11437992002-04-12 09:54:03 +00006885cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006886#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006887_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006888
Michael W. Hudson54241132001-12-07 15:38:26 +00006889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006890# The cast to long int works around a bug in the HP C Compiler
6891# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6892# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6893# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6895$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006896if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006897 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006898else
Matthias Kloseb9621712010-04-24 17:59:49 +00006899 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 +00006900
Martin v. Löwis18e16552006-02-15 17:27:45 +00006901else
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 if test "$ac_cv_type_size_t" = yes; then
6903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006905as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006906See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006907 else
6908 ac_cv_sizeof_size_t=0
6909 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006911
Martin v. Löwis18e16552006-02-15 17:27:45 +00006912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6914$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006915
6916
6917
Martin v. Löwis18e16552006-02-15 17:27:45 +00006918cat >>confdefs.h <<_ACEOF
6919#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6920_ACEOF
6921
6922
Christian Heimes400adb02008-02-01 08:12:03 +00006923# The cast to long int works around a bug in the HP C Compiler
6924# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6925# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6926# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6928$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006929if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006930 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006931else
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 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 +00006933
Christian Heimes400adb02008-02-01 08:12:03 +00006934else
Matthias Kloseb9621712010-04-24 17:59:49 +00006935 if test "$ac_cv_type_pid_t" = yes; then
6936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006938as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006939See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006940 else
6941 ac_cv_sizeof_pid_t=0
6942 fi
6943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006944
Christian Heimes400adb02008-02-01 08:12:03 +00006945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6947$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006948
6949
6950
6951cat >>confdefs.h <<_ACEOF
6952#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6953_ACEOF
6954
6955
Michael W. Hudson54241132001-12-07 15:38:26 +00006956
Matthias Kloseb9621712010-04-24 17:59:49 +00006957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6958$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006959have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006961/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006962
Martin v. Löwis11437992002-04-12 09:54:03 +00006963int
6964main ()
6965{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006966long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006967 ;
6968 return 0;
6969}
6970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006971if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006972
6973
Matthias Kloseb9621712010-04-24 17:59:49 +00006974$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006975
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006976 have_long_long=yes
6977
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6981$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006982if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006983# The cast to long int works around a bug in the HP C Compiler
6984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6986# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6988$as_echo_n "checking size of long long... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006989if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006991else
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 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 +00006993
Martin v. Löwis11437992002-04-12 09:54:03 +00006994else
Matthias Kloseb9621712010-04-24 17:59:49 +00006995 if test "$ac_cv_type_long_long" = yes; then
6996 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006998as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006999See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007000 else
7001 ac_cv_sizeof_long_long=0
7002 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007004
Martin v. Löwis11437992002-04-12 09:54:03 +00007005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7007$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007008
7009
7010
Martin v. Löwis11437992002-04-12 09:54:03 +00007011cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007012#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007013_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007014
Michael W. Hudson54241132001-12-07 15:38:26 +00007015
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007016fi
7017
Matthias Kloseb9621712010-04-24 17:59:49 +00007018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7019$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007020have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007022/* end confdefs.h. */
7023
7024int
7025main ()
7026{
7027long double x; x = (long double)0;
7028 ;
7029 return 0;
7030}
7031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007032if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007033
7034
Matthias Kloseb9621712010-04-24 17:59:49 +00007035$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007036
7037 have_long_double=yes
7038
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007039fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7042$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007043if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007044# The cast to long int works around a bug in the HP C Compiler
7045# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7046# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7047# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7049$as_echo_n "checking size of long double... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007050if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007051 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007052else
Matthias Kloseb9621712010-04-24 17:59:49 +00007053 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 +00007054
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007055else
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 if test "$ac_cv_type_long_double" = yes; then
7057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007059as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007060See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007061 else
7062 ac_cv_sizeof_long_double=0
7063 fi
7064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007065
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7068$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007069
7070
7071
7072cat >>confdefs.h <<_ACEOF
7073#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7074_ACEOF
7075
7076
7077fi
7078
7079
Matthias Kloseb9621712010-04-24 17:59:49 +00007080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7081$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007082have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007084/* end confdefs.h. */
7085
7086int
7087main ()
7088{
7089_Bool x; x = (_Bool)0;
7090 ;
7091 return 0;
7092}
7093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007094if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007095
7096
Matthias Kloseb9621712010-04-24 17:59:49 +00007097$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007098
7099 have_c99_bool=yes
7100
Thomas Woutersb2137042007-02-01 18:02:27 +00007101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7104$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007105if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007106# The cast to long int works around a bug in the HP C Compiler
7107# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7108# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7109# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7111$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007112if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007113 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007114else
Matthias Kloseb9621712010-04-24 17:59:49 +00007115 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 +00007116
Thomas Woutersb2137042007-02-01 18:02:27 +00007117else
Matthias Kloseb9621712010-04-24 17:59:49 +00007118 if test "$ac_cv_type__Bool" = yes; then
7119 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007121as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007122See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007123 else
7124 ac_cv_sizeof__Bool=0
7125 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007127
Thomas Woutersb2137042007-02-01 18:02:27 +00007128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7130$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007131
7132
7133
Thomas Woutersb2137042007-02-01 18:02:27 +00007134cat >>confdefs.h <<_ACEOF
7135#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7136_ACEOF
7137
7138
7139fi
7140
Matthias Kloseb9621712010-04-24 17:59:49 +00007141ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007142 #include <stdint.h>
7143 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007144 #ifdef HAVE_INTTYPES_H
7145 #include <inttypes.h>
7146 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007147"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007148if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007149
7150cat >>confdefs.h <<_ACEOF
7151#define HAVE_UINTPTR_T 1
7152_ACEOF
7153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007154# The cast to long int works around a bug in the HP C Compiler
7155# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7156# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7157# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7159$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007160if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007161 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007162else
Matthias Kloseb9621712010-04-24 17:59:49 +00007163 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 +00007164
Martin v. Löwis11437992002-04-12 09:54:03 +00007165else
Matthias Kloseb9621712010-04-24 17:59:49 +00007166 if test "$ac_cv_type_uintptr_t" = yes; then
7167 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007169as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007170See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007171 else
7172 ac_cv_sizeof_uintptr_t=0
7173 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007175
Martin v. Löwis11437992002-04-12 09:54:03 +00007176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7178$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007179
7180
7181
Martin v. Löwis11437992002-04-12 09:54:03 +00007182cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007183#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007184_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007185
Michael W. Hudson54241132001-12-07 15:38:26 +00007186
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007187fi
7188
Thomas Wouters89f507f2006-12-13 04:49:30 +00007189
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007190# The cast to long int works around a bug in the HP C Compiler
7191# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7192# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7193# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7195$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007196if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007197 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007198else
Matthias Kloseb9621712010-04-24 17:59:49 +00007199 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007200#ifdef HAVE_SYS_TYPES_H
7201#include <sys/types.h>
7202#endif
7203
Matthias Kloseb9621712010-04-24 17:59:49 +00007204"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007205
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007206else
Matthias Kloseb9621712010-04-24 17:59:49 +00007207 if test "$ac_cv_type_off_t" = yes; then
7208 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7209$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007210as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007211See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007212 else
7213 ac_cv_sizeof_off_t=0
7214 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007216
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7219$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007220
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007221
7222
Martin v. Löwis11437992002-04-12 09:54:03 +00007223cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007224#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007225_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007226
Michael W. Hudson54241132001-12-07 15:38:26 +00007227
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007228
Matthias Kloseb9621712010-04-24 17:59:49 +00007229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7230$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007231if test "$have_long_long" = yes
7232then
7233if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007234 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007235
Matthias Kloseb9621712010-04-24 17:59:49 +00007236$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007237
Matthias Kloseb9621712010-04-24 17:59:49 +00007238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7239$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007240else
Matthias Kloseb9621712010-04-24 17:59:49 +00007241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7242$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007243fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007244else
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7246$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007247fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007248
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249# The cast to long int works around a bug in the HP C Compiler
7250# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7251# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7252# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7254$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007255if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007257else
Matthias Kloseb9621712010-04-24 17:59:49 +00007258 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259#ifdef HAVE_SYS_TYPES_H
7260#include <sys/types.h>
7261#endif
7262#ifdef HAVE_TIME_H
7263#include <time.h>
7264#endif
7265
Matthias Kloseb9621712010-04-24 17:59:49 +00007266"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007268else
Matthias Kloseb9621712010-04-24 17:59:49 +00007269 if test "$ac_cv_type_time_t" = yes; then
7270 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7271$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007272as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007273See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007274 else
7275 ac_cv_sizeof_time_t=0
7276 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007278
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7281$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007282
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007283
7284
Martin v. Löwis11437992002-04-12 09:54:03 +00007285cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007286#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007287_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007288
Michael W. Hudson54241132001-12-07 15:38:26 +00007289
7290
Trent Mick635f6fb2000-08-23 21:33:05 +00007291# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007292ac_save_cc="$CC"
7293if test "$ac_cv_kpthread" = "yes"
7294then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007295elif test "$ac_cv_kthread" = "yes"
7296then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007297elif test "$ac_cv_pthread" = "yes"
7298then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007299fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007300
Matthias Kloseb9621712010-04-24 17:59:49 +00007301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7302$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007303have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007305/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007306
7307 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007308int
7309main ()
7310{
Guido van Rossum12580492000-09-24 16:47:19 +00007311pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007312 ;
7313 return 0;
7314}
Matthias Kloseb159a552010-04-25 21:00:44 +00007315
Martin v. Löwis11437992002-04-12 09:54:03 +00007316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007317if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007318 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7322$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007323if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007324 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007325# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7326# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7327# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7329$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007330if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007331 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007332else
Matthias Kloseb9621712010-04-24 17:59:49 +00007333 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007334#ifdef HAVE_PTHREAD_H
7335#include <pthread.h>
7336#endif
7337
Matthias Kloseb9621712010-04-24 17:59:49 +00007338"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007339
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007340else
Matthias Kloseb9621712010-04-24 17:59:49 +00007341 if test "$ac_cv_type_pthread_t" = yes; then
7342 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7343$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007344as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007345See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007346 else
7347 ac_cv_sizeof_pthread_t=0
7348 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007350
Trent Mick635f6fb2000-08-23 21:33:05 +00007351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7353$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007354
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007355
7356
Martin v. Löwis11437992002-04-12 09:54:03 +00007357cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007358#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007359_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007360
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007361
Trent Mick635f6fb2000-08-23 21:33:05 +00007362fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007363CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007364
Michael W. Hudson54241132001-12-07 15:38:26 +00007365
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007366case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007367 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007368 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7369 ;;
7370 Darwin/*)
7371 OTHER_LIBTOOL_OPT=""
7372 ;;
7373esac
7374
7375
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007376ARCH_RUN_32BIT=""
7377
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007378case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007379 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007380 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7381 if test "${enable_universalsdk}"; then
7382 :
7383 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007384 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007385 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007386 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007387 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007388 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007389 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007390 if test ${gcc_version} '<' 4.0
7391 then
7392 LIBTOOL_CRUFT="-lcc_dynamic"
7393 else
7394 LIBTOOL_CRUFT=""
7395 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007397 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007398else
Matthias Kloseb9621712010-04-24 17:59:49 +00007399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007400/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007401
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007402 #include <unistd.h>
7403 int main(int argc, char*argv[])
7404 {
7405 if (sizeof(long) == 4) {
7406 return 0;
7407 } else {
7408 return 1;
7409 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007410 }
7411
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007413if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007414 ac_osx_32bit=yes
7415else
Matthias Kloseb9621712010-04-24 17:59:49 +00007416 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7419 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007420fi
7421
7422
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007423 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007424 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007425 i386)
7426 MACOSX_DEFAULT_ARCH="i386"
7427 ;;
7428 ppc)
7429 MACOSX_DEFAULT_ARCH="ppc"
7430 ;;
7431 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007432 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007433 ;;
7434 esac
7435 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007436 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007437 i386)
7438 MACOSX_DEFAULT_ARCH="x86_64"
7439 ;;
7440 ppc)
7441 MACOSX_DEFAULT_ARCH="ppc64"
7442 ;;
7443 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007444 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007445 ;;
7446 esac
7447
7448 #ARCH_RUN_32BIT="true"
7449 fi
7450
7451 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007452 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007453 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007454esac
7455
Matthias Kloseb9621712010-04-24 17:59:49 +00007456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7457$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007458if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007459then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007460 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007461 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007462 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007463
Matthias Kloseb9621712010-04-24 17:59:49 +00007464$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007465
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7467$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007468 if test $enable_shared = "yes"
7469 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007470 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 +00007471 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007472else
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7474$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007475fi
7476
Matthias Kloseb9621712010-04-24 17:59:49 +00007477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7478$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007479case $ac_sys_system/$ac_sys_release in
7480 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007481
Matthias Kloseb9621712010-04-24 17:59:49 +00007482$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7485$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007486 ;;
7487 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007490 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007491esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007492
Guido van Rossum0a516c91994-09-12 10:58:40 +00007493# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007494
Michael W. Hudson54241132001-12-07 15:38:26 +00007495
7496
7497
7498
Benjamin Peterson99f03762010-04-11 22:15:28 +00007499
Thomas Wouters477c8d52006-05-27 19:21:47 +00007500
Georg Brandlb1441c72009-01-03 22:33:39 +00007501
Thomas Wouters477c8d52006-05-27 19:21:47 +00007502cat >>confdefs.h <<_ACEOF
7503#define SHLIB_EXT "$SO"
7504_ACEOF
7505
Guido van Rossum0a516c91994-09-12 10:58:40 +00007506# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007507# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007508# (Shared libraries in this instance are shared modules to be loaded into
7509# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7511$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007512if test -z "$LDSHARED"
7513then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007514 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007515 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007516 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007517 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007518 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007519 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007520 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007521 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007522 if test "$GCC" = "yes" ; then
7523 LDSHARED='$(CC) -shared'
7524 LDCXXSHARED='$(CXX) -shared'
7525 else
7526 LDSHARED='$(CC) -G'
7527 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007528 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007529 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007530 if test "$GCC" = "yes" ; then
7531 LDSHARED='$(CC) -shared'
7532 LDCXXSHARED='$(CXX) -shared'
7533 else
7534 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007535 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007536 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007537 LDSHARED='$(CC) -bundle'
7538 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007539 if test "$enable_framework" ; then
7540 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007541 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7542 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007543 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007544 else
7545 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007546 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007547 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007548 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007549 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007550 LDSHARED='$(CC) -bundle'
7551 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007552 if test "$enable_framework" ; then
7553 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007554 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7555 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007556 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007557 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007558 # No framework, use the Python app as bundle-loader
7559 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007560 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007561 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007562 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007563 Darwin/*)
7564 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7565 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007566
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007567 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007568 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007569 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007570 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007571 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007572 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7573 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007574 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007575 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007576 LDSHARED='$(CC) -bundle'
7577 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007578 if test "$enable_framework" ; then
7579 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007580 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7581 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007582 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007583 else
7584 # No framework, use the Python app as bundle-loader
7585 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7586 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007587 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007588 fi
7589 fi
7590 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007591 Linux*|GNU*|QNX*)
7592 LDSHARED='$(CC) -shared'
7593 LDCXXSHARED='$(CXX) -shared';;
7594 BSD/OS*/4*)
7595 LDSHARED="gcc -shared"
7596 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007597 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007598 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007599 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007600 LDSHARED='$(CC) -shared'
7601 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007602 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007603 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007604 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007605 OpenBSD*)
7606 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7607 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007608 LDSHARED='$(CC) -shared $(CCSHARED)'
7609 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007610 else
7611 case `uname -r` in
7612 [01].* | 2.[0-7] | 2.[0-7].*)
7613 LDSHARED="ld -Bshareable ${LDFLAGS}"
7614 ;;
7615 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007616 LDSHARED='$(CC) -shared $(CCSHARED)'
7617 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007618 ;;
7619 esac
7620 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007621 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007622 LDSHARED='$(CC) -shared'
7623 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007624 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007625 if test "$GCC" = "yes" ; then
7626 LDSHARED='$(CC) -shared'
7627 LDCXXSHARED='$(CXX) -shared'
7628 else
7629 LDSHARED='$(CC) -G'
7630 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007631 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007632 SCO_SV*)
7633 LDSHARED='$(CC) -Wl,-G,-Bexport'
7634 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7635 CYGWIN*)
7636 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7637 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007638 *) LDSHARED="ld";;
7639 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7642$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007643LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007644BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007645# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007646# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7648$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007649if test -z "$CCSHARED"
7650then
Guido van Rossum07397971997-04-29 21:49:50 +00007651 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007652 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007653 then CCSHARED="-fPIC";
7654 elif test `uname -p` = sparc;
7655 then CCSHARED="-xcode=pic32";
7656 else CCSHARED="-Kpic";
7657 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007658 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007659 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007660 else CCSHARED="+z";
7661 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007662 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007663 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007664 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007665 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007666 if test "$GCC" = "yes"
7667 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007668 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007669 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007670 SCO_SV*)
7671 if test "$GCC" = "yes"
7672 then CCSHARED="-fPIC"
7673 else CCSHARED="-Kpic -belf"
7674 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007675 IRIX*/6*) case $CC in
7676 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007677 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007678 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007679 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7682$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007683# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007684# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7686$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007687if test -z "$LINKFORSHARED"
7688then
Guido van Rossum07397971997-04-29 21:49:50 +00007689 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007690 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007691 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007692 LINKFORSHARED="-Wl,-E -Wl,+s";;
7693# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007694 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007695 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007696 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007698 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007699 if test "$enable_framework"
7700 then
Jack Jansenda49e192005-01-07 13:08:22 +00007701 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007702 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007703 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007704 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007705 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007706 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007707 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007708 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7709 then
7710 LINKFORSHARED="-Wl,--export-dynamic"
7711 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007712 SunOS/5*) case $CC in
7713 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007714 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007715 then
7716 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007717 fi;;
7718 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007719 CYGWIN*)
7720 if test $enable_shared = "no"
7721 then
7722 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7723 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007724 QNX*)
7725 # -Wl,-E causes the symbols to be added to the dynamic
7726 # symbol table so that they can be found when a module
7727 # is loaded. -N 2048K causes the stack size to be set
7728 # to 2048 kilobytes so that the stack doesn't overflow
7729 # when running test_compile.py.
7730 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007731 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7734$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007735
Michael W. Hudson54241132001-12-07 15:38:26 +00007736
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007737
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7739$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007740if test ! "$LIBRARY" = "$LDLIBRARY"
7741then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007742 case $ac_sys_system in
7743 CYGWIN*)
7744 # Cygwin needs CCSHARED when building extension DLLs
7745 # but not when building the interpreter DLL.
7746 CFLAGSFORSHARED='';;
7747 *)
7748 CFLAGSFORSHARED='$(CCSHARED)'
7749 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7752$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007753
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007754# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7755# library (with --enable-shared).
7756# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007757# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7758# if it is not required, since it creates a dependency of the shared library
7759# to LIBS. This, in turn, means that applications linking the shared libpython
7760# don't need to link LIBS explicitly. The default should be only changed
7761# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007762
Matthias Kloseb9621712010-04-24 17:59:49 +00007763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7764$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007765case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007766 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007767 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007768esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7770$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007771
7772
Guido van Rossum627b2d71993-12-24 10:39:16 +00007773# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7775$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007776if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007777 $as_echo_n "(cached) " >&6
7778else
7779 ac_check_lib_save_LIBS=$LIBS
7780LIBS="-lsendfile $LIBS"
7781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7782/* end confdefs.h. */
7783
7784/* Override any GCC internal prototype to avoid an error.
7785 Use char because int might match the return type of a GCC
7786 builtin and then its argument prototype would still apply. */
7787#ifdef __cplusplus
7788extern "C"
7789#endif
7790char sendfile ();
7791int
7792main ()
7793{
7794return sendfile ();
7795 ;
7796 return 0;
7797}
7798_ACEOF
7799if ac_fn_c_try_link "$LINENO"; then :
7800 ac_cv_lib_sendfile_sendfile=yes
7801else
7802 ac_cv_lib_sendfile_sendfile=no
7803fi
7804rm -f core conftest.err conftest.$ac_objext \
7805 conftest$ac_exeext conftest.$ac_ext
7806LIBS=$ac_check_lib_save_LIBS
7807fi
7808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7809$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007810if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007811 cat >>confdefs.h <<_ACEOF
7812#define HAVE_LIBSENDFILE 1
7813_ACEOF
7814
7815 LIBS="-lsendfile $LIBS"
7816
7817fi
7818
Matthias Kloseb9621712010-04-24 17:59:49 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7820$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007821if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823else
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007825LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829/* Override any GCC internal prototype to avoid an error.
7830 Use char because int might match the return type of a GCC
7831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007832#ifdef __cplusplus
7833extern "C"
7834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007835char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007836int
7837main ()
7838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007840 ;
7841 return 0;
7842}
7843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007845 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007846else
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007849rm -f core conftest.err conftest.$ac_objext \
7850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007851LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7854$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007855if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007856 cat >>confdefs.h <<_ACEOF
7857#define HAVE_LIBDL 1
7858_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007859
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007860 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007861
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007862fi
7863 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7865$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007866if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007868else
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007870LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874/* Override any GCC internal prototype to avoid an error.
7875 Use char because int might match the return type of a GCC
7876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007877#ifdef __cplusplus
7878extern "C"
7879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007880char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007881int
7882main ()
7883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007885 ;
7886 return 0;
7887}
7888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007894rm -f core conftest.err conftest.$ac_objext \
7895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007896LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7899$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007900if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 cat >>confdefs.h <<_ACEOF
7902#define HAVE_LIBDLD 1
7903_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007904
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007905 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007906
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007907fi
7908 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007909
Georg Brandlb1441c72009-01-03 22:33:39 +00007910# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007911if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7913$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007914if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007916else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007917 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921/* Override any GCC internal prototype to avoid an error.
7922 Use char because int might match the return type of a GCC
7923 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007924#ifdef __cplusplus
7925extern "C"
7926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007927char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007928int
7929main ()
7930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 ;
7933 return 0;
7934}
7935_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936for ac_lib in '' pthread rt posix4; do
7937 if test -z "$ac_lib"; then
7938 ac_res="none required"
7939 else
7940 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007941 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946rm -f core conftest.err conftest.$ac_objext \
7947 conftest$ac_exeext
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007948 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951done
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007952if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954else
7955 ac_cv_search_sem_init=no
7956fi
7957rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007958LIBS=$ac_func_search_save_LIBS
7959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7961$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007963if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007965
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007966fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007967 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007968 # posix4 on Solaris 2.6
7969 # pthread (first!) on Linux
7970fi
7971
Martin v. Löwis19d17342003-06-14 21:03:05 +00007972# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7974$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007975if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007977else
7978 ac_check_lib_save_LIBS=$LIBS
7979LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007981/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007983/* Override any GCC internal prototype to avoid an error.
7984 Use char because int might match the return type of a GCC
7985 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007986#ifdef __cplusplus
7987extern "C"
7988#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007989char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007990int
7991main ()
7992{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007994 ;
7995 return 0;
7996}
7997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007998if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007999 ac_cv_lib_intl_textdomain=yes
8000else
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008003rm -f core conftest.err conftest.$ac_objext \
8004 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008005LIBS=$ac_check_lib_save_LIBS
8006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8008$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008009if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008010
Matthias Kloseb9621712010-04-24 17:59:49 +00008011$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008012
Brett Cannonc6d936e2009-06-07 20:09:53 +00008013 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008014fi
8015
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008016
8017# checks for system dependent C++ extensions support
8018case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8020$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008022/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008023
Georg Brandl59e87bd2011-02-15 19:48:59 +00008024 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008025int
8026main ()
8027{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008028loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 ;
8030 return 0;
8031}
Matthias Kloseb159a552010-04-25 21:00:44 +00008032
Martin v. Löwis11437992002-04-12 09:54:03 +00008033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008034if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008035
Matthias Kloseb159a552010-04-25 21:00:44 +00008036
Matthias Kloseb9621712010-04-24 17:59:49 +00008037$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008038
Matthias Kloseb159a552010-04-25 21:00:44 +00008039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008040$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008041
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008042else
Matthias Kloseb159a552010-04-25 21:00:44 +00008043
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008045$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008046
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008048rm -f core conftest.err conftest.$ac_objext \
8049 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008050 *) ;;
8051esac
8052
Guido van Rossum70c7f481998-03-26 18:44:10 +00008053# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8055$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008056if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008058else
Martin v. Löwis11437992002-04-12 09:54:03 +00008059 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008060LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064/* Override any GCC internal prototype to avoid an error.
8065 Use char because int might match the return type of a GCC
8066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008067#ifdef __cplusplus
8068extern "C"
8069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008070char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008071int
8072main ()
8073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 ;
8076 return 0;
8077}
8078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008080 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008081else
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008084rm -f core conftest.err conftest.$ac_objext \
8085 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008086LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8089$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008090if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008091 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008092fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008093 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8095$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008096if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008098else
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008100LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104/* Override any GCC internal prototype to avoid an error.
8105 Use char because int might match the return type of a GCC
8106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008107#ifdef __cplusplus
8108extern "C"
8109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008110char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008111int
8112main ()
8113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 ;
8116 return 0;
8117}
8118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008120 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008121else
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008124rm -f core conftest.err conftest.$ac_objext \
8125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008126LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8129$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008130if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008131 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008132fi
8133 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8136$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008139if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8142$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008143LIBS="$withval $LIBS"
8144
8145else
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8147$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148fi
8149
Guido van Rossum7f43da71994-08-01 12:15:30 +00008150
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008151if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008152 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8153set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8155$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008156if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008158else
8159 case $PKG_CONFIG in
8160 [\\/]* | ?:[\\/]*)
8161 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8162 ;;
8163 *)
8164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8165for as_dir in $PATH
8166do
8167 IFS=$as_save_IFS
8168 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008169 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8171 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008173 break 2
8174 fi
8175done
Matthias Kloseb9621712010-04-24 17:59:49 +00008176 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008177IFS=$as_save_IFS
8178
8179 ;;
8180esac
8181fi
8182PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8183if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8185$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008186else
Matthias Kloseb9621712010-04-24 17:59:49 +00008187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008189fi
8190
8191
8192fi
8193if test -z "$ac_cv_path_PKG_CONFIG"; then
8194 ac_pt_PKG_CONFIG=$PKG_CONFIG
8195 # Extract the first word of "pkg-config", so it can be a program name with args.
8196set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8198$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008199if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008200 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008201else
8202 case $ac_pt_PKG_CONFIG in
8203 [\\/]* | ?:[\\/]*)
8204 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8205 ;;
8206 *)
8207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8208for as_dir in $PATH
8209do
8210 IFS=$as_save_IFS
8211 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008213 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8214 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008216 break 2
8217 fi
8218done
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008220IFS=$as_save_IFS
8221
8222 ;;
8223esac
8224fi
8225ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8226if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8228$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008229else
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8231$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008232fi
8233
8234 if test "x$ac_pt_PKG_CONFIG" = x; then
8235 PKG_CONFIG=""
8236 else
8237 case $cross_compiling:$ac_tool_warned in
8238yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8240$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008241ac_tool_warned=yes ;;
8242esac
8243 PKG_CONFIG=$ac_pt_PKG_CONFIG
8244 fi
8245else
8246 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8247fi
8248
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008249
8250# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8252$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008253
8254# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008255if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008256 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008257else
8258 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008259fi
8260
8261
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8263$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008264
8265# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8267$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008268
8269# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008270if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008271 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008272else
8273 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008274fi
8275
8276
8277if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008278 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8279else
8280 LIBFFI_INCLUDEDIR=""
8281fi
8282
8283
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8285$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008286
Benjamin Peterson076ed002010-10-31 17:11:02 +00008287# Check for support for loadable sqlite extensions
8288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8289$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8290# Check whether --enable-loadable-sqlite-extensions was given.
8291if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8292 enableval=$enable_loadable_sqlite_extensions;
8293else
8294 enable_loadable_sqlite_extensions="no"
8295fi
8296
8297
8298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8299$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8300
Matthias Klose55708cc2009-04-30 08:06:49 +00008301# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8303$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008304
8305# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008306if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008307 withval=$with_dbmliborder;
8308if test x$with_dbmliborder = xyes
8309then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008310as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008311else
8312 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8313 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8314 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008315 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008316 fi
8317 done
8318fi
8319fi
8320
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8322$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008323
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008324# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008325
8326
Matthias Kloseb9621712010-04-24 17:59:49 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8328$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008330# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008331if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008332 withval=$with_signal_module;
8333fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008334
8335
8336if test -z "$with_signal_module"
8337then with_signal_module="yes"
8338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8340$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008341
8342if test "${with_signal_module}" = "yes"; then
8343 USE_SIGNAL_MODULE=""
8344 SIGNAL_OBJS=""
8345else
8346 USE_SIGNAL_MODULE="#"
8347 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8348fi
8349
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008350# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008351
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008352USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008353
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
8356# Templates for things AC_DEFINEd more than once.
8357# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008358
8359
Martin v. Löwis11437992002-04-12 09:54:03 +00008360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8362$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008365if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008366 withval=$with_threads;
8367fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008368
8369
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008370# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008372# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008373if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008374 withval=$with_thread; with_threads=$with_thread
8375fi
8376
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008377
8378if test -z "$with_threads"
8379then with_threads="yes"
8380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8382$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008383
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008384
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008385if test "$with_threads" = "no"
8386then
8387 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008388elif test "$ac_cv_pthread_is_default" = yes
8389then
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008391
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008392 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008394
8395 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008396 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008397elif test "$ac_cv_kpthread" = "yes"
8398then
8399 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008400 if test "$ac_cv_cxx_thread" = "yes"; then
8401 CXX="$CXX -Kpthread"
8402 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008404
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008405 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008406 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008407elif test "$ac_cv_kthread" = "yes"
8408then
8409 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008410 if test "$ac_cv_cxx_thread" = "yes"; then
8411 CXX="$CXX -Kthread"
8412 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008413 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008414
8415 posix_threads=yes
8416 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008417elif test "$ac_cv_pthread" = "yes"
8418then
8419 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008420 if test "$ac_cv_cxx_thread" = "yes"; then
8421 CXX="$CXX -pthread"
8422 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008424
8425 posix_threads=yes
8426 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008427else
8428 if test ! -z "$with_threads" -a -d "$with_threads"
8429 then LDFLAGS="$LDFLAGS -L$with_threads"
8430 fi
8431 if test ! -z "$withval" -a -d "$withval"
8432 then LDFLAGS="$LDFLAGS -L$withval"
8433 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008434
8435 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008436 # define _POSIX_THREADS in unistd.h. Some apparently don't
8437 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8439$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008441/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008442
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008443#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008444#ifdef _POSIX_THREADS
8445yes
8446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008447
8448_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008451 unistd_defines_pthreads=yes
8452else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008453 unistd_defines_pthreads=no
8454fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008455rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008456
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8458$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008461
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008462 # Just looking for pthread_create in libpthread is not enough:
8463 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8464 # So we really have to include pthread.h, and then link.
8465 _libs=$LIBS
8466 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8468$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008470/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008471#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008472
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008473void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008474int
8475main ()
8476{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008477
8478pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 ;
8480 return 0;
8481}
8482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008483if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008484
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8486$as_echo "yes" >&6; }
8487 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008488
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008489 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008490 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008491else
Martin v. Löwis11437992002-04-12 09:54:03 +00008492
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008493 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008495if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008497
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008498 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008499 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008500else
Guido van Rossumad678af1998-10-02 14:42:15 +00008501
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8503$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008504if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008506else
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008508LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512/* Override any GCC internal prototype to avoid an error.
8513 Use char because int might match the return type of a GCC
8514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008515#ifdef __cplusplus
8516extern "C"
8517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008518char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008519int
8520main ()
8521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ;
8524 return 0;
8525}
8526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008529else
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532rm -f core conftest.err conftest.$ac_objext \
8533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008534LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8537$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008538if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008540
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008541 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008542 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008543 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008544else
Greg Steinadf63d62000-07-05 10:38:09 +00008545
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8547$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008548if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008550else
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008552LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556/* Override any GCC internal prototype to avoid an error.
8557 Use char because int might match the return type of a GCC
8558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008559#ifdef __cplusplus
8560extern "C"
8561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008562char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008563int
8564main ()
8565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ;
8568 return 0;
8569}
8570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008573else
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008576rm -f core conftest.err conftest.$ac_objext \
8577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008578LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8581$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008582if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008584
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008585 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008586 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008587 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008588else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008589
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8591$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008592if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008593 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008594else
Martin v. Löwis11437992002-04-12 09:54:03 +00008595 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008596LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600/* Override any GCC internal prototype to avoid an error.
8601 Use char because int might match the return type of a GCC
8602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008603#ifdef __cplusplus
8604extern "C"
8605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008606char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008607int
8608main ()
8609{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008611 ;
8612 return 0;
8613}
8614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008615if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008616 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008617else
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008620rm -f core conftest.err conftest.$ac_objext \
8621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008622LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8625$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008626if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008628
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008629 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008630 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008631 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008632else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008633
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8635$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008636if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008638else
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008640LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644/* Override any GCC internal prototype to avoid an error.
8645 Use char because int might match the return type of a GCC
8646 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008647#ifdef __cplusplus
8648extern "C"
8649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008650char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008651int
8652main ()
8653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008655 ;
8656 return 0;
8657}
8658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008659if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008660 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008661else
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664rm -f core conftest.err conftest.$ac_objext \
8665 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008666LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8669$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008670if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008672
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008673 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008674 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008675 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008676else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008677
Martin v. Löwis130fb172001-07-19 11:00:41 +00008678 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008679fi
8680
Guido van Rossum627b2d71993-12-24 10:39:16 +00008681
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008682fi
8683
Guido van Rossum0be3e491997-05-22 20:33:33 +00008684fi
8685
Guido van Rossum49545951997-12-02 19:28:29 +00008686fi
8687
Guido van Rossumb93a8621998-05-07 13:27:32 +00008688fi
8689
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008691rm -f core conftest.err conftest.$ac_objext \
8692 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008693
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8695$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008696if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008698else
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008700LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704/* Override any GCC internal prototype to avoid an error.
8705 Use char because int might match the return type of a GCC
8706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008707#ifdef __cplusplus
8708extern "C"
8709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008710char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008711int
8712main ()
8713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 ;
8716 return 0;
8717}
8718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008721else
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008724rm -f core conftest.err conftest.$ac_objext \
8725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008726LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8729$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008730if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008732
Martin v. Löwis130fb172001-07-19 11:00:41 +00008733 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008734 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008735 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008736fi
8737
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008738
Neal Norwitza978ab02002-11-02 16:58:05 +00008739 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8741$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008742if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008744else
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008746LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008750/* Override any GCC internal prototype to avoid an error.
8751 Use char because int might match the return type of a GCC
8752 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008753#ifdef __cplusplus
8754extern "C"
8755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008756char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008757int
8758main ()
8759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008760return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 ;
8762 return 0;
8763}
8764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008767else
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008770rm -f core conftest.err conftest.$ac_objext \
8771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008772LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8775$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008776if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008778
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008779 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008780 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008781 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008782fi
8783
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008784 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008785fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008786
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008787if test "$posix_threads" = "yes"; then
8788 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008789
Matthias Kloseb9621712010-04-24 17:59:49 +00008790$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008791
8792 fi
8793
8794 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8795 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008796 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008797$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008798
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008799 ;;
8800 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008801$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008802
8803 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008804 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008805$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008806
8807 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008808 esac
8809
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8811$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008812 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008816 ac_cv_pthread_system_supported=no
8817else
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008819/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008820#include <pthread.h>
8821 void *foo(void *parm) {
8822 return NULL;
8823 }
8824 main() {
8825 pthread_attr_t attr;
8826 pthread_t id;
8827 if (pthread_attr_init(&attr)) exit(-1);
8828 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8829 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8830 exit(0);
8831 }
8832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008833if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834 ac_cv_pthread_system_supported=yes
8835else
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008840fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842
Guido van Rossum627b2d71993-12-24 10:39:16 +00008843fi
8844
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8846$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008847 if test "$ac_cv_pthread_system_supported" = "yes"; then
8848
Matthias Kloseb9621712010-04-24 17:59:49 +00008849$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850
8851 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008852 for ac_func in pthread_sigmask
8853do :
8854 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008855if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008856 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008857#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008858_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008859 case $ac_sys_system in
8860 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008861
Matthias Kloseb9621712010-04-24 17:59:49 +00008862$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008863
8864 ;;
8865 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008866fi
8867done
8868
8869fi
8870
8871
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008872# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008873
Matthias Kloseb9621712010-04-24 17:59:49 +00008874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8875$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008877if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008879 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8881$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008882 ipv6=no
8883 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8885$as_echo "yes" >&6; }
8886 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008887
8888 ipv6=yes
8889 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008891else
Martin v. Löwis11437992002-04-12 09:54:03 +00008892
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008894
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8896$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008897 ipv6=no
8898
8899else
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008901/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008902 /* AF_INET6 available check */
8903#include <sys/types.h>
8904#include <sys/socket.h>
8905main()
8906{
8907 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8908 exit(1);
8909 else
8910 exit(0);
8911}
8912
Martin v. Löwis11437992002-04-12 09:54:03 +00008913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008914if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008915
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8917$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008919
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920else
Matthias Kloseb159a552010-04-25 21:00:44 +00008921
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008924 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8928 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008929fi
8930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008932if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8934$as_echo_n "checking if RFC2553 API is available... " >&6; }
8935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008936/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008937
8938 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008939#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008940int
8941main ()
8942{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008943struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008944 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008945 ;
8946 return 0;
8947}
Matthias Kloseb159a552010-04-25 21:00:44 +00008948
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008950if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008951
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008953$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008954 ipv6=yes
8955
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008956else
Matthias Kloseb159a552010-04-25 21:00:44 +00008957
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008959$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008960 ipv6=no
8961
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008964fi
8965
8966if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008968
8969fi
8970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008971fi
8972
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008973
8974ipv6type=unknown
8975ipv6lib=none
8976ipv6trylibc=no
8977
8978if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8980$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008981 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8982 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008983 case $i in
8984 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008986/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008987
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988#include <netinet/in.h>
8989#ifdef IPV6_INRIA_VERSION
8990yes
8991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008992_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008995 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008997rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998
8999 ;;
9000 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009002/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009003
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009004#include <netinet/in.h>
9005#ifdef __KAME__
9006yes
9007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009008_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009011 ipv6type=$i;
9012 ipv6lib=inet6
9013 ipv6libdir=/usr/local/v6/lib
9014 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009016rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017
9018 ;;
9019 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009021/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009022
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023#include <features.h>
9024#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9025yes
9026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009027_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009030 ipv6type=$i;
9031 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009033rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034
9035 ;;
9036 linux-inet6)
9037 if test -d /usr/inet6; then
9038 ipv6type=$i
9039 ipv6lib=inet6
9040 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009041 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042 fi
9043 ;;
9044 solaris)
9045 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009046 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047 ipv6type=$i
9048 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009049 fi
9050 fi
9051 ;;
9052 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009054/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009055
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009056#include <sys/param.h>
9057#ifdef _TOSHIBA_INET6
9058yes
9059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009060_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009063 ipv6type=$i;
9064 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009065 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009067rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068
9069 ;;
9070 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009072/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009073
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074#include </usr/local/v6/include/sys/v6config.h>
9075#ifdef __V6D__
9076yes
9077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009078_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081 ipv6type=$i;
9082 ipv6lib=v6;
9083 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009084 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009086rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087
9088 ;;
9089 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009091/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009092
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009093#include <sys/param.h>
9094#ifdef _ZETA_MINAMI_INET6
9095yes
9096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009097_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009100 ipv6type=$i;
9101 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009102 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009103fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009104rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009105
9106 ;;
9107 esac
9108 if test "$ipv6type" != "unknown"; then
9109 break
9110 fi
9111 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9113$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009114fi
9115
9116if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9117 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9118 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9119 echo "using lib$ipv6lib"
9120 else
9121 if test $ipv6trylibc = "yes"; then
9122 echo "using libc"
9123 else
9124 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9125 echo "You need to fetch lib$ipv6lib.a from appropriate"
9126 echo 'ipv6 kit and compile beforehand.'
9127 exit 1
9128 fi
9129 fi
9130fi
9131
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9133$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009135/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009136
9137 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009138int
9139main ()
9140{
9141FSIORefNum fRef = 0
9142 ;
9143 return 0;
9144}
Matthias Kloseb159a552010-04-25 21:00:44 +00009145
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009147if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009148
Matthias Kloseb159a552010-04-25 21:00:44 +00009149
Matthias Kloseb9621712010-04-24 17:59:49 +00009150$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009151
Matthias Kloseb9621712010-04-24 17:59:49 +00009152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9153$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009154
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009155else
Matthias Kloseb159a552010-04-25 21:00:44 +00009156
Matthias Kloseb9621712010-04-24 17:59:49 +00009157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009159
9160fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9162
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009163# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9165$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009166
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009167# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009168if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169 withval=$with_doc_strings;
9170fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009171
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009172
9173if test -z "$with_doc_strings"
9174then with_doc_strings="yes"
9175fi
9176if test "$with_doc_strings" != "no"
9177then
9178
Matthias Kloseb9621712010-04-24 17:59:49 +00009179$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009180
9181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9183$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009184
Antoine Pitrou042b1282010-08-13 21:15:58 +00009185# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9187$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009190if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009191 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009192if test "$withval" != no
9193then
9194
Matthias Kloseb9621712010-04-24 17:59:49 +00009195$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009196
Matthias Kloseb9621712010-04-24 17:59:49 +00009197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9198$as_echo "yes" >&6; }
9199else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9200$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009201fi
9202else
Matthias Kloseb9621712010-04-24 17:59:49 +00009203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9204$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205fi
9206
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009207
9208# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9210$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009212# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009213if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009214 withval=$with_pymalloc;
9215fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009216
Neil Schemenauera35c6882001-02-27 04:45:05 +00009217
Neil Schemenauer16c22972002-03-22 15:34:49 +00009218if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009219then
9220 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009221 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009222fi
9223if test "$with_pymalloc" != "no"
9224then
Martin v. Löwis11437992002-04-12 09:54:03 +00009225
Matthias Kloseb9621712010-04-24 17:59:49 +00009226$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009227
9228fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9230$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009231
Benjamin Peterson05159c42009-12-03 03:01:27 +00009232# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9234$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009235
9236# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009237if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009238 withval=$with_valgrind;
9239else
9240 with_valgrind=no
9241fi
9242
Matthias Kloseb9621712010-04-24 17:59:49 +00009243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9244$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009245if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009246 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009247if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009248
Matthias Kloseb9621712010-04-24 17:59:49 +00009249$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009250
9251else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009252 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009253
9254fi
9255
9256
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009257 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009258fi
9259
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009260# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009261
Guido van Rossum98935bf2001-09-05 19:13:16 +00009262DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009263
Guido van Rossume97ee181999-12-20 21:27:22 +00009264# the dlopen() function means we might want to use dynload_shlib.o. some
9265# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009266for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009267do :
9268 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009269if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009271#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009272_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009273
Guido van Rossume97ee181999-12-20 21:27:22 +00009274fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009275done
Guido van Rossume97ee181999-12-20 21:27:22 +00009276
Michael W. Hudson54241132001-12-07 15:38:26 +00009277
Guido van Rossume97ee181999-12-20 21:27:22 +00009278# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9279# loading of modules.
9280
Matthias Kloseb9621712010-04-24 17:59:49 +00009281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9282$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009283if test -z "$DYNLOADFILE"
9284then
9285 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009286 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9287 if test "$ac_cv_func_dlopen" = yes
9288 then DYNLOADFILE="dynload_shlib.o"
9289 else DYNLOADFILE="dynload_aix.o"
9290 fi
9291 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009292 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009293 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9294 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009295 *)
9296 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9297 # out any dynamic loading
9298 if test "$ac_cv_func_dlopen" = yes
9299 then DYNLOADFILE="dynload_shlib.o"
9300 else DYNLOADFILE="dynload_stub.o"
9301 fi
9302 ;;
9303 esac
9304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9306$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009307if test "$DYNLOADFILE" != "dynload_stub.o"
9308then
Martin v. Löwis11437992002-04-12 09:54:03 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009311
9312fi
9313
Neil Schemenauer4e425612001-06-19 15:44:15 +00009314# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9315
Michael W. Hudson54241132001-12-07 15:38:26 +00009316
Matthias Kloseb9621712010-04-24 17:59:49 +00009317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9318$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009319if test -z "$MACHDEP_OBJS"
9320then
Jack Jansene578a632001-08-15 01:27:14 +00009321 MACHDEP_OBJS=$extra_machdep_objs
9322else
9323 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9326$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009327
Guido van Rossum627b2d71993-12-24 10:39:16 +00009328# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009329for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009330 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009331 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009332 futimens futimes gai_strerror \
9333 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009334 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009335 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009336 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009337 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009338 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009339 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009340 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009341 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009342 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009343 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9344 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009345 sigaction sigaltstack siginterrupt sigpending sigrelse \
9346 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009347 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009348 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9349 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009350do :
9351 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9352ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009353if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009355#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009356_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009357
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009358fi
9359done
9360
Michael W. Hudson54241132001-12-07 15:38:26 +00009361
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009362# For some functions, having a definition is not sufficient, since
9363# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9365$as_echo_n "checking for chroot... " >&6; }
9366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009367/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009368#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009369int
9370main ()
9371{
9372void *x=chroot
9373 ;
9374 return 0;
9375}
9376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009378
Matthias Kloseb9621712010-04-24 17:59:49 +00009379$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009380
Matthias Kloseb159a552010-04-25 21:00:44 +00009381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009382$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009383else
Matthias Kloseb9621712010-04-24 17:59:49 +00009384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9385$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009386
9387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9390$as_echo_n "checking for link... " >&6; }
9391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009392/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009393#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009394int
9395main ()
9396{
9397void *x=link
9398 ;
9399 return 0;
9400}
9401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009403
Matthias Kloseb9621712010-04-24 17:59:49 +00009404$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009405
Matthias Kloseb159a552010-04-25 21:00:44 +00009406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009407$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009408else
Matthias Kloseb9621712010-04-24 17:59:49 +00009409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9410$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009411
9412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9415$as_echo_n "checking for symlink... " >&6; }
9416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009417/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009418#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009419int
9420main ()
9421{
9422void *x=symlink
9423 ;
9424 return 0;
9425}
9426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009428
Matthias Kloseb9621712010-04-24 17:59:49 +00009429$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009430
Matthias Kloseb159a552010-04-25 21:00:44 +00009431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009432$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009433else
Matthias Kloseb9621712010-04-24 17:59:49 +00009434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9435$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009436
9437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9440$as_echo_n "checking for fchdir... " >&6; }
9441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009442/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009443#include <unistd.h>
9444int
9445main ()
9446{
9447void *x=fchdir
9448 ;
9449 return 0;
9450}
9451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009452if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009453
Matthias Kloseb9621712010-04-24 17:59:49 +00009454$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009455
Matthias Kloseb159a552010-04-25 21:00:44 +00009456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009457$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009458else
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9460$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009461
9462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9465$as_echo_n "checking for fsync... " >&6; }
9466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009467/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009468#include <unistd.h>
9469int
9470main ()
9471{
9472void *x=fsync
9473 ;
9474 return 0;
9475}
9476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009477if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009478
Matthias Kloseb9621712010-04-24 17:59:49 +00009479$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009480
Matthias Kloseb159a552010-04-25 21:00:44 +00009481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009482$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009483else
Matthias Kloseb9621712010-04-24 17:59:49 +00009484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009486
9487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9490$as_echo_n "checking for fdatasync... " >&6; }
9491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009492/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009493#include <unistd.h>
9494int
9495main ()
9496{
9497void *x=fdatasync
9498 ;
9499 return 0;
9500}
9501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009502if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009503
Matthias Kloseb9621712010-04-24 17:59:49 +00009504$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009505
Matthias Kloseb159a552010-04-25 21:00:44 +00009506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009507$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009508else
Matthias Kloseb9621712010-04-24 17:59:49 +00009509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9510$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009511
9512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9515$as_echo_n "checking for epoll... " >&6; }
9516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009517/* end confdefs.h. */
9518#include <sys/epoll.h>
9519int
9520main ()
9521{
9522void *x=epoll_create
9523 ;
9524 return 0;
9525}
9526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009527if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009528
Matthias Kloseb9621712010-04-24 17:59:49 +00009529$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009530
Matthias Kloseb159a552010-04-25 21:00:44 +00009531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009532$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009533else
Matthias Kloseb9621712010-04-24 17:59:49 +00009534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9535$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009536
9537fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9540$as_echo_n "checking for kqueue... " >&6; }
9541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009542/* end confdefs.h. */
9543
9544#include <sys/types.h>
9545#include <sys/event.h>
9546
9547int
9548main ()
9549{
9550int x=kqueue()
9551 ;
9552 return 0;
9553}
9554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009555if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009556
Matthias Kloseb9621712010-04-24 17:59:49 +00009557$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009558
Matthias Kloseb159a552010-04-25 21:00:44 +00009559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009560$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009561else
Matthias Kloseb9621712010-04-24 17:59:49 +00009562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9563$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009564
9565fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009567# On some systems (eg. FreeBSD 5), we would find a definition of the
9568# functions ctermid_r, setgroups in the library, but no prototype
9569# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9570# address to avoid compiler warnings and potential miscompilations
9571# because of the missing prototypes.
9572
Matthias Kloseb9621712010-04-24 17:59:49 +00009573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9574$as_echo_n "checking for ctermid_r... " >&6; }
9575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009576/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009577
Martin v. Löwisd5843682002-11-21 20:41:28 +00009578#include <stdio.h>
9579
Martin v. Löwisd5843682002-11-21 20:41:28 +00009580int
9581main ()
9582{
9583void* p = ctermid_r
9584 ;
9585 return 0;
9586}
9587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009588if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009589
Matthias Kloseb9621712010-04-24 17:59:49 +00009590$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009591
Matthias Kloseb159a552010-04-25 21:00:44 +00009592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009593$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009594else
Matthias Kloseb9621712010-04-24 17:59:49 +00009595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9596$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009597
9598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9600
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9602$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009603if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009604 $as_echo_n "(cached) " >&6
9605else
9606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009607/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009608#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009609int
9610main ()
9611{
9612void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009613
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009614 ;
9615 return 0;
9616}
9617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009618if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009619 ac_cv_flock_decl=yes
9620else
9621 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009622
9623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009625
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009626fi
9627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9628$as_echo "$ac_cv_flock_decl" >&6; }
9629if test "x${ac_cv_flock_decl}" = xyes; then
9630 for ac_func in flock
9631do :
9632 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009633if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009634 cat >>confdefs.h <<_ACEOF
9635#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009636_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009637
Antoine Pitroua3000072010-09-07 14:52:42 +00009638else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009640$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009641if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009642 $as_echo_n "(cached) " >&6
9643else
9644 ac_check_lib_save_LIBS=$LIBS
9645LIBS="-lbsd $LIBS"
9646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9647/* end confdefs.h. */
9648
9649/* Override any GCC internal prototype to avoid an error.
9650 Use char because int might match the return type of a GCC
9651 builtin and then its argument prototype would still apply. */
9652#ifdef __cplusplus
9653extern "C"
9654#endif
9655char flock ();
9656int
9657main ()
9658{
9659return flock ();
9660 ;
9661 return 0;
9662}
9663_ACEOF
9664if ac_fn_c_try_link "$LINENO"; then :
9665 ac_cv_lib_bsd_flock=yes
9666else
9667 ac_cv_lib_bsd_flock=no
9668fi
9669rm -f core conftest.err conftest.$ac_objext \
9670 conftest$ac_exeext conftest.$ac_ext
9671LIBS=$ac_check_lib_save_LIBS
9672fi
9673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9674$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009675if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009676 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009677
9678
9679$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9680
9681
9682fi
9683
9684
9685fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009686done
9687
Antoine Pitroua3000072010-09-07 14:52:42 +00009688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689
Matthias Kloseb9621712010-04-24 17:59:49 +00009690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9691$as_echo_n "checking for getpagesize... " >&6; }
9692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009693/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009694
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009695#include <unistd.h>
9696
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009697int
9698main ()
9699{
9700void* p = getpagesize
9701 ;
9702 return 0;
9703}
9704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009705if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009706
Matthias Kloseb9621712010-04-24 17:59:49 +00009707$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009708
Matthias Kloseb159a552010-04-25 21:00:44 +00009709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009710$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009711else
Matthias Kloseb9621712010-04-24 17:59:49 +00009712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9713$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009714
9715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009717
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9719$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9721/* end confdefs.h. */
9722
9723#include <malloc.h>
9724
9725int
9726main ()
9727{
9728mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9729 ;
9730 return 0;
9731}
9732_ACEOF
9733if ac_fn_c_try_compile "$LINENO"; then :
9734
9735$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9736
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9738$as_echo "yes" >&6; }
9739else
9740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9741$as_echo "no" >&6; }
9742
9743fi
9744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9745
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009746for ac_prog in true
9747do
9748 # Extract the first word of "$ac_prog", so it can be a program name with args.
9749set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9751$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009752if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009753 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009754else
9755 if test -n "$TRUE"; then
9756 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9757else
9758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9759for as_dir in $PATH
9760do
9761 IFS=$as_save_IFS
9762 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009763 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009764 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 +00009765 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009766 $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 +00009767 break 2
9768 fi
9769done
Matthias Kloseb9621712010-04-24 17:59:49 +00009770 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009772
9773fi
9774fi
9775TRUE=$ac_cv_prog_TRUE
9776if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9778$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009779else
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9781$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009782fi
9783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009784
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009785 test -n "$TRUE" && break
9786done
9787test -n "$TRUE" || TRUE="/bin/true"
9788
9789
Matthias Kloseb9621712010-04-24 17:59:49 +00009790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9791$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009792if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009793 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009794else
9795 ac_check_lib_save_LIBS=$LIBS
9796LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009798/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009800/* Override any GCC internal prototype to avoid an error.
9801 Use char because int might match the return type of a GCC
9802 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009803#ifdef __cplusplus
9804extern "C"
9805#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009806char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009807int
9808main ()
9809{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009810return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009811 ;
9812 return 0;
9813}
9814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009815if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009816 ac_cv_lib_c_inet_aton=yes
9817else
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009820rm -f core conftest.err conftest.$ac_objext \
9821 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009822LIBS=$ac_check_lib_save_LIBS
9823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9825$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009826if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009827 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009828else
Matthias Kloseb9621712010-04-24 17:59:49 +00009829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9830$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009831if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009833else
9834 ac_check_lib_save_LIBS=$LIBS
9835LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009837/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839/* Override any GCC internal prototype to avoid an error.
9840 Use char because int might match the return type of a GCC
9841 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009842#ifdef __cplusplus
9843extern "C"
9844#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009845char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009846int
9847main ()
9848{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009850 ;
9851 return 0;
9852}
9853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009854if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009855 ac_cv_lib_resolv_inet_aton=yes
9856else
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009859rm -f core conftest.err conftest.$ac_objext \
9860 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009861LIBS=$ac_check_lib_save_LIBS
9862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9864$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009865if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009866 cat >>confdefs.h <<_ACEOF
9867#define HAVE_LIBRESOLV 1
9868_ACEOF
9869
9870 LIBS="-lresolv $LIBS"
9871
9872fi
9873
9874
9875fi
9876
9877
Christian Heimesd0764e22007-12-04 15:00:33 +00009878# On Tru64, chflags seems to be present, but calling it will
9879# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9881$as_echo_n "checking for chflags... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009882if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009883 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009884else
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009886 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009887else
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009889/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009890
Christian Heimesd0764e22007-12-04 15:00:33 +00009891#include <sys/stat.h>
9892#include <unistd.h>
9893int main(int argc, char*argv[])
9894{
9895 if(chflags(argv[0], 0) != 0)
9896 return 1;
9897 return 0;
9898}
Ned Deily3eb67d52011-06-28 00:00:28 -07009899
Christian Heimesd0764e22007-12-04 15:00:33 +00009900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009901if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009902 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009903else
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9907 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009908fi
9909
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009910
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9913$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009914if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009916if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009917 ac_cv_have_chflags="yes"
9918else
9919 ac_cv_have_chflags="no"
9920fi
9921
9922fi
9923if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009924
Matthias Kloseb9621712010-04-24 17:59:49 +00009925$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009926
9927fi
9928
Matthias Kloseb9621712010-04-24 17:59:49 +00009929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9930$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009931if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009933else
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009935 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009936else
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009938/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009939
Christian Heimesd0764e22007-12-04 15:00:33 +00009940#include <sys/stat.h>
9941#include <unistd.h>
9942int main(int argc, char*argv[])
9943{
9944 if(lchflags(argv[0], 0) != 0)
9945 return 1;
9946 return 0;
9947}
Ned Deily3eb67d52011-06-28 00:00:28 -07009948
Christian Heimesd0764e22007-12-04 15:00:33 +00009949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009950if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009951 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009952else
Matthias Kloseb9621712010-04-24 17:59:49 +00009953 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9956 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009957fi
9958
9959
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9962$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009963if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009964 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009965if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009966 ac_cv_have_lchflags="yes"
9967else
9968 ac_cv_have_lchflags="no"
9969fi
9970
9971fi
9972if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009973
Matthias Kloseb9621712010-04-24 17:59:49 +00009974$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009975
9976fi
9977
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009978case $ac_sys_system/$ac_sys_release in
9979Darwin/*)
9980 _CUR_CFLAGS="${CFLAGS}"
9981 _CUR_LDFLAGS="${LDFLAGS}"
9982 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9983 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9984 ;;
9985esac
9986
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9988$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009989if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009991else
9992 ac_check_lib_save_LIBS=$LIBS
9993LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009995/* end confdefs.h. */
9996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997/* Override any GCC internal prototype to avoid an error.
9998 Use char because int might match the return type of a GCC
9999 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010000#ifdef __cplusplus
10001extern "C"
10002#endif
10003char inflateCopy ();
10004int
10005main ()
10006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010007return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010008 ;
10009 return 0;
10010}
10011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010012if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010013 ac_cv_lib_z_inflateCopy=yes
10014else
Matthias Kloseb9621712010-04-24 17:59:49 +000010015 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010017rm -f core conftest.err conftest.$ac_objext \
10018 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010019LIBS=$ac_check_lib_save_LIBS
10020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10022$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010023if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010024
Matthias Kloseb9621712010-04-24 17:59:49 +000010025$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010026
10027fi
10028
10029
10030case $ac_sys_system/$ac_sys_release in
10031Darwin/*)
10032 CFLAGS="${_CUR_CFLAGS}"
10033 LDFLAGS="${_CUR_LDFLAGS}"
10034 ;;
10035esac
10036
Matthias Kloseb9621712010-04-24 17:59:49 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10038$as_echo_n "checking for hstrerror... " >&6; }
10039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010040/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010041
Martin v. Löwise9416172003-05-03 10:12:45 +000010042#include <netdb.h>
10043
Martin v. Löwise9416172003-05-03 10:12:45 +000010044int
10045main ()
10046{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010047void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010048 ;
10049 return 0;
10050}
10051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010053
Matthias Kloseb9621712010-04-24 17:59:49 +000010054$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010055
Matthias Kloseb159a552010-04-25 21:00:44 +000010056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010057$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010058else
Matthias Kloseb9621712010-04-24 17:59:49 +000010059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10060$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010061
10062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010063rm -f core conftest.err conftest.$ac_objext \
10064 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010065
Matthias Kloseb9621712010-04-24 17:59:49 +000010066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10067$as_echo_n "checking for inet_aton... " >&6; }
10068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010069/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010070
Martin v. Löwis86d66262006-02-17 08:40:11 +000010071#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010072#include <sys/socket.h>
10073#include <netinet/in.h>
10074#include <arpa/inet.h>
10075
Martin v. Löwise9416172003-05-03 10:12:45 +000010076int
10077main ()
10078{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010079void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010080 ;
10081 return 0;
10082}
10083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010084if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010085
Matthias Kloseb9621712010-04-24 17:59:49 +000010086$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010087
Matthias Kloseb159a552010-04-25 21:00:44 +000010088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010089$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010090else
Matthias Kloseb9621712010-04-24 17:59:49 +000010091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10092$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010093
10094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010095rm -f core conftest.err conftest.$ac_objext \
10096 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097
Matthias Kloseb9621712010-04-24 17:59:49 +000010098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10099$as_echo_n "checking for inet_pton... " >&6; }
10100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010101/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010102
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010103#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010104#include <sys/socket.h>
10105#include <netinet/in.h>
10106#include <arpa/inet.h>
10107
Martin v. Löwise9416172003-05-03 10:12:45 +000010108int
10109main ()
10110{
10111void* p = inet_pton
10112 ;
10113 return 0;
10114}
10115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010116if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010117
Matthias Kloseb9621712010-04-24 17:59:49 +000010118$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010119
Matthias Kloseb159a552010-04-25 21:00:44 +000010120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010121$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010122else
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10124$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010125
10126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010128
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010129# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10131$as_echo_n "checking for setgroups... " >&6; }
10132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010133/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010134
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010135#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010136#ifdef HAVE_GRP_H
10137#include <grp.h>
10138#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010139
Martin v. Löwisd5843682002-11-21 20:41:28 +000010140int
10141main ()
10142{
10143void* p = setgroups
10144 ;
10145 return 0;
10146}
10147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010148if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010149
Matthias Kloseb9621712010-04-24 17:59:49 +000010150$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010151
Matthias Kloseb159a552010-04-25 21:00:44 +000010152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010153$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010154else
Matthias Kloseb9621712010-04-24 17:59:49 +000010155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10156$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010157
10158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010160
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010161# check for openpty and forkpty
10162
10163for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010164do :
10165 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010166if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010168#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010169_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010170
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010171else
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10173$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010174if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010176else
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010178LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182/* Override any GCC internal prototype to avoid an error.
10183 Use char because int might match the return type of a GCC
10184 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010185#ifdef __cplusplus
10186extern "C"
10187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010188char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010189int
10190main ()
10191{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010193 ;
10194 return 0;
10195}
10196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010197if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010199else
Matthias Kloseb9621712010-04-24 17:59:49 +000010200 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010202rm -f core conftest.err conftest.$ac_objext \
10203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010204LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10207$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010208if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010210 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010211else
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10213$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010214if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010215 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010216else
10217 ac_check_lib_save_LIBS=$LIBS
10218LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010220/* end confdefs.h. */
10221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222/* Override any GCC internal prototype to avoid an error.
10223 Use char because int might match the return type of a GCC
10224 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010225#ifdef __cplusplus
10226extern "C"
10227#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010228char openpty ();
10229int
10230main ()
10231{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010233 ;
10234 return 0;
10235}
10236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010237if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010238 ac_cv_lib_bsd_openpty=yes
10239else
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010242rm -f core conftest.err conftest.$ac_objext \
10243 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010244LIBS=$ac_check_lib_save_LIBS
10245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10247$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010248if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010250 LIBS="$LIBS -lbsd"
10251fi
10252
10253
10254fi
10255
Fred Drake8cef4cf2000-06-28 16:40:38 +000010256
10257fi
10258done
10259
10260for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010261do :
10262 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010263if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010265#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010266_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010267
Fred Drake8cef4cf2000-06-28 16:40:38 +000010268else
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10270$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010271if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010272 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010273else
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010275LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279/* Override any GCC internal prototype to avoid an error.
10280 Use char because int might match the return type of a GCC
10281 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010282#ifdef __cplusplus
10283extern "C"
10284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010285char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010286int
10287main ()
10288{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 ;
10291 return 0;
10292}
10293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010294if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010295 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010296else
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010299rm -f core conftest.err conftest.$ac_objext \
10300 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010301LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10304$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010305if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010307 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010308else
Matthias Kloseb9621712010-04-24 17:59:49 +000010309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10310$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010311if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010313else
10314 ac_check_lib_save_LIBS=$LIBS
10315LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010317/* end confdefs.h. */
10318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010319/* Override any GCC internal prototype to avoid an error.
10320 Use char because int might match the return type of a GCC
10321 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010322#ifdef __cplusplus
10323extern "C"
10324#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010325char forkpty ();
10326int
10327main ()
10328{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010330 ;
10331 return 0;
10332}
10333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010334if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010335 ac_cv_lib_bsd_forkpty=yes
10336else
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010339rm -f core conftest.err conftest.$ac_objext \
10340 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010341LIBS=$ac_check_lib_save_LIBS
10342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10344$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010345if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010347 LIBS="$LIBS -lbsd"
10348fi
10349
10350
10351fi
10352
Fred Drake8cef4cf2000-06-28 16:40:38 +000010353
10354fi
10355done
10356
Jack Jansendd19cf82001-12-06 22:36:17 +000010357
Christian Heimesb186d002008-03-18 15:15:01 +000010358# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010359for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010360do :
10361 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010362if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010363 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010364#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010365_ACEOF
10366
10367fi
10368done
10369
10370
Michael W. Hudson54241132001-12-07 15:38:26 +000010371# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010372for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010373do :
10374 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10375ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010376if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010378#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010379_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010380
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010381fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010382done
10383
Michael W. Hudson54241132001-12-07 15:38:26 +000010384
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010385ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010386if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010387 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010388
Martin v. Löwis1142de32002-03-29 16:28:31 +000010389else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010390 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010391 *" dup2.$ac_objext "* ) ;;
10392 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010393 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010394esac
10395
Martin v. Löwis1142de32002-03-29 16:28:31 +000010396fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010397
10398ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010399if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010400 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10401
10402else
10403 case " $LIBOBJS " in
10404 *" getcwd.$ac_objext "* ) ;;
10405 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10406 ;;
10407esac
10408
10409fi
10410
10411ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010412if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010413 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10414
10415else
10416 case " $LIBOBJS " in
10417 *" strdup.$ac_objext "* ) ;;
10418 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10419 ;;
10420esac
10421
10422fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010423
10424
10425for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010426do :
10427 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010428if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010429 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010430#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010433/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010434#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010435int
10436main ()
10437{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010438getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 ;
10440 return 0;
10441}
10442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010444
Matthias Kloseb9621712010-04-24 17:59:49 +000010445$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010446
Guido van Rossum627b2d71993-12-24 10:39:16 +000010447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010449
Guido van Rossum627b2d71993-12-24 10:39:16 +000010450fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010451done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010452
Jack Jansen150753c2003-03-29 22:07:47 +000010453for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010454do :
10455 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010456if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010457 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010458#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010461/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010462#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010463int
10464main ()
10465{
10466setpgrp(0,0);
10467 ;
10468 return 0;
10469}
10470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010471if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010472
Matthias Kloseb9621712010-04-24 17:59:49 +000010473$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010474
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010477
10478fi
10479done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010480
Thomas Wouters3a584202000-08-05 23:28:51 +000010481for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010482do :
10483 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010484if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010485 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010486#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010489/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010490#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010491int
10492main ()
10493{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010494gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010495 ;
10496 return 0;
10497}
10498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010499if ac_fn_c_try_compile "$LINENO"; then :
10500
Guido van Rossum627b2d71993-12-24 10:39:16 +000010501else
Skip Montanaro6dead952003-09-25 14:50:04 +000010502
Matthias Kloseb9621712010-04-24 17:59:49 +000010503$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010504
Martin v. Löwis11437992002-04-12 09:54:03 +000010505
Guido van Rossum627b2d71993-12-24 10:39:16 +000010506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010508
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010509fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010510done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010511
Michael W. Hudson54241132001-12-07 15:38:26 +000010512
Matthias Kloseb9621712010-04-24 17:59:49 +000010513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10514$as_echo_n "checking for major... " >&6; }
10515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010516/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010517
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010518#if defined(MAJOR_IN_MKDEV)
10519#include <sys/mkdev.h>
10520#elif defined(MAJOR_IN_SYSMACROS)
10521#include <sys/sysmacros.h>
10522#else
10523#include <sys/types.h>
10524#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010525
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010526int
10527main ()
10528{
10529
10530 makedev(major(0),minor(0));
10531
10532 ;
10533 return 0;
10534}
10535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010536if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010537
10538
Matthias Kloseb9621712010-04-24 17:59:49 +000010539$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010540
Matthias Kloseb9621712010-04-24 17:59:49 +000010541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10542$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010543
10544else
Skip Montanaro6dead952003-09-25 14:50:04 +000010545
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10547$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010548
10549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010550rm -f core conftest.err conftest.$ac_objext \
10551 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010552
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010553# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010554# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10556$as_echo_n "checking for getaddrinfo... " >&6; }
10557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010558/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010559
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010560#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010561#include <sys/socket.h>
10562#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010563#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010564
Martin v. Löwis11437992002-04-12 09:54:03 +000010565int
10566main ()
10567{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010568getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010569 ;
10570 return 0;
10571}
10572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010573if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010574 have_getaddrinfo=yes
10575else
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010578rm -f core conftest.err conftest.$ac_objext \
10579 conftest$ac_exeext conftest.$ac_ext
10580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10581$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010582if test $have_getaddrinfo = yes
10583then
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10585$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010586 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010588else
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010590 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010591else
Matthias Kloseb9621712010-04-24 17:59:49 +000010592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010593/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010594
10595#include <sys/types.h>
10596#include <netdb.h>
10597#include <string.h>
10598#include <sys/socket.h>
10599#include <netinet/in.h>
10600
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010601int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010602{
10603 int passive, gaierr, inet4 = 0, inet6 = 0;
10604 struct addrinfo hints, *ai, *aitop;
10605 char straddr[INET6_ADDRSTRLEN], strport[16];
10606
10607 for (passive = 0; passive <= 1; passive++) {
10608 memset(&hints, 0, sizeof(hints));
10609 hints.ai_family = AF_UNSPEC;
10610 hints.ai_flags = passive ? AI_PASSIVE : 0;
10611 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010612 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010613 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10614 (void)gai_strerror(gaierr);
10615 goto bad;
10616 }
10617 for (ai = aitop; ai; ai = ai->ai_next) {
10618 if (ai->ai_addr == NULL ||
10619 ai->ai_addrlen == 0 ||
10620 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10621 straddr, sizeof(straddr), strport, sizeof(strport),
10622 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10623 goto bad;
10624 }
10625 switch (ai->ai_family) {
10626 case AF_INET:
10627 if (strcmp(strport, "54321") != 0) {
10628 goto bad;
10629 }
10630 if (passive) {
10631 if (strcmp(straddr, "0.0.0.0") != 0) {
10632 goto bad;
10633 }
10634 } else {
10635 if (strcmp(straddr, "127.0.0.1") != 0) {
10636 goto bad;
10637 }
10638 }
10639 inet4++;
10640 break;
10641 case AF_INET6:
10642 if (strcmp(strport, "54321") != 0) {
10643 goto bad;
10644 }
10645 if (passive) {
10646 if (strcmp(straddr, "::") != 0) {
10647 goto bad;
10648 }
10649 } else {
10650 if (strcmp(straddr, "::1") != 0) {
10651 goto bad;
10652 }
10653 }
10654 inet6++;
10655 break;
10656 case AF_UNSPEC:
10657 goto bad;
10658 break;
10659 default:
10660 /* another family support? */
10661 break;
10662 }
10663 }
10664 }
10665
10666 if (!(inet4 == 0 || inet4 == 2))
10667 goto bad;
10668 if (!(inet6 == 0 || inet6 == 2))
10669 goto bad;
10670
10671 if (aitop)
10672 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010673 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010674
10675 bad:
10676 if (aitop)
10677 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010678 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010679}
10680
Martin v. Löwis11437992002-04-12 09:54:03 +000010681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010682if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010683 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010684else
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010691fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010692
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010694
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10696$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10697
Mark Dickinson2df5d282009-12-31 21:22:50 +000010698if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010699then
10700 if test $ipv6 = yes
10701 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010702 echo 'Fatal: You must get working getaddrinfo() function.'
10703 echo ' or you can specify "--disable-ipv6"'.
10704 exit 1
10705 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010706else
Martin v. Löwis11437992002-04-12 09:54:03 +000010707
Matthias Kloseb9621712010-04-24 17:59:49 +000010708$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010709
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010710fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010711
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010712for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010713do :
10714 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010715if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010716 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010717#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010718_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010719
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010720fi
10721done
10722
Michael W. Hudson54241132001-12-07 15:38:26 +000010723
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010724# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10726$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010727if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010729else
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010731/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010732#include <sys/types.h>
10733#include <sys/time.h>
10734#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010735
Martin v. Löwis11437992002-04-12 09:54:03 +000010736int
10737main ()
10738{
10739if ((struct tm *) 0)
10740return 0;
10741 ;
10742 return 0;
10743}
10744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010745if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010746 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010747else
Matthias Kloseb9621712010-04-24 17:59:49 +000010748 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10753$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010754if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010755
Matthias Kloseb9621712010-04-24 17:59:49 +000010756$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010757
10758fi
10759
Matthias Kloseb9621712010-04-24 17:59:49 +000010760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10761$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010762if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010764else
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010766/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010767#include <sys/types.h>
10768#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010769
Martin v. Löwis11437992002-04-12 09:54:03 +000010770int
10771main ()
10772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010773struct tm tm;
10774 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010776 ;
10777 return 0;
10778}
10779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010780if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010781 ac_cv_struct_tm=time.h
10782else
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010786fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10788$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010789if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010790
Matthias Kloseb9621712010-04-24 17:59:49 +000010791$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010792
10793fi
10794
Matthias Kloseb9621712010-04-24 17:59:49 +000010795ac_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 +000010796#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010797
Matthias Kloseb9621712010-04-24 17:59:49 +000010798"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010799if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010800
10801cat >>confdefs.h <<_ACEOF
10802#define HAVE_STRUCT_TM_TM_ZONE 1
10803_ACEOF
10804
10805
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010806fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010807
Martin v. Löwis11437992002-04-12 09:54:03 +000010808if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10809
Matthias Kloseb9621712010-04-24 17:59:49 +000010810$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010811
10812else
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10814"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010815if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010817else
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010819fi
10820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010822#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823_ACEOF
10824
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10826$as_echo_n "checking for tzname... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010827if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010829else
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010831/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010832#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010833#if !HAVE_DECL_TZNAME
10834extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010836
Martin v. Löwis11437992002-04-12 09:54:03 +000010837int
10838main ()
10839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010840return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010841 ;
10842 return 0;
10843}
10844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010845if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010846 ac_cv_var_tzname=yes
10847else
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010850rm -f core conftest.err conftest.$ac_objext \
10851 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10854$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010855 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010858
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010859 fi
10860fi
10861
Matthias Kloseb9621712010-04-24 17:59:49 +000010862ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010863if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010864
10865cat >>confdefs.h <<_ACEOF
10866#define HAVE_STRUCT_STAT_ST_RDEV 1
10867_ACEOF
10868
10869
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010870fi
10871
Matthias Kloseb9621712010-04-24 17:59:49 +000010872ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010873if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010874
Martin v. Löwis11437992002-04-12 09:54:03 +000010875cat >>confdefs.h <<_ACEOF
10876#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10877_ACEOF
10878
10879
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010880fi
10881
Matthias Kloseb9621712010-04-24 17:59:49 +000010882ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010883if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010884
10885cat >>confdefs.h <<_ACEOF
10886#define HAVE_STRUCT_STAT_ST_FLAGS 1
10887_ACEOF
10888
10889
10890fi
10891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010893if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010894
10895cat >>confdefs.h <<_ACEOF
10896#define HAVE_STRUCT_STAT_ST_GEN 1
10897_ACEOF
10898
10899
10900fi
10901
Matthias Kloseb9621712010-04-24 17:59:49 +000010902ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010903if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010904
10905cat >>confdefs.h <<_ACEOF
10906#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10907_ACEOF
10908
10909
10910fi
10911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010913if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010914
Martin v. Löwis11437992002-04-12 09:54:03 +000010915cat >>confdefs.h <<_ACEOF
10916#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10917_ACEOF
10918
10919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010921
10922else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010923 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010924 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010925 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10926 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010927esac
10928
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010929fi
10930
Michael W. Hudson54241132001-12-07 15:38:26 +000010931
Martin v. Löwis11437992002-04-12 09:54:03 +000010932
Matthias Kloseb9621712010-04-24 17:59:49 +000010933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10934$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010935if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010937else
Matthias Kloseb159a552010-04-25 21:00:44 +000010938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010941#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010942int
10943main ()
10944{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010945return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010946 ;
10947 return 0;
10948}
10949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010950if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010951 ac_cv_header_time_altzone=yes
10952else
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957fi
10958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10960$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010961if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010964
10965fi
10966
Guido van Rossumda88dad1995-01-26 00:46:29 +000010967was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10969$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010971/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010972
10973#include <sys/types.h>
10974#include <sys/select.h>
10975#include <sys/time.h>
10976
Martin v. Löwis11437992002-04-12 09:54:03 +000010977int
10978main ()
10979{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010980;
Martin v. Löwis11437992002-04-12 09:54:03 +000010981 ;
10982 return 0;
10983}
10984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010985if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010986
10987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010989
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010990 was_it_defined=yes
10991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10995$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010996
Matthias Kloseb9621712010-04-24 17:59:49 +000010997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10998$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010999if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011001else
Matthias Kloseb9621712010-04-24 17:59:49 +000011002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011003/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011004#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011005int
11006main ()
11007{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011008struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011009 ;
11010 return 0;
11011}
11012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011013if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011014 ac_cv_struct_addrinfo=yes
11015else
Matthias Kloseb9621712010-04-24 17:59:49 +000011016 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11019fi
11020
Matthias Kloseb9621712010-04-24 17:59:49 +000011021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11022$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011023if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011024
Matthias Kloseb9621712010-04-24 17:59:49 +000011025$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011026
11027fi
11028
Matthias Kloseb9621712010-04-24 17:59:49 +000011029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11030$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011031if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011033else
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011035/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011036
11037# include <sys/types.h>
11038# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011039int
11040main ()
11041{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011042struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 ;
11044 return 0;
11045}
11046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011047if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011048 ac_cv_struct_sockaddr_storage=yes
11049else
Matthias Kloseb9621712010-04-24 17:59:49 +000011050 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11053fi
11054
Matthias Kloseb9621712010-04-24 17:59:49 +000011055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11056$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011057if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011058
Matthias Kloseb9621712010-04-24 17:59:49 +000011059$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011060
11061fi
11062
Guido van Rossum627b2d71993-12-24 10:39:16 +000011063# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011064
Matthias Kloseb9621712010-04-24 17:59:49 +000011065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11066$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011067if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011068 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011069else
Matthias Kloseb9621712010-04-24 17:59:49 +000011070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011072$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011073int
11074main ()
11075{
11076static int test_array [1 - 2 * !(((char) -1) < 0)];
11077test_array [0] = 0
11078
11079 ;
11080 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011081}
Martin v. Löwis11437992002-04-12 09:54:03 +000011082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011083if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011084 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011085else
Matthias Kloseb9621712010-04-24 17:59:49 +000011086 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11091$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011092if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011093 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011094
11095fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011096
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11098$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011099if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011101else
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011104
Martin v. Löwis11437992002-04-12 09:54:03 +000011105int
11106main ()
11107{
11108/* FIXME: Include the comments suggested by Paul. */
11109#ifndef __cplusplus
11110 /* Ultrix mips cc rejects this. */
11111 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011112 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011114 char const *const *pcpcc;
11115 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011116 /* NEC SVR4.0.2 mips cc rejects this. */
11117 struct point {int x, y;};
11118 static struct point const zero = {0,0};
11119 /* AIX XL C 1.02.0.0 rejects this.
11120 It does not let you subtract one const X* pointer from another in
11121 an arm of an if-expression whose if-part is not a constant
11122 expression */
11123 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011124 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011125 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126 ++pcpcc;
11127 ppc = (char**) pcpcc;
11128 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 { /* SCO 3.2v4 cc rejects this. */
11130 char *t;
11131 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011132
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011134 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011135 }
11136 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11137 int x[] = {25, 17};
11138 const int *foo = &x[0];
11139 ++foo;
11140 }
11141 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11142 typedef const int *iptr;
11143 iptr p = 0;
11144 ++p;
11145 }
11146 { /* AIX XL C 1.02.0.0 rejects this saying
11147 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11148 struct s { int j; const int *ap[3]; };
11149 struct s *b; b->j = 5;
11150 }
11151 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11152 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011153 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011154 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011156#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011157
Martin v. Löwis11437992002-04-12 09:54:03 +000011158 ;
11159 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011160}
Martin v. Löwis11437992002-04-12 09:54:03 +000011161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011162if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011163 ac_cv_c_const=yes
11164else
Matthias Kloseb9621712010-04-24 17:59:49 +000011165 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11170$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011171if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011172
Matthias Kloseb9621712010-04-24 17:59:49 +000011173$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011174
11175fi
11176
Michael W. Hudson54241132001-12-07 15:38:26 +000011177
Guido van Rossumda88dad1995-01-26 00:46:29 +000011178works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11180$as_echo_n "checking for working volatile... " >&6; }
11181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011182/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011183
Martin v. Löwis11437992002-04-12 09:54:03 +000011184int
11185main ()
11186{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011187volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 ;
11189 return 0;
11190}
11191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011192if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011193 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011194else
Skip Montanaro6dead952003-09-25 14:50:04 +000011195
Matthias Kloseb9621712010-04-24 17:59:49 +000011196$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011197
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011198
Guido van Rossum627b2d71993-12-24 10:39:16 +000011199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11202$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011203
Guido van Rossumda88dad1995-01-26 00:46:29 +000011204works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11206$as_echo_n "checking for working signed char... " >&6; }
11207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011208/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011209
Martin v. Löwis11437992002-04-12 09:54:03 +000011210int
11211main ()
11212{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011213signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011214 ;
11215 return 0;
11216}
11217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011218if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011219 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011220else
Skip Montanaro6dead952003-09-25 14:50:04 +000011221
Matthias Kloseb9621712010-04-24 17:59:49 +000011222$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011223
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011224
Guido van Rossum7f43da71994-08-01 12:15:30 +000011225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11228$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011229
Guido van Rossumda88dad1995-01-26 00:46:29 +000011230have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11232$as_echo_n "checking for prototypes... " >&6; }
11233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011234/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011235int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011236int
11237main ()
11238{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011239return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011240 ;
11241 return 0;
11242}
11243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011244if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011245
Matthias Kloseb9621712010-04-24 17:59:49 +000011246$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011247
Matthias Kloseb159a552010-04-25 21:00:44 +000011248 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11252$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011253
Guido van Rossumda88dad1995-01-26 00:46:29 +000011254works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11256$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011258/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011259
11260#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011261int foo(int x, ...) {
11262 va_list va;
11263 va_start(va, x);
11264 va_arg(va, int);
11265 va_arg(va, char *);
11266 va_arg(va, double);
11267 return 0;
11268}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011269
Martin v. Löwis11437992002-04-12 09:54:03 +000011270int
11271main ()
11272{
Guido van Rossum90eea071996-08-30 20:58:57 +000011273return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011274 ;
11275 return 0;
11276}
11277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011279
11280
Matthias Kloseb9621712010-04-24 17:59:49 +000011281$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011282
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011283 works=yes
11284
Guido van Rossum627b2d71993-12-24 10:39:16 +000011285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11288$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011289
Martin v. Löwisd6320502004-08-12 13:45:08 +000011290# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11292$as_echo_n "checking for socketpair... " >&6; }
11293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011294/* end confdefs.h. */
11295
11296#include <sys/types.h>
11297#include <sys/socket.h>
11298
11299int
11300main ()
11301{
11302void *x=socketpair
11303 ;
11304 return 0;
11305}
11306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011308
Matthias Kloseb9621712010-04-24 17:59:49 +000011309$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011310
Matthias Kloseb159a552010-04-25 21:00:44 +000011311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011312$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011313else
Matthias Kloseb9621712010-04-24 17:59:49 +000011314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11315$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011316
11317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011319
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011320# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11322$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011325#include <sys/types.h>
11326#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011327int
11328main ()
11329{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011330struct sockaddr x;
11331x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 ;
11333 return 0;
11334}
11335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011336if ac_fn_c_try_compile "$LINENO"; then :
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11338$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011339
Matthias Kloseb9621712010-04-24 17:59:49 +000011340$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011341
11342else
Matthias Kloseb9621712010-04-24 17:59:49 +000011343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11344$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011345
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011348
Guido van Rossumda88dad1995-01-26 00:46:29 +000011349va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11351$as_echo_n "checking whether va_list is an array... " >&6; }
11352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011353/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011354
11355#ifdef HAVE_STDARG_PROTOTYPES
11356#include <stdarg.h>
11357#else
11358#include <varargs.h>
11359#endif
11360
Martin v. Löwis11437992002-04-12 09:54:03 +000011361int
11362main ()
11363{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011364va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 ;
11366 return 0;
11367}
11368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011369if ac_fn_c_try_compile "$LINENO"; then :
11370
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371else
Skip Montanaro6dead952003-09-25 14:50:04 +000011372
Martin v. Löwis11437992002-04-12 09:54:03 +000011373
Matthias Kloseb9621712010-04-24 17:59:49 +000011374$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011375
Guido van Rossumda88dad1995-01-26 00:46:29 +000011376 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011377
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11381$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011382
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011383# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011384
11385
Matthias Kloseb9621712010-04-24 17:59:49 +000011386ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011387if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011388
Matthias Kloseb9621712010-04-24 17:59:49 +000011389 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11392$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011393 OLD_CFLAGS=$CFLAGS
11394 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011396/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011397
11398# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011399
Martin v. Löwis11437992002-04-12 09:54:03 +000011400int
11401main ()
11402{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011403
11404 char *name;
11405 struct hostent *he, *res;
11406 char buffer[2048];
11407 int buflen = 2048;
11408 int h_errnop;
11409
11410 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011411
11412 ;
11413 return 0;
11414}
11415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011416if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011417
Matthias Kloseb9621712010-04-24 17:59:49 +000011418 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011419
Martin v. Löwis11437992002-04-12 09:54:03 +000011420
Matthias Kloseb9621712010-04-24 17:59:49 +000011421$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011422
Matthias Kloseb9621712010-04-24 17:59:49 +000011423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11424$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011425
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011426else
Skip Montanaro6dead952003-09-25 14:50:04 +000011427
Matthias Kloseb9621712010-04-24 17:59:49 +000011428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11429$as_echo "no" >&6; }
11430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11431$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011433/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011434
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011435# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011436
Martin v. Löwis11437992002-04-12 09:54:03 +000011437int
11438main ()
11439{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011440
11441 char *name;
11442 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011443 char buffer[2048];
11444 int buflen = 2048;
11445 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011446
Matthias Kloseb159a552010-04-25 21:00:44 +000011447 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011448
11449 ;
11450 return 0;
11451}
11452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011454
Matthias Kloseb9621712010-04-24 17:59:49 +000011455 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011456
Martin v. Löwis11437992002-04-12 09:54:03 +000011457
Matthias Kloseb159a552010-04-25 21:00:44 +000011458$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011459
Matthias Kloseb9621712010-04-24 17:59:49 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11461$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011462
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011463else
Skip Montanaro6dead952003-09-25 14:50:04 +000011464
Matthias Kloseb9621712010-04-24 17:59:49 +000011465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11466$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11468$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11470/* end confdefs.h. */
11471
11472# include <netdb.h>
11473
11474int
11475main ()
11476{
11477
11478 char *name;
11479 struct hostent *he;
11480 struct hostent_data data;
11481
11482 (void) gethostbyname_r(name, he, &data);
11483
11484 ;
11485 return 0;
11486}
11487_ACEOF
11488if ac_fn_c_try_compile "$LINENO"; then :
11489
11490 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11491
11492
11493$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11494
11495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11496$as_echo "yes" >&6; }
11497
11498else
11499
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11501$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011505
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011508
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011511 CFLAGS=$OLD_CFLAGS
11512
11513else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011514
Matthias Kloseb9621712010-04-24 17:59:49 +000011515 for ac_func in gethostbyname
11516do :
11517 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011518if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011520#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011521_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011522
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011523fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011524done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011525
Michael W. Hudson54241132001-12-07 15:38:26 +000011526
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011527fi
11528
Michael W. Hudson54241132001-12-07 15:38:26 +000011529
11530
11531
11532
11533
11534
Guido van Rossum627b2d71993-12-24 10:39:16 +000011535# checks for system services
11536# (none yet)
11537
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011538# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011539ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011540if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011541
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011542else
Matthias Kloseb9621712010-04-24 17:59:49 +000011543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11544$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011545if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011547else
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011549LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553/* Override any GCC internal prototype to avoid an error.
11554 Use char because int might match the return type of a GCC
11555 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011556#ifdef __cplusplus
11557extern "C"
11558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011559char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011560int
11561main ()
11562{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011563return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011564 ;
11565 return 0;
11566}
11567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011568if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011570else
Matthias Kloseb9621712010-04-24 17:59:49 +000011571 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011573rm -f core conftest.err conftest.$ac_objext \
11574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011575LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11578$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011579if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 cat >>confdefs.h <<_ACEOF
11581#define HAVE_LIBIEEE 1
11582_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011583
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011584 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011585
Guido van Rossum627b2d71993-12-24 10:39:16 +000011586fi
11587
Michael W. Hudson54241132001-12-07 15:38:26 +000011588
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011589fi
11590
Michael W. Hudson54241132001-12-07 15:38:26 +000011591
Guido van Rossum7f253911997-05-09 02:42:48 +000011592# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11594$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011597if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011598 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011599if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011600then
11601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011603
Matthias Kloseb9621712010-04-24 17:59:49 +000011604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11605$as_echo "yes" >&6; }
11606else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11607$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011608fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011609else
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11611$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011612fi
11613
Guido van Rossum7f253911997-05-09 02:42:48 +000011614
Guido van Rossum7f43da71994-08-01 12:15:30 +000011615# check for --with-libm=...
11616
Guido van Rossum563e7081996-09-10 18:20:48 +000011617case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011618Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011619*) LIBM=-lm
11620esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11622$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011625if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011626 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011627if test "$withval" = no
11628then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11630$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011631elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011632then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11634$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011635else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011636fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011637else
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11639$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011640fi
11641
Guido van Rossum7f43da71994-08-01 12:15:30 +000011642
11643# check for --with-libc=...
11644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11646$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011648# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011649if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011650 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011651if test "$withval" = no
11652then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11654$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011655elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011656then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11658$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011659else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011660fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011661else
Matthias Kloseb9621712010-04-24 17:59:49 +000011662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11663$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011664fi
11665
Guido van Rossum7f43da71994-08-01 12:15:30 +000011666
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011667# **************************************************
11668# * Check for various properties of floating point *
11669# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011670
Matthias Kloseb9621712010-04-24 17:59:49 +000011671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11672$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011673if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011675else
11676
Matthias Kloseb9621712010-04-24 17:59:49 +000011677if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011678 ac_cv_little_endian_double=no
11679else
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011681/* end confdefs.h. */
11682
11683#include <string.h>
11684int main() {
11685 double x = 9006104071832581.0;
11686 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11687 return 0;
11688 else
11689 return 1;
11690}
11691
11692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011693if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011694 ac_cv_little_endian_double=yes
11695else
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11699 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011700fi
11701
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011702fi
11703
Matthias Kloseb9621712010-04-24 17:59:49 +000011704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11705$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011706if test "$ac_cv_little_endian_double" = yes
11707then
11708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710
11711fi
11712
Matthias Kloseb9621712010-04-24 17:59:49 +000011713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11714$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011715if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011716 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011717else
11718
Matthias Kloseb9621712010-04-24 17:59:49 +000011719if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011720 ac_cv_big_endian_double=no
11721else
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011723/* end confdefs.h. */
11724
11725#include <string.h>
11726int main() {
11727 double x = 9006104071832581.0;
11728 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11729 return 0;
11730 else
11731 return 1;
11732}
11733
11734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011735if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011736 ac_cv_big_endian_double=yes
11737else
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742fi
11743
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011744fi
11745
Matthias Kloseb9621712010-04-24 17:59:49 +000011746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11747$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011748if test "$ac_cv_big_endian_double" = yes
11749then
11750
Matthias Kloseb9621712010-04-24 17:59:49 +000011751$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011752
11753fi
11754
11755# Some ARM platforms use a mixed-endian representation for doubles.
11756# While Python doesn't currently have full support for these platforms
11757# (see e.g., issue 1762561), we can at least make sure that float <-> string
11758# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11760$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011761if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011763else
11764
Matthias Kloseb9621712010-04-24 17:59:49 +000011765if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011766 ac_cv_mixed_endian_double=no
11767else
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011769/* end confdefs.h. */
11770
11771#include <string.h>
11772int main() {
11773 double x = 9006104071832581.0;
11774 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11775 return 0;
11776 else
11777 return 1;
11778}
11779
11780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011781if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011782 ac_cv_mixed_endian_double=yes
11783else
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011786rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11787 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788fi
11789
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011790fi
11791
Matthias Kloseb9621712010-04-24 17:59:49 +000011792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11793$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011794if test "$ac_cv_mixed_endian_double" = yes
11795then
11796
Matthias Kloseb9621712010-04-24 17:59:49 +000011797$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011798
11799fi
11800
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011801# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011802# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011803# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011804# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011805# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011806# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011807
11808# This inline assembler syntax may also work for suncc and icc,
11809# so we try it on all platforms.
11810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11812$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011814/* end confdefs.h. */
11815
11816int
11817main ()
11818{
11819
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011820 unsigned short cw;
11821 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11822 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011823
11824 ;
11825 return 0;
11826}
11827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011828if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011829 have_gcc_asm_for_x87=yes
11830else
Matthias Kloseb9621712010-04-24 17:59:49 +000011831 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011832fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11835$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011836if test "$have_gcc_asm_for_x87" = yes
11837then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011838
Matthias Kloseb9621712010-04-24 17:59:49 +000011839$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011840
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011841fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011842
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011843# Detect whether system arithmetic is subject to x87-style double
11844# rounding issues. The result of this test has little meaning on non
11845# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11846# mode is round-to-nearest and double rounding issues are present, and
11847# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11849$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011850# $BASECFLAGS may affect the result
11851ac_save_cc="$CC"
11852CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011853if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011854 ac_cv_x87_double_rounding=no
11855else
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011857/* end confdefs.h. */
11858
11859#include <stdlib.h>
11860#include <math.h>
11861int main() {
11862 volatile double x, y, z;
11863 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11864 x = 0.99999999999999989; /* 1-2**-53 */
11865 y = 1./x;
11866 if (y != 1.)
11867 exit(0);
11868 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11869 x = 1e16;
11870 y = 2.99999;
11871 z = x + y;
11872 if (z != 1e16+4.)
11873 exit(0);
11874 /* both tests show evidence of double rounding */
11875 exit(1);
11876}
11877
11878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011879if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011880 ac_cv_x87_double_rounding=no
11881else
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011886fi
11887
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011888CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11890$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011891if test "$ac_cv_x87_double_rounding" = yes
11892then
11893
Matthias Kloseb9621712010-04-24 17:59:49 +000011894$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011895
11896fi
11897
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011898# ************************************
11899# * Check for mathematical functions *
11900# ************************************
11901
11902LIBS_SAVE=$LIBS
11903LIBS="$LIBS $LIBM"
11904
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011905for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11906do :
11907 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11908ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011909if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011910 cat >>confdefs.h <<_ACEOF
11911#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11912_ACEOF
11913
11914fi
11915done
11916
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011917for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011918do :
11919 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11920ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011921if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011922 cat >>confdefs.h <<_ACEOF
11923#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11924_ACEOF
11925
11926fi
11927done
11928
11929ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11930"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011931if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011932 ac_have_decl=1
11933else
11934 ac_have_decl=0
11935fi
11936
11937cat >>confdefs.h <<_ACEOF
11938#define HAVE_DECL_ISINF $ac_have_decl
11939_ACEOF
11940ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11941"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011942if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011943 ac_have_decl=1
11944else
11945 ac_have_decl=0
11946fi
11947
11948cat >>confdefs.h <<_ACEOF
11949#define HAVE_DECL_ISNAN $ac_have_decl
11950_ACEOF
11951ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11952"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011953if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011954 ac_have_decl=1
11955else
11956 ac_have_decl=0
11957fi
11958
11959cat >>confdefs.h <<_ACEOF
11960#define HAVE_DECL_ISFINITE $ac_have_decl
11961_ACEOF
11962
11963
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011964# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11965# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11967$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011968if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011969 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011970else
11971
Matthias Kloseb9621712010-04-24 17:59:49 +000011972if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011973 ac_cv_tanh_preserves_zero_sign=no
11974else
Matthias Kloseb9621712010-04-24 17:59:49 +000011975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011976/* end confdefs.h. */
11977
11978#include <math.h>
11979#include <stdlib.h>
11980int main() {
11981 /* return 0 if either negative zeros don't exist
11982 on this platform or if negative zeros exist
11983 and tanh(-0.) == -0. */
11984 if (atan2(0., -1.) == atan2(-0., -1.) ||
11985 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11986 else exit(1);
11987}
11988
11989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011990if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011991 ac_cv_tanh_preserves_zero_sign=yes
11992else
Matthias Kloseb9621712010-04-24 17:59:49 +000011993 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011997fi
11998
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011999fi
12000
Matthias Kloseb9621712010-04-24 17:59:49 +000012001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12002$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012003if test "$ac_cv_tanh_preserves_zero_sign" = yes
12004then
12005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012007
12008fi
12009
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012010if test "$ac_cv_func_log1p" = yes
12011then
12012 # On some versions of AIX, log1p(-0.) returns 0. instead of
12013 # -0. See issue #9920.
12014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12015$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012016 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012017 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012018else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012019
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012020 if test "$cross_compiling" = yes; then :
12021 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012022else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12024/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012025
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012026 #include <math.h>
12027 #include <stdlib.h>
12028 int main() {
12029 /* Fail if the signs of log1p(-0.) and -0. can be
12030 distinguished. */
12031 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12032 return 0;
12033 else
12034 return 1;
12035 }
12036
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012037_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012038if ac_fn_c_try_run "$LINENO"; then :
12039 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012040else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012041 ac_cv_log1p_drops_zero_sign=yes
12042fi
12043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12044 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012045fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012046
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012047fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012048
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12050$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12051fi
12052if test "$ac_cv_log1p_drops_zero_sign" = yes
12053then
12054
12055$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12056
12057fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012058
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012059LIBS=$LIBS_SAVE
12060
Mark Dickinsona614f042009-11-28 12:48:43 +000012061# For multiprocessing module, check that sem_open
12062# actually works. For FreeBSD versions <= 7.2,
12063# the kernel module that provides POSIX semaphores
12064# isn't loaded by default, so an attempt to call
12065# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12067$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012068if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012070else
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012072 ac_cv_posix_semaphores_enabled=yes
12073else
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012075/* end confdefs.h. */
12076
12077#include <unistd.h>
12078#include <fcntl.h>
12079#include <stdio.h>
12080#include <semaphore.h>
12081#include <sys/stat.h>
12082
12083int main(void) {
12084 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12085 if (a == SEM_FAILED) {
12086 perror("sem_open");
12087 return 1;
12088 }
12089 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012090 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012091 return 0;
12092}
12093
12094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012095if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012096 ac_cv_posix_semaphores_enabled=yes
12097else
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12101 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012102fi
12103
12104
Mark Dickinsona614f042009-11-28 12:48:43 +000012105fi
12106
Matthias Kloseb9621712010-04-24 17:59:49 +000012107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12108$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012109if test $ac_cv_posix_semaphores_enabled = no
12110then
12111
Matthias Kloseb9621712010-04-24 17:59:49 +000012112$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012113
12114fi
12115
Mark Dickinson10683072009-04-18 21:18:19 +000012116# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12118$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012119if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012121else
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012123 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012124else
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012126/* end confdefs.h. */
12127
12128#include <unistd.h>
12129#include <fcntl.h>
12130#include <stdio.h>
12131#include <semaphore.h>
12132#include <sys/stat.h>
12133
12134int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012135 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012136 int count;
12137 int res;
12138 if(a==SEM_FAILED){
12139 perror("sem_open");
12140 return 1;
12141
12142 }
12143 res = sem_getvalue(a, &count);
12144 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012145 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012146 return res==-1 ? 1 : 0;
12147}
12148
Mark Dickinson10683072009-04-18 21:18:19 +000012149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012150if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012151 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012152else
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12156 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012157fi
12158
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012159
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012160fi
12161
Matthias Kloseb9621712010-04-24 17:59:49 +000012162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12163$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012164if test $ac_cv_broken_sem_getvalue = yes
12165then
12166
Matthias Kloseb9621712010-04-24 17:59:49 +000012167$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012168
12169fi
12170
Mark Dickinsonbd792642009-03-18 20:06:12 +000012171# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12173$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012174# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012175if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012176 enableval=$enable_big_digits; case $enable_big_digits in
12177yes)
12178 enable_big_digits=30 ;;
12179no)
12180 enable_big_digits=15 ;;
1218115|30)
12182 ;;
12183*)
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012184 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 +000012185esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12187$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012188
12189cat >>confdefs.h <<_ACEOF
12190#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12191_ACEOF
12192
12193
12194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12196$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012197fi
12198
12199
Guido van Rossumef2255b2000-03-10 22:30:29 +000012200# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012201ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012202if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012203
12204
Matthias Kloseb9621712010-04-24 17:59:49 +000012205$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012206
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012207 wchar_h="yes"
12208
Guido van Rossumef2255b2000-03-10 22:30:29 +000012209else
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012211
12212fi
12213
Michael W. Hudson54241132001-12-07 15:38:26 +000012214
Martin v. Löwis11437992002-04-12 09:54:03 +000012215
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012216# determine wchar_t size
12217if test "$wchar_h" = yes
12218then
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12221# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12222# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12224$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012225if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012227else
Matthias Kloseb9621712010-04-24 17:59:49 +000012228 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12229"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012230
Martin v. Löwis11437992002-04-12 09:54:03 +000012231else
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 if test "$ac_cv_type_wchar_t" = yes; then
12233 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12234$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012235as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012236See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012237 else
12238 ac_cv_sizeof_wchar_t=0
12239 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012241
Martin v. Löwis11437992002-04-12 09:54:03 +000012242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12244$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012245
12246
12247
Martin v. Löwis11437992002-04-12 09:54:03 +000012248cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012249#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012250_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012251
Michael W. Hudson54241132001-12-07 15:38:26 +000012252
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012253fi
12254
Matthias Kloseb9621712010-04-24 17:59:49 +000012255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12256$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012257have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012259/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012260
12261#include <tcl.h>
12262#if TCL_UTF_MAX != 6
12263# error "NOT UCS4_TCL"
12264#endif
12265int
12266main ()
12267{
12268
12269 ;
12270 return 0;
12271}
12272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012273if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012274
12275
Matthias Kloseb9621712010-04-24 17:59:49 +000012276$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012277
12278 have_ucs4_tcl=yes
12279
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12283$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012284
Skip Montanaro6dead952003-09-25 14:50:04 +000012285# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012286if test "$wchar_h" = yes
12287then
12288 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12290$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012291 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012293else
12294
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012296 ac_cv_wchar_t_signed=yes
12297else
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012299/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012300
12301 #include <wchar.h>
12302 int main()
12303 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012304 /* Success: exit code 0 */
12305 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012306 }
12307
12308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012309if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012310 ac_cv_wchar_t_signed=yes
12311else
Matthias Kloseb9621712010-04-24 17:59:49 +000012312 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12315 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012316fi
12317
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012318fi
12319
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12321$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012322fi
12323
Matthias Kloseb9621712010-04-24 17:59:49 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12325$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012326
12327# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012328if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012329 withval=$with_wide_unicode;
12330if test "$withval" != no
12331then unicode_size="4"
12332else unicode_size="2"
12333fi
12334
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012335else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012336
Georg Brandl52d168a2008-01-07 18:10:24 +000012337case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012338 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012339 *) unicode_size="2" ;;
12340esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012341
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012342fi
12343
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012344
12345
Georg Brandl52d168a2008-01-07 18:10:24 +000012346case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012347 4)
12348 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12349
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012350 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012351 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012352 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012353 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012354esac
12355
Michael W. Hudson54241132001-12-07 15:38:26 +000012356
Martin v. Löwis11437992002-04-12 09:54:03 +000012357
Georg Brandl52d168a2008-01-07 18:10:24 +000012358# wchar_t is only usable if it maps to an unsigned type
12359if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012360 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012361then
12362 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012363
Matthias Kloseb9621712010-04-24 17:59:49 +000012364$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012365
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012367
Georg Brandl52d168a2008-01-07 18:10:24 +000012368elif test "$ac_cv_sizeof_short" = "$unicode_size"
12369then
12370 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012372
Georg Brandl52d168a2008-01-07 18:10:24 +000012373elif test "$ac_cv_sizeof_long" = "$unicode_size"
12374then
12375 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012376 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012377
Georg Brandl52d168a2008-01-07 18:10:24 +000012378else
12379 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012380fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12382$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012383
12384# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12386$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012387if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012389else
Matthias Kloseb9621712010-04-24 17:59:49 +000012390 ac_cv_c_bigendian=unknown
12391 # See if we're dealing with a universal compiler.
12392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12393/* end confdefs.h. */
12394#ifndef __APPLE_CC__
12395 not a universal capable compiler
12396 #endif
12397 typedef int dummy;
12398
Skip Montanaro6dead952003-09-25 14:50:04 +000012399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012400if ac_fn_c_try_compile "$LINENO"; then :
12401
12402 # Check for potential -arch flags. It is not universal unless
12403 # there are at least two -arch flags with different values.
12404 ac_arch=
12405 ac_prev=
12406 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12407 if test -n "$ac_prev"; then
12408 case $ac_word in
12409 i?86 | x86_64 | ppc | ppc64)
12410 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12411 ac_arch=$ac_word
12412 else
12413 ac_cv_c_bigendian=universal
12414 break
12415 fi
12416 ;;
12417 esac
12418 ac_prev=
12419 elif test "x$ac_word" = "x-arch"; then
12420 ac_prev=arch
12421 fi
12422 done
12423fi
12424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12425 if test $ac_cv_c_bigendian = unknown; then
12426 # See if sys/param.h defines the BYTE_ORDER macro.
12427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012428/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012429#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012431
Martin v. Löwis11437992002-04-12 09:54:03 +000012432int
12433main ()
12434{
Matthias Kloseb9621712010-04-24 17:59:49 +000012435#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12436 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12437 && LITTLE_ENDIAN)
12438 bogus endian macros
12439 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012440
12441 ;
12442 return 0;
12443}
12444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012445if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012446 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012448/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012449#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012451
Martin v. Löwis11437992002-04-12 09:54:03 +000012452int
12453main ()
12454{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012455#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 not big endian
12457 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012458
12459 ;
12460 return 0;
12461}
12462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012463if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012464 ac_cv_c_bigendian=yes
12465else
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012469fi
12470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12471 fi
12472 if test $ac_cv_c_bigendian = unknown; then
12473 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012475/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012476#include <limits.h>
12477
Martin v. Löwis11437992002-04-12 09:54:03 +000012478int
12479main ()
12480{
Matthias Kloseb9621712010-04-24 17:59:49 +000012481#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12482 bogus endian macros
12483 #endif
12484
Martin v. Löwis11437992002-04-12 09:54:03 +000012485 ;
12486 return 0;
12487}
12488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012489if ac_fn_c_try_compile "$LINENO"; then :
12490 # It does; now see whether it defined to _BIG_ENDIAN or not.
12491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12492/* end confdefs.h. */
12493#include <limits.h>
12494
12495int
12496main ()
12497{
12498#ifndef _BIG_ENDIAN
12499 not big endian
12500 #endif
12501
12502 ;
12503 return 0;
12504}
12505_ACEOF
12506if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012507 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012508else
Matthias Kloseb9621712010-04-24 17:59:49 +000012509 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12512fi
12513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12514 fi
12515 if test $ac_cv_c_bigendian = unknown; then
12516 # Compile a test program.
12517 if test "$cross_compiling" = yes; then :
12518 # Try to guess by grepping values from an object file.
12519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12520/* end confdefs.h. */
12521short int ascii_mm[] =
12522 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12523 short int ascii_ii[] =
12524 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12525 int use_ascii (int i) {
12526 return ascii_mm[i] + ascii_ii[i];
12527 }
12528 short int ebcdic_ii[] =
12529 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12530 short int ebcdic_mm[] =
12531 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12532 int use_ebcdic (int i) {
12533 return ebcdic_mm[i] + ebcdic_ii[i];
12534 }
12535 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536
Matthias Kloseb9621712010-04-24 17:59:49 +000012537int
12538main ()
12539{
12540return use_ascii (foo) == use_ebcdic (foo);
12541 ;
12542 return 0;
12543}
12544_ACEOF
12545if ac_fn_c_try_compile "$LINENO"; then :
12546 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12547 ac_cv_c_bigendian=yes
12548 fi
12549 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12550 if test "$ac_cv_c_bigendian" = unknown; then
12551 ac_cv_c_bigendian=no
12552 else
12553 # finding both strings is unlikely to happen, but who knows?
12554 ac_cv_c_bigendian=unknown
12555 fi
12556 fi
12557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012559else
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012561/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012563int
12564main ()
12565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 /* Are we little or big endian? From Harbison&Steele. */
12568 union
12569 {
12570 long int l;
12571 char c[sizeof (long int)];
12572 } u;
12573 u.l = 1;
12574 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575
12576 ;
12577 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012578}
Martin v. Löwis11437992002-04-12 09:54:03 +000012579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012580if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012581 ac_cv_c_bigendian=no
12582else
Matthias Kloseb9621712010-04-24 17:59:49 +000012583 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12586 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012588
Matthias Kloseb9621712010-04-24 17:59:49 +000012589 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12592$as_echo "$ac_cv_c_bigendian" >&6; }
12593 case $ac_cv_c_bigendian in #(
12594 yes)
12595 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12596;; #(
12597 no)
12598 ;; #(
12599 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012600
Matthias Kloseb9621712010-04-24 17:59:49 +000012601$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012602
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 ;; #(
12604 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012605 as_fn_error $? "unknown endianness
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012606 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012607 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012608
Michael W. Hudson54241132001-12-07 15:38:26 +000012609
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012610# ABI version string for Python extension modules. This appears between the
12611# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12612# from the following attributes which affect the ABI of this Python build (in
12613# this order):
12614#
12615# * The Python implementation (always 'cpython-' for us)
12616# * The major and minor version numbers
12617# * --with-pydebug (adds a 'd')
12618# * --with-pymalloc (adds a 'm')
12619# * --with-wide-unicode (adds a 'u')
12620#
12621# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012622# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12623# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012624
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12626$as_echo_n "checking ABIFLAGS... " >&6; }
12627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12628$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12630$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012631SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12633$as_echo "$SOABI" >&6; }
12634
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12636$as_echo_n "checking LDVERSION... " >&6; }
12637LDVERSION='$(VERSION)$(ABIFLAGS)'
12638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12639$as_echo "$LDVERSION" >&6; }
12640
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012641# SO is the extension of shared libraries `(including the dot!)
12642# -- usually .so, .sl on HP-UX, .dll on Cygwin
12643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12644$as_echo_n "checking SO... " >&6; }
12645if test -z "$SO"
12646then
12647 case $ac_sys_system in
12648 hp*|HP*)
12649 case `uname -m` in
12650 ia64) SO=.so;;
12651 *) SO=.sl;;
12652 esac
12653 ;;
12654 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012655 Linux*|GNU*)
12656 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012657 *) SO=.so;;
12658 esac
12659else
12660 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012661 echo
12662 echo '====================================================================='
12663 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012664 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012665 echo '+ Do you really mean to change the extension for shared libraries? +'
12666 echo '+ Continuing in 10 seconds to let you to ponder. +'
12667 echo '+ +'
12668 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012669 sleep 10
12670fi
12671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12672$as_echo "$SO" >&6; }
12673
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012674# Check whether right shifting a negative integer extends the sign bit
12675# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12677$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012678if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012680else
Martin v. Löwis11437992002-04-12 09:54:03 +000012681
Matthias Kloseb9621712010-04-24 17:59:49 +000012682if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012683 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012684else
Matthias Kloseb9621712010-04-24 17:59:49 +000012685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012686/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012687
12688int main()
12689{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012690 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012691}
12692
Martin v. Löwis11437992002-04-12 09:54:03 +000012693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012694if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012695 ac_cv_rshift_extends_sign=yes
12696else
Matthias Kloseb9621712010-04-24 17:59:49 +000012697 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12700 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012701fi
12702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012703fi
12704
Matthias Kloseb9621712010-04-24 17:59:49 +000012705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12706$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012707if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012708then
Martin v. Löwis11437992002-04-12 09:54:03 +000012709
Matthias Kloseb9621712010-04-24 17:59:49 +000012710$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012711
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012712fi
12713
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012714# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12716$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012717if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012719else
Martin v. Löwis11437992002-04-12 09:54:03 +000012720
Matthias Kloseb9621712010-04-24 17:59:49 +000012721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012722/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012723#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012724int
12725main ()
12726{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012727
12728 FILE *f = fopen("/dev/null", "r");
12729 flockfile(f);
12730 getc_unlocked(f);
12731 funlockfile(f);
12732
Martin v. Löwis11437992002-04-12 09:54:03 +000012733 ;
12734 return 0;
12735}
12736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012737if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012738 ac_cv_have_getc_unlocked=yes
12739else
Matthias Kloseb9621712010-04-24 17:59:49 +000012740 ac_cv_have_getc_unlocked=no
12741fi
12742rm -f core conftest.err conftest.$ac_objext \
12743 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012745
Matthias Kloseb9621712010-04-24 17:59:49 +000012746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12747$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012748if test "$ac_cv_have_getc_unlocked" = yes
12749then
Martin v. Löwis11437992002-04-12 09:54:03 +000012750
Matthias Kloseb9621712010-04-24 17:59:49 +000012751$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012752
12753fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012754
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012755# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012756# save the value of LIBS so we don't actually link Python with readline
12757LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012758
Gregory P. Smith18820942008-09-07 06:24:49 +000012759# On some systems we need to link readline to a termcap compatible
12760# library. NOTE: Keep the precedence of listed libraries synchronised
12761# with setup.py.
12762py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12764$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012765for py_libtermcap in "" ncursesw ncurses curses termcap; do
12766 if test -z "$py_libtermcap"; then
12767 READLINE_LIBS="-lreadline"
12768 else
12769 READLINE_LIBS="-lreadline -l$py_libtermcap"
12770 fi
12771 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012773/* end confdefs.h. */
12774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012775/* Override any GCC internal prototype to avoid an error.
12776 Use char because int might match the return type of a GCC
12777 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012778#ifdef __cplusplus
12779extern "C"
12780#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012781char readline ();
12782int
12783main ()
12784{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012786 ;
12787 return 0;
12788}
12789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012790if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012791 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012793rm -f core conftest.err conftest.$ac_objext \
12794 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012795 if test $py_cv_lib_readline = yes; then
12796 break
12797 fi
12798done
12799# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12800#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012801if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12803$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012804else
Matthias Kloseb9621712010-04-24 17:59:49 +000012805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12806$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012809
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012810fi
12811
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012812# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12814$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012815if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012816 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012817else
12818 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012819LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012821/* end confdefs.h. */
12822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012823/* Override any GCC internal prototype to avoid an error.
12824 Use char because int might match the return type of a GCC
12825 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012826#ifdef __cplusplus
12827extern "C"
12828#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012829char rl_callback_handler_install ();
12830int
12831main ()
12832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012833return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012834 ;
12835 return 0;
12836}
12837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012838if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012839 ac_cv_lib_readline_rl_callback_handler_install=yes
12840else
Matthias Kloseb9621712010-04-24 17:59:49 +000012841 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012843rm -f core conftest.err conftest.$ac_objext \
12844 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012845LIBS=$ac_check_lib_save_LIBS
12846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12848$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012849if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012850
Matthias Kloseb9621712010-04-24 17:59:49 +000012851$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012852
12853fi
12854
12855
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012856# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012858/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012859#include <readline/readline.h>
12860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012861if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012862 have_readline=yes
12863else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012864 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012865
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012866fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012867rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012868if test $have_readline = yes
12869then
Matthias Kloseb9621712010-04-24 17:59:49 +000012870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012871/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012872#include <readline/readline.h>
12873
12874_ACEOF
12875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012876 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012877
Matthias Kloseb9621712010-04-24 17:59:49 +000012878$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012879
12880fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012881rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012882
Matthias Kloseb9621712010-04-24 17:59:49 +000012883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012884/* end confdefs.h. */
12885#include <readline/readline.h>
12886
12887_ACEOF
12888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012892
12893fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012894rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012895
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012896fi
12897
Martin v. Löwis0daad592001-09-30 21:09:59 +000012898# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12900$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012901if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012903else
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012905LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909/* Override any GCC internal prototype to avoid an error.
12910 Use char because int might match the return type of a GCC
12911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012912#ifdef __cplusplus
12913extern "C"
12914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012915char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012916int
12917main ()
12918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012919return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012920 ;
12921 return 0;
12922}
12923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012925 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012926else
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012929rm -f core conftest.err conftest.$ac_objext \
12930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012931LIBS=$ac_check_lib_save_LIBS
12932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12934$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012935if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012938
Martin v. Löwis0daad592001-09-30 21:09:59 +000012939fi
12940
Michael W. Hudson54241132001-12-07 15:38:26 +000012941
Thomas Wouters89d996e2007-09-08 17:39:28 +000012942# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12944$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012945if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012946 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012947else
12948 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012949LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012951/* end confdefs.h. */
12952
12953/* Override any GCC internal prototype to avoid an error.
12954 Use char because int might match the return type of a GCC
12955 builtin and then its argument prototype would still apply. */
12956#ifdef __cplusplus
12957extern "C"
12958#endif
12959char rl_completion_display_matches_hook ();
12960int
12961main ()
12962{
12963return rl_completion_display_matches_hook ();
12964 ;
12965 return 0;
12966}
12967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012968if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012969 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12970else
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012973rm -f core conftest.err conftest.$ac_objext \
12974 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012975LIBS=$ac_check_lib_save_LIBS
12976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12978$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012979if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012982
12983fi
12984
12985
Martin v. Löwis0daad592001-09-30 21:09:59 +000012986# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12988$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012989if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012991else
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012993LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997/* Override any GCC internal prototype to avoid an error.
12998 Use char because int might match the return type of a GCC
12999 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013000#ifdef __cplusplus
13001extern "C"
13002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013003char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013004int
13005main ()
13006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013007return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013008 ;
13009 return 0;
13010}
13011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013012if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013013 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013014else
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013017rm -f core conftest.err conftest.$ac_objext \
13018 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013019LIBS=$ac_check_lib_save_LIBS
13020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13022$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013023if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013026
Guido van Rossum353ae582001-07-10 16:45:32 +000013027fi
13028
Jack Jansendd19cf82001-12-06 22:36:17 +000013029
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013030# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013032/* end confdefs.h. */
13033#include <readline/readline.h>
13034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013035if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013036 have_readline=yes
13037else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013038 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013039
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013040fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013041rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013042if test $have_readline = yes
13043then
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013045/* end confdefs.h. */
13046#include <readline/readline.h>
13047
13048_ACEOF
13049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013053
13054fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013055rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013056
13057fi
13058
Martin v. Löwis82bca632006-02-10 20:49:30 +000013059# End of readline checks: restore LIBS
13060LIBS=$LIBS_no_readline
13061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13063$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013064if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013065 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013066else
Martin v. Löwis11437992002-04-12 09:54:03 +000013067
Matthias Kloseb9621712010-04-24 17:59:49 +000013068if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013069 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013070else
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013072/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013073
13074int main()
13075{
13076 int val1 = nice(1);
13077 if (val1 != -1 && val1 == nice(2))
13078 exit(0);
13079 exit(1);
13080}
13081
Martin v. Löwis11437992002-04-12 09:54:03 +000013082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013083if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013084 ac_cv_broken_nice=yes
13085else
Matthias Kloseb9621712010-04-24 17:59:49 +000013086 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13089 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013090fi
13091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013092fi
13093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13095$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013096if test "$ac_cv_broken_nice" = yes
13097then
Martin v. Löwis11437992002-04-12 09:54:03 +000013098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013100
13101fi
13102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13104$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013105if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013107else
Matthias Kloseb9621712010-04-24 17:59:49 +000013108 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013109 ac_cv_broken_poll=no
13110else
Matthias Kloseb9621712010-04-24 17:59:49 +000013111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013112/* end confdefs.h. */
13113
13114#include <poll.h>
13115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013116int main()
13117{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013118 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013119 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013120
13121 close (42);
13122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013123 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013124 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013125 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013126 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013127 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013128 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013129 return 1;
13130}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013131
13132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013133if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013134 ac_cv_broken_poll=yes
13135else
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13139 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013141
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013142fi
13143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13145$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013146if test "$ac_cv_broken_poll" = yes
13147then
13148
Matthias Kloseb9621712010-04-24 17:59:49 +000013149$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013150
13151fi
13152
Brett Cannon43802422005-02-10 20:48:03 +000013153# 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 +000013154# (which is not required by ISO C or UNIX spec) and/or if we support
13155# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013156ac_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 +000013157#include <$ac_cv_struct_tm>
13158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013160if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013161
13162cat >>confdefs.h <<_ACEOF
13163#define HAVE_STRUCT_TM_TM_ZONE 1
13164_ACEOF
13165
13166
13167fi
13168
13169if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013172
13173else
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13175"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013176if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013178else
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013180fi
13181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013182cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013183#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013184_ACEOF
13185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13187$as_echo_n "checking for tzname... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013188if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013190else
Matthias Kloseb9621712010-04-24 17:59:49 +000013191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013192/* end confdefs.h. */
13193#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013194#if !HAVE_DECL_TZNAME
13195extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013196#endif
13197
13198int
13199main ()
13200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013201return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013202 ;
13203 return 0;
13204}
13205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013206if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013207 ac_cv_var_tzname=yes
13208else
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013211rm -f core conftest.err conftest.$ac_objext \
13212 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13215$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013216 if test $ac_cv_var_tzname = yes; then
13217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013219
13220 fi
13221fi
13222
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013223
Martin v. Löwis1d459062005-03-14 21:23:33 +000013224# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13226$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013227if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013229else
13230
Matthias Kloseb9621712010-04-24 17:59:49 +000013231if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013232 ac_cv_working_tzset=no
13233else
Matthias Kloseb9621712010-04-24 17:59:49 +000013234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013235/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013236
13237#include <stdlib.h>
13238#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013239#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013240
13241#if HAVE_TZNAME
13242extern char *tzname[];
13243#endif
13244
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013245int main()
13246{
Brett Cannon18367812003-09-19 00:59:16 +000013247 /* Note that we need to ensure that not only does tzset(3)
13248 do 'something' with localtime, but it works as documented
13249 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013250 This includes making sure that tzname is set properly if
13251 tm->tm_zone does not exist since it is the alternative way
13252 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013253
13254 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013255 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013256 */
13257
Martin v. Löwis1d459062005-03-14 21:23:33 +000013258 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013259 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13260
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013261 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013262 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013263 if (localtime(&groundhogday)->tm_hour != 0)
13264 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013265#if HAVE_TZNAME
13266 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13267 if (strcmp(tzname[0], "UTC") ||
13268 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13269 exit(1);
13270#endif
Brett Cannon18367812003-09-19 00:59:16 +000013271
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013272 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013273 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013274 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013275 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013276#if HAVE_TZNAME
13277 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13278 exit(1);
13279#endif
Brett Cannon18367812003-09-19 00:59:16 +000013280
13281 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13282 tzset();
13283 if (localtime(&groundhogday)->tm_hour != 11)
13284 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013285#if HAVE_TZNAME
13286 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13287 exit(1);
13288#endif
13289
13290#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013291 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13292 exit(1);
13293 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13294 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013295#endif
Brett Cannon18367812003-09-19 00:59:16 +000013296
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013297 exit(0);
13298}
13299
13300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013301if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013302 ac_cv_working_tzset=yes
13303else
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13307 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013308fi
13309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013310fi
13311
Matthias Kloseb9621712010-04-24 17:59:49 +000013312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13313$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013314if test "$ac_cv_working_tzset" = yes
13315then
13316
Matthias Kloseb9621712010-04-24 17:59:49 +000013317$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013318
13319fi
13320
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013321# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13323$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013324if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013326else
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013328/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013329#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013330int
13331main ()
13332{
13333
13334struct stat st;
13335st.st_mtim.tv_nsec = 1;
13336
13337 ;
13338 return 0;
13339}
13340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013341if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013342 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013343else
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13347fi
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13350$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013351if test "$ac_cv_stat_tv_nsec" = yes
13352then
13353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013355
13356fi
13357
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013358# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13360$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013361if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013363else
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013365/* end confdefs.h. */
13366#include <sys/stat.h>
13367int
13368main ()
13369{
13370
13371struct stat st;
13372st.st_mtimespec.tv_nsec = 1;
13373
13374 ;
13375 return 0;
13376}
13377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013379 ac_cv_stat_tv_nsec2=yes
13380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13384fi
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13387$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013388if test "$ac_cv_stat_tv_nsec2" = yes
13389then
13390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013392
13393fi
13394
Jack Jansen666b1e72001-10-31 12:11:48 +000013395# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13397$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013398if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013400else
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013402/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013403#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013404int
13405main ()
13406{
Jack Jansen666b1e72001-10-31 12:11:48 +000013407
13408 int rtn;
13409 rtn = mvwdelch(0,0,0);
13410
Martin v. Löwis11437992002-04-12 09:54:03 +000013411 ;
13412 return 0;
13413}
13414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013415if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013416 ac_cv_mvwdelch_is_expression=yes
13417else
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13421fi
13422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13424$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013425
13426if test "$ac_cv_mvwdelch_is_expression" = yes
13427then
Martin v. Löwis11437992002-04-12 09:54:03 +000013428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013430
13431fi
13432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13434$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013435if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013436 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013437else
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013439/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013440#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013441int
13442main ()
13443{
Jack Jansen666b1e72001-10-31 12:11:48 +000013444
13445 WINDOW *w;
13446 w->_flags = 0;
13447
Martin v. Löwis11437992002-04-12 09:54:03 +000013448 ;
13449 return 0;
13450}
13451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013452if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013453 ac_cv_window_has_flags=yes
13454else
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13458fi
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13461$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013462
Jack Jansen666b1e72001-10-31 12:11:48 +000013463
13464if test "$ac_cv_window_has_flags" = yes
13465then
Martin v. Löwis11437992002-04-12 09:54:03 +000013466
Matthias Kloseb9621712010-04-24 17:59:49 +000013467$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013468
13469fi
13470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13472$as_echo_n "checking for is_term_resized... " >&6; }
13473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013474/* end confdefs.h. */
13475#include <curses.h>
13476int
13477main ()
13478{
13479void *x=is_term_resized
13480 ;
13481 return 0;
13482}
13483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013485
Matthias Kloseb9621712010-04-24 17:59:49 +000013486$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013487
Matthias Kloseb159a552010-04-25 21:00:44 +000013488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013489$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013490else
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13492$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013493
13494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13496
Matthias Kloseb9621712010-04-24 17:59:49 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13498$as_echo_n "checking for resize_term... " >&6; }
13499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013500/* end confdefs.h. */
13501#include <curses.h>
13502int
13503main ()
13504{
13505void *x=resize_term
13506 ;
13507 return 0;
13508}
13509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013510if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013511
Matthias Kloseb9621712010-04-24 17:59:49 +000013512$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013513
Matthias Kloseb159a552010-04-25 21:00:44 +000013514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013515$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013516else
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13518$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013519
13520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13524$as_echo_n "checking for resizeterm... " >&6; }
13525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013526/* end confdefs.h. */
13527#include <curses.h>
13528int
13529main ()
13530{
13531void *x=resizeterm
13532 ;
13533 return 0;
13534}
13535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013536if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013539
Matthias Kloseb159a552010-04-25 21:00:44 +000013540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13544$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013545
13546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13550$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013551
13552if test -r /dev/ptmx
13553then
Matthias Kloseb9621712010-04-24 17:59:49 +000013554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13555$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013556
Matthias Kloseb9621712010-04-24 17:59:49 +000013557$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013558
Thomas Wouters89f507f2006-12-13 04:49:30 +000013559else
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13561$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013562fi
13563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13565$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013566
13567if test -r /dev/ptc
13568then
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13570$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013573
Thomas Wouters89f507f2006-12-13 04:49:30 +000013574else
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13576$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013577fi
13578
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013579if test "$have_long_long" = yes
13580then
Matthias Kloseb9621712010-04-24 17:59:49 +000013581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13582$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013583 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013585else
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013587 ac_cv_have_long_long_format=no
13588else
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013590/* end confdefs.h. */
13591
13592 #include <stdio.h>
13593 #include <stddef.h>
13594 #include <string.h>
13595
13596 #ifdef HAVE_SYS_TYPES_H
13597 #include <sys/types.h>
13598 #endif
13599
13600 int main()
13601 {
13602 char buffer[256];
13603
13604 if (sprintf(buffer, "%lld", (long long)123) < 0)
13605 return 1;
13606 if (strcmp(buffer, "123"))
13607 return 1;
13608
13609 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13610 return 1;
13611 if (strcmp(buffer, "-123"))
13612 return 1;
13613
13614 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13615 return 1;
13616 if (strcmp(buffer, "123"))
13617 return 1;
13618
13619 return 0;
13620 }
13621
13622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013623if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013624 ac_cv_have_long_long_format=yes
13625else
Matthias Kloseb9621712010-04-24 17:59:49 +000013626 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013627fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013628rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13629 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013630fi
13631
13632
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013633fi
13634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13636$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013637fi
13638
Mark Dickinson89d7d412009-12-31 20:50:59 +000013639if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013640then
13641
Matthias Kloseb9621712010-04-24 17:59:49 +000013642$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013643
13644fi
13645
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013646if test $ac_sys_system = Darwin
13647then
13648 LIBS="$LIBS -framework CoreFoundation"
13649fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13652$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013653if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013655else
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013657 ac_cv_have_size_t_format="cross -- assuming yes"
13658
Thomas Wouters477c8d52006-05-27 19:21:47 +000013659else
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013661/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013662
Thomas Wouters477c8d52006-05-27 19:21:47 +000013663#include <stdio.h>
13664#include <stddef.h>
13665#include <string.h>
13666
Christian Heimes2c181612007-12-17 20:04:13 +000013667#ifdef HAVE_SYS_TYPES_H
13668#include <sys/types.h>
13669#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013670
13671#ifdef HAVE_SSIZE_T
13672typedef ssize_t Py_ssize_t;
13673#elif SIZEOF_VOID_P == SIZEOF_LONG
13674typedef long Py_ssize_t;
13675#else
13676typedef int Py_ssize_t;
13677#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013678
Christian Heimes2c181612007-12-17 20:04:13 +000013679int main()
13680{
13681 char buffer[256];
13682
Thomas Wouters477c8d52006-05-27 19:21:47 +000013683 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13684 return 1;
13685
Thomas Wouters89f507f2006-12-13 04:49:30 +000013686 if (strcmp(buffer, "123"))
13687 return 1;
13688
13689 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13690 return 1;
13691
13692 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013693 return 1;
13694
13695 return 0;
13696}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013697
Thomas Wouters477c8d52006-05-27 19:21:47 +000013698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013699if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013700 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013701else
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13705 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013706fi
13707
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13710$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013711if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013712
Matthias Kloseb9621712010-04-24 17:59:49 +000013713$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013714
13715fi
13716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013718#ifdef HAVE_SYS_TYPES_H
13719#include <sys/types.h>
13720#endif
13721#ifdef HAVE_SYS_SOCKET_H
13722#include <sys/socket.h>
13723#endif
13724
Matthias Kloseb9621712010-04-24 17:59:49 +000013725"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013726if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013727
Martin v. Löwis11437992002-04-12 09:54:03 +000013728else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013731
13732fi
13733
Michael W. Hudson54241132001-12-07 15:38:26 +000013734
Matthias Kloseb9621712010-04-24 17:59:49 +000013735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13736$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013737if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013739else
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013741 ac_cv_broken_mbstowcs=no
13742else
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013744/* end confdefs.h. */
13745
13746#include<stdlib.h>
13747int main() {
13748 size_t len = -1;
13749 const char *str = "text";
13750 len = mbstowcs(NULL, str, 0);
13751 return (len != 4);
13752}
13753
13754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013755if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013756 ac_cv_broken_mbstowcs=no
13757else
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013762fi
13763
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013764fi
13765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13767$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013768if test "$ac_cv_broken_mbstowcs" = yes
13769then
13770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013772
13773fi
13774
Antoine Pitrou042b1282010-08-13 21:15:58 +000013775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13776$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013777if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013778 $as_echo_n "(cached) " >&6
13779else
13780 if test "$cross_compiling" = yes; then :
13781 ac_cv_computed_gotos=no
13782else
13783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13784/* end confdefs.h. */
13785
13786int main(int argc, char **argv)
13787{
13788 static void *targets[1] = { &&LABEL1 };
13789 goto LABEL2;
13790LABEL1:
13791 return 0;
13792LABEL2:
13793 goto *targets[0];
13794 return 1;
13795}
13796
13797_ACEOF
13798if ac_fn_c_try_run "$LINENO"; then :
13799 ac_cv_computed_gotos=yes
13800else
13801 ac_cv_computed_gotos=no
13802fi
13803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13804 conftest.$ac_objext conftest.beam conftest.$ac_ext
13805fi
13806
13807fi
13808
13809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13810$as_echo "$ac_cv_computed_gotos" >&6; }
13811if test "$ac_cv_computed_gotos" = yes
13812then
13813
13814$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13815
13816fi
13817
Antoine Pitroub52ec782009-01-25 16:34:23 +000013818# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13820$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013821
13822# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013823if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013824 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013825if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013826then
13827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013829
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13831$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013832fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013833if test "$withval" = no
13834then
13835
13836$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13839$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013840fi
13841
Antoine Pitrou042b1282010-08-13 21:15:58 +000013842else
13843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13844$as_echo "no value specified" >&6; }
13845fi
13846
Antoine Pitroub52ec782009-01-25 16:34:23 +000013847
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013848case $ac_sys_system in
13849AIX*)
13850
13851$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13852 ;;
13853esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013854
Michael W. Hudson54241132001-12-07 15:38:26 +000013855
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013856
13857
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013858for h in `(cd $srcdir;echo Python/thread_*.h)`
13859do
13860 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13861done
13862
Michael W. Hudson54241132001-12-07 15:38:26 +000013863
Neal Norwitzd24499d2005-12-18 21:36:39 +000013864SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13866$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013867for dir in $SRCDIRS; do
13868 if test ! -d $dir; then
13869 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013870 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013871done
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13873$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013874
Guido van Rossum627b2d71993-12-24 10:39:16 +000013875# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013876ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013877
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013878ac_config_files="$ac_config_files Modules/ld_so_aix"
13879
Martin v. Löwis11437992002-04-12 09:54:03 +000013880cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013881# This file is a shell script that caches the results of configure
13882# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013883# scripts and configure runs, see configure's option --config-cache.
13884# It is not useful on other systems. If it contains results you don't
13885# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013886#
Martin v. Löwis11437992002-04-12 09:54:03 +000013887# config.status only pays attention to the cache file if you give it
13888# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013889#
Skip Montanaro6dead952003-09-25 14:50:04 +000013890# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013891# loading this file, other *unset* `ac_cv_foo' will be assigned the
13892# following values.
13893
13894_ACEOF
13895
Guido van Rossumf78abae1997-01-21 22:02:36 +000013896# The following way of writing the cache mishandles newlines in values,
13897# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013899# Ultrix sh set writes to stderr and can't be redirected directly,
13900# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901(
13902 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13903 eval ac_val=\$$ac_var
13904 case $ac_val in #(
13905 *${as_nl}*)
13906 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13908$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013909 esac
13910 case $ac_var in #(
13911 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13913 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914 esac ;;
13915 esac
13916 done
13917
Martin v. Löwis11437992002-04-12 09:54:03 +000013918 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13920 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 # `set' does not quote correctly, so add quotes: double-quote
13922 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013923 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013924 "s/'/'\\\\''/g;
13925 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 *)
13928 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013930 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931 esac |
13932 sort
13933) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013934 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13939 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13941 :end' >>confcache
13942if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13943 if test -w "$cache_file"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013944 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13946$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013947 if test ! -f "$cache_file" || test -h "$cache_file"; then
13948 cat confcache >"$cache_file"
13949 else
13950 case $cache_file in #(
13951 */* | ?:*)
13952 mv -f confcache "$cache_file"$$ &&
13953 mv -f "$cache_file"$$ "$cache_file" ;; #(
13954 *)
13955 mv -f confcache "$cache_file" ;;
13956 esac
13957 fi
13958 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013959 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13961$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013962 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013963fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013964rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013965
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013966test "x$prefix" = xNONE && prefix=$ac_default_prefix
13967# Let make expand exec_prefix.
13968test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013969
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013970DEFS=-DHAVE_CONFIG_H
13971
Skip Montanaro6dead952003-09-25 14:50:04 +000013972ac_libobjs=
13973ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013974U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013975for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13976 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013977 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13980 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13982 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013983done
13984LIBOBJS=$ac_libobjs
13985
13986LTLIBOBJS=$ac_ltlibobjs
13987
13988
Martin v. Löwis11437992002-04-12 09:54:03 +000013989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013991: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013992ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013993ac_clean_files_save=$ac_clean_files
13994ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013995{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13996$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13997as_write_fail=0
13998cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013999#! $SHELL
14000# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014001# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014002# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014003# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014004
Martin v. Löwis11437992002-04-12 09:54:03 +000014005debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014006ac_cs_recheck=false
14007ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009SHELL=\${CONFIG_SHELL-$SHELL}
14010export SHELL
14011_ASEOF
14012cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14013## -------------------- ##
14014## M4sh Initialization. ##
14015## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014017# Be more Bourne compatible
14018DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014020 emulate sh
14021 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014023 # is contrary to our usage. Disable this feature.
14024 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014026else
Matthias Kloseb9621712010-04-24 17:59:49 +000014027 case `(set -o) 2>/dev/null` in #(
14028 *posix*) :
14029 set -o posix ;; #(
14030 *) :
14031 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014032esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014034
14035
Matthias Kloseb9621712010-04-24 17:59:49 +000014036as_nl='
14037'
14038export as_nl
14039# Printing a long string crashes Solaris 7 /usr/bin/printf.
14040as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14041as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14042as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14043# Prefer a ksh shell builtin over an external printf program on Solaris,
14044# but without wasting forks for bash or zsh.
14045if test -z "$BASH_VERSION$ZSH_VERSION" \
14046 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14047 as_echo='print -r --'
14048 as_echo_n='print -rn --'
14049elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14050 as_echo='printf %s\n'
14051 as_echo_n='printf %s'
14052else
14053 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14054 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14055 as_echo_n='/usr/ucb/echo -n'
14056 else
14057 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14058 as_echo_n_body='eval
14059 arg=$1;
14060 case $arg in #(
14061 *"$as_nl"*)
14062 expr "X$arg" : "X\\(.*\\)$as_nl";
14063 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14064 esac;
14065 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14066 '
14067 export as_echo_n_body
14068 as_echo_n='sh -c $as_echo_n_body as_echo'
14069 fi
14070 export as_echo_body
14071 as_echo='sh -c $as_echo_body as_echo'
14072fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014073
14074# The user is always right.
14075if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 PATH_SEPARATOR=:
14077 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14078 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14079 PATH_SEPARATOR=';'
14080 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083
14084# IFS
14085# We need space, tab and new line, in precisely that order. Quoting is
14086# there to prevent editors from complaining about space-tab.
14087# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14088# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089IFS=" "" $as_nl"
14090
14091# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094 *[\\/]* ) as_myself=$0 ;;
14095 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014096for as_dir in $PATH
14097do
14098 IFS=$as_save_IFS
14099 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104 ;;
14105esac
14106# We did not find ourselves, most probably we were run as `sh COMMAND'
14107# in which case we are not to be found in the path.
14108if test "x$as_myself" = x; then
14109 as_myself=$0
14110fi
14111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014114fi
14115
Matthias Kloseb9621712010-04-24 17:59:49 +000014116# Unset variables that we do not need and which cause bugs (e.g. in
14117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14118# suppresses any "Segmentation fault" message there. '((' could
14119# trigger a bug in pdksh 5.2.14.
14120for as_var in BASH_ENV ENV MAIL MAILPATH
14121do eval test x\${$as_var+set} = xset \
14122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014123done
14124PS1='$ '
14125PS2='> '
14126PS4='+ '
14127
14128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014129LC_ALL=C
14130export LC_ALL
14131LANGUAGE=C
14132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133
Matthias Kloseb9621712010-04-24 17:59:49 +000014134# CDPATH.
14135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14136
14137
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014138# as_fn_error STATUS ERROR [LINENO LOG_FD]
14139# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014140# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14141# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014142# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014143as_fn_error ()
14144{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014145 as_status=$1; test $as_status -eq 0 && as_status=1
14146 if test "$4"; then
14147 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14148 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014150 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 as_fn_exit $as_status
14152} # as_fn_error
14153
14154
14155# as_fn_set_status STATUS
14156# -----------------------
14157# Set $? to STATUS, without forking.
14158as_fn_set_status ()
14159{
14160 return $1
14161} # as_fn_set_status
14162
14163# as_fn_exit STATUS
14164# -----------------
14165# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14166as_fn_exit ()
14167{
14168 set +e
14169 as_fn_set_status $1
14170 exit $1
14171} # as_fn_exit
14172
14173# as_fn_unset VAR
14174# ---------------
14175# Portably unset VAR.
14176as_fn_unset ()
14177{
14178 { eval $1=; unset $1;}
14179}
14180as_unset=as_fn_unset
14181# as_fn_append VAR VALUE
14182# ----------------------
14183# Append the text in VALUE to the end of the definition contained in VAR. Take
14184# advantage of any shell optimizations that allow amortized linear growth over
14185# repeated appends, instead of the typical quadratic growth present in naive
14186# implementations.
14187if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14188 eval 'as_fn_append ()
14189 {
14190 eval $1+=\$2
14191 }'
14192else
14193 as_fn_append ()
14194 {
14195 eval $1=\$$1\$2
14196 }
14197fi # as_fn_append
14198
14199# as_fn_arith ARG...
14200# ------------------
14201# Perform arithmetic evaluation on the ARGs, and store the result in the
14202# global $as_val. Take advantage of shells that can avoid forks. The arguments
14203# must be portable across $(()) and expr.
14204if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14205 eval 'as_fn_arith ()
14206 {
14207 as_val=$(( $* ))
14208 }'
14209else
14210 as_fn_arith ()
14211 {
14212 as_val=`expr "$@" || test $? -eq 1`
14213 }
14214fi # as_fn_arith
14215
14216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014217if expr a : '\(a\)' >/dev/null 2>&1 &&
14218 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14219 as_expr=expr
14220else
14221 as_expr=false
14222fi
14223
14224if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14225 as_basename=basename
14226else
14227 as_basename=false
14228fi
14229
Matthias Kloseb9621712010-04-24 17:59:49 +000014230if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14231 as_dirname=dirname
14232else
14233 as_dirname=false
14234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236as_me=`$as_basename -- "$0" ||
14237$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14238 X"$0" : 'X\(//\)$' \| \
14239 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014240$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241 sed '/^.*\/\([^/][^/]*\)\/*$/{
14242 s//\1/
14243 q
14244 }
14245 /^X\/\(\/\/\)$/{
14246 s//\1/
14247 q
14248 }
14249 /^X\/\(\/\).*/{
14250 s//\1/
14251 q
14252 }
14253 s/.*/./; q'`
14254
Matthias Kloseb9621712010-04-24 17:59:49 +000014255# Avoid depending upon Character Ranges.
14256as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14257as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14258as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14259as_cr_digits='0123456789'
14260as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014261
14262ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014263case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014264-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 xy) ECHO_C='\c';;
14268 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14269 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014270 esac;;
14271*)
14272 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014273esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014274
Martin v. Löwis11437992002-04-12 09:54:03 +000014275rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014276if test -d conf$$.dir; then
14277 rm -f conf$$.dir/conf$$.file
14278else
14279 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014280 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014282if (echo >conf$$.file) 2>/dev/null; then
14283 if ln -s conf$$.file conf$$ 2>/dev/null; then
14284 as_ln_s='ln -s'
14285 # ... but there are two gotchas:
14286 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14287 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14288 # In both cases, we have to default to `cp -p'.
14289 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14290 as_ln_s='cp -p'
14291 elif ln conf$$.file conf$$ 2>/dev/null; then
14292 as_ln_s=ln
14293 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014294 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014295 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014296else
14297 as_ln_s='cp -p'
14298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014299rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14300rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014301
Matthias Kloseb9621712010-04-24 17:59:49 +000014302
14303# as_fn_mkdir_p
14304# -------------
14305# Create "$as_dir" as a directory, including parents if necessary.
14306as_fn_mkdir_p ()
14307{
14308
14309 case $as_dir in #(
14310 -*) as_dir=./$as_dir;;
14311 esac
14312 test -d "$as_dir" || eval $as_mkdir_p || {
14313 as_dirs=
14314 while :; do
14315 case $as_dir in #(
14316 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14317 *) as_qdir=$as_dir;;
14318 esac
14319 as_dirs="'$as_qdir' $as_dirs"
14320 as_dir=`$as_dirname -- "$as_dir" ||
14321$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14322 X"$as_dir" : 'X\(//\)[^/]' \| \
14323 X"$as_dir" : 'X\(//\)$' \| \
14324 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14325$as_echo X"$as_dir" |
14326 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14327 s//\1/
14328 q
14329 }
14330 /^X\(\/\/\)[^/].*/{
14331 s//\1/
14332 q
14333 }
14334 /^X\(\/\/\)$/{
14335 s//\1/
14336 q
14337 }
14338 /^X\(\/\).*/{
14339 s//\1/
14340 q
14341 }
14342 s/.*/./; q'`
14343 test -d "$as_dir" && break
14344 done
14345 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014346 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014347
14348
14349} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014350if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014351 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014352else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014353 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014354 as_mkdir_p=false
14355fi
14356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014357if test -x / >/dev/null 2>&1; then
14358 as_test_x='test -x'
14359else
14360 if ls -dL / >/dev/null 2>&1; then
14361 as_ls_L_option=L
14362 else
14363 as_ls_L_option=
14364 fi
14365 as_test_x='
14366 eval sh -c '\''
14367 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014368 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 case $1 in #(
14371 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014372 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014373 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374 ???[sx]*):;;*)false;;esac;fi
14375 '\'' sh
14376 '
14377fi
14378as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014379
14380# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014381as_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 +000014382
14383# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014384as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014385
14386
Martin v. Löwis11437992002-04-12 09:54:03 +000014387exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014388## ----------------------------------- ##
14389## Main body of $CONFIG_STATUS script. ##
14390## ----------------------------------- ##
14391_ASEOF
14392test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014393
Matthias Kloseb9621712010-04-24 17:59:49 +000014394cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14395# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014396# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014397# values after options handling.
14398ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014399This file was extended by python $as_me 3.3, which was
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014400generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014401
14402 CONFIG_FILES = $CONFIG_FILES
14403 CONFIG_HEADERS = $CONFIG_HEADERS
14404 CONFIG_LINKS = $CONFIG_LINKS
14405 CONFIG_COMMANDS = $CONFIG_COMMANDS
14406 $ $0 $@
14407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014408on `(hostname || uname -n) 2>/dev/null | sed 1q`
14409"
14410
Martin v. Löwis11437992002-04-12 09:54:03 +000014411_ACEOF
14412
Matthias Kloseb9621712010-04-24 17:59:49 +000014413case $ac_config_files in *"
14414"*) set x $ac_config_files; shift; ac_config_files=$*;;
14415esac
14416
14417case $ac_config_headers in *"
14418"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14419esac
14420
14421
14422cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014423# Files that config.status was made for.
Benjamin Peterson94b580d2011-08-02 17:30:04 -050014424config_files="$ac_config_files"
14425config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014427_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014428
Matthias Kloseb9621712010-04-24 17:59:49 +000014429cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014430ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014431\`$as_me' instantiates files and other configuration actions
14432from templates according to the current configuration. Unless the files
14433and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
Matthias Kloseb9621712010-04-24 17:59:49 +000014435Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014436
14437 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014439 --config print configuration, then exit
14440 -q, --quiet, --silent
14441 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014442 -d, --debug don't remove temporary files
14443 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 --file=FILE[:TEMPLATE]
14445 instantiate the configuration file FILE
14446 --header=FILE[:TEMPLATE]
14447 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014448
14449Configuration files:
14450$config_files
14451
14452Configuration headers:
14453$config_headers
14454
Matthias Kloseb9621712010-04-24 17:59:49 +000014455Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014458cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14459ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014460ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014461python config.status 3.3
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014462configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014464
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014465Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014466This config.status script is free software; the Free Software Foundation
14467gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014468
14469ac_pwd='$ac_pwd'
14470srcdir='$srcdir'
14471INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014472test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014473_ACEOF
14474
Matthias Kloseb9621712010-04-24 17:59:49 +000014475cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14476# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014477ac_need_defaults=:
14478while test $# != 0
14479do
14480 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014481 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014482 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14483 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014484 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014486 --*=)
14487 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14488 ac_optarg=
14489 ac_shift=:
14490 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014491 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014492 ac_option=$1
14493 ac_optarg=$2
14494 ac_shift=shift
14495 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014496 esac
14497
Skip Montanaro6dead952003-09-25 14:50:04 +000014498 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014500 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14501 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014502 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014503 $as_echo "$ac_cs_version"; exit ;;
14504 --config | --confi | --conf | --con | --co | --c )
14505 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014507 debug=: ;;
14508 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014509 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 case $ac_optarg in
14511 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014512 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014513 esac
14514 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014515 ac_need_defaults=false;;
14516 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014517 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 case $ac_optarg in
14519 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14520 esac
14521 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014522 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014523 --he | --h)
14524 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014525 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014526Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014527 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014528 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014529 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14530 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14531 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014532
14533 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014534 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014535Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014536
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014539
14540 esac
14541 shift
14542done
14543
Skip Montanaro6dead952003-09-25 14:50:04 +000014544ac_configure_extra_args=
14545
14546if $ac_cs_silent; then
14547 exec 6>/dev/null
14548 ac_configure_extra_args="$ac_configure_extra_args --silent"
14549fi
14550
14551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014552cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014553if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014554 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14555 shift
14556 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14557 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014560fi
14561
Martin v. Löwis11437992002-04-12 09:54:03 +000014562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014563cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564exec 5>>config.log
14565{
14566 echo
14567 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14568## Running $as_me. ##
14569_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014574cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014576
Matthias Kloseb9621712010-04-24 17:59:49 +000014577cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014578
14579# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014580for ac_config_target in $ac_config_targets
14581do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014582 case $ac_config_target in
14583 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14584 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14585 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014586 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14587 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14589 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014590 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014591 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014592
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014593 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014594 esac
14595done
14596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014597
Martin v. Löwis11437992002-04-12 09:54:03 +000014598# If the user did not use the arguments to specify the items to instantiate,
14599# then the envvar interface is used. Set only those that are not.
14600# We use the long form for the default assignment because of an extremely
14601# bizarre bug on SunOS 4.1.3.
14602if $ac_need_defaults; then
14603 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14604 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14605fi
14606
Skip Montanaro6dead952003-09-25 14:50:04 +000014607# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014609# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610# Hook for its removal unless debugging.
14611# Note that there is a small window in which the directory will not be cleaned:
14612# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014613$debug ||
14614{
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014615 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616 trap 'exit_status=$?
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014617 : "${ac_tmp:=$tmp}"
14618 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014621}
Martin v. Löwis11437992002-04-12 09:54:03 +000014622# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014623
Martin v. Löwis11437992002-04-12 09:54:03 +000014624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014626 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014627} ||
14628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629 tmp=./conf$$-$RANDOM
14630 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014631} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014632ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014633
Matthias Kloseb9621712010-04-24 17:59:49 +000014634# Set up the scripts for CONFIG_FILES section.
14635# No need to generate them if there are no CONFIG_FILES.
14636# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014638
Matthias Kloseb9621712010-04-24 17:59:49 +000014639
14640ac_cr=`echo X | tr X '\015'`
14641# On cygwin, bash can eat \r inside `` if the user requested igncr.
14642# But we know of no other shell where ac_cr would be empty at this
14643# point, so we can use a bashism as a fallback.
14644if test "x$ac_cr" = x; then
14645 eval ac_cr=\$\'\\r\'
14646fi
14647ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14648if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014649 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014650else
14651 ac_cs_awk_cr=$ac_cr
14652fi
14653
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014654echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014655_ACEOF
14656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658{
14659 echo "cat >conf$$subs.awk <<_ACEOF" &&
14660 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14661 echo "_ACEOF"
14662} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014663 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14664ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014665ac_delim='%!_!# '
14666for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014667 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014668 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669
Matthias Kloseb9621712010-04-24 17:59:49 +000014670 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14671 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014672 break
14673 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014674 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014675 else
14676 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014677 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678done
Matthias Kloseb9621712010-04-24 17:59:49 +000014679rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680
Matthias Kloseb9621712010-04-24 17:59:49 +000014681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014682cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014684sed -n '
14685h
14686s/^/S["/; s/!.*/"]=/
14687p
14688g
14689s/^[^!]*!//
14690:repl
14691t repl
14692s/'"$ac_delim"'$//
14693t delim
14694:nl
14695h
14696s/\(.\{148\}\)..*/\1/
14697t more1
14698s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14699p
14700n
14701b repl
14702:more1
14703s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14704p
14705g
14706s/.\{148\}//
14707t nl
14708:delim
14709h
14710s/\(.\{148\}\)..*/\1/
14711t more2
14712s/["\\]/\\&/g; s/^/"/; s/$/"/
14713p
14714b
14715:more2
14716s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14717p
14718g
14719s/.\{148\}//
14720t delim
14721' <conf$$subs.awk | sed '
14722/^[^""]/{
14723 N
14724 s/\n//
14725}
14726' >>$CONFIG_STATUS || ac_write_fail=1
14727rm -f conf$$subs.awk
14728cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14729_ACAWK
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014730cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 for (key in S) S_is_set[key] = 1
14732 FS = ""
14733
14734}
14735{
14736 line = $ 0
14737 nfields = split(line, field, "@")
14738 substed = 0
14739 len = length(field[1])
14740 for (i = 2; i < nfields; i++) {
14741 key = field[i]
14742 keylen = length(key)
14743 if (S_is_set[key]) {
14744 value = S[key]
14745 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14746 len += length(value) + length(field[++i])
14747 substed = 1
14748 } else
14749 len += 1 + keylen
14750 }
14751
14752 print line
14753}
14754
14755_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014757cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14758if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14759 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14760else
14761 cat
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014762fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014763 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014764_ACEOF
14765
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014766# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14767# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014768# trailing colons and then remove the whole line if VPATH becomes empty
14769# (actually we leave an empty line to preserve line numbers).
14770if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014771 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14772h
14773s///
14774s/^/:/
14775s/[ ]*$/:/
14776s/:\$(srcdir):/:/g
14777s/:\${srcdir}:/:/g
14778s/:@srcdir@:/:/g
14779s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014780s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014781x
14782s/\(=[ ]*\).*/\1/
14783G
14784s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014785s/^[^=]*=[ ]*$//
14786}'
14787fi
14788
Matthias Kloseb9621712010-04-24 17:59:49 +000014789cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014790fi # test -n "$CONFIG_FILES"
14791
Matthias Kloseb9621712010-04-24 17:59:49 +000014792# Set up the scripts for CONFIG_HEADERS section.
14793# No need to generate them if there are no CONFIG_HEADERS.
14794# This happens for instance with `./config.status Makefile'.
14795if test -n "$CONFIG_HEADERS"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014796cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014797BEGIN {
14798_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014799
Matthias Kloseb9621712010-04-24 17:59:49 +000014800# Transform confdefs.h into an awk script `defines.awk', embedded as
14801# here-document in config.status, that substitutes the proper values into
14802# config.h.in to produce config.h.
14803
14804# Create a delimiter string that does not exist in confdefs.h, to ease
14805# handling of long lines.
14806ac_delim='%!_!# '
14807for ac_last_try in false false :; do
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014808 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14809 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 break
14811 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014812 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 else
14814 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14815 fi
14816done
14817
14818# For the awk script, D is an array of macro values keyed by name,
14819# likewise P contains macro parameters if any. Preserve backslash
14820# newline sequences.
14821
14822ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14823sed -n '
14824s/.\{148\}/&'"$ac_delim"'/g
14825t rset
14826:rset
14827s/^[ ]*#[ ]*define[ ][ ]*/ /
14828t def
14829d
14830:def
14831s/\\$//
14832t bsnl
14833s/["\\]/\\&/g
14834s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14835D["\1"]=" \3"/p
14836s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14837d
14838:bsnl
14839s/["\\]/\\&/g
14840s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14841D["\1"]=" \3\\\\\\n"\\/p
14842t cont
14843s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14844t cont
14845d
14846:cont
14847n
14848s/.\{148\}/&'"$ac_delim"'/g
14849t clear
14850:clear
14851s/\\$//
14852t bsnlc
14853s/["\\]/\\&/g; s/^/"/; s/$/"/p
14854d
14855:bsnlc
14856s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14857b cont
14858' <confdefs.h | sed '
14859s/'"$ac_delim"'/"\\\
14860"/g' >>$CONFIG_STATUS || ac_write_fail=1
14861
14862cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14863 for (key in D) D_is_set[key] = 1
14864 FS = ""
14865}
14866/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14867 line = \$ 0
14868 split(line, arg, " ")
14869 if (arg[1] == "#") {
14870 defundef = arg[2]
14871 mac1 = arg[3]
14872 } else {
14873 defundef = substr(arg[1], 2)
14874 mac1 = arg[2]
14875 }
14876 split(mac1, mac2, "(") #)
14877 macro = mac2[1]
14878 prefix = substr(line, 1, index(line, defundef) - 1)
14879 if (D_is_set[macro]) {
14880 # Preserve the white space surrounding the "#".
14881 print prefix "define", macro P[macro] D[macro]
14882 next
14883 } else {
14884 # Replace #undef with comments. This is necessary, for example,
14885 # in the case of _POSIX_SOURCE, which is predefined and required
14886 # on some systems where configure will not decide to define it.
14887 if (defundef == "undef") {
14888 print "/*", prefix defundef, macro, "*/"
14889 next
14890 }
14891 }
14892}
14893{ print }
14894_ACAWK
14895_ACEOF
14896cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014897 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014898fi # test -n "$CONFIG_HEADERS"
14899
14900
14901eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14902shift
14903for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904do
14905 case $ac_tag in
14906 :[FHLC]) ac_mode=$ac_tag; continue;;
14907 esac
14908 case $ac_mode$ac_tag in
14909 :[FHL]*:*);;
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014910 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911 :[FH]-) ac_tag=-:-;;
14912 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14913 esac
14914 ac_save_IFS=$IFS
14915 IFS=:
14916 set x $ac_tag
14917 IFS=$ac_save_IFS
14918 shift
14919 ac_file=$1
14920 shift
14921
14922 case $ac_mode in
14923 :L) ac_source=$1;;
14924 :[FH])
14925 ac_file_inputs=
14926 for ac_f
14927 do
14928 case $ac_f in
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014929 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930 *) # Look for the file first in the build tree, then in the source tree
14931 # (if the path is not absolute). The absolute path cannot be DOS-style,
14932 # because $ac_f cannot contain `:'.
14933 test -f "$ac_f" ||
14934 case $ac_f in
14935 [\\/$]*) false;;
14936 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14937 esac ||
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014938 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14941 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942 done
14943
14944 # Let's still pretend it is `configure' which instantiates (i.e., don't
14945 # use $as_me), people would be surprised to read:
14946 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014947 configure_input='Generated from '`
14948 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14949 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950 if test x"$ac_file" != x-; then
14951 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14953$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014955 # Neutralize special characters interpreted by sed in replacement strings.
14956 case $configure_input in #(
14957 *\&* | *\|* | *\\* )
14958 ac_sed_conf_input=`$as_echo "$configure_input" |
14959 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14960 *) ac_sed_conf_input=$configure_input;;
14961 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962
14963 case $ac_tag in
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014964 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14965 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014966 esac
14967 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014968 esac
14969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014971$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014972 X"$ac_file" : 'X\(//\)[^/]' \| \
14973 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014974 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014975$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14977 s//\1/
14978 q
14979 }
14980 /^X\(\/\/\)[^/].*/{
14981 s//\1/
14982 q
14983 }
14984 /^X\(\/\/\)$/{
14985 s//\1/
14986 q
14987 }
14988 /^X\(\/\).*/{
14989 s//\1/
14990 q
14991 }
14992 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014993 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 ac_builddir=.
14995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996case "$ac_dir" in
14997.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14998*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 case $ac_top_builddir_sub in
15003 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15004 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15005 esac ;;
15006esac
15007ac_abs_top_builddir=$ac_pwd
15008ac_abs_builddir=$ac_pwd$ac_dir_suffix
15009# for backward compatibility:
15010ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015011
15012case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 ac_top_srcdir=$ac_top_builddir_sub
15016 ac_abs_top_srcdir=$ac_pwd ;;
15017 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015018 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019 ac_top_srcdir=$srcdir
15020 ac_abs_top_srcdir=$srcdir ;;
15021 *) # Relative name.
15022 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15023 ac_top_srcdir=$ac_top_build_prefix$srcdir
15024 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015025esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015027
Martin v. Löwis11437992002-04-12 09:54:03 +000015028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029 case $ac_mode in
15030 :F)
15031 #
15032 # CONFIG_FILE
15033 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015034
15035 case $INSTALL in
15036 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015039_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040
Matthias Kloseb9621712010-04-24 17:59:49 +000015041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015042# If the template does not know about datarootdir, expand it.
15043# FIXME: This hack should be removed a few years after 2.60.
15044ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015045ac_sed_dataroot='
15046/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015047 p
15048 q
15049}
15050/@datadir@/p
15051/@docdir@/p
15052/@infodir@/p
15053/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015054/@mandir@/p'
15055case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056*datarootdir*) ac_datarootdir_seen=yes;;
15057*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015058 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15059$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062 ac_datarootdir_hack='
15063 s&@datadir@&$datadir&g
15064 s&@docdir@&$docdir&g
15065 s&@infodir@&$infodir&g
15066 s&@localedir@&$localedir&g
15067 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015068 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015069esac
15070_ACEOF
15071
15072# Neutralize VPATH when `$srcdir' = `.'.
15073# Shell code in configure.ac might set extrasub.
15074# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015075cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15076ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015077$extrasub
15078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015079cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015080:t
15081/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015082s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015084s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085s&@srcdir@&$ac_srcdir&;t t
15086s&@abs_srcdir@&$ac_abs_srcdir&;t t
15087s&@top_srcdir@&$ac_top_srcdir&;t t
15088s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15089s&@builddir@&$ac_builddir&;t t
15090s&@abs_builddir@&$ac_abs_builddir&;t t
15091s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15092s&@INSTALL@&$ac_INSTALL&;t t
15093$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015094"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015095eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15096 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015098test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015099 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15100 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15101 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015102 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015103which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015104$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015105which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015106
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015107 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 case $ac_file in
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015109 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15110 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015112 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113 ;;
15114 :H)
15115 #
15116 # CONFIG_HEADER
15117 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015118 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 {
15120 $as_echo "/* $configure_input */" \
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015121 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15122 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015123 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015124 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15126$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015127 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 rm -f "$ac_file"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015129 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015130 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 fi
15132 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 $as_echo "/* $configure_input */" \
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015134 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015135 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139
15140 esac
15141
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015142
15143 case $ac_file$ac_mode in
15144 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15145
15146 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147done # for ac_tag
15148
Guido van Rossum627b2d71993-12-24 10:39:16 +000015149
Matthias Kloseb9621712010-04-24 17:59:49 +000015150as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015151_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015152ac_clean_files=$ac_clean_files_save
15153
Matthias Kloseb9621712010-04-24 17:59:49 +000015154test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015155 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015156
Martin v. Löwis11437992002-04-12 09:54:03 +000015157
15158# configure is writing to config.log, and then calls config.status.
15159# config.status does its own redirection, appending to config.log.
15160# Unfortunately, on DOS this fails, as config.log is still kept open
15161# by configure, so config.status won't be able to write to it; its
15162# output is simply discarded. So we exec the FD to /dev/null,
15163# effectively closing config.log, so it can be properly (re)opened and
15164# appended to by config.status. When coming back to configure, we
15165# need to make the FD available again.
15166if test "$no_create" != yes; then
15167 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015168 ac_config_status_args=
15169 test "$silent" = yes &&
15170 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015171 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015172 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 exec 5>>config.log
15174 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15175 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015176 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015177fi
15178if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15180$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015181fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015182
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015183
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015184echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015185if test ! -f Modules/Setup
15186then
15187 cp $srcdir/Modules/Setup.dist Modules/Setup
15188fi
15189
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015190echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015191if test ! -f Modules/Setup.local
15192then
15193 echo "# Edit this file for local setup changes" >Modules/Setup.local
15194fi
15195
15196echo "creating Makefile"
15197$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15198 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015199 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015200mv config.c Modules