blob: efebf4131afe1cc53a29a1b8831402c995bfdda6 [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
Matthias Kloseb9621712010-04-24 17:59:49 +0000770with_computed_gotos
771'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000772 ac_precious_vars='build_alias
773host_alias
774target_alias
775CC
776CFLAGS
777LDFLAGS
778LIBS
779CPPFLAGS
Martin v. Löwisd63a3b82011-09-28 07:41:54 +0200780CPP
781CPPFLAGS'
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
Antoine Pitrou042b1282010-08-13 21:15:58 +00001441 --with(out)-computed-gotos
1442 Use computed gotos in evaluation loop (enabled by
1443 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001444
1445Some influential environment variables:
1446 CC C compiler command
1447 CFLAGS C compiler flags
1448 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1449 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 CPP C preprocessor
1454
1455Use these variables to override the choices made by `configure' or to help
1456it to find libraries and programs with nonstandard names/locations.
1457
Georg Brandle2e15612009-05-20 18:25:10 +00001458Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001461fi
1462
1463if test "$ac_init_help" = "recursive"; then
1464 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001466 test -d "$ac_dir" ||
1467 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1468 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 ac_builddir=.
1470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471case "$ac_dir" in
1472.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1473*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001476 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 case $ac_top_builddir_sub in
1478 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1479 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1480 esac ;;
1481esac
1482ac_abs_top_builddir=$ac_pwd
1483ac_abs_builddir=$ac_pwd$ac_dir_suffix
1484# for backward compatibility:
1485ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001486
1487case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001488 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001489 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490 ac_top_srcdir=$ac_top_builddir_sub
1491 ac_abs_top_srcdir=$ac_pwd ;;
1492 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 ac_top_srcdir=$srcdir
1495 ac_abs_top_srcdir=$srcdir ;;
1496 *) # Relative name.
1497 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1498 ac_top_srcdir=$ac_top_build_prefix$srcdir
1499 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001500esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503 cd "$ac_dir" || { ac_status=$?; continue; }
1504 # Check for guested configure.
1505 if test -f "$ac_srcdir/configure.gnu"; then
1506 echo &&
1507 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1508 elif test -f "$ac_srcdir/configure"; then
1509 echo &&
1510 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001511 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001512 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513 fi || ac_status=$?
1514 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 done
1516fi
1517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001519if $ac_init_version; then
1520 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001521python configure 3.3
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001522generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001523
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001524Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001525This configure script is free software; the Free Software Foundation
1526gives unlimited permission to copy, distribute and modify it.
1527_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001530
1531## ------------------------ ##
1532## Autoconf initialization. ##
1533## ------------------------ ##
1534
1535# ac_fn_c_try_compile LINENO
1536# --------------------------
1537# Try to compile conftest.$ac_ext, and return whether this succeeded.
1538ac_fn_c_try_compile ()
1539{
1540 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1541 rm -f conftest.$ac_objext
1542 if { { ac_try="$ac_compile"
1543case "(($ac_try" in
1544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1545 *) ac_try_echo=$ac_try;;
1546esac
1547eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1548$as_echo "$ac_try_echo"; } >&5
1549 (eval "$ac_compile") 2>conftest.err
1550 ac_status=$?
1551 if test -s conftest.err; then
1552 grep -v '^ *+' conftest.err >conftest.er1
1553 cat conftest.er1 >&5
1554 mv -f conftest.er1 conftest.err
1555 fi
1556 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1557 test $ac_status = 0; } && {
1558 test -z "$ac_c_werror_flag" ||
1559 test ! -s conftest.err
1560 } && test -s conftest.$ac_objext; then :
1561 ac_retval=0
1562else
1563 $as_echo "$as_me: failed program was:" >&5
1564sed 's/^/| /' conftest.$ac_ext >&5
1565
1566 ac_retval=1
1567fi
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001568 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 as_fn_set_status $ac_retval
1570
1571} # ac_fn_c_try_compile
1572
Matthias Kloseb9621712010-04-24 17:59:49 +00001573# ac_fn_c_try_link LINENO
1574# -----------------------
1575# Try to link conftest.$ac_ext, and return whether this succeeded.
1576ac_fn_c_try_link ()
1577{
1578 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1579 rm -f conftest.$ac_objext conftest$ac_exeext
1580 if { { ac_try="$ac_link"
1581case "(($ac_try" in
1582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1583 *) ac_try_echo=$ac_try;;
1584esac
1585eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1586$as_echo "$ac_try_echo"; } >&5
1587 (eval "$ac_link") 2>conftest.err
1588 ac_status=$?
1589 if test -s conftest.err; then
1590 grep -v '^ *+' conftest.err >conftest.er1
1591 cat conftest.er1 >&5
1592 mv -f conftest.er1 conftest.err
1593 fi
1594 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1595 test $ac_status = 0; } && {
1596 test -z "$ac_c_werror_flag" ||
1597 test ! -s conftest.err
1598 } && test -s conftest$ac_exeext && {
1599 test "$cross_compiling" = yes ||
1600 $as_test_x conftest$ac_exeext
1601 }; then :
1602 ac_retval=0
1603else
1604 $as_echo "$as_me: failed program was:" >&5
1605sed 's/^/| /' conftest.$ac_ext >&5
1606
1607 ac_retval=1
1608fi
1609 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1610 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1611 # interfere with the next link command; also delete a directory that is
1612 # left behind by Apple's compiler. We do this before executing the actions.
1613 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001614 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 as_fn_set_status $ac_retval
1616
1617} # ac_fn_c_try_link
1618
Matthias Kloseb9621712010-04-24 17:59:49 +00001619# ac_fn_c_try_cpp LINENO
1620# ----------------------
1621# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1622ac_fn_c_try_cpp ()
1623{
1624 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1625 if { { ac_try="$ac_cpp conftest.$ac_ext"
1626case "(($ac_try" in
1627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1628 *) ac_try_echo=$ac_try;;
1629esac
1630eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1631$as_echo "$ac_try_echo"; } >&5
1632 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1633 ac_status=$?
1634 if test -s conftest.err; then
1635 grep -v '^ *+' conftest.err >conftest.er1
1636 cat conftest.er1 >&5
1637 mv -f conftest.er1 conftest.err
1638 fi
1639 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001640 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001641 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1642 test ! -s conftest.err
1643 }; then :
1644 ac_retval=0
1645else
1646 $as_echo "$as_me: failed program was:" >&5
1647sed 's/^/| /' conftest.$ac_ext >&5
1648
1649 ac_retval=1
1650fi
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001651 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001652 as_fn_set_status $ac_retval
1653
1654} # ac_fn_c_try_cpp
1655
1656# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1657# -------------------------------------------------------
1658# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1659# the include files in INCLUDES and setting the cache variable VAR
1660# accordingly.
1661ac_fn_c_check_header_mongrel ()
1662{
1663 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001664 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1666$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001667if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001668 $as_echo_n "(cached) " >&6
1669fi
1670eval ac_res=\$$3
1671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1672$as_echo "$ac_res" >&6; }
1673else
1674 # Is the header compilable?
1675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1676$as_echo_n "checking $2 usability... " >&6; }
1677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1678/* end confdefs.h. */
1679$4
1680#include <$2>
1681_ACEOF
1682if ac_fn_c_try_compile "$LINENO"; then :
1683 ac_header_compiler=yes
1684else
1685 ac_header_compiler=no
1686fi
1687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1689$as_echo "$ac_header_compiler" >&6; }
1690
1691# Is the header present?
1692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1693$as_echo_n "checking $2 presence... " >&6; }
1694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1695/* end confdefs.h. */
1696#include <$2>
1697_ACEOF
1698if ac_fn_c_try_cpp "$LINENO"; then :
1699 ac_header_preproc=yes
1700else
1701 ac_header_preproc=no
1702fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001703rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1705$as_echo "$ac_header_preproc" >&6; }
1706
1707# So? What about this header?
1708case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1709 yes:no: )
1710 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1711$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1713$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1714 ;;
1715 no:yes:* )
1716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1717$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1719$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1721$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1723$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1725$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001726( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001727## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001728## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001729 ) | sed "s/^/$as_me: WARNING: /" >&2
1730 ;;
1731esac
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1733$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001734if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001735 $as_echo_n "(cached) " >&6
1736else
1737 eval "$3=\$ac_header_compiler"
1738fi
1739eval ac_res=\$$3
1740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1741$as_echo "$ac_res" >&6; }
1742fi
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001743 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001744
1745} # ac_fn_c_check_header_mongrel
1746
1747# ac_fn_c_try_run LINENO
1748# ----------------------
1749# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1750# that executables *can* be run.
1751ac_fn_c_try_run ()
1752{
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 if { { ac_try="$ac_link"
1755case "(($ac_try" in
1756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757 *) ac_try_echo=$ac_try;;
1758esac
1759eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1760$as_echo "$ac_try_echo"; } >&5
1761 (eval "$ac_link") 2>&5
1762 ac_status=$?
1763 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1764 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1765 { { case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770$as_echo "$ac_try_echo"; } >&5
1771 (eval "$ac_try") 2>&5
1772 ac_status=$?
1773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1774 test $ac_status = 0; }; }; then :
1775 ac_retval=0
1776else
1777 $as_echo "$as_me: program exited with status $ac_status" >&5
1778 $as_echo "$as_me: failed program was:" >&5
1779sed 's/^/| /' conftest.$ac_ext >&5
1780
1781 ac_retval=$ac_status
1782fi
1783 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001784 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001785 as_fn_set_status $ac_retval
1786
1787} # ac_fn_c_try_run
1788
1789# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1790# -------------------------------------------------------
1791# Tests whether HEADER exists and can be compiled using the include files in
1792# INCLUDES, setting the cache variable VAR accordingly.
1793ac_fn_c_check_header_compile ()
1794{
1795 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1797$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001798if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001799 $as_echo_n "(cached) " >&6
1800else
1801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1802/* end confdefs.h. */
1803$4
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_compile "$LINENO"; then :
1807 eval "$3=yes"
1808else
1809 eval "$3=no"
1810fi
1811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1812fi
1813eval ac_res=\$$3
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1815$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001816 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001817
1818} # ac_fn_c_check_header_compile
1819
Matthias Kloseb9621712010-04-24 17:59:49 +00001820# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1821# -------------------------------------------
1822# Tests whether TYPE exists after having included INCLUDES, setting cache
1823# variable VAR accordingly.
1824ac_fn_c_check_type ()
1825{
1826 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1828$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001829if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001830 $as_echo_n "(cached) " >&6
1831else
1832 eval "$3=no"
1833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834/* end confdefs.h. */
1835$4
1836int
1837main ()
1838{
1839if (sizeof ($2))
1840 return 0;
1841 ;
1842 return 0;
1843}
1844_ACEOF
1845if ac_fn_c_try_compile "$LINENO"; then :
1846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847/* end confdefs.h. */
1848$4
1849int
1850main ()
1851{
1852if (sizeof (($2)))
1853 return 0;
1854 ;
1855 return 0;
1856}
1857_ACEOF
1858if ac_fn_c_try_compile "$LINENO"; then :
1859
1860else
1861 eval "$3=yes"
1862fi
1863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001870 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001871
1872} # ac_fn_c_check_type
1873
1874# ac_fn_c_find_uintX_t LINENO BITS VAR
1875# ------------------------------------
1876# Finds an unsigned integer type with width BITS, setting cache variable VAR
1877# accordingly.
1878ac_fn_c_find_uintX_t ()
1879{
1880 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1882$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001883if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001884 $as_echo_n "(cached) " >&6
1885else
1886 eval "$3=no"
1887 # Order is important - never check a type that is potentially smaller
1888 # than half of the expected target width.
1889 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1890 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$ac_includes_default
1894int
1895main ()
1896{
1897static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1898test_array [0] = 0
1899
1900 ;
1901 return 0;
1902}
1903_ACEOF
1904if ac_fn_c_try_compile "$LINENO"; then :
1905 case $ac_type in #(
1906 uint$2_t) :
1907 eval "$3=yes" ;; #(
1908 *) :
1909 eval "$3=\$ac_type" ;;
1910esac
1911fi
1912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001913 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001914
1915else
1916 break
1917fi
1918 done
1919fi
1920eval ac_res=\$$3
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1922$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001923 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001924
1925} # ac_fn_c_find_uintX_t
1926
1927# ac_fn_c_find_intX_t LINENO BITS VAR
1928# -----------------------------------
1929# Finds a signed integer type with width BITS, setting cache variable VAR
1930# accordingly.
1931ac_fn_c_find_intX_t ()
1932{
1933 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1935$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001936if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001937 $as_echo_n "(cached) " >&6
1938else
1939 eval "$3=no"
1940 # Order is important - never check a type that is potentially smaller
1941 # than half of the expected target width.
1942 for ac_type in int$2_t 'int' 'long int' \
1943 'long long int' 'short int' 'signed char'; do
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001947 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001948int
1949main ()
1950{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001951static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001952test_array [0] = 0
1953
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001962 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001963int
1964main ()
1965{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001966static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001967 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1968test_array [0] = 0
1969
1970 ;
1971 return 0;
1972}
1973_ACEOF
1974if ac_fn_c_try_compile "$LINENO"; then :
1975
1976else
1977 case $ac_type in #(
1978 int$2_t) :
1979 eval "$3=yes" ;; #(
1980 *) :
1981 eval "$3=\$ac_type" ;;
1982esac
1983fi
1984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001987 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989else
1990 break
1991fi
1992 done
1993fi
1994eval ac_res=\$$3
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001998
1999} # ac_fn_c_find_intX_t
2000
2001# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2002# --------------------------------------------
2003# Tries to find the compile-time value of EXPR in a program that includes
2004# INCLUDES, setting VAR accordingly. Returns whether the value could be
2005# computed
2006ac_fn_c_compute_int ()
2007{
2008 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2009 if test "$cross_compiling" = yes; then
2010 # Depending upon the size, compute the lo and hi bounds.
2011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014int
2015main ()
2016{
2017static int test_array [1 - 2 * !(($2) >= 0)];
2018test_array [0] = 0
2019
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025 ac_lo=0 ac_mid=0
2026 while :; do
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$4
2030int
2031main ()
2032{
2033static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2034test_array [0] = 0
2035
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040if ac_fn_c_try_compile "$LINENO"; then :
2041 ac_hi=$ac_mid; break
2042else
2043 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2044 if test $ac_lo -le $ac_mid; then
2045 ac_lo= ac_hi=
2046 break
2047 fi
2048 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2049fi
2050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2051 done
2052else
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) < 0)];
2060test_array [0] = 0
2061
2062 ;
2063 return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_compile "$LINENO"; then :
2067 ac_hi=-1 ac_mid=-1
2068 while :; do
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072int
2073main ()
2074{
2075static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2076test_array [0] = 0
2077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_lo=$ac_mid; break
2084else
2085 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2086 if test $ac_mid -le $ac_hi; then
2087 ac_lo= ac_hi=
2088 break
2089 fi
2090 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093 done
2094else
2095 ac_lo= ac_hi=
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100# Binary search between lo and hi bounds.
2101while test "x$ac_lo" != "x$ac_hi"; do
2102 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2110test_array [0] = 0
2111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_hi=$ac_mid
2118else
2119 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122done
2123case $ac_lo in #((
2124?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2125'') ac_retval=1 ;;
2126esac
2127 else
2128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129/* end confdefs.h. */
2130$4
2131static long int longval () { return $2; }
2132static unsigned long int ulongval () { return $2; }
2133#include <stdio.h>
2134#include <stdlib.h>
2135int
2136main ()
2137{
2138
2139 FILE *f = fopen ("conftest.val", "w");
2140 if (! f)
2141 return 1;
2142 if (($2) < 0)
2143 {
2144 long int i = longval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%ld", i);
2148 }
2149 else
2150 {
2151 unsigned long int i = ulongval ();
2152 if (i != ($2))
2153 return 1;
2154 fprintf (f, "%lu", i);
2155 }
2156 /* Do not output a trailing newline, as this causes \r\n confusion
2157 on some platforms. */
2158 return ferror (f) || fclose (f) != 0;
2159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_run "$LINENO"; then :
2165 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2166else
2167 ac_retval=1
2168fi
2169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2170 conftest.$ac_objext conftest.beam conftest.$ac_ext
2171rm -f conftest.val
2172
2173 fi
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002174 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 as_fn_set_status $ac_retval
2176
2177} # ac_fn_c_compute_int
2178
2179# ac_fn_c_check_func LINENO FUNC VAR
2180# ----------------------------------
2181# Tests whether FUNC exists, setting the cache variable VAR accordingly
2182ac_fn_c_check_func ()
2183{
2184 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2186$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002187if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002188 $as_echo_n "(cached) " >&6
2189else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2193 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2194#define $2 innocuous_$2
2195
2196/* System header to define __stub macros and hopefully few prototypes,
2197 which can conflict with char $2 (); below.
2198 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2199 <limits.h> exists even on freestanding compilers. */
2200
2201#ifdef __STDC__
2202# include <limits.h>
2203#else
2204# include <assert.h>
2205#endif
2206
2207#undef $2
2208
2209/* Override any GCC internal prototype to avoid an error.
2210 Use char because int might match the return type of a GCC
2211 builtin and then its argument prototype would still apply. */
2212#ifdef __cplusplus
2213extern "C"
2214#endif
2215char $2 ();
2216/* The GNU C library defines this for functions which it implements
2217 to always fail with ENOSYS. Some functions are actually named
2218 something starting with __ and the normal name is an alias. */
2219#if defined __stub_$2 || defined __stub___$2
2220choke me
2221#endif
2222
2223int
2224main ()
2225{
2226return $2 ();
2227 ;
2228 return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_link "$LINENO"; then :
2232 eval "$3=yes"
2233else
2234 eval "$3=no"
2235fi
2236rm -f core conftest.err conftest.$ac_objext \
2237 conftest$ac_exeext conftest.$ac_ext
2238fi
2239eval ac_res=\$$3
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002243
2244} # ac_fn_c_check_func
2245
2246# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2247# ----------------------------------------------------
2248# Tries to find if the field MEMBER exists in type AGGR, after including
2249# INCLUDES, setting cache variable VAR accordingly.
2250ac_fn_c_check_member ()
2251{
2252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2254$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002255if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002256 $as_echo_n "(cached) " >&6
2257else
2258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259/* end confdefs.h. */
2260$5
2261int
2262main ()
2263{
2264static $2 ac_aggr;
2265if (ac_aggr.$3)
2266return 0;
2267 ;
2268 return 0;
2269}
2270_ACEOF
2271if ac_fn_c_try_compile "$LINENO"; then :
2272 eval "$4=yes"
2273else
2274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h. */
2276$5
2277int
2278main ()
2279{
2280static $2 ac_aggr;
2281if (sizeof ac_aggr.$3)
2282return 0;
2283 ;
2284 return 0;
2285}
2286_ACEOF
2287if ac_fn_c_try_compile "$LINENO"; then :
2288 eval "$4=yes"
2289else
2290 eval "$4=no"
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295fi
2296eval ac_res=\$$4
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2298$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002299 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002300
2301} # ac_fn_c_check_member
2302
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002303# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2304# ---------------------------------------------
2305# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2306# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002307ac_fn_c_check_decl ()
2308{
2309 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002310 as_decl_name=`echo $2|sed 's/ *(.*//'`
2311 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2313$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002314if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002315 $as_echo_n "(cached) " >&6
2316else
2317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318/* end confdefs.h. */
2319$4
2320int
2321main ()
2322{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002323#ifndef $as_decl_name
2324#ifdef __cplusplus
2325 (void) $as_decl_use;
2326#else
2327 (void) $as_decl_name;
2328#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002329#endif
2330
2331 ;
2332 return 0;
2333}
2334_ACEOF
2335if ac_fn_c_try_compile "$LINENO"; then :
2336 eval "$3=yes"
2337else
2338 eval "$3=no"
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342eval ac_res=\$$3
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002345 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002346
2347} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002349This file contains any messages produced by compilers while
2350running configure, to aid debugging if configure makes a mistake.
2351
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002352It was created by python $as_me 3.3, which was
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002353generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002354
2355 $ $0 $@
2356
2357_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002359{
2360cat <<_ASUNAME
2361## --------- ##
2362## Platform. ##
2363## --------- ##
2364
2365hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2366uname -m = `(uname -m) 2>/dev/null || echo unknown`
2367uname -r = `(uname -r) 2>/dev/null || echo unknown`
2368uname -s = `(uname -s) 2>/dev/null || echo unknown`
2369uname -v = `(uname -v) 2>/dev/null || echo unknown`
2370
2371/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2372/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2373
2374/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2375/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2376/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002378/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2379/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2380/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2381
2382_ASUNAME
2383
2384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002389 $as_echo "PATH: $as_dir"
2390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002391IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002392
2393} >&5
2394
2395cat >&5 <<_ACEOF
2396
2397
2398## ----------- ##
2399## Core tests. ##
2400## ----------- ##
2401
2402_ACEOF
2403
2404
2405# Keep a trace of the command line.
2406# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002407# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002408# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002411ac_configure_args0=
2412ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_must_keep_next=false
2414for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002415do
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 for ac_arg
2417 do
2418 case $ac_arg in
2419 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2420 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2421 | -silent | --silent | --silen | --sile | --sil)
2422 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 esac
2426 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002431 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 case $ac_arg in
2434 *=* | --config-cache | -C | -disable-* | --disable-* \
2435 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2436 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2437 | -with-* | --with-* | -without-* | --without-* | --x)
2438 case "$ac_configure_args0 " in
2439 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2440 esac
2441 ;;
2442 -* ) ac_must_keep_next=true ;;
2443 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002445 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 ;;
2447 esac
2448 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002449done
Matthias Kloseb9621712010-04-24 17:59:49 +00002450{ ac_configure_args0=; unset ac_configure_args0;}
2451{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453# When interrupted or exit'd, cleanup temporary files, and complete
2454# config.log. We remove comments because anyway the quotes in there
2455# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456# WARNING: Use '\'' to represent an apostrophe within the trap.
2457# 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 +00002458trap 'exit_status=$?
2459 # Save into config.log some information that might help in debugging.
2460 {
2461 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002462
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002463 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002464## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002465## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 echo
2467 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468(
2469 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2470 eval ac_val=\$$ac_var
2471 case $ac_val in #(
2472 *${as_nl}*)
2473 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002474 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2475$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 esac
2477 case $ac_var in #(
2478 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2480 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac ;;
2482 esac
2483 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2486 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 "s/'\''/'\''\\\\'\'''\''/g;
2489 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2490 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002491 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002493 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac |
2495 sort
2496)
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002498
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002499 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002500## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 echo
2503 for ac_var in $ac_subst_vars
2504 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 eval ac_val=\$$ac_var
2506 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 done | sort
2511 echo
2512
2513 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 echo
2518 for ac_var in $ac_subst_files
2519 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 eval ac_val=\$$ac_var
2521 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 done | sort
2526 echo
2527 fi
2528
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002530 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002531## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002532## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
2536 fi
2537 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 $as_echo "$as_me: caught signal $ac_signal"
2539 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 rm -f core *.core core.conftest.* &&
2542 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002545for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002546 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002547done
2548ac_signal=0
2549
2550# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002552
Matthias Kloseb9621712010-04-24 17:59:49 +00002553$as_echo "/* confdefs.h */" > confdefs.h
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555# Predefined preprocessor variables.
2556
2557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_NAME "$PACKAGE_NAME"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_VERSION "$PACKAGE_VERSION"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_STRING "$PACKAGE_STRING"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2575_ACEOF
2576
Matthias Kloseb9621712010-04-24 17:59:49 +00002577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_URL "$PACKAGE_URL"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581
2582# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002583# Prefer an explicitly selected file to automatically selected ones.
2584ac_site_file1=NONE
2585ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587 # We do not want a PATH search for config.site.
2588 case $CONFIG_SITE in #((
2589 -*) ac_site_file1=./$CONFIG_SITE;;
2590 */*) ac_site_file1=$CONFIG_SITE;;
2591 *) ac_site_file1=./$CONFIG_SITE;;
2592 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 ac_site_file1=$prefix/share/config.site
2595 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596else
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 ac_site_file1=$ac_default_prefix/share/config.site
2598 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002600for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601do
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 test "x$ac_site_file" = xNONE && continue
2603 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2605$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002607 . "$ac_site_file" \
2608 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2610as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002611See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612 fi
2613done
2614
2615if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 # Some versions of bash will fail to source /dev/null (special files
2617 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2618 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2620$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2623 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 esac
2625 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002626else
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2628$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 >$cache_file
2630fi
2631
2632# Check that the precious variables saved in the cache have kept the same
2633# value.
2634ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2637 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2639 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 case $ac_old_set,$ac_new_set in
2641 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2643$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 +00002644 ac_cache_corrupted=: ;;
2645 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2647$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_cache_corrupted=: ;;
2649 ,);;
2650 *)
2651 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 # differences in whitespace do not lead to failure.
2653 ac_old_val_w=`echo x $ac_old_val`
2654 ac_new_val_w=`echo x $ac_new_val`
2655 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2657$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2658 ac_cache_corrupted=:
2659 else
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2661$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2662 eval $ac_var=\$ac_old_val
2663 fi
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2665$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2667$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 fi;;
2669 esac
2670 # Pass precious variables to config.status.
2671 if test "$ac_new_set" = set; then
2672 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 *) ac_arg=$ac_var=$ac_new_val ;;
2675 esac
2676 case " $ac_configure_args " in
2677 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 esac
2680 fi
2681done
2682if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2686$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002687 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002689## -------------------- ##
2690## Main body of script. ##
2691## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692
Guido van Rossum7f43da71994-08-01 12:15:30 +00002693ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2697ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698
Guido van Rossum627b2d71993-12-24 10:39:16 +00002699
Michael W. Hudson54241132001-12-07 15:38:26 +00002700
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002701
2702
2703
2704
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002705if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002706then
2707# Extract the first word of "hg", so it can be a program name with args.
2708set dummy hg; ac_word=$2
2709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2710$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002711if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002712 $as_echo_n "(cached) " >&6
2713else
2714 if test -n "$HAS_HG"; then
2715 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2716else
2717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2718for as_dir in $PATH
2719do
2720 IFS=$as_save_IFS
2721 test -z "$as_dir" && as_dir=.
2722 for ac_exec_ext in '' $ac_executable_extensions; do
2723 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2724 ac_cv_prog_HAS_HG="found"
2725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2726 break 2
2727 fi
2728done
2729 done
2730IFS=$as_save_IFS
2731
2732 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2733fi
2734fi
2735HAS_HG=$ac_cv_prog_HAS_HG
2736if test -n "$HAS_HG"; then
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2738$as_echo "$HAS_HG" >&6; }
2739else
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2741$as_echo "no" >&6; }
2742fi
2743
2744
2745else
2746HAS_HG=no-repository
2747fi
2748if test $HAS_HG = found
2749then
2750 HGVERSION="hg id -i \$(srcdir)"
2751 HGTAG="hg id -t \$(srcdir)"
2752 HGBRANCH="hg id -b \$(srcdir)"
2753else
2754 HGVERSION=""
2755 HGTAG=""
2756 HGBRANCH=""
2757fi
2758
2759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002760ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002761
2762
Martin v. Löwis11437992002-04-12 09:54:03 +00002763
Benjamin Petersond23f8222009-04-05 19:13:16 +00002764if test "$prefix" != "/"; then
2765 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2766fi
2767
2768
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
2770
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002771# We don't use PACKAGE_ variables, and they cause conflicts
2772# with other autoconf-based packages that include Python.h
2773grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2774rm confdefs.h
2775mv confdefs.h.new confdefs.h
2776
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002777
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002778VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002779
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002780# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002781
2782SOVERSION=1.0
2783
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002784# The later defininition of _XOPEN_SOURCE disables certain features
2785# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2786
Matthias Kloseb9621712010-04-24 17:59:49 +00002787$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002788
2789
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002790# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2791# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2792# them.
2793
Matthias Kloseb9621712010-04-24 17:59:49 +00002794$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002795
2796
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002797# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2798# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2799# them.
2800
Matthias Kloseb9621712010-04-24 17:59:49 +00002801$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002802
2803
Martin v. Löwisd6320502004-08-12 13:45:08 +00002804# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2805# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2806
Matthias Kloseb9621712010-04-24 17:59:49 +00002807$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002808
2809
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002810# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2811# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2812# them.
2813
Matthias Kloseb9621712010-04-24 17:59:49 +00002814$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002815
2816
2817
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002818define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002819
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002820# Arguments passed to configure.
2821
2822CONFIG_ARGS="$ac_configure_args"
2823
Matthias Kloseb9621712010-04-24 17:59:49 +00002824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2825$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002826# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002827if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002829 case $enableval in
2830 yes)
2831 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002832 if test ! -d "${enableval}"
2833 then
2834 enableval=/
2835 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002836 ;;
2837 esac
2838 case $enableval in
2839 no)
2840 UNIVERSALSDK=
2841 enable_universalsdk=
2842 ;;
2843 *)
2844 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002845 if test ! -d "${UNIVERSALSDK}"
2846 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002847 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002848 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002849 ;;
2850 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002851
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002852
Thomas Wouters477c8d52006-05-27 19:21:47 +00002853else
2854
2855 UNIVERSALSDK=
2856 enable_universalsdk=
2857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002858fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002859
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002860if test -n "${UNIVERSALSDK}"
2861then
Matthias Kloseb9621712010-04-24 17:59:49 +00002862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2863$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002864else
Matthias Kloseb9621712010-04-24 17:59:49 +00002865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2866$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002867fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002869
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002870
2871
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002872UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002873
Matthias Kloseb9621712010-04-24 17:59:49 +00002874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2875$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002876
2877# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002878if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002879 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2881$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002882 UNIVERSAL_ARCHS="$withval"
2883
2884else
2885
Matthias Kloseb9621712010-04-24 17:59:49 +00002886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2887$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002888
2889fi
2890
2891
2892
2893
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002894
2895# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002896if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002897 withval=$with_framework_name;
2898 PYTHONFRAMEWORK=${withval}
2899 PYTHONFRAMEWORKDIR=${withval}.framework
2900 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2901
2902else
2903
2904 PYTHONFRAMEWORK=Python
2905 PYTHONFRAMEWORKDIR=Python.framework
2906 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2907
2908fi
2909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002911if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002912 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002913 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002914 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002915 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002916 esac
2917 case $enableval in
2918 no)
2919 PYTHONFRAMEWORK=
2920 PYTHONFRAMEWORKDIR=no-framework
2921 PYTHONFRAMEWORKPREFIX=
2922 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002923 FRAMEWORKINSTALLFIRST=
2924 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002925 FRAMEWORKALTINSTALLFIRST=
2926 FRAMEWORKALTINSTALLLAST=
2927 if test "x${prefix}" = "xNONE"; then
2928 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2929 else
2930 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2931 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002932 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002933 ;;
2934 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002935 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002936 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002937 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002938 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002939 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2940 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002941 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002942
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002943 if test "x${prefix}" = "xNONE" ; then
2944 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002945
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002946 else
2947 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2948 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002949
2950 case "${enableval}" in
2951 /System*)
2952 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2953 if test "${prefix}" = "NONE" ; then
2954 # See below
2955 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2956 fi
2957 ;;
2958
2959 /Library*)
2960 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2961 ;;
2962
2963 */Library/Frameworks)
2964 MDIR="`dirname "${enableval}"`"
2965 MDIR="`dirname "${MDIR}"`"
2966 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2967
2968 if test "${prefix}" = "NONE"; then
2969 # User hasn't specified the
2970 # --prefix option, but wants to install
2971 # the framework in a non-default location,
2972 # ensure that the compatibility links get
2973 # installed relative to that prefix as well
2974 # instead of in /usr/local.
2975 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2976 fi
2977 ;;
2978
2979 *)
2980 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2981 ;;
2982 esac
2983
Jack Jansen127e56e2001-09-11 14:41:54 +00002984 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002985
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002986 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002987 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002988 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002991
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002992 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2993
2994 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2995
Jack Jansene578a632001-08-15 01:27:14 +00002996 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002997
Guido van Rossum563e7081996-09-10 18:20:48 +00002998else
Martin v. Löwis11437992002-04-12 09:54:03 +00002999
Jack Jansene578a632001-08-15 01:27:14 +00003000 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003001 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003002 PYTHONFRAMEWORKPREFIX=
3003 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003004 FRAMEWORKINSTALLFIRST=
3005 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003006 FRAMEWORKALTINSTALLFIRST=
3007 FRAMEWORKALTINSTALLLAST=
3008 if test "x${prefix}" = "xNONE" ; then
3009 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3010 else
3011 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3012 fi
Jack Jansene578a632001-08-15 01:27:14 +00003013 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003014
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003015
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016fi
3017
Thomas Wouters477c8d52006-05-27 19:21:47 +00003018
3019
Michael W. Hudson54241132001-12-07 15:38:26 +00003020
3021
3022
3023
Jack Jansene578a632001-08-15 01:27:14 +00003024
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003025
3026
3027
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003028
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003029
Jack Jansene578a632001-08-15 01:27:14 +00003030##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003031## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003032## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003033##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003034# Set name for machine-dependent library files
3035
Matthias Kloseb9621712010-04-24 17:59:49 +00003036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3037$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003038if test -z "$MACHDEP"
3039then
Guido van Rossum563e7081996-09-10 18:20:48 +00003040 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003041 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003042 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003043 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003044 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003045 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003046 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003047 ac_md_system=`echo $ac_sys_system |
3048 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3049 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003050 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003051 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003052
Guido van Rossum07397971997-04-29 21:49:50 +00003053 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003054 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003055 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003056 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003057 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003058 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003059 esac
3060fi
Guido van Rossum91922671997-10-09 20:24:13 +00003061
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003062# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3063# disable features if it is defined, without any means to access these
3064# features as extensions. For these systems, we skip the definition of
3065# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3066# some feature, make sure there is no alternative way to access this
3067# feature. Also, when using wildcards, make sure you have verified the
3068# need for not defining _XOPEN_SOURCE on all systems matching the
3069# wildcard, and that the wildcard does not include future systems
3070# (which may remove their limitations).
3071case $ac_sys_system/$ac_sys_release in
3072 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3073 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003074 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003075 # In addition, Stefan Krah confirms that issue #1244610 exists through
3076 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003077 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003078 define_xopen_source=no
3079 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3080 # also defined. This can be overridden by defining _BSD_SOURCE
3081 # As this has a different meaning on Linux, only define it on OpenBSD
3082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003084
3085 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003086 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003087 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3088 # also defined. This can be overridden by defining _BSD_SOURCE
3089 # As this has a different meaning on Linux, only define it on OpenBSD
3090
Matthias Kloseb9621712010-04-24 17:59:49 +00003091$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003092
3093 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003094 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3095 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3096 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003097 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 +00003098 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003099 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3100 # request to enable features supported by the standard as a request
3101 # to disable features not supported by the standard. The best way
3102 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3103 # entirely and define __EXTENSIONS__ instead.
3104 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003105 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003106 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3107 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003108 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003109 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003110 define_xopen_source=no;;
3111 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003112 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003113 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003114 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003115 # On FreeBSD 4, the math functions C89 does not cover are never defined
3116 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3117 FreeBSD/4.*)
3118 define_xopen_source=no;;
3119 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3120 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3121 # identifies itself as Darwin/7.*
3122 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3123 # disables platform specific features beyond repair.
3124 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3125 # has no effect, don't bother defining them
3126 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003127 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003128 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003129 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003130 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3131 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3132 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003133 AIX/4)
3134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003135 AIX/5)
3136 if test `uname -r` -eq 1; then
3137 define_xopen_source=no
3138 fi
3139 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003140 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3141 # defining NI_NUMERICHOST.
3142 QNX/6.3.2)
3143 define_xopen_source=no
3144 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003145
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003146esac
3147
3148if test $define_xopen_source = yes
3149then
Victor Stinner14d098d2011-09-07 22:29:43 +02003150 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003151
Victor Stinner14d098d2011-09-07 22:29:43 +02003152$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003153
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003154
3155 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3156 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3157 # several APIs are not declared. Since this is also needed in some
3158 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003159
Matthias Kloseb9621712010-04-24 17:59:49 +00003160$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003161
3162
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003163
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003164$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003165
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003166fi
3167
Guido van Rossum91922671997-10-09 20:24:13 +00003168#
3169# SGI compilers allow the specification of the both the ABI and the
3170# ISA on the command line. Depending on the values of these switches,
3171# different and often incompatable code will be generated.
3172#
3173# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3174# thus supply support for various ABI/ISA combinations. The MACHDEP
3175# variable is also adjusted.
3176#
3177
3178if test ! -z "$SGI_ABI"
3179then
3180 CC="cc $SGI_ABI"
3181 LDFLAGS="$SGI_ABI $LDFLAGS"
3182 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3185$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003186
Jack Jansen6b08a402004-06-03 12:41:45 +00003187# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3188# it may influence the way we can build extensions, so distutils
3189# needs to check it
3190
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Jack Jansen6b08a402004-06-03 12:41:45 +00003192CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003194
Matthias Kloseb9621712010-04-24 17:59:49 +00003195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3196$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003197ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3199$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003200
Guido van Rossum627b2d71993-12-24 10:39:16 +00003201# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003202
3203# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3204# for debug/optimization stuff. BASECFLAGS is for flags that are required
3205# just to get things to compile and link. Users are free to override OPT
3206# when running configure or make. The build should not break if they do.
3207# BASECFLAGS should generally not be messed with, however.
3208
3209# XXX shouldn't some/most/all of this code be merged with the stuff later
3210# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3212$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003215if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003217 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003218 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003219 without_gcc=yes;;
3220 yes) CC=gcc
3221 without_gcc=no;;
3222 *) CC=$withval
3223 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003224 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003225else
Martin v. Löwis11437992002-04-12 09:54:03 +00003226
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003227 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003228 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003229 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003230 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003231 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232fi
3233
Matthias Kloseb9621712010-04-24 17:59:49 +00003234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3235$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003236
Guido van Rossum8b131c51995-03-09 14:10:13 +00003237# If the user switches compilers, we can't believe the cache
3238if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3239then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003240 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003241(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003242fi
3243
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003244# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3245# when the compiler supports them, but we don't always want -O2, and
3246# we set -g later.
3247if test -z "$CFLAGS"; then
3248 CFLAGS=
3249fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003250ac_ext=c
3251ac_cpp='$CPP $CPPFLAGS'
3252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3254ac_compiler_gnu=$ac_cv_c_compiler_gnu
3255if test -n "$ac_tool_prefix"; then
3256 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3257set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3259$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003260if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003261 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003262else
3263 if test -n "$CC"; then
3264 ac_cv_prog_CC="$CC" # Let the user override the test.
3265else
Martin v. Löwis11437992002-04-12 09:54:03 +00003266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3267for as_dir in $PATH
3268do
3269 IFS=$as_save_IFS
3270 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003271 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272 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 +00003273 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003274 $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 +00003275 break 2
3276 fi
3277done
Matthias Kloseb9621712010-04-24 17:59:49 +00003278 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003279IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003280
Jack Jansendd19cf82001-12-06 22:36:17 +00003281fi
3282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003283CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003284if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3286$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003287else
Matthias Kloseb9621712010-04-24 17:59:49 +00003288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3289$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003290fi
3291
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003292
Martin v. Löwis11437992002-04-12 09:54:03 +00003293fi
3294if test -z "$ac_cv_prog_CC"; then
3295 ac_ct_CC=$CC
3296 # Extract the first word of "gcc", so it can be a program name with args.
3297set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3299$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003300if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003301 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003302else
3303 if test -n "$ac_ct_CC"; then
3304 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3305else
3306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3307for as_dir in $PATH
3308do
3309 IFS=$as_save_IFS
3310 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003311 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003312 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 +00003313 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003314 $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 +00003315 break 2
3316 fi
3317done
Matthias Kloseb9621712010-04-24 17:59:49 +00003318 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003319IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003320
3321fi
3322fi
3323ac_ct_CC=$ac_cv_prog_ac_ct_CC
3324if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3326$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003327else
Matthias Kloseb9621712010-04-24 17:59:49 +00003328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3329$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003330fi
3331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332 if test "x$ac_ct_CC" = x; then
3333 CC=""
3334 else
3335 case $cross_compiling:$ac_tool_warned in
3336yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003339ac_tool_warned=yes ;;
3340esac
3341 CC=$ac_ct_CC
3342 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003343else
3344 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003345fi
3346
Jack Jansendd19cf82001-12-06 22:36:17 +00003347if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003348 if test -n "$ac_tool_prefix"; then
3349 # 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 +00003350set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3352$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003353if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003355else
3356 if test -n "$CC"; then
3357 ac_cv_prog_CC="$CC" # Let the user override the test.
3358else
Martin v. Löwis11437992002-04-12 09:54:03 +00003359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3360for as_dir in $PATH
3361do
3362 IFS=$as_save_IFS
3363 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003364 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003365 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 +00003366 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003367 $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 +00003368 break 2
3369 fi
3370done
Matthias Kloseb9621712010-04-24 17:59:49 +00003371 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003373
3374fi
3375fi
3376CC=$ac_cv_prog_CC
3377if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3379$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003380else
Matthias Kloseb9621712010-04-24 17:59:49 +00003381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3382$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003383fi
3384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003385
Martin v. Löwis11437992002-04-12 09:54:03 +00003386 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003387fi
3388if test -z "$CC"; then
3389 # Extract the first word of "cc", so it can be a program name with args.
3390set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3392$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003393if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003394 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003395else
3396 if test -n "$CC"; then
3397 ac_cv_prog_CC="$CC" # Let the user override the test.
3398else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003399 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3401for as_dir in $PATH
3402do
3403 IFS=$as_save_IFS
3404 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003406 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 +00003407 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3408 ac_prog_rejected=yes
3409 continue
3410 fi
3411 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 $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 +00003413 break 2
3414 fi
3415done
Matthias Kloseb9621712010-04-24 17:59:49 +00003416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003417IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003418
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003419if test $ac_prog_rejected = yes; then
3420 # We found a bogon in the path, so make sure we never use it.
3421 set dummy $ac_cv_prog_CC
3422 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424 # We chose a different compiler from the bogus one.
3425 # However, it has the same basename, so the bogon will be chosen
3426 # first if we set CC to just the basename; use the full file name.
3427 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003428 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003429 fi
3430fi
3431fi
3432fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003433CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003434if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3436$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003437else
Matthias Kloseb9621712010-04-24 17:59:49 +00003438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3439$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003440fi
3441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443fi
3444if test -z "$CC"; then
3445 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003446 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 do
3448 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3449set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3451$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003452if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003454else
3455 if test -n "$CC"; then
3456 ac_cv_prog_CC="$CC" # Let the user override the test.
3457else
Martin v. Löwis11437992002-04-12 09:54:03 +00003458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3459for as_dir in $PATH
3460do
3461 IFS=$as_save_IFS
3462 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003463 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464 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 +00003465 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003466 $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 +00003467 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003469done
Matthias Kloseb9621712010-04-24 17:59:49 +00003470 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
3473fi
3474fi
3475CC=$ac_cv_prog_CC
3476if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3478$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003479else
Matthias Kloseb9621712010-04-24 17:59:49 +00003480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3481$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003482fi
3483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 test -n "$CC" && break
3486 done
3487fi
3488if test -z "$CC"; then
3489 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003490 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003491do
3492 # Extract the first word of "$ac_prog", so it can be a program name with args.
3493set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3495$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003496if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003498else
3499 if test -n "$ac_ct_CC"; then
3500 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3501else
3502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3503for as_dir in $PATH
3504do
3505 IFS=$as_save_IFS
3506 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003507 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003508 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 +00003509 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003510 $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 +00003511 break 2
3512 fi
3513done
Matthias Kloseb9621712010-04-24 17:59:49 +00003514 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003515IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003516
Martin v. Löwis11437992002-04-12 09:54:03 +00003517fi
3518fi
3519ac_ct_CC=$ac_cv_prog_ac_ct_CC
3520if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3522$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003523else
Matthias Kloseb9621712010-04-24 17:59:49 +00003524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3525$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003526fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003528
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 test -n "$ac_ct_CC" && break
3530done
Michael W. Hudson54241132001-12-07 15:38:26 +00003531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003532 if test "x$ac_ct_CC" = x; then
3533 CC=""
3534 else
3535 case $cross_compiling:$ac_tool_warned in
3536yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003537{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3538$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539ac_tool_warned=yes ;;
3540esac
3541 CC=$ac_ct_CC
3542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003543fi
3544
3545fi
3546
3547
Matthias Kloseb9621712010-04-24 17:59:49 +00003548test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003550as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003551See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003552
3553# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003554$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3555set X $ac_compile
3556ac_compiler=$2
3557for ac_option in --version -v -V -qversion; do
3558 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003559case "(($ac_try" in
3560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3561 *) ac_try_echo=$ac_try;;
3562esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003563eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3564$as_echo "$ac_try_echo"; } >&5
3565 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 if test -s conftest.err; then
3568 sed '10a\
3569... rest of stderr output deleted ...
3570 10q' conftest.err >conftest.er1
3571 cat conftest.er1 >&5
3572 fi
3573 rm -f conftest.er1 conftest.err
3574 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3575 test $ac_status = 0; }
3576done
Martin v. Löwis11437992002-04-12 09:54:03 +00003577
Matthias Kloseb9621712010-04-24 17:59:49 +00003578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003579/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003580
Martin v. Löwis11437992002-04-12 09:54:03 +00003581int
3582main ()
3583{
3584
3585 ;
3586 return 0;
3587}
3588_ACEOF
3589ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003590ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003591# Try to create an executable without -o first, disregard a.out.
3592# It will help us diagnose broken compilers, and finding out an intuition
3593# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3595$as_echo_n "checking whether the C compiler works... " >&6; }
3596ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3597
3598# The possible output files:
3599ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601ac_rmfiles=
3602for ac_file in $ac_files
3603do
3604 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003606 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3607 esac
3608done
3609rm -f $ac_rmfiles
3610
Matthias Kloseb9621712010-04-24 17:59:49 +00003611if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612case "(($ac_try" in
3613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3614 *) ac_try_echo=$ac_try;;
3615esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003616eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3617$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3621 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3623# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3624# in a Makefile. We should not override ac_cv_exeext if it was cached,
3625# so that the user can short-circuit this test for compilers unknown to
3626# Autoconf.
3627for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003628do
3629 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003632 ;;
3633 [ab].out )
3634 # We found the default executable, but exeext='' is most
3635 # certainly right.
3636 break;;
3637 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639 then :; else
3640 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3641 fi
3642 # We set ac_cv_exeext here because the later test for it is not
3643 # safe: cross compilers may not add the suffix if given an `-o'
3644 # argument, so we may need to know it at that point already.
3645 # Even if this section looks crufty: it has the advantage of
3646 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003647 break;;
3648 * )
3649 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003650 esac
3651done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652test "$ac_cv_exeext" = no && ac_cv_exeext=
3653
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003654else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 ac_file=''
3656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003657if test -z "$ac_file"; then :
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3659$as_echo "no" >&6; }
3660$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003661sed 's/^/| /' conftest.$ac_ext >&5
3662
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003665as_fn_error 77 "C compiler cannot create executables
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003666See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003667else
3668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3669$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3672$as_echo_n "checking for C compiler default output file name... " >&6; }
3673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3674$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003675ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003676
Matthias Kloseb9621712010-04-24 17:59:49 +00003677rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003678ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3680$as_echo_n "checking for suffix of executables... " >&6; }
3681if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682case "(($ac_try" in
3683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3684 *) ac_try_echo=$ac_try;;
3685esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3687$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3691 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003692 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3693# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3694# work properly (i.e., refer to `conftest.exe'), while it won't with
3695# `rm'.
3696for ac_file in conftest.exe conftest conftest.*; do
3697 test -f "$ac_file" || continue
3698 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003700 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3701 break;;
3702 * ) break;;
3703 esac
3704done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003705else
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003708as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003709See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003711rm -f conftest conftest$ac_cv_exeext
3712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3713$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003714
3715rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003716EXEEXT=$ac_cv_exeext
3717ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3719/* end confdefs.h. */
3720#include <stdio.h>
3721int
3722main ()
3723{
3724FILE *f = fopen ("conftest.out", "w");
3725 return ferror (f) || fclose (f) != 0;
3726
3727 ;
3728 return 0;
3729}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003731ac_clean_files="$ac_clean_files conftest.out"
3732# Check that the compiler produces executables we can run. If not, either
3733# the compiler is broken, or we cross compile.
3734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3735$as_echo_n "checking whether we are cross compiling... " >&6; }
3736if test "$cross_compiling" != yes; then
3737 { { ac_try="$ac_link"
3738case "(($ac_try" in
3739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3740 *) ac_try_echo=$ac_try;;
3741esac
3742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3743$as_echo "$ac_try_echo"; } >&5
3744 (eval "$ac_link") 2>&5
3745 ac_status=$?
3746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3747 test $ac_status = 0; }
3748 if { ac_try='./conftest$ac_cv_exeext'
3749 { { case "(($ac_try" in
3750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3751 *) ac_try_echo=$ac_try;;
3752esac
3753eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3754$as_echo "$ac_try_echo"; } >&5
3755 (eval "$ac_try") 2>&5
3756 ac_status=$?
3757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3758 test $ac_status = 0; }; }; then
3759 cross_compiling=no
3760 else
3761 if test "$cross_compiling" = maybe; then
3762 cross_compiling=yes
3763 else
3764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003766as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003767If you meant to cross compile, use \`--host'.
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003768See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 fi
3770 fi
3771fi
3772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3773$as_echo "$cross_compiling" >&6; }
3774
3775rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3776ac_clean_files=$ac_clean_files_save
3777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3778$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003779if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 $as_echo_n "(cached) " >&6
3781else
3782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003783/* end confdefs.h. */
3784
3785int
3786main ()
3787{
3788
3789 ;
3790 return 0;
3791}
3792_ACEOF
3793rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003794if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795case "(($ac_try" in
3796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3797 *) ac_try_echo=$ac_try;;
3798esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3800$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3804 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 for ac_file in conftest.o conftest.obj conftest.*; do
3806 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3810 break;;
3811 esac
3812done
3813else
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003815sed 's/^/| /' conftest.$ac_ext >&5
3816
Matthias Kloseb9621712010-04-24 17:59:49 +00003817{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003819as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003820See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003821fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003822rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3825$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003826OBJEXT=$ac_cv_objext
3827ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3829$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003830if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836int
3837main ()
3838{
3839#ifndef __GNUC__
3840 choke me
3841#endif
3842
3843 ;
3844 return 0;
3845}
3846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003847if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 ac_compiler_gnu=yes
3849else
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003853ac_cv_c_compiler_gnu=$ac_compiler_gnu
3854
3855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3857$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3858if test $ac_compiler_gnu = yes; then
3859 GCC=yes
3860else
3861 GCC=
3862fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003863ac_test_CFLAGS=${CFLAGS+set}
3864ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3866$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003867if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003869else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870 ac_save_c_werror_flag=$ac_c_werror_flag
3871 ac_c_werror_flag=yes
3872 ac_cv_prog_cc_g=no
3873 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877int
3878main ()
3879{
3880
3881 ;
3882 return 0;
3883}
3884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003885if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003886 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003887else
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 CFLAGS=""
3889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890/* end confdefs.h. */
3891
3892int
3893main ()
3894{
3895
3896 ;
3897 return 0;
3898}
3899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003900if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901
Matthias Kloseb9621712010-04-24 17:59:49 +00003902else
3903 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906/* end confdefs.h. */
3907
3908int
3909main ()
3910{
3911
3912 ;
3913 return 0;
3914}
3915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003916if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3924 ac_c_werror_flag=$ac_save_c_werror_flag
3925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3927$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003928if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003930elif test $ac_cv_prog_cc_g = yes; then
3931 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003932 CFLAGS="-g -O2"
3933 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003934 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003935 fi
3936else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003937 if test "$GCC" = yes; then
3938 CFLAGS="-O2"
3939 else
3940 CFLAGS=
3941 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3944$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003945if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003947else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003949ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003951/* end confdefs.h. */
3952#include <stdarg.h>
3953#include <stdio.h>
3954#include <sys/types.h>
3955#include <sys/stat.h>
3956/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3957struct buf { int x; };
3958FILE * (*rcsopen) (struct buf *, struct stat *, int);
3959static char *e (p, i)
3960 char **p;
3961 int i;
3962{
3963 return p[i];
3964}
3965static char *f (char * (*g) (char **, int), char **p, ...)
3966{
3967 char *s;
3968 va_list v;
3969 va_start (v,p);
3970 s = g (p, va_arg (v,int));
3971 va_end (v);
3972 return s;
3973}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003974
3975/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3976 function prototypes and stuff, but not '\xHH' hex character constants.
3977 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003979 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3980 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003982int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3985 inside strings and character constants. */
3986#define FOO(x) 'x'
3987int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3988
Skip Montanaro6dead952003-09-25 14:50:04 +00003989int test (int i, double x);
3990struct s1 {int (*f) (int a);};
3991struct s2 {int (*f) (double a);};
3992int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3993int argc;
3994char **argv;
3995int
3996main ()
3997{
3998return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3999 ;
4000 return 0;
4001}
4002_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4004 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004005do
4006 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010rm -f core conftest.err conftest.$ac_objext
4011 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004012done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004013rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004014CC=$ac_save_CC
4015
4016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004017# AC_CACHE_VAL
4018case "x$ac_cv_prog_cc_c89" in
4019 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4021$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4024$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004025 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4028$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004029esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004030if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004031
Matthias Kloseb9621712010-04-24 17:59:49 +00004032fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004033
Martin v. Löwis11437992002-04-12 09:54:03 +00004034ac_ext=c
4035ac_cpp='$CPP $CPPFLAGS'
4036ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4037ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4038ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004040
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004041
4042
Matthias Kloseb9621712010-04-24 17:59:49 +00004043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4044$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004046# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004047if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004048 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004049
4050 case $withval in
4051 no) with_cxx_main=no
4052 MAINCC='$(CC)';;
4053 yes) with_cxx_main=yes
4054 MAINCC='$(CXX)';;
4055 *) with_cxx_main=yes
4056 MAINCC=$withval
4057 if test -z "$CXX"
4058 then
4059 CXX=$withval
4060 fi;;
4061 esac
4062else
4063
4064 with_cxx_main=no
4065 MAINCC='$(CC)'
4066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067fi
4068
Matthias Kloseb9621712010-04-24 17:59:49 +00004069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4070$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004071
4072preset_cxx="$CXX"
4073if test -z "$CXX"
4074then
4075 case "$CC" in
4076 gcc) # Extract the first word of "g++", so it can be a program name with args.
4077set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4079$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004080if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004082else
4083 case $CXX in
4084 [\\/]* | ?:[\\/]*)
4085 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4086 ;;
4087 *)
4088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4089for as_dir in notfound
4090do
4091 IFS=$as_save_IFS
4092 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094 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 +00004095 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004097 break 2
4098 fi
4099done
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004102
4103 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4104 ;;
4105esac
4106fi
4107CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004108if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4110$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004111else
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4113$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004116 ;;
4117 cc) # Extract the first word of "c++", so it can be a program name with args.
4118set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4120$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004121if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004123else
4124 case $CXX in
4125 [\\/]* | ?:[\\/]*)
4126 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4127 ;;
4128 *)
4129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4130for as_dir in notfound
4131do
4132 IFS=$as_save_IFS
4133 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135 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 +00004136 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004138 break 2
4139 fi
4140done
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004143
4144 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4145 ;;
4146esac
4147fi
4148CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004149if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4151$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004152else
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4154$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004157 ;;
4158 esac
4159 if test "$CXX" = "notfound"
4160 then
4161 CXX=""
4162 fi
4163fi
4164if test -z "$CXX"
4165then
4166 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4167do
4168 # Extract the first word of "$ac_prog", so it can be a program name with args.
4169set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4171$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004172if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004174else
4175 if test -n "$CXX"; then
4176 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4177else
4178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4179for as_dir in $PATH
4180do
4181 IFS=$as_save_IFS
4182 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184 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 +00004185 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004187 break 2
4188 fi
4189done
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004192
4193fi
4194fi
4195CXX=$ac_cv_prog_CXX
4196if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4198$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4201$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004202fi
4203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004205 test -n "$CXX" && break
4206done
4207test -n "$CXX" || CXX="notfound"
4208
4209 if test "$CXX" = "notfound"
4210 then
4211 CXX=""
4212 fi
4213fi
4214if test "$preset_cxx" != "$CXX"
4215then
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004217
4218 By default, distutils will build C++ extension modules with \"$CXX\".
4219 If this is not intended, then set CXX on the configure command line.
4220 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004221$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004222
4223 By default, distutils will build C++ extension modules with \"$CXX\".
4224 If this is not intended, then set CXX on the configure command line.
4225 " >&2;}
4226fi
4227
4228
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4230$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4231save_LDFLAGS="$LDFLAGS"
4232LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004233
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4235/* end confdefs.h. */
4236
4237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
4245if ac_fn_c_try_link "$LINENO"; then :
4246 NO_AS_NEEDED="-Wl,--no-as-needed"
4247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4248$as_echo "yes" >&6; }
4249else
4250 NO_AS_NEEDED=""
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4252$as_echo "no" >&6; }
4253fi
4254rm -f core conftest.err conftest.$ac_objext \
4255 conftest$ac_exeext conftest.$ac_ext
4256LDFLAGS="$save_LDFLAGS"
4257
4258
4259
4260# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004261ac_ext=c
4262ac_cpp='$CPP $CPPFLAGS'
4263ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4264ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4265ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4267$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004268# On Suns, sometimes $CPP names a directory.
4269if test -n "$CPP" && test -d "$CPP"; then
4270 CPP=
4271fi
4272if test -z "$CPP"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004273 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004275else
Martin v. Löwis11437992002-04-12 09:54:03 +00004276 # Double quotes because CPP needs to be expanded
4277 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4278 do
4279 ac_preproc_ok=false
4280for ac_c_preproc_warn_flag in '' yes
4281do
4282 # Use a header file that comes with gcc, so configuring glibc
4283 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004284 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4285 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004286 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004287 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004289/* end confdefs.h. */
4290#ifdef __STDC__
4291# include <limits.h>
4292#else
4293# include <assert.h>
4294#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004295 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004297if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004298
Matthias Kloseb9621712010-04-24 17:59:49 +00004299else
Martin v. Löwis11437992002-04-12 09:54:03 +00004300 # Broken: fails on valid input.
4301continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004302fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004303rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004309#include <ac_nonexistent.h>
4310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004311if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 # Broken: success on invalid input.
4313continue
4314else
Martin v. Löwis11437992002-04-12 09:54:03 +00004315 # Passes both tests.
4316ac_preproc_ok=:
4317break
4318fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004319rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004320
4321done
4322# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004323rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004324if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004325 break
4326fi
4327
4328 done
4329 ac_cv_prog_CPP=$CPP
4330
4331fi
4332 CPP=$ac_cv_prog_CPP
4333else
4334 ac_cv_prog_CPP=$CPP
4335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4337$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004338ac_preproc_ok=false
4339for ac_c_preproc_warn_flag in '' yes
4340do
4341 # Use a header file that comes with gcc, so configuring glibc
4342 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004343 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4344 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004345 # On the NeXT, cc -E runs the code through the compiler's parser,
4346 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004348/* end confdefs.h. */
4349#ifdef __STDC__
4350# include <limits.h>
4351#else
4352# include <assert.h>
4353#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004354 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004356if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004357
Matthias Kloseb9621712010-04-24 17:59:49 +00004358else
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 # Broken: fails on valid input.
4360continue
4361fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004362rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004368#include <ac_nonexistent.h>
4369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004370if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004371 # Broken: success on invalid input.
4372continue
4373else
Martin v. Löwis11437992002-04-12 09:54:03 +00004374 # Passes both tests.
4375ac_preproc_ok=:
4376break
4377fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004378rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004379
4380done
4381# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004382rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004383if $ac_preproc_ok; then :
4384
Martin v. Löwis11437992002-04-12 09:54:03 +00004385else
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004388as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004389See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004390fi
4391
4392ac_ext=c
4393ac_cpp='$CPP $CPPFLAGS'
4394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4396ac_compiler_gnu=$ac_cv_c_compiler_gnu
4397
4398
Matthias Kloseb9621712010-04-24 17:59:49 +00004399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4400$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004401if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004403else
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004405 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 # Loop through the user's path and test for each of PROGNAME-LIST
4407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4409do
4410 IFS=$as_save_IFS
4411 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004412 for ac_prog in grep ggrep; do
4413 for ac_exec_ext in '' $ac_executable_extensions; do
4414 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4415 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4416# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417 # Check for GNU $ac_path_GREP
4418case `"$ac_path_GREP" --version 2>&1` in
4419*GNU*)
4420 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4421*)
4422 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424 while :
4425 do
4426 cat "conftest.in" "conftest.in" >"conftest.tmp"
4427 mv "conftest.tmp" "conftest.in"
4428 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004429 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4431 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004432 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004433 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4434 # Best one so far, save it but keep looking for a better one
4435 ac_cv_path_GREP="$ac_path_GREP"
4436 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004437 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004438 # 10*(2^10) chars as input seems more than enough
4439 test $ac_count -gt 10 && break
4440 done
4441 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4442esac
4443
Matthias Kloseb9621712010-04-24 17:59:49 +00004444 $ac_path_GREP_found && break 3
4445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004446 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004447 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004448IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004449 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004450 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 +00004451 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004452else
4453 ac_cv_path_GREP=$GREP
4454fi
4455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4458$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004459 GREP="$ac_cv_path_GREP"
4460
4461
Matthias Kloseb9621712010-04-24 17:59:49 +00004462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4463$as_echo_n "checking for egrep... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004464if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004465 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466else
4467 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4468 then ac_cv_path_EGREP="$GREP -E"
4469 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004470 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004471 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004472 # Loop through the user's path and test for each of PROGNAME-LIST
4473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004474for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4475do
4476 IFS=$as_save_IFS
4477 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004478 for ac_prog in egrep; do
4479 for ac_exec_ext in '' $ac_executable_extensions; do
4480 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4481 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4482# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004483 # Check for GNU $ac_path_EGREP
4484case `"$ac_path_EGREP" --version 2>&1` in
4485*GNU*)
4486 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4487*)
4488 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004489 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004490 while :
4491 do
4492 cat "conftest.in" "conftest.in" >"conftest.tmp"
4493 mv "conftest.tmp" "conftest.in"
4494 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004495 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004496 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4497 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004498 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004499 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4500 # Best one so far, save it but keep looking for a better one
4501 ac_cv_path_EGREP="$ac_path_EGREP"
4502 ac_path_EGREP_max=$ac_count
4503 fi
4504 # 10*(2^10) chars as input seems more than enough
4505 test $ac_count -gt 10 && break
4506 done
4507 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4508esac
4509
Matthias Kloseb9621712010-04-24 17:59:49 +00004510 $ac_path_EGREP_found && break 3
4511 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004512 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004514IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004515 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004516 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 +00004517 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004518else
4519 ac_cv_path_EGREP=$EGREP
4520fi
4521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004522 fi
4523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4525$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004526 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004527
4528
Matthias Kloseb9621712010-04-24 17:59:49 +00004529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4530$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004531if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004532 $as_echo_n "(cached) " >&6
4533else
4534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004535/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004536#include <stdlib.h>
4537#include <stdarg.h>
4538#include <string.h>
4539#include <float.h>
4540
4541int
4542main ()
4543{
4544
4545 ;
4546 return 0;
4547}
4548_ACEOF
4549if ac_fn_c_try_compile "$LINENO"; then :
4550 ac_cv_header_stdc=yes
4551else
4552 ac_cv_header_stdc=no
4553fi
4554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4555
4556if test $ac_cv_header_stdc = yes; then
4557 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4559/* end confdefs.h. */
4560#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004561
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004562_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004564 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004565
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004566else
Matthias Kloseb9621712010-04-24 17:59:49 +00004567 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004568fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004569rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004570
Matthias Kloseb9621712010-04-24 17:59:49 +00004571fi
4572
4573if test $ac_cv_header_stdc = yes; then
4574 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4576/* end confdefs.h. */
4577#include <stdlib.h>
4578
4579_ACEOF
4580if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4581 $EGREP "free" >/dev/null 2>&1; then :
4582
4583else
4584 ac_cv_header_stdc=no
4585fi
4586rm -f conftest*
4587
4588fi
4589
4590if test $ac_cv_header_stdc = yes; then
4591 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4592 if test "$cross_compiling" = yes; then :
4593 :
4594else
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596/* end confdefs.h. */
4597#include <ctype.h>
4598#include <stdlib.h>
4599#if ((' ' & 0x0FF) == 0x020)
4600# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4601# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4602#else
4603# define ISLOWER(c) \
4604 (('a' <= (c) && (c) <= 'i') \
4605 || ('j' <= (c) && (c) <= 'r') \
4606 || ('s' <= (c) && (c) <= 'z'))
4607# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4608#endif
4609
4610#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4611int
4612main ()
4613{
4614 int i;
4615 for (i = 0; i < 256; i++)
4616 if (XOR (islower (i), ISLOWER (i))
4617 || toupper (i) != TOUPPER (i))
4618 return 2;
4619 return 0;
4620}
4621_ACEOF
4622if ac_fn_c_try_run "$LINENO"; then :
4623
4624else
4625 ac_cv_header_stdc=no
4626fi
4627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4628 conftest.$ac_objext conftest.beam conftest.$ac_ext
4629fi
4630
4631fi
4632fi
4633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4634$as_echo "$ac_cv_header_stdc" >&6; }
4635if test $ac_cv_header_stdc = yes; then
4636
4637$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4638
4639fi
4640
4641# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4642for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4643 inttypes.h stdint.h unistd.h
4644do :
4645 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4646ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4647"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004648if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004649 cat >>confdefs.h <<_ACEOF
4650#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4651_ACEOF
4652
4653fi
4654
4655done
4656
4657
4658
4659 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 +02004660if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004661 MINIX=yes
4662else
4663 MINIX=
4664fi
4665
4666
4667 if test "$MINIX" = yes; then
4668
4669$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4670
4671
4672$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4673
4674
4675$as_echo "#define _MINIX 1" >>confdefs.h
4676
4677 fi
4678
4679
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4681$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004682if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004683 $as_echo_n "(cached) " >&6
4684else
4685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4686/* end confdefs.h. */
4687
4688# define __EXTENSIONS__ 1
4689 $ac_includes_default
4690int
4691main ()
4692{
4693
4694 ;
4695 return 0;
4696}
4697_ACEOF
4698if ac_fn_c_try_compile "$LINENO"; then :
4699 ac_cv_safe_to_define___extensions__=yes
4700else
4701 ac_cv_safe_to_define___extensions__=no
4702fi
4703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4704fi
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4706$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4707 test $ac_cv_safe_to_define___extensions__ = yes &&
4708 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4709
4710 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4711
4712 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4713
4714 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4715
4716 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4717
4718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720# Check for unsupported systems
4721case $ac_sys_system/$ac_sys_release in
4722atheos*|Linux*/1*)
4723 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4724 echo See README for details.
4725 exit 1;;
4726esac
4727
4728
Matthias Kloseb9621712010-04-24 17:59:49 +00004729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4730$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004731
4732# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004733if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004734 withval=$with_suffix;
4735 case $withval in
4736 no) EXEEXT=;;
4737 yes) EXEEXT=.exe;;
4738 *) EXEEXT=$withval;;
4739 esac
4740fi
4741
Matthias Kloseb9621712010-04-24 17:59:49 +00004742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4743$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744
4745# Test whether we're running on a non-case-sensitive system, in which
4746# case we give a warning if no ext is given
4747
Matthias Kloseb9621712010-04-24 17:59:49 +00004748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4749$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750if test ! -d CaseSensitiveTestDir; then
4751mkdir CaseSensitiveTestDir
4752fi
4753
4754if test -d casesensitivetestdir
4755then
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4757$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758 BUILDEXEEXT=.exe
4759else
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004762 BUILDEXEEXT=$EXEEXT
4763fi
4764rmdir CaseSensitiveTestDir
4765
4766case $MACHDEP in
4767bsdos*)
4768 case $CC in
4769 gcc) CC="$CC -D_HAVE_BSDI";;
4770 esac;;
4771esac
4772
4773case $ac_sys_system in
4774hp*|HP*)
4775 case $CC in
4776 cc|*/cc) CC="$CC -Ae";;
4777 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778esac
4779
4780
4781
Matthias Kloseb9621712010-04-24 17:59:49 +00004782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4783$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784if test -z "$LIBRARY"
4785then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004786 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4789$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004790
4791# LDLIBRARY is the name of the library to link against (as opposed to the
4792# name of the library into which to insert object files). BLDLIBRARY is also
4793# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4794# is blank as the main program is not linked directly against LDLIBRARY.
4795# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4796# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4797# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4798# DLLLIBRARY is the shared (i.e., DLL) library.
4799#
4800# RUNSHARED is used to run shared python without installed libraries
4801#
4802# INSTSONAME is the name of the shared library that will be use to install
4803# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004804#
4805# LDVERSION is the shared library version number, normally the Python version
4806# with the ABI build flags appended.
4807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808
4809
4810
4811
4812
4813
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004815LDLIBRARY="$LIBRARY"
4816BLDLIBRARY='$(LDLIBRARY)'
4817INSTSONAME='$(LDLIBRARY)'
4818DLLLIBRARY=''
4819LDLIBRARYDIR=''
4820RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004821LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822
4823# LINKCC is the command that links the python executable -- default is $(CC).
4824# If CXX is set, and if it is needed to link a main function that was
4825# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4826# python might then depend on the C++ runtime
4827# This is altered for AIX in order to build the export list before
4828# linking.
4829
Matthias Kloseb9621712010-04-24 17:59:49 +00004830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4831$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832if test -z "$LINKCC"
4833then
4834 LINKCC='$(PURIFY) $(MAINCC)'
4835 case $ac_sys_system in
4836 AIX*)
4837 exp_extra="\"\""
4838 if test $ac_sys_release -ge 5 -o \
4839 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4840 exp_extra="."
4841 fi
4842 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843 QNX*)
4844 # qcc must be used because the other compilers do not
4845 # support -N.
4846 LINKCC=qcc;;
4847 esac
4848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4850$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004851
4852# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4853# make sure we default having it set to "no": this is used by
4854# distutils.unixccompiler to know if it should add --enable-new-dtags
4855# to linker command lines, and failing to detect GNU ld simply results
4856# in the same bahaviour as before.
4857
Matthias Kloseb9621712010-04-24 17:59:49 +00004858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4859$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860ac_prog=ld
4861if test "$GCC" = yes; then
4862 ac_prog=`$CC -print-prog-name=ld`
4863fi
4864case `"$ac_prog" -V 2>&1 < /dev/null` in
4865 *GNU*)
4866 GNULD=yes;;
4867 *)
4868 GNULD=no;;
4869esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4871$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4874$as_echo_n "checking for inline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004875if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004876 $as_echo_n "(cached) " >&6
4877else
4878 ac_cv_c_inline=no
4879for ac_kw in inline __inline__ __inline; do
4880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4881/* end confdefs.h. */
4882#ifndef __cplusplus
4883typedef int foo_t;
4884static $ac_kw foo_t static_foo () {return 0; }
4885$ac_kw foo_t foo () {return 0; }
4886#endif
4887
4888_ACEOF
4889if ac_fn_c_try_compile "$LINENO"; then :
4890 ac_cv_c_inline=$ac_kw
4891fi
4892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4893 test "$ac_cv_c_inline" != no && break
4894done
4895
4896fi
4897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4898$as_echo "$ac_cv_c_inline" >&6; }
4899
4900case $ac_cv_c_inline in
4901 inline | yes) ;;
4902 *)
4903 case $ac_cv_c_inline in
4904 no) ac_val=;;
4905 *) ac_val=$ac_cv_c_inline;;
4906 esac
4907 cat >>confdefs.h <<_ACEOF
4908#ifndef __cplusplus
4909#define inline $ac_val
4910#endif
4911_ACEOF
4912 ;;
4913esac
4914
4915if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004916
4917$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004918
4919
4920fi
4921
4922
Matthias Kloseb9621712010-04-24 17:59:49 +00004923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4924$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004926if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 enableval=$enable_shared;
4928fi
4929
4930
4931if test -z "$enable_shared"
4932then
4933 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004934 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935 enable_shared="yes";;
4936 *)
4937 enable_shared="no";;
4938 esac
4939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4941$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942
Matthias Kloseb9621712010-04-24 17:59:49 +00004943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4944$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004946if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 enableval=$enable_profiling; ac_save_cc="$CC"
4948 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004949 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 ac_enable_profiling="no"
4951else
Matthias Kloseb9621712010-04-24 17:59:49 +00004952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953/* end confdefs.h. */
4954int main() { return 0; }
4955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004956if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957 ac_enable_profiling="yes"
4958else
Matthias Kloseb9621712010-04-24 17:59:49 +00004959 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963fi
4964
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965 CC="$ac_save_cc"
4966fi
4967
Matthias Kloseb9621712010-04-24 17:59:49 +00004968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4969$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970
4971case "$ac_enable_profiling" in
4972 "yes")
4973 BASECFLAGS="-pg $BASECFLAGS"
4974 LDFLAGS="-pg $LDFLAGS"
4975 ;;
4976esac
4977
Matthias Kloseb9621712010-04-24 17:59:49 +00004978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4979$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980
4981# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4982# library that we build, but we do not want to link against it (we
4983# will find it with a -framework option). For this reason there is an
4984# extra variable BLDLIBRARY against which Python and the extension
4985# modules are linked, BLDLIBRARY. This is normally the same as
4986# LDLIBRARY, but empty for MacOSX framework builds.
4987if test "$enable_framework"
4988then
4989 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4990 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4991 BLDLIBRARY=''
4992else
4993 BLDLIBRARY='$(LDLIBRARY)'
4994fi
4995
4996# Other platforms follow
4997if test $enable_shared = "yes"; then
4998
Matthias Kloseb9621712010-04-24 17:59:49 +00004999$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000
5001 case $ac_sys_system in
5002 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005003 LDLIBRARY='libpython$(LDVERSION).dll.a'
5004 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005 ;;
5006 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005007 LDLIBRARY='libpython$(LDVERSION).so'
5008 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5010 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005011 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005012 then
5013 PY3LIBRARY=libpython3.so
5014 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005016 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005017 LDLIBRARY='libpython$(LDVERSION).so'
5018 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5020 case $ac_sys_system in
5021 FreeBSD*)
5022 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5023 ;;
5024 esac
5025 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005026 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005027 then
5028 PY3LIBRARY=libpython3.so
5029 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030 ;;
5031 hp*|HP*)
5032 case `uname -m` in
5033 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005034 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035 ;;
5036 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005037 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005038 ;;
5039 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005040 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005041 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5042 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005044 LDLIBRARY='libpython$(LDVERSION).dylib'
5045 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005046 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5047 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005048 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005049 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005050 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5051 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052
5053 esac
5054else # shared is disabled
5055 case $ac_sys_system in
5056 CYGWIN*)
5057 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005058 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059 ;;
5060 esac
5061fi
5062
Matthias Kloseb9621712010-04-24 17:59:49 +00005063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5064$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065
5066if test -n "$ac_tool_prefix"; then
5067 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5068set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005071if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073else
5074 if test -n "$RANLIB"; then
5075 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5076else
5077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5084 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086 break 2
5087 fi
5088done
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090IFS=$as_save_IFS
5091
5092fi
5093fi
5094RANLIB=$ac_cv_prog_RANLIB
5095if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5097$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005098else
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005101fi
5102
5103
5104fi
5105if test -z "$ac_cv_prog_RANLIB"; then
5106 ac_ct_RANLIB=$RANLIB
5107 # Extract the first word of "ranlib", so it can be a program name with args.
5108set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5110$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005111if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005113else
5114 if test -n "$ac_ct_RANLIB"; then
5115 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5116else
5117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118for as_dir in $PATH
5119do
5120 IFS=$as_save_IFS
5121 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5124 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126 break 2
5127 fi
5128done
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130IFS=$as_save_IFS
5131
5132fi
5133fi
5134ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5135if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5137$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138else
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5140$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141fi
5142
5143 if test "x$ac_ct_RANLIB" = x; then
5144 RANLIB=":"
5145 else
5146 case $cross_compiling:$ac_tool_warned in
5147yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150ac_tool_warned=yes ;;
5151esac
5152 RANLIB=$ac_ct_RANLIB
5153 fi
5154else
5155 RANLIB="$ac_cv_prog_RANLIB"
5156fi
5157
5158
5159for ac_prog in ar aal
5160do
5161 # Extract the first word of "$ac_prog", so it can be a program name with args.
5162set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5164$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005165if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005166 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005167else
5168 if test -n "$AR"; then
5169 ac_cv_prog_AR="$AR" # Let the user override the test.
5170else
5171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5172for as_dir in $PATH
5173do
5174 IFS=$as_save_IFS
5175 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005176 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005177 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5178 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005179 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005180 break 2
5181 fi
5182done
Matthias Kloseb9621712010-04-24 17:59:49 +00005183 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005184IFS=$as_save_IFS
5185
5186fi
5187fi
5188AR=$ac_cv_prog_AR
5189if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5191$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005192else
Matthias Kloseb9621712010-04-24 17:59:49 +00005193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5194$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195fi
5196
5197
5198 test -n "$AR" && break
5199done
5200test -n "$AR" || AR="ar"
5201
5202
5203# tweak ARFLAGS only if the user didn't set it on the command line
5204
5205if test -z "$ARFLAGS"
5206then
5207 ARFLAGS="rc"
5208fi
5209
5210
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005211DISABLE_ASDLGEN=""
5212# Extract the first word of "python", so it can be a program name with args.
5213set dummy python; ac_word=$2
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005216if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005217 $as_echo_n "(cached) " >&6
5218else
5219 if test -n "$HAS_PYTHON"; then
5220 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5221else
5222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5223for as_dir in $PATH
5224do
5225 IFS=$as_save_IFS
5226 test -z "$as_dir" && as_dir=.
5227 for ac_exec_ext in '' $ac_executable_extensions; do
5228 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5229 ac_cv_prog_HAS_PYTHON="found"
5230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5231 break 2
5232 fi
5233done
5234 done
5235IFS=$as_save_IFS
5236
5237 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5238fi
5239fi
5240HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5241if test -n "$HAS_PYTHON"; then
5242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5243$as_echo "$HAS_PYTHON" >&6; }
5244else
5245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246$as_echo "no" >&6; }
5247fi
5248
5249
5250if test $HAS_HG != found -o $HAS_PYTHON != found
5251then
5252 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5253fi
5254
5255
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005256case $MACHDEP in
5257bsdos*|hp*|HP*)
5258 # install -d does not work on BSDI or HP-UX
5259 if test -z "$INSTALL"
5260 then
5261 INSTALL="${srcdir}/install-sh -c"
5262 fi
5263esac
5264ac_aux_dir=
5265for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005266 if test -f "$ac_dir/install-sh"; then
5267 ac_aux_dir=$ac_dir
5268 ac_install_sh="$ac_aux_dir/install-sh -c"
5269 break
5270 elif test -f "$ac_dir/install.sh"; then
5271 ac_aux_dir=$ac_dir
5272 ac_install_sh="$ac_aux_dir/install.sh -c"
5273 break
5274 elif test -f "$ac_dir/shtool"; then
5275 ac_aux_dir=$ac_dir
5276 ac_install_sh="$ac_aux_dir/shtool install -c"
5277 break
5278 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005279done
5280if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005281 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005282fi
5283
5284# These three variables are undocumented and unsupported,
5285# and are intended to be withdrawn in a future Autoconf release.
5286# They can cause serious problems if a builder's source tree is in a directory
5287# whose full name contains unusual characters.
5288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5291
5292
5293# Find a good install program. We prefer a C program (faster),
5294# so one script is as good as another. But avoid the broken or
5295# incompatible versions:
5296# SysV /etc/install, /usr/sbin/install
5297# SunOS /usr/etc/install
5298# IRIX /sbin/install
5299# AIX /bin/install
5300# AmigaOS /C/install, which installs bootblocks on floppy discs
5301# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5302# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5303# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5304# OS/2's system install, which has a completely different semantic
5305# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005306# Reject install programs that cannot install multiple files.
5307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5308$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309if test -z "$INSTALL"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005310if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005311 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312else
5313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5314for as_dir in $PATH
5315do
5316 IFS=$as_save_IFS
5317 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005318 # Account for people who put trailing slashes in PATH elements.
5319case $as_dir/ in #((
5320 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005322 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323 /usr/ucb/* ) ;;
5324 *)
5325 # OSF1 and SCO ODT 3.0 have their own names for install.
5326 # Don't use installbsd from OSF since it installs stuff as root
5327 # by default.
5328 for ac_prog in ginstall scoinst install; do
5329 for ac_exec_ext in '' $ac_executable_extensions; do
5330 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5331 if test $ac_prog = install &&
5332 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5333 # AIX install. It has an incompatible calling convention.
5334 :
5335 elif test $ac_prog = install &&
5336 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5337 # program-specific install script used by HP pwplus--don't use.
5338 :
5339 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005340 rm -rf conftest.one conftest.two conftest.dir
5341 echo one > conftest.one
5342 echo two > conftest.two
5343 mkdir conftest.dir
5344 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5345 test -s conftest.one && test -s conftest.two &&
5346 test -s conftest.dir/conftest.one &&
5347 test -s conftest.dir/conftest.two
5348 then
5349 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5350 break 3
5351 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 fi
5353 fi
5354 done
5355 done
5356 ;;
5357esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005358
5359 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360IFS=$as_save_IFS
5361
Matthias Kloseb9621712010-04-24 17:59:49 +00005362rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005363
5364fi
5365 if test "${ac_cv_path_install+set}" = set; then
5366 INSTALL=$ac_cv_path_install
5367 else
5368 # As a last resort, use the slow shell script. Don't cache a
5369 # value for INSTALL within a source directory, because that will
5370 # break other packages using the cache if that directory is
5371 # removed, or if the value is a relative name.
5372 INSTALL=$ac_install_sh
5373 fi
5374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5376$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377
5378# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5379# It thinks the first close brace ends the variable substitution.
5380test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5381
5382test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5383
5384test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5385
5386
5387# Not every filesystem supports hard links
5388
5389if test -z "$LN" ; then
5390 case $ac_sys_system in
5391 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392 *) LN=ln;;
5393 esac
5394fi
5395
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005396# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005397
5398ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005399
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005400# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5402$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005403
5404# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005405if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406 withval=$with_pydebug;
5407if test "$withval" != no
5408then
5409
Matthias Kloseb9621712010-04-24 17:59:49 +00005410$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5413$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005415 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005416else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5417$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418fi
5419else
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5421$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422fi
5423
5424
5425# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5426# merged with this chunk of code?
5427
5428# Optimizer/debugger flags
5429# ------------------------
5430# (The following bit of code is complicated enough - please keep things
5431# indented properly. Just pretend you're editing Python code. ;-)
5432
5433# There are two parallel sets of case statements below, one that checks to
5434# see if OPT was set and one that does BASECFLAGS setting based upon
5435# compiler and platform. BASECFLAGS tweaks need to be made even if the
5436# user set OPT.
5437
5438# tweak OPT based on compiler and platform, only if the user didn't set
5439# it on the command line
5440
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005441if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442then
5443 case $GCC in
5444 yes)
5445 if test "$CC" != 'g++' ; then
5446 STRICT_PROTO="-Wstrict-prototypes"
5447 fi
5448 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5449 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5450 WRAP="-fwrapv"
5451 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005452
5453 # Clang also needs -fwrapv
5454 if test "$CC" = "clang" ; then
5455 WRAP="-fwrapv"
5456 fi
5457
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458 case $ac_cv_prog_cc_g in
5459 yes)
5460 if test "$Py_DEBUG" = 'true' ; then
5461 # Optimization messes up debuggers, so turn it off for
5462 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005463 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464 else
5465 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5466 fi
5467 ;;
5468 *)
5469 OPT="-O3 -Wall $STRICT_PROTO"
5470 ;;
5471 esac
5472 case $ac_sys_system in
5473 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5474 ;;
5475 esac
5476 ;;
5477
5478 *)
5479 OPT="-O"
5480 ;;
5481 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482fi
5483
5484
5485
5486# The -arch flags for universal builds on OSX
5487UNIVERSAL_ARCH_FLAGS=
5488
5489
5490# tweak BASECFLAGS based on compiler and platform
5491case $GCC in
5492yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005493 # Python doesn't violate C99 aliasing rules, but older versions of
5494 # GCC produce warnings for legal Python code. Enable
5495 # -fno-strict-aliasing on versions of GCC that support but produce
5496 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5498$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499 ac_save_cc="$CC"
5500 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005501 save_CFLAGS="$CFLAGS"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005502 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005503 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005504else
Matthias Kloseb9621712010-04-24 17:59:49 +00005505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005506/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005507
Matthias Kloseb159a552010-04-25 21:00:44 +00005508
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005509int
5510main ()
5511{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005512
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005513 ;
5514 return 0;
5515}
Matthias Kloseb159a552010-04-25 21:00:44 +00005516
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005518if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005519
5520 CC="$ac_save_cc -fstrict-aliasing"
5521 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005523/* end confdefs.h. */
5524
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005525 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005526int
5527main ()
5528{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005529double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005530 ;
5531 return 0;
5532}
Matthias Kloseb159a552010-04-25 21:00:44 +00005533
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005535if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005536
5537 ac_cv_no_strict_aliasing=no
5538
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539else
Matthias Kloseb159a552010-04-25 21:00:44 +00005540
5541 ac_cv_no_strict_aliasing=yes
5542
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005543fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005545
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005546else
Matthias Kloseb159a552010-04-25 21:00:44 +00005547
5548 ac_cv_no_strict_aliasing=no
5549
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005552fi
5553
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005554 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5557$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005558 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559 then
5560 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5561 fi
5562
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
5564$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
5565 ac_save_cc="$CC"
5566 CC="$CC -Wunused-result -Werror"
5567 save_CFLAGS="$CFLAGS"
5568 if ${ac_cv_disable_unused_result_warning+:} false; then :
5569 $as_echo_n "(cached) " >&6
5570else
5571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5572/* end confdefs.h. */
5573
5574
5575int
5576main ()
5577{
5578
5579 ;
5580 return 0;
5581}
5582
5583_ACEOF
5584if ac_fn_c_try_compile "$LINENO"; then :
5585
5586 ac_cv_disable_unused_result_warning=yes
5587
5588else
5589
5590 ac_cv_disable_unused_result_warning=no
5591
5592fi
5593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5594fi
5595
5596 CFLAGS="$save_CFLAGS"
5597 CC="$ac_save_cc"
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
5599$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
5600
5601 if test $ac_cv_disable_unused_result_warning = yes
5602 then
5603 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
5604 fi
5605
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5607 # support. Without this, treatment of subnormals doesn't follow
5608 # the standard.
5609 case $ac_sys_machine in
5610 alpha*)
5611 BASECFLAGS="$BASECFLAGS -mieee"
5612 ;;
5613 esac
5614
5615 case $ac_sys_system in
5616 SCO_SV*)
5617 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5618 ;;
5619 # is there any other compiler on Darwin besides gcc?
5620 Darwin*)
5621 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5622 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005623 if test "${CC}" = gcc
5624 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5626$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005627 case "${UNIVERSALSDK}" in
5628 */MacOSX10.4u.sdk)
5629 # Build using 10.4 SDK, force usage of gcc when the
5630 # compiler is gcc, otherwise the user will get very
5631 # confusing error messages when building on OSX 10.6
5632 CC=gcc-4.0
5633 CPP=cpp-4.0
5634 ;;
5635 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5637$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005638 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639
5640
5641 if test "${enable_universalsdk}"; then
5642 UNIVERSAL_ARCH_FLAGS=""
5643 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5644 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5645 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005646 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5648 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005649 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005650 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651
5652 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5653 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005654 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005655 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005657 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5658 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005659 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005660 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005661
5662 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5663 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005664 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005665 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005668 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 +00005669
5670 fi
5671
5672
Ronald Oussoren666028b2010-04-18 19:07:43 +00005673 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5674 if test "${UNIVERSALSDK}" != "/"
5675 then
5676 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5677 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005678 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 fi
5680 fi
5681
5682 # Calculate the right deployment target for this build.
5683 #
5684 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5685 if test ${cur_target} '>' 10.2; then
5686 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005687 if test ${enable_universalsdk}; then
5688 if test "${UNIVERSAL_ARCHS}" = "all"; then
5689 # Ensure that the default platform for a
5690 # 4-way universal build is OSX 10.5,
5691 # that's the first OS release where
5692 # 4-way builds make sense.
5693 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005694
5695 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5696 cur_target='10.5'
5697
5698 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5699 cur_target='10.5'
5700
5701 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5702 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005703 fi
5704 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005705 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005706 # On Intel macs default to a deployment
5707 # target of 10.4, that's the first OSX
5708 # release with Intel support.
5709 cur_target="10.4"
5710 fi
5711 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 fi
5713 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5714
5715 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5716 # environment with a value that is the same as what we'll use
5717 # in the Makefile to ensure that we'll get the same compiler
5718 # environment during configure and build time.
5719 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5720 export MACOSX_DEPLOYMENT_TARGET
5721 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5722
5723 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724 esac
5725 ;;
5726
5727*)
5728 case $ac_sys_system in
5729 OpenUNIX*|UnixWare*)
5730 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5731 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732 SCO_SV*)
5733 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5734 ;;
5735 esac
5736 ;;
5737esac
5738
5739if test "$Py_DEBUG" = 'true'; then
5740 :
5741else
5742 OPT="-DNDEBUG $OPT"
5743fi
5744
5745if test "$ac_arch_flags"
5746then
5747 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5748fi
5749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750# Check whether GCC supports PyArg_ParseTuple format
5751if test "$GCC" = "yes"
5752then
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5754$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755 save_CFLAGS=$CFLAGS
5756 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758/* end confdefs.h. */
5759
5760 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761int
5762main ()
5763{
5764
5765 ;
5766 return 0;
5767}
Matthias Kloseb159a552010-04-25 21:00:44 +00005768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005770if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771
Matthias Kloseb159a552010-04-25 21:00:44 +00005772
Matthias Kloseb9621712010-04-24 17:59:49 +00005773$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774
Matthias Kloseb159a552010-04-25 21:00:44 +00005775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005776$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005777
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778else
Matthias Kloseb159a552010-04-25 21:00:44 +00005779
5780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005781$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782
5783fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5785 CFLAGS=$save_CFLAGS
5786fi
5787
5788# On some compilers, pthreads are available without further options
5789# (e.g. MacOS X). On some of these systems, the compiler will not
5790# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5791# So we have to see first whether pthreads are available without
5792# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5794$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005795if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005796 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797else
Matthias Kloseb9621712010-04-24 17:59:49 +00005798 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799 ac_cv_pthread_is_default=no
5800else
Matthias Kloseb9621712010-04-24 17:59:49 +00005801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802/* end confdefs.h. */
5803
5804#include <pthread.h>
5805
5806void* routine(void* p){return NULL;}
5807
5808int main(){
5809 pthread_t p;
5810 if(pthread_create(&p,NULL,routine,NULL)!=0)
5811 return 1;
5812 (void)pthread_detach(p);
5813 return 0;
5814}
5815
5816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005817if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818
5819 ac_cv_pthread_is_default=yes
5820 ac_cv_kthread=no
5821 ac_cv_pthread=no
5822
5823else
Matthias Kloseb9621712010-04-24 17:59:49 +00005824 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828fi
5829
5830
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831fi
5832
Matthias Kloseb9621712010-04-24 17:59:49 +00005833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5834$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835
5836
5837if test $ac_cv_pthread_is_default = yes
5838then
5839 ac_cv_kpthread=no
5840else
5841# -Kpthread, if available, provides the right #defines
5842# and linker options to make pthread_create available
5843# Some compilers won't report that they do not support -Kpthread,
5844# so we need to run a program to see whether it really made the
5845# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5847$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005848if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005849 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850else
5851 ac_save_cc="$CC"
5852CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005853if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854 ac_cv_kpthread=no
5855else
Matthias Kloseb9621712010-04-24 17:59:49 +00005856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857/* end confdefs.h. */
5858
5859#include <pthread.h>
5860
5861void* routine(void* p){return NULL;}
5862
5863int main(){
5864 pthread_t p;
5865 if(pthread_create(&p,NULL,routine,NULL)!=0)
5866 return 1;
5867 (void)pthread_detach(p);
5868 return 0;
5869}
5870
5871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005872if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873 ac_cv_kpthread=yes
5874else
Matthias Kloseb9621712010-04-24 17:59:49 +00005875 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879fi
5880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881CC="$ac_save_cc"
5882fi
5883
Matthias Kloseb9621712010-04-24 17:59:49 +00005884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5885$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
5887
5888if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5889then
5890# -Kthread, if available, provides the right #defines
5891# and linker options to make pthread_create available
5892# Some compilers won't report that they do not support -Kthread,
5893# so we need to run a program to see whether it really made the
5894# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5896$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005897if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005898 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899else
5900 ac_save_cc="$CC"
5901CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005902if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ac_cv_kthread=no
5904else
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906/* end confdefs.h. */
5907
5908#include <pthread.h>
5909
5910void* routine(void* p){return NULL;}
5911
5912int main(){
5913 pthread_t p;
5914 if(pthread_create(&p,NULL,routine,NULL)!=0)
5915 return 1;
5916 (void)pthread_detach(p);
5917 return 0;
5918}
5919
5920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005921if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ac_cv_kthread=yes
5923else
Matthias Kloseb9621712010-04-24 17:59:49 +00005924 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928fi
5929
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930CC="$ac_save_cc"
5931fi
5932
Matthias Kloseb9621712010-04-24 17:59:49 +00005933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5934$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935fi
5936
5937if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5938then
5939# -pthread, if available, provides the right #defines
5940# and linker options to make pthread_create available
5941# Some compilers won't report that they do not support -pthread,
5942# so we need to run a program to see whether it really made the
5943# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5945$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005946if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948else
5949 ac_save_cc="$CC"
5950CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005951if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 ac_cv_pthread=no
5953else
Matthias Kloseb9621712010-04-24 17:59:49 +00005954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955/* end confdefs.h. */
5956
5957#include <pthread.h>
5958
5959void* routine(void* p){return NULL;}
5960
5961int main(){
5962 pthread_t p;
5963 if(pthread_create(&p,NULL,routine,NULL)!=0)
5964 return 1;
5965 (void)pthread_detach(p);
5966 return 0;
5967}
5968
5969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005970if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 ac_cv_pthread=yes
5972else
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5976 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977fi
5978
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979CC="$ac_save_cc"
5980fi
5981
Matthias Kloseb9621712010-04-24 17:59:49 +00005982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5983$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984fi
5985
5986# If we have set a CC compiler flag for thread support then
5987# check if it works for CXX, too.
5988ac_cv_cxx_thread=no
5989if test ! -z "$CXX"
5990then
Matthias Kloseb9621712010-04-24 17:59:49 +00005991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5992$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993ac_save_cxx="$CXX"
5994
5995if test "$ac_cv_kpthread" = "yes"
5996then
5997 CXX="$CXX -Kpthread"
5998 ac_cv_cxx_thread=yes
5999elif test "$ac_cv_kthread" = "yes"
6000then
6001 CXX="$CXX -Kthread"
6002 ac_cv_cxx_thread=yes
6003elif test "$ac_cv_pthread" = "yes"
6004then
6005 CXX="$CXX -pthread"
6006 ac_cv_cxx_thread=yes
6007fi
6008
6009if test $ac_cv_cxx_thread = yes
6010then
6011 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6012 $CXX -c conftest.$ac_ext 2>&5
6013 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6014 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6015 then
6016 ac_cv_cxx_thread=yes
6017 else
6018 ac_cv_cxx_thread=no
6019 fi
6020 rm -fr conftest*
6021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6023$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024fi
6025CXX="$ac_save_cxx"
6026
6027
6028# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6030$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006031if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033else
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035/* end confdefs.h. */
6036#include <stdlib.h>
6037#include <stdarg.h>
6038#include <string.h>
6039#include <float.h>
6040
6041int
6042main ()
6043{
6044
6045 ;
6046 return 0;
6047}
6048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006049if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 ac_cv_header_stdc=yes
6051else
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6055
6056if test $ac_cv_header_stdc = yes; then
6057 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059/* end confdefs.h. */
6060#include <string.h>
6061
6062_ACEOF
6063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006064 $EGREP "memchr" >/dev/null 2>&1; then :
6065
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066else
6067 ac_cv_header_stdc=no
6068fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006069rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070
6071fi
6072
6073if test $ac_cv_header_stdc = yes; then
6074 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076/* end confdefs.h. */
6077#include <stdlib.h>
6078
6079_ACEOF
6080if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 $EGREP "free" >/dev/null 2>&1; then :
6082
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083else
6084 ac_cv_header_stdc=no
6085fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006086rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087
6088fi
6089
6090if test $ac_cv_header_stdc = yes; then
6091 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093 :
6094else
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096/* end confdefs.h. */
6097#include <ctype.h>
6098#include <stdlib.h>
6099#if ((' ' & 0x0FF) == 0x020)
6100# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6101# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6102#else
6103# define ISLOWER(c) \
6104 (('a' <= (c) && (c) <= 'i') \
6105 || ('j' <= (c) && (c) <= 'r') \
6106 || ('s' <= (c) && (c) <= 'z'))
6107# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6108#endif
6109
6110#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6111int
6112main ()
6113{
6114 int i;
6115 for (i = 0; i < 256; i++)
6116 if (XOR (islower (i), ISLOWER (i))
6117 || toupper (i) != TOUPPER (i))
6118 return 2;
6119 return 0;
6120}
6121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006122if ac_fn_c_try_run "$LINENO"; then :
6123
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006124else
Matthias Kloseb9621712010-04-24 17:59:49 +00006125 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006129fi
6130
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006131fi
6132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6134$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006135if test $ac_cv_header_stdc = yes; then
6136
Matthias Kloseb9621712010-04-24 17:59:49 +00006137$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006138
6139fi
6140
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006141for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006142fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006143ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006144sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006145unistd.h utime.h \
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006146sys/audioio.h sys/xattr.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006147sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006148sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6149sys/stat.h sys/termio.h sys/time.h \
6150sys/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 -07006151libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006152bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006153do :
6154 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6155ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006156if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006157 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006158#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006159_ACEOF
6160
6161fi
6162
Guido van Rossum627b2d71993-12-24 10:39:16 +00006163done
6164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006165ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006166for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006167 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6169$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006170if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006171 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006172else
Matthias Kloseb9621712010-04-24 17:59:49 +00006173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006174/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006175#include <sys/types.h>
6176#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006177
Martin v. Löwis11437992002-04-12 09:54:03 +00006178int
6179main ()
6180{
6181if ((DIR *) 0)
6182return 0;
6183 ;
6184 return 0;
6185}
6186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006188 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006189else
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006194eval ac_res=\$$as_ac_Header
6195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6196$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006197if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006198 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006199#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006200_ACEOF
6201
6202ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006203fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006204
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006205done
6206# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6207if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6209$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006210if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006211 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006212else
Martin v. Löwis11437992002-04-12 09:54:03 +00006213 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006217/* Override any GCC internal prototype to avoid an error.
6218 Use char because int might match the return type of a GCC
6219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006220#ifdef __cplusplus
6221extern "C"
6222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006223char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006224int
6225main ()
6226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006227return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006228 ;
6229 return 0;
6230}
6231_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006232for ac_lib in '' dir; do
6233 if test -z "$ac_lib"; then
6234 ac_res="none required"
6235 else
6236 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006237 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006238 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006239 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006242rm -f core conftest.err conftest.$ac_objext \
6243 conftest$ac_exeext
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006244 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006245 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006247done
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006248if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006250else
6251 ac_cv_search_opendir=no
6252fi
6253rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006254LIBS=$ac_func_search_save_LIBS
6255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6257$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006258ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006259if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006260 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006261
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006262fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006263
Michael W. Hudson54241132001-12-07 15:38:26 +00006264else
Matthias Kloseb9621712010-04-24 17:59:49 +00006265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6266$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006267if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006268 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006269else
6270 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006274/* Override any GCC internal prototype to avoid an error.
6275 Use char because int might match the return type of a GCC
6276 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006277#ifdef __cplusplus
6278extern "C"
6279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006280char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006281int
6282main ()
6283{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006284return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006285 ;
6286 return 0;
6287}
6288_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006289for ac_lib in '' x; do
6290 if test -z "$ac_lib"; then
6291 ac_res="none required"
6292 else
6293 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006294 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006295 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006296 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006297 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006299rm -f core conftest.err conftest.$ac_objext \
6300 conftest$ac_exeext
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006301 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006302 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006304done
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006305if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006307else
6308 ac_cv_search_opendir=no
6309fi
6310rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006311LIBS=$ac_func_search_save_LIBS
6312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6314$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006315ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006316if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006317 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006318
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006319fi
6320
6321fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006322
Matthias Kloseb9621712010-04-24 17:59:49 +00006323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6324$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006325if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006326 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006327else
Matthias Kloseb9621712010-04-24 17:59:49 +00006328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006329/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006330#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006331int
6332main ()
6333{
6334return makedev(0, 0);
6335 ;
6336 return 0;
6337}
6338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006339if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006340 ac_cv_header_sys_types_h_makedev=yes
6341else
Matthias Kloseb9621712010-04-24 17:59:49 +00006342 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006344rm -f core conftest.err conftest.$ac_objext \
6345 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006346
6347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6349$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006350
6351if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006352ac_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 +02006353if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006354
Matthias Kloseb9621712010-04-24 17:59:49 +00006355$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006356
6357fi
6358
6359
6360
6361 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006362 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 +02006363if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006364
Matthias Kloseb9621712010-04-24 17:59:49 +00006365$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006366
6367fi
6368
6369
6370 fi
6371fi
6372
Michael W. Hudson54241132001-12-07 15:38:26 +00006373
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006374# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6375for ac_header in net/if.h
6376do :
6377 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6378#ifdef STDC_HEADERS
6379# include <stdlib.h>
6380# include <stddef.h>
6381#else
6382# ifdef HAVE_STDLIB_H
6383# include <stdlib.h>
6384# endif
6385#endif
6386#ifdef HAVE_SYS_SOCKET_H
6387# include <sys/socket.h>
6388#endif
6389
6390"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006391if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006392 cat >>confdefs.h <<_ACEOF
6393#define HAVE_NET_IF_H 1
6394_ACEOF
6395
6396fi
6397
6398done
6399
6400
6401
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006402# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006403for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006404do :
6405 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006406#ifdef HAVE_CURSES_H
6407#include <curses.h>
6408#endif
6409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006411if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006412 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006413#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006414_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006415
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006416fi
6417
6418done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006419
6420
Martin v. Löwis11017b12006-01-14 18:12:57 +00006421# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006422for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006423do :
6424 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 +00006425#ifdef HAVE_ASM_TYPES_H
6426#include <asm/types.h>
6427#endif
6428#ifdef HAVE_SYS_SOCKET_H
6429#include <sys/socket.h>
6430#endif
6431
Matthias Kloseb9621712010-04-24 17:59:49 +00006432"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006433if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006434 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006435#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006436_ACEOF
6437
6438fi
6439
6440done
6441
6442
Guido van Rossum627b2d71993-12-24 10:39:16 +00006443# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006444was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6446$as_echo_n "checking for clock_t in time.h... " >&6; }
6447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006448/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006449#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006450
6451_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006453 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006454 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006455else
Martin v. Löwis11437992002-04-12 09:54:03 +00006456
6457
Matthias Kloseb9621712010-04-24 17:59:49 +00006458$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006459
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006460
Guido van Rossum627b2d71993-12-24 10:39:16 +00006461fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006462rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006463
Matthias Kloseb9621712010-04-24 17:59:49 +00006464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6465$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006466
Matthias Kloseb9621712010-04-24 17:59:49 +00006467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6468$as_echo_n "checking for makedev... " >&6; }
6469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006470/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006471
Jesus Cea740f53a2010-04-28 11:35:30 +00006472#if defined(MAJOR_IN_MKDEV)
6473#include <sys/mkdev.h>
6474#elif defined(MAJOR_IN_SYSMACROS)
6475#include <sys/sysmacros.h>
6476#else
6477#include <sys/types.h>
6478#endif
6479
Neal Norwitz11690112002-07-30 01:08:28 +00006480int
6481main ()
6482{
Jesus Cea740f53a2010-04-28 11:35:30 +00006483
6484 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006485 ;
6486 return 0;
6487}
Matthias Kloseb159a552010-04-25 21:00:44 +00006488
Neal Norwitz11690112002-07-30 01:08:28 +00006489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006490if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006491 ac_cv_has_makedev=yes
6492else
Matthias Kloseb9621712010-04-24 17:59:49 +00006493 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006495rm -f core conftest.err conftest.$ac_objext \
6496 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6498$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006499if test "$ac_cv_has_makedev" = "yes"; then
6500
Matthias Kloseb9621712010-04-24 17:59:49 +00006501$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006502
6503fi
6504
Martin v. Löwis399a6892002-10-04 10:22:02 +00006505# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6506# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6507# defined, but the compiler does not support pragma redefine_extname,
6508# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6509# structures (such as rlimit64) without declaring them. As a
6510# work-around, disable LFS on such configurations
6511
6512use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6514$as_echo_n "checking Solaris LFS bug... " >&6; }
6515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006516/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006517
6518#define _LARGEFILE_SOURCE 1
6519#define _FILE_OFFSET_BITS 64
6520#include <sys/resource.h>
6521
Martin v. Löwis399a6892002-10-04 10:22:02 +00006522int
6523main ()
6524{
6525struct rlimit foo;
6526 ;
6527 return 0;
6528}
6529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006530if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006531 sol_lfs_bug=no
6532else
Matthias Kloseb9621712010-04-24 17:59:49 +00006533 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6537$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006538if test "$sol_lfs_bug" = "yes"; then
6539 use_lfs=no
6540fi
6541
6542if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006543# Two defines needed to enable largefile support on various platforms
6544# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006545case $ac_sys_system/$ac_sys_release in
6546AIX*)
6547
6548$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6549
6550 ;;
6551esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006552
Matthias Kloseb9621712010-04-24 17:59:49 +00006553$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006554
6555
Matthias Kloseb9621712010-04-24 17:59:49 +00006556$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006557
Martin v. Löwis399a6892002-10-04 10:22:02 +00006558fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006559
Guido van Rossum84e7b241996-08-19 21:59:00 +00006560# Add some code to confdefs.h so that the test for off_t works on SCO
6561cat >> confdefs.h <<\EOF
6562#if defined(SCO_DS)
6563#undef _OFF_T
6564#endif
6565EOF
6566
Guido van Rossumef2255b2000-03-10 22:30:29 +00006567# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006568ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006569if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006570
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006571else
Martin v. Löwis11437992002-04-12 09:54:03 +00006572
6573cat >>confdefs.h <<_ACEOF
6574#define mode_t int
6575_ACEOF
6576
6577fi
6578
Matthias Kloseb9621712010-04-24 17:59:49 +00006579ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006580if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006581
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006582else
Martin v. Löwis11437992002-04-12 09:54:03 +00006583
6584cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006585#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006586_ACEOF
6587
6588fi
6589
Matthias Kloseb9621712010-04-24 17:59:49 +00006590ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006591if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006592
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006593else
Martin v. Löwis11437992002-04-12 09:54:03 +00006594
6595cat >>confdefs.h <<_ACEOF
6596#define pid_t int
6597_ACEOF
6598
6599fi
6600
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006601
Martin v. Löwis11437992002-04-12 09:54:03 +00006602cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006603#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006604_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006605
Matthias Kloseb9621712010-04-24 17:59:49 +00006606ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006607if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006608
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006609else
Martin v. Löwis11437992002-04-12 09:54:03 +00006610
6611cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006613_ACEOF
6614
6615fi
6616
Matthias Kloseb9621712010-04-24 17:59:49 +00006617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6618$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006619if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006620 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006621else
Matthias Kloseb9621712010-04-24 17:59:49 +00006622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006623/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006624#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006625
6626_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006627if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006628 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006629 ac_cv_type_uid_t=yes
6630else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006631 ac_cv_type_uid_t=no
6632fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006633rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006634
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6637$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006638if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006639
Matthias Kloseb9621712010-04-24 17:59:49 +00006640$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006641
6642
Matthias Kloseb9621712010-04-24 17:59:49 +00006643$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006644
6645fi
6646
Matthias Kloseb9621712010-04-24 17:59:49 +00006647ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6648case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006649 no|yes) ;; #(
6650 *)
6651
Matthias Kloseb9621712010-04-24 17:59:49 +00006652$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006653
6654
6655cat >>confdefs.h <<_ACEOF
6656#define uint32_t $ac_cv_c_uint32_t
6657_ACEOF
6658;;
6659 esac
6660
Matthias Kloseb9621712010-04-24 17:59:49 +00006661ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6662case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006663 no|yes) ;; #(
6664 *)
6665
Matthias Kloseb9621712010-04-24 17:59:49 +00006666$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006667
6668
6669cat >>confdefs.h <<_ACEOF
6670#define uint64_t $ac_cv_c_uint64_t
6671_ACEOF
6672;;
6673 esac
6674
Matthias Kloseb9621712010-04-24 17:59:49 +00006675ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6676case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006677 no|yes) ;; #(
6678 *)
6679
6680cat >>confdefs.h <<_ACEOF
6681#define int32_t $ac_cv_c_int32_t
6682_ACEOF
6683;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006684esac
6685
Matthias Kloseb9621712010-04-24 17:59:49 +00006686ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6687case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006688 no|yes) ;; #(
6689 *)
6690
6691cat >>confdefs.h <<_ACEOF
6692#define int64_t $ac_cv_c_int64_t
6693_ACEOF
6694;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006695esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006696
Matthias Kloseb9621712010-04-24 17:59:49 +00006697ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006698if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006699
Matthias Kloseb9621712010-04-24 17:59:49 +00006700$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006701
6702fi
6703
Jack Jansendd19cf82001-12-06 22:36:17 +00006704
Michael W. Hudson54241132001-12-07 15:38:26 +00006705# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006706# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006707# The cast to long int works around a bug in the HP C Compiler
6708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6710# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6712$as_echo_n "checking size of int... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006713if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006715else
Matthias Kloseb9621712010-04-24 17:59:49 +00006716 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 +00006717
Martin v. Löwis11437992002-04-12 09:54:03 +00006718else
Matthias Kloseb9621712010-04-24 17:59:49 +00006719 if test "$ac_cv_type_int" = yes; then
6720 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006722as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006723See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006724 else
6725 ac_cv_sizeof_int=0
6726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006728
Martin v. Löwis11437992002-04-12 09:54:03 +00006729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6731$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006732
6733
6734
Martin v. Löwis11437992002-04-12 09:54:03 +00006735cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006736#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006737_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006738
6739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006740# The cast to long int works around a bug in the HP C Compiler
6741# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6742# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6743# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6745$as_echo_n "checking size of long... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006746if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006748else
Matthias Kloseb9621712010-04-24 17:59:49 +00006749 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 +00006750
Martin v. Löwis11437992002-04-12 09:54:03 +00006751else
Matthias Kloseb9621712010-04-24 17:59:49 +00006752 if test "$ac_cv_type_long" = yes; then
6753 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006755as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006756See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006757 else
6758 ac_cv_sizeof_long=0
6759 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006761
Martin v. Löwis11437992002-04-12 09:54:03 +00006762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6764$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006765
6766
6767
Martin v. Löwis11437992002-04-12 09:54:03 +00006768cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006769#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006770_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006771
6772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006773# The cast to long int works around a bug in the HP C Compiler
6774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6776# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6778$as_echo_n "checking size of void *... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006779if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006780 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006781else
Matthias Kloseb9621712010-04-24 17:59:49 +00006782 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 +00006783
Martin v. Löwis11437992002-04-12 09:54:03 +00006784else
Matthias Kloseb9621712010-04-24 17:59:49 +00006785 if test "$ac_cv_type_void_p" = yes; then
6786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006788as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006789See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006790 else
6791 ac_cv_sizeof_void_p=0
6792 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006794
Martin v. Löwis11437992002-04-12 09:54:03 +00006795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6797$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006798
6799
6800
Martin v. Löwis11437992002-04-12 09:54:03 +00006801cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006802#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006803_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006804
6805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006806# The cast to long int works around a bug in the HP C Compiler
6807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6809# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6811$as_echo_n "checking size of short... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006812if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006814else
Matthias Kloseb9621712010-04-24 17:59:49 +00006815 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 +00006816
Martin v. Löwis11437992002-04-12 09:54:03 +00006817else
Matthias Kloseb9621712010-04-24 17:59:49 +00006818 if test "$ac_cv_type_short" = yes; then
6819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006821as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006822See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006823 else
6824 ac_cv_sizeof_short=0
6825 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006827
Martin v. Löwis11437992002-04-12 09:54:03 +00006828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6830$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006831
6832
6833
Martin v. Löwis11437992002-04-12 09:54:03 +00006834cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006835#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006836_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006837
6838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006839# The cast to long int works around a bug in the HP C Compiler
6840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6842# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6844$as_echo_n "checking size of float... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006845if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006846 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006847else
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 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 +00006849
Martin v. Löwis11437992002-04-12 09:54:03 +00006850else
Matthias Kloseb9621712010-04-24 17:59:49 +00006851 if test "$ac_cv_type_float" = yes; then
6852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006854as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006855See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006856 else
6857 ac_cv_sizeof_float=0
6858 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006860
Martin v. Löwis11437992002-04-12 09:54:03 +00006861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6863$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006864
6865
6866
Martin v. Löwis11437992002-04-12 09:54:03 +00006867cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006868#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006869_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006870
6871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006872# The cast to long int works around a bug in the HP C Compiler
6873# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6874# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6875# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6877$as_echo_n "checking size of double... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006878if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006879 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006880else
Matthias Kloseb9621712010-04-24 17:59:49 +00006881 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 +00006882
Martin v. Löwis11437992002-04-12 09:54:03 +00006883else
Matthias Kloseb9621712010-04-24 17:59:49 +00006884 if test "$ac_cv_type_double" = yes; then
6885 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006887as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006888See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006889 else
6890 ac_cv_sizeof_double=0
6891 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006893
Martin v. Löwis11437992002-04-12 09:54:03 +00006894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6896$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897
6898
6899
Martin v. Löwis11437992002-04-12 09:54:03 +00006900cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006901#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006902_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006903
6904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006905# The cast to long int works around a bug in the HP C Compiler
6906# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6907# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6908# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6910$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006911if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006912 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006913else
Matthias Kloseb9621712010-04-24 17:59:49 +00006914 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 +00006915
Martin v. Löwis11437992002-04-12 09:54:03 +00006916else
Matthias Kloseb9621712010-04-24 17:59:49 +00006917 if test "$ac_cv_type_fpos_t" = yes; then
6918 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006920as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006921See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006922 else
6923 ac_cv_sizeof_fpos_t=0
6924 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006926
Martin v. Löwis11437992002-04-12 09:54:03 +00006927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6929$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006930
6931
6932
Martin v. Löwis11437992002-04-12 09:54:03 +00006933cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006934#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006935_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006936
Michael W. Hudson54241132001-12-07 15:38:26 +00006937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006938# The cast to long int works around a bug in the HP C Compiler
6939# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6940# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6941# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6943$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006944if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006945 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006946else
Matthias Kloseb9621712010-04-24 17:59:49 +00006947 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 +00006948
Martin v. Löwis18e16552006-02-15 17:27:45 +00006949else
Matthias Kloseb9621712010-04-24 17:59:49 +00006950 if test "$ac_cv_type_size_t" = yes; then
6951 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006953as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006954See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006955 else
6956 ac_cv_sizeof_size_t=0
6957 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006959
Martin v. Löwis18e16552006-02-15 17:27:45 +00006960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6962$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006963
6964
6965
Martin v. Löwis18e16552006-02-15 17:27:45 +00006966cat >>confdefs.h <<_ACEOF
6967#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6968_ACEOF
6969
6970
Christian Heimes400adb02008-02-01 08:12:03 +00006971# The cast to long int works around a bug in the HP C Compiler
6972# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6973# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6974# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6976$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006977if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006978 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006979else
Matthias Kloseb9621712010-04-24 17:59:49 +00006980 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 +00006981
Christian Heimes400adb02008-02-01 08:12:03 +00006982else
Matthias Kloseb9621712010-04-24 17:59:49 +00006983 if test "$ac_cv_type_pid_t" = yes; then
6984 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006986as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006987See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006988 else
6989 ac_cv_sizeof_pid_t=0
6990 fi
6991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006992
Christian Heimes400adb02008-02-01 08:12:03 +00006993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6995$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006996
6997
6998
6999cat >>confdefs.h <<_ACEOF
7000#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7001_ACEOF
7002
7003
Michael W. Hudson54241132001-12-07 15:38:26 +00007004
Matthias Kloseb9621712010-04-24 17:59:49 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7006$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007007have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007009/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007010
Martin v. Löwis11437992002-04-12 09:54:03 +00007011int
7012main ()
7013{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007014long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 ;
7016 return 0;
7017}
7018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007019if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007020
7021
Matthias Kloseb9621712010-04-24 17:59:49 +00007022$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007023
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007024 have_long_long=yes
7025
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7029$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007030if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007031# The cast to long int works around a bug in the HP C Compiler
7032# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7033# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7034# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7036$as_echo_n "checking size of long long... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007037if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007038 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007039else
Matthias Kloseb9621712010-04-24 17:59:49 +00007040 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 +00007041
Martin v. Löwis11437992002-04-12 09:54:03 +00007042else
Matthias Kloseb9621712010-04-24 17:59:49 +00007043 if test "$ac_cv_type_long_long" = yes; then
7044 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7045$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007046as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007047See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007048 else
7049 ac_cv_sizeof_long_long=0
7050 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007052
Martin v. Löwis11437992002-04-12 09:54:03 +00007053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7055$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007056
7057
7058
Martin v. Löwis11437992002-04-12 09:54:03 +00007059cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007060#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007061_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007062
Michael W. Hudson54241132001-12-07 15:38:26 +00007063
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007064fi
7065
Matthias Kloseb9621712010-04-24 17:59:49 +00007066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7067$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007068have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007070/* end confdefs.h. */
7071
7072int
7073main ()
7074{
7075long double x; x = (long double)0;
7076 ;
7077 return 0;
7078}
7079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007080if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007081
7082
Matthias Kloseb9621712010-04-24 17:59:49 +00007083$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007084
7085 have_long_double=yes
7086
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007087fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7090$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007091if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007092# The cast to long int works around a bug in the HP C Compiler
7093# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7094# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7095# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7097$as_echo_n "checking size of long double... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007098if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007099 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007100else
Matthias Kloseb9621712010-04-24 17:59:49 +00007101 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 +00007102
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007103else
Matthias Kloseb9621712010-04-24 17:59:49 +00007104 if test "$ac_cv_type_long_double" = yes; then
7105 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7106$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007107as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007108See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007109 else
7110 ac_cv_sizeof_long_double=0
7111 fi
7112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007113
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7116$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007117
7118
7119
7120cat >>confdefs.h <<_ACEOF
7121#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7122_ACEOF
7123
7124
7125fi
7126
7127
Matthias Kloseb9621712010-04-24 17:59:49 +00007128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7129$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007130have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007132/* end confdefs.h. */
7133
7134int
7135main ()
7136{
7137_Bool x; x = (_Bool)0;
7138 ;
7139 return 0;
7140}
7141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007142if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007143
7144
Matthias Kloseb9621712010-04-24 17:59:49 +00007145$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007146
7147 have_c99_bool=yes
7148
Thomas Woutersb2137042007-02-01 18:02:27 +00007149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7152$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007153if test "$have_c99_bool" = yes ; then
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 _Bool" >&5
7159$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007160if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007161 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007162else
Matthias Kloseb9621712010-04-24 17:59:49 +00007163 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 +00007164
Thomas Woutersb2137042007-02-01 18:02:27 +00007165else
Matthias Kloseb9621712010-04-24 17:59:49 +00007166 if test "$ac_cv_type__Bool" = 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 (_Bool)
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__Bool=0
7173 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007175
Thomas Woutersb2137042007-02-01 18:02:27 +00007176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7178$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007179
7180
7181
Thomas Woutersb2137042007-02-01 18:02:27 +00007182cat >>confdefs.h <<_ACEOF
7183#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7184_ACEOF
7185
7186
7187fi
7188
Matthias Kloseb9621712010-04-24 17:59:49 +00007189ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007190 #include <stdint.h>
7191 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007192 #ifdef HAVE_INTTYPES_H
7193 #include <inttypes.h>
7194 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007195"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007196if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007197
7198cat >>confdefs.h <<_ACEOF
7199#define HAVE_UINTPTR_T 1
7200_ACEOF
7201
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007202# The cast to long int works around a bug in the HP C Compiler
7203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7205# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7207$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007208if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007209 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007210else
Matthias Kloseb9621712010-04-24 17:59:49 +00007211 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 +00007212
Martin v. Löwis11437992002-04-12 09:54:03 +00007213else
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 if test "$ac_cv_type_uintptr_t" = yes; then
7215 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7216$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007217as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007218See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007219 else
7220 ac_cv_sizeof_uintptr_t=0
7221 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007223
Martin v. Löwis11437992002-04-12 09:54:03 +00007224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7226$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007227
7228
7229
Martin v. Löwis11437992002-04-12 09:54:03 +00007230cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007231#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007232_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007233
Michael W. Hudson54241132001-12-07 15:38:26 +00007234
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007235fi
7236
Thomas Wouters89f507f2006-12-13 04:49:30 +00007237
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007238# The cast to long int works around a bug in the HP C Compiler
7239# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7240# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7241# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7243$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007244if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007246else
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007248#ifdef HAVE_SYS_TYPES_H
7249#include <sys/types.h>
7250#endif
7251
Matthias Kloseb9621712010-04-24 17:59:49 +00007252"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007253
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007254else
Matthias Kloseb9621712010-04-24 17:59:49 +00007255 if test "$ac_cv_type_off_t" = yes; then
7256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007258as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007259See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007260 else
7261 ac_cv_sizeof_off_t=0
7262 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007264
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7267$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007268
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007269
7270
Martin v. Löwis11437992002-04-12 09:54:03 +00007271cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007272#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007273_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007274
Michael W. Hudson54241132001-12-07 15:38:26 +00007275
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007276
Matthias Kloseb9621712010-04-24 17:59:49 +00007277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7278$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007279if test "$have_long_long" = yes
7280then
7281if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007282 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007283
Matthias Kloseb9621712010-04-24 17:59:49 +00007284$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007285
Matthias Kloseb9621712010-04-24 17:59:49 +00007286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7287$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007288else
Matthias Kloseb9621712010-04-24 17:59:49 +00007289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7290$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007291fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007292else
Matthias Kloseb9621712010-04-24 17:59:49 +00007293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7294$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007295fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007296
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007297# The cast to long int works around a bug in the HP C Compiler
7298# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7299# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7300# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7302$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007303if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007304 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007305else
Matthias Kloseb9621712010-04-24 17:59:49 +00007306 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007307#ifdef HAVE_SYS_TYPES_H
7308#include <sys/types.h>
7309#endif
7310#ifdef HAVE_TIME_H
7311#include <time.h>
7312#endif
7313
Matthias Kloseb9621712010-04-24 17:59:49 +00007314"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007315
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007316else
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 if test "$ac_cv_type_time_t" = yes; then
7318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007320as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007321See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007322 else
7323 ac_cv_sizeof_time_t=0
7324 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007326
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7329$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007330
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007331
7332
Martin v. Löwis11437992002-04-12 09:54:03 +00007333cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007334#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007335_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007336
Michael W. Hudson54241132001-12-07 15:38:26 +00007337
7338
Trent Mick635f6fb2000-08-23 21:33:05 +00007339# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007340ac_save_cc="$CC"
7341if test "$ac_cv_kpthread" = "yes"
7342then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007343elif test "$ac_cv_kthread" = "yes"
7344then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007345elif test "$ac_cv_pthread" = "yes"
7346then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007347fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007348
Matthias Kloseb9621712010-04-24 17:59:49 +00007349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7350$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007351have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007353/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007354
7355 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007356int
7357main ()
7358{
Guido van Rossum12580492000-09-24 16:47:19 +00007359pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007360 ;
7361 return 0;
7362}
Matthias Kloseb159a552010-04-25 21:00:44 +00007363
Martin v. Löwis11437992002-04-12 09:54:03 +00007364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007365if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007366 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7370$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007371if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007373# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7374# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7375# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7377$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007378if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007379 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007380else
Matthias Kloseb9621712010-04-24 17:59:49 +00007381 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007382#ifdef HAVE_PTHREAD_H
7383#include <pthread.h>
7384#endif
7385
Matthias Kloseb9621712010-04-24 17:59:49 +00007386"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007387
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007388else
Matthias Kloseb9621712010-04-24 17:59:49 +00007389 if test "$ac_cv_type_pthread_t" = yes; then
7390 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7391$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007392as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007393See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007394 else
7395 ac_cv_sizeof_pthread_t=0
7396 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007397fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007398
Trent Mick635f6fb2000-08-23 21:33:05 +00007399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7401$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007402
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007403
7404
Martin v. Löwis11437992002-04-12 09:54:03 +00007405cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007406#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007407_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007408
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007409
Trent Mick635f6fb2000-08-23 21:33:05 +00007410fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007411CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007412
Michael W. Hudson54241132001-12-07 15:38:26 +00007413
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007414case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007415 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007416 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7417 ;;
7418 Darwin/*)
7419 OTHER_LIBTOOL_OPT=""
7420 ;;
7421esac
7422
7423
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007424ARCH_RUN_32BIT=""
7425
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007426case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007427 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007428 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7429 if test "${enable_universalsdk}"; then
7430 :
7431 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007432 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007433 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007434 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007435 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007436 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007437 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007438 if test ${gcc_version} '<' 4.0
7439 then
7440 LIBTOOL_CRUFT="-lcc_dynamic"
7441 else
7442 LIBTOOL_CRUFT=""
7443 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007444 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007445 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007446else
Matthias Kloseb9621712010-04-24 17:59:49 +00007447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007448/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007449
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007450 #include <unistd.h>
7451 int main(int argc, char*argv[])
7452 {
7453 if (sizeof(long) == 4) {
7454 return 0;
7455 } else {
7456 return 1;
7457 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007458 }
7459
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007461if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007462 ac_osx_32bit=yes
7463else
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7467 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007468fi
7469
7470
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007471 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007472 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007473 i386)
7474 MACOSX_DEFAULT_ARCH="i386"
7475 ;;
7476 ppc)
7477 MACOSX_DEFAULT_ARCH="ppc"
7478 ;;
7479 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007480 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007481 ;;
7482 esac
7483 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007484 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007485 i386)
7486 MACOSX_DEFAULT_ARCH="x86_64"
7487 ;;
7488 ppc)
7489 MACOSX_DEFAULT_ARCH="ppc64"
7490 ;;
7491 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007492 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007493 ;;
7494 esac
7495
7496 #ARCH_RUN_32BIT="true"
7497 fi
7498
7499 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007500 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007501 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007502esac
7503
Matthias Kloseb9621712010-04-24 17:59:49 +00007504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7505$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007506if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007507then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007508 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007509 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007510 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007511
Matthias Kloseb9621712010-04-24 17:59:49 +00007512$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007513
Matthias Kloseb9621712010-04-24 17:59:49 +00007514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7515$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007516 if test $enable_shared = "yes"
7517 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007518 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 +00007519 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007520else
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7522$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007523fi
7524
Matthias Kloseb9621712010-04-24 17:59:49 +00007525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7526$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007527case $ac_sys_system/$ac_sys_release in
7528 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007529
Matthias Kloseb9621712010-04-24 17:59:49 +00007530$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007531
Matthias Kloseb9621712010-04-24 17:59:49 +00007532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7533$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007534 ;;
7535 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7537$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007538 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007539esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007540
Guido van Rossum0a516c91994-09-12 10:58:40 +00007541# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007542
Michael W. Hudson54241132001-12-07 15:38:26 +00007543
7544
7545
7546
Benjamin Peterson99f03762010-04-11 22:15:28 +00007547
Thomas Wouters477c8d52006-05-27 19:21:47 +00007548
Georg Brandlb1441c72009-01-03 22:33:39 +00007549
Thomas Wouters477c8d52006-05-27 19:21:47 +00007550cat >>confdefs.h <<_ACEOF
7551#define SHLIB_EXT "$SO"
7552_ACEOF
7553
Guido van Rossum0a516c91994-09-12 10:58:40 +00007554# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007555# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007556# (Shared libraries in this instance are shared modules to be loaded into
7557# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7559$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007560if test -z "$LDSHARED"
7561then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007562 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007563 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007564 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007565 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007566 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007567 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007568 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007569 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007570 if test "$GCC" = "yes" ; then
7571 LDSHARED='$(CC) -shared'
7572 LDCXXSHARED='$(CXX) -shared'
7573 else
7574 LDSHARED='$(CC) -G'
7575 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007576 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007577 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007578 if test "$GCC" = "yes" ; then
7579 LDSHARED='$(CC) -shared'
7580 LDCXXSHARED='$(CXX) -shared'
7581 else
7582 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007583 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007584 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007585 LDSHARED='$(CC) -bundle'
7586 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007587 if test "$enable_framework" ; then
7588 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007589 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7590 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007591 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007592 else
7593 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007594 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007595 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007596 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007597 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007598 LDSHARED='$(CC) -bundle'
7599 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007600 if test "$enable_framework" ; then
7601 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007602 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7603 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007604 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007605 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007606 # No framework, use the Python app as bundle-loader
7607 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007608 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007609 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007610 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007611 Darwin/*)
7612 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7613 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007614
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007615 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007616 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007617 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007618 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007619 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007620 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7621 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007622 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007623 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007624 LDSHARED='$(CC) -bundle'
7625 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007626 if test "$enable_framework" ; then
7627 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007628 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7629 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007630 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007631 else
7632 # No framework, use the Python app as bundle-loader
7633 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7634 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007635 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007636 fi
7637 fi
7638 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007639 Linux*|GNU*|QNX*)
7640 LDSHARED='$(CC) -shared'
7641 LDCXXSHARED='$(CXX) -shared';;
7642 BSD/OS*/4*)
7643 LDSHARED="gcc -shared"
7644 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007645 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007646 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007647 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007648 LDSHARED='$(CC) -shared'
7649 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007650 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007651 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007652 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007653 OpenBSD*)
7654 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7655 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007656 LDSHARED='$(CC) -shared $(CCSHARED)'
7657 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007658 else
7659 case `uname -r` in
7660 [01].* | 2.[0-7] | 2.[0-7].*)
7661 LDSHARED="ld -Bshareable ${LDFLAGS}"
7662 ;;
7663 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007664 LDSHARED='$(CC) -shared $(CCSHARED)'
7665 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007666 ;;
7667 esac
7668 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007669 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007670 LDSHARED='$(CC) -shared'
7671 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007672 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007673 if test "$GCC" = "yes" ; then
7674 LDSHARED='$(CC) -shared'
7675 LDCXXSHARED='$(CXX) -shared'
7676 else
7677 LDSHARED='$(CC) -G'
7678 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007679 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007680 SCO_SV*)
7681 LDSHARED='$(CC) -Wl,-G,-Bexport'
7682 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7683 CYGWIN*)
7684 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7685 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007686 *) LDSHARED="ld";;
7687 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7690$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007691LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007692BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007693# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007694# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7696$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007697if test -z "$CCSHARED"
7698then
Guido van Rossum07397971997-04-29 21:49:50 +00007699 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007700 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007701 then CCSHARED="-fPIC";
7702 elif test `uname -p` = sparc;
7703 then CCSHARED="-xcode=pic32";
7704 else CCSHARED="-Kpic";
7705 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007706 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007707 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007708 else CCSHARED="+z";
7709 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007710 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007711 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007712 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007713 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007714 if test "$GCC" = "yes"
7715 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007716 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007717 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007718 SCO_SV*)
7719 if test "$GCC" = "yes"
7720 then CCSHARED="-fPIC"
7721 else CCSHARED="-Kpic -belf"
7722 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007723 IRIX*/6*) case $CC in
7724 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007725 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007726 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007727 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7730$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007731# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007732# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7734$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007735if test -z "$LINKFORSHARED"
7736then
Guido van Rossum07397971997-04-29 21:49:50 +00007737 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007738 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007739 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007740 LINKFORSHARED="-Wl,-E -Wl,+s";;
7741# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007742 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007743 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007744 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007746 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007747 if test "$enable_framework"
7748 then
Jack Jansenda49e192005-01-07 13:08:22 +00007749 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007750 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007751 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007752 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007753 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007754 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007755 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007756 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7757 then
7758 LINKFORSHARED="-Wl,--export-dynamic"
7759 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007760 SunOS/5*) case $CC in
7761 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007762 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007763 then
7764 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007765 fi;;
7766 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007767 CYGWIN*)
7768 if test $enable_shared = "no"
7769 then
7770 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7771 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007772 QNX*)
7773 # -Wl,-E causes the symbols to be added to the dynamic
7774 # symbol table so that they can be found when a module
7775 # is loaded. -N 2048K causes the stack size to be set
7776 # to 2048 kilobytes so that the stack doesn't overflow
7777 # when running test_compile.py.
7778 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007779 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7782$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007783
Michael W. Hudson54241132001-12-07 15:38:26 +00007784
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007785
Matthias Kloseb9621712010-04-24 17:59:49 +00007786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7787$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007788if test ! "$LIBRARY" = "$LDLIBRARY"
7789then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007790 case $ac_sys_system in
7791 CYGWIN*)
7792 # Cygwin needs CCSHARED when building extension DLLs
7793 # but not when building the interpreter DLL.
7794 CFLAGSFORSHARED='';;
7795 *)
7796 CFLAGSFORSHARED='$(CCSHARED)'
7797 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7800$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007801
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007802# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7803# library (with --enable-shared).
7804# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007805# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7806# if it is not required, since it creates a dependency of the shared library
7807# to LIBS. This, in turn, means that applications linking the shared libpython
7808# don't need to link LIBS explicitly. The default should be only changed
7809# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007810
Matthias Kloseb9621712010-04-24 17:59:49 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7812$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007813case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007814 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007815 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007816esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7818$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007819
7820
Guido van Rossum627b2d71993-12-24 10:39:16 +00007821# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7823$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007824if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007825 $as_echo_n "(cached) " >&6
7826else
7827 ac_check_lib_save_LIBS=$LIBS
7828LIBS="-lsendfile $LIBS"
7829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7830/* end confdefs.h. */
7831
7832/* Override any GCC internal prototype to avoid an error.
7833 Use char because int might match the return type of a GCC
7834 builtin and then its argument prototype would still apply. */
7835#ifdef __cplusplus
7836extern "C"
7837#endif
7838char sendfile ();
7839int
7840main ()
7841{
7842return sendfile ();
7843 ;
7844 return 0;
7845}
7846_ACEOF
7847if ac_fn_c_try_link "$LINENO"; then :
7848 ac_cv_lib_sendfile_sendfile=yes
7849else
7850 ac_cv_lib_sendfile_sendfile=no
7851fi
7852rm -f core conftest.err conftest.$ac_objext \
7853 conftest$ac_exeext conftest.$ac_ext
7854LIBS=$ac_check_lib_save_LIBS
7855fi
7856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7857$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007858if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007859 cat >>confdefs.h <<_ACEOF
7860#define HAVE_LIBSENDFILE 1
7861_ACEOF
7862
7863 LIBS="-lsendfile $LIBS"
7864
7865fi
7866
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7868$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007869if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007871else
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007873LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877/* Override any GCC internal prototype to avoid an error.
7878 Use char because int might match the return type of a GCC
7879 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007880#ifdef __cplusplus
7881extern "C"
7882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007883char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007884int
7885main ()
7886{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007887return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007888 ;
7889 return 0;
7890}
7891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007892if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007894else
Matthias Kloseb9621712010-04-24 17:59:49 +00007895 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007897rm -f core conftest.err conftest.$ac_objext \
7898 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007899LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7902$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007903if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 cat >>confdefs.h <<_ACEOF
7905#define HAVE_LIBDL 1
7906_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007907
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007908 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007909
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007910fi
7911 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7913$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007914if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007916else
Martin v. Löwis11437992002-04-12 09:54:03 +00007917 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007918LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922/* Override any GCC internal prototype to avoid an error.
7923 Use char because int might match the return type of a GCC
7924 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007925#ifdef __cplusplus
7926extern "C"
7927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007928char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007929int
7930main ()
7931{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007932return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007933 ;
7934 return 0;
7935}
7936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007937if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007939else
Matthias Kloseb9621712010-04-24 17:59:49 +00007940 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007942rm -f core conftest.err conftest.$ac_objext \
7943 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007944LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7947$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007948if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 cat >>confdefs.h <<_ACEOF
7950#define HAVE_LIBDLD 1
7951_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007952
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007953 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007954
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007955fi
7956 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007957
Georg Brandlb1441c72009-01-03 22:33:39 +00007958# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007959if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7961$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007962if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007963 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007964else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007965 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007968
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969/* Override any GCC internal prototype to avoid an error.
7970 Use char because int might match the return type of a GCC
7971 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007972#ifdef __cplusplus
7973extern "C"
7974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007975char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007976int
7977main ()
7978{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 ;
7981 return 0;
7982}
7983_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984for ac_lib in '' pthread rt posix4; do
7985 if test -z "$ac_lib"; then
7986 ac_res="none required"
7987 else
7988 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007989 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007991 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007994rm -f core conftest.err conftest.$ac_objext \
7995 conftest$ac_exeext
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007996 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999done
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008000if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008001
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002else
8003 ac_cv_search_sem_init=no
8004fi
8005rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008006LIBS=$ac_func_search_save_LIBS
8007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8009$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008011if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008012 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008013
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008014fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008015 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008016 # posix4 on Solaris 2.6
8017 # pthread (first!) on Linux
8018fi
8019
Martin v. Löwis19d17342003-06-14 21:03:05 +00008020# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8022$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008023if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008025else
8026 ac_check_lib_save_LIBS=$LIBS
8027LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008029/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031/* Override any GCC internal prototype to avoid an error.
8032 Use char because int might match the return type of a GCC
8033 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008034#ifdef __cplusplus
8035extern "C"
8036#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008037char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008038int
8039main ()
8040{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008042 ;
8043 return 0;
8044}
8045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008046if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008047 ac_cv_lib_intl_textdomain=yes
8048else
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008051rm -f core conftest.err conftest.$ac_objext \
8052 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008053LIBS=$ac_check_lib_save_LIBS
8054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8056$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008057if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008058
Matthias Kloseb9621712010-04-24 17:59:49 +00008059$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008060
Brett Cannonc6d936e2009-06-07 20:09:53 +00008061 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008062fi
8063
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008064
8065# checks for system dependent C++ extensions support
8066case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8068$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008070/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008071
Georg Brandl59e87bd2011-02-15 19:48:59 +00008072 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008073int
8074main ()
8075{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008076loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008077 ;
8078 return 0;
8079}
Matthias Kloseb159a552010-04-25 21:00:44 +00008080
Martin v. Löwis11437992002-04-12 09:54:03 +00008081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008082if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008083
Matthias Kloseb159a552010-04-25 21:00:44 +00008084
Matthias Kloseb9621712010-04-24 17:59:49 +00008085$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008086
Matthias Kloseb159a552010-04-25 21:00:44 +00008087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008088$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008089
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008090else
Matthias Kloseb159a552010-04-25 21:00:44 +00008091
8092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008093$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008094
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008096rm -f core conftest.err conftest.$ac_objext \
8097 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008098 *) ;;
8099esac
8100
Guido van Rossum70c7f481998-03-26 18:44:10 +00008101# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8103$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008104if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008106else
Martin v. Löwis11437992002-04-12 09:54:03 +00008107 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008108LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112/* Override any GCC internal prototype to avoid an error.
8113 Use char because int might match the return type of a GCC
8114 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008115#ifdef __cplusplus
8116extern "C"
8117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008118char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008119int
8120main ()
8121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 ;
8124 return 0;
8125}
8126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008127if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008128 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008129else
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008131fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008132rm -f core conftest.err conftest.$ac_objext \
8133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008134LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8137$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008138if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008139 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008140fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008141 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8143$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008144if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008145 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008146else
Martin v. Löwis11437992002-04-12 09:54:03 +00008147 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008148LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008152/* Override any GCC internal prototype to avoid an error.
8153 Use char because int might match the return type of a GCC
8154 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008155#ifdef __cplusplus
8156extern "C"
8157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008158char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008159int
8160main ()
8161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008163 ;
8164 return 0;
8165}
8166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008167if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008168 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008169else
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008171fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008172rm -f core conftest.err conftest.$ac_objext \
8173 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008174LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8177$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008178if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008179 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008180fi
8181 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008182
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8184$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008186# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008187if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8190$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008191LIBS="$withval $LIBS"
8192
8193else
Matthias Kloseb9621712010-04-24 17:59:49 +00008194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8195$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196fi
8197
Guido van Rossum7f43da71994-08-01 12:15:30 +00008198
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008199if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008200 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8201set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8203$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008204if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008205 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008206else
8207 case $PKG_CONFIG in
8208 [\\/]* | ?:[\\/]*)
8209 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8210 ;;
8211 *)
8212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213for as_dir in $PATH
8214do
8215 IFS=$as_save_IFS
8216 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8219 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008221 break 2
8222 fi
8223done
Matthias Kloseb9621712010-04-24 17:59:49 +00008224 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008225IFS=$as_save_IFS
8226
8227 ;;
8228esac
8229fi
8230PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8231if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8233$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008234else
Matthias Kloseb9621712010-04-24 17:59:49 +00008235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8236$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008237fi
8238
8239
8240fi
8241if test -z "$ac_cv_path_PKG_CONFIG"; then
8242 ac_pt_PKG_CONFIG=$PKG_CONFIG
8243 # Extract the first word of "pkg-config", so it can be a program name with args.
8244set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8246$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008247if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008248 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008249else
8250 case $ac_pt_PKG_CONFIG in
8251 [\\/]* | ?:[\\/]*)
8252 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8253 ;;
8254 *)
8255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8256for as_dir in $PATH
8257do
8258 IFS=$as_save_IFS
8259 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008260 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008261 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8262 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008263 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008264 break 2
8265 fi
8266done
Matthias Kloseb9621712010-04-24 17:59:49 +00008267 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008268IFS=$as_save_IFS
8269
8270 ;;
8271esac
8272fi
8273ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8274if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8276$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008277else
Matthias Kloseb9621712010-04-24 17:59:49 +00008278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8279$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008280fi
8281
8282 if test "x$ac_pt_PKG_CONFIG" = x; then
8283 PKG_CONFIG=""
8284 else
8285 case $cross_compiling:$ac_tool_warned in
8286yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8288$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008289ac_tool_warned=yes ;;
8290esac
8291 PKG_CONFIG=$ac_pt_PKG_CONFIG
8292 fi
8293else
8294 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8295fi
8296
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008297
8298# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8300$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008301
8302# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008303if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008304 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008305else
8306 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008307fi
8308
8309
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8311$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008312
8313# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8315$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008316
8317# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008318if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008319 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008320else
8321 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008322fi
8323
8324
8325if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008326 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8327else
8328 LIBFFI_INCLUDEDIR=""
8329fi
8330
8331
Matthias Kloseb9621712010-04-24 17:59:49 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8333$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008334
Benjamin Peterson076ed002010-10-31 17:11:02 +00008335# Check for support for loadable sqlite extensions
8336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8337$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8338# Check whether --enable-loadable-sqlite-extensions was given.
8339if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8340 enableval=$enable_loadable_sqlite_extensions;
8341else
8342 enable_loadable_sqlite_extensions="no"
8343fi
8344
8345
8346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8347$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8348
Matthias Klose55708cc2009-04-30 08:06:49 +00008349# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8351$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008352
8353# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008354if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008355 withval=$with_dbmliborder;
8356if test x$with_dbmliborder = xyes
8357then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008358as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008359else
8360 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8361 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8362 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008363 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008364 fi
8365 done
8366fi
8367fi
8368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8370$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008371
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008372# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008373
8374
Matthias Kloseb9621712010-04-24 17:59:49 +00008375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8376$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008377
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008378# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008379if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008380 withval=$with_signal_module;
8381fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008382
8383
8384if test -z "$with_signal_module"
8385then with_signal_module="yes"
8386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8388$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008389
8390if test "${with_signal_module}" = "yes"; then
8391 USE_SIGNAL_MODULE=""
8392 SIGNAL_OBJS=""
8393else
8394 USE_SIGNAL_MODULE="#"
8395 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8396fi
8397
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008398# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008399
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008400USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008402
Martin v. Löwis11437992002-04-12 09:54:03 +00008403
8404# Templates for things AC_DEFINEd more than once.
8405# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008406
8407
Martin v. Löwis11437992002-04-12 09:54:03 +00008408
Matthias Kloseb9621712010-04-24 17:59:49 +00008409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8410$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008413if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414 withval=$with_threads;
8415fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008416
8417
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008418# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008421if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422 withval=$with_thread; with_threads=$with_thread
8423fi
8424
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008425
8426if test -z "$with_threads"
8427then with_threads="yes"
8428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8430$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008431
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008432
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008433if test "$with_threads" = "no"
8434then
8435 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008436elif test "$ac_cv_pthread_is_default" = yes
8437then
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008439
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008440 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008442
8443 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008445elif test "$ac_cv_kpthread" = "yes"
8446then
8447 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008448 if test "$ac_cv_cxx_thread" = "yes"; then
8449 CXX="$CXX -Kpthread"
8450 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008452
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008453 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008454 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008455elif test "$ac_cv_kthread" = "yes"
8456then
8457 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008458 if test "$ac_cv_cxx_thread" = "yes"; then
8459 CXX="$CXX -Kthread"
8460 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008461 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008462
8463 posix_threads=yes
8464 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008465elif test "$ac_cv_pthread" = "yes"
8466then
8467 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008468 if test "$ac_cv_cxx_thread" = "yes"; then
8469 CXX="$CXX -pthread"
8470 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008472
8473 posix_threads=yes
8474 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008475else
8476 if test ! -z "$with_threads" -a -d "$with_threads"
8477 then LDFLAGS="$LDFLAGS -L$with_threads"
8478 fi
8479 if test ! -z "$withval" -a -d "$withval"
8480 then LDFLAGS="$LDFLAGS -L$withval"
8481 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008482
8483 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008484 # define _POSIX_THREADS in unistd.h. Some apparently don't
8485 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8487$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008489/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008490
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008491#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008492#ifdef _POSIX_THREADS
8493yes
8494#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008495
8496_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008497if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008499 unistd_defines_pthreads=yes
8500else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008501 unistd_defines_pthreads=no
8502fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008503rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008504
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8506$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008507
Matthias Kloseb9621712010-04-24 17:59:49 +00008508 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008509
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008510 # Just looking for pthread_create in libpthread is not enough:
8511 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8512 # So we really have to include pthread.h, and then link.
8513 _libs=$LIBS
8514 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8516$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008518/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008519#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008520
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008521void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008522int
8523main ()
8524{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008525
8526pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008527 ;
8528 return 0;
8529}
8530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008531if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008532
Matthias Kloseb9621712010-04-24 17:59:49 +00008533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8534$as_echo "yes" >&6; }
8535 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008536
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008537 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008538 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008539else
Martin v. Löwis11437992002-04-12 09:54:03 +00008540
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008541 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008543if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008545
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008546 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008547 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008548else
Guido van Rossumad678af1998-10-02 14:42:15 +00008549
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8551$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008552if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008554else
Martin v. Löwis11437992002-04-12 09:54:03 +00008555 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008556LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560/* Override any GCC internal prototype to avoid an error.
8561 Use char because int might match the return type of a GCC
8562 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008563#ifdef __cplusplus
8564extern "C"
8565#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008566char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008567int
8568main ()
8569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 ;
8572 return 0;
8573}
8574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008575if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008577else
Matthias Kloseb9621712010-04-24 17:59:49 +00008578 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008580rm -f core conftest.err conftest.$ac_objext \
8581 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008582LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8585$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008586if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008587 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008588
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008589 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008590 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008591 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008592else
Greg Steinadf63d62000-07-05 10:38:09 +00008593
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8595$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008596if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008598else
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008600LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604/* Override any GCC internal prototype to avoid an error.
8605 Use char because int might match the return type of a GCC
8606 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008607#ifdef __cplusplus
8608extern "C"
8609#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008610char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008611int
8612main ()
8613{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ;
8616 return 0;
8617}
8618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008619if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008621else
Matthias Kloseb9621712010-04-24 17:59:49 +00008622 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008624rm -f core conftest.err conftest.$ac_objext \
8625 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008626LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8629$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008630if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008632
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008633 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008634 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008635 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008636else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008637
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8639$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008640if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008641 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008642else
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008644LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008648/* Override any GCC internal prototype to avoid an error.
8649 Use char because int might match the return type of a GCC
8650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008651#ifdef __cplusplus
8652extern "C"
8653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008654char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008655int
8656main ()
8657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ;
8660 return 0;
8661}
8662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008663if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668rm -f core conftest.err conftest.$ac_objext \
8669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008670LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8673$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008674if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008676
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008677 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008678 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008679 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008680else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008681
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8683$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008684if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008686else
Martin v. Löwis11437992002-04-12 09:54:03 +00008687 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008688LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008692/* Override any GCC internal prototype to avoid an error.
8693 Use char because int might match the return type of a GCC
8694 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008695#ifdef __cplusplus
8696extern "C"
8697#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008698char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008699int
8700main ()
8701{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008702return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 ;
8704 return 0;
8705}
8706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008707if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008709else
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008712rm -f core conftest.err conftest.$ac_objext \
8713 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008714LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8717$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008718if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008720
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008721 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008722 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008723 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008724else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008725
Martin v. Löwis130fb172001-07-19 11:00:41 +00008726 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008727fi
8728
Guido van Rossum627b2d71993-12-24 10:39:16 +00008729
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008730fi
8731
Guido van Rossum0be3e491997-05-22 20:33:33 +00008732fi
8733
Guido van Rossum49545951997-12-02 19:28:29 +00008734fi
8735
Guido van Rossumb93a8621998-05-07 13:27:32 +00008736fi
8737
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008739rm -f core conftest.err conftest.$ac_objext \
8740 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008741
Matthias Kloseb9621712010-04-24 17:59:49 +00008742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8743$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008744if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008745 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008746else
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008748LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752/* Override any GCC internal prototype to avoid an error.
8753 Use char because int might match the return type of a GCC
8754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008755#ifdef __cplusplus
8756extern "C"
8757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008758char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008759int
8760main ()
8761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008763 ;
8764 return 0;
8765}
8766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008769else
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008772rm -f core conftest.err conftest.$ac_objext \
8773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008774LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8777$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008778if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008779 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008780
Martin v. Löwis130fb172001-07-19 11:00:41 +00008781 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008782 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008783 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008784fi
8785
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008786
Neal Norwitza978ab02002-11-02 16:58:05 +00008787 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8789$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008790if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008792else
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008794LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798/* Override any GCC internal prototype to avoid an error.
8799 Use char because int might match the return type of a GCC
8800 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008801#ifdef __cplusplus
8802extern "C"
8803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008804char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008805int
8806main ()
8807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008809 ;
8810 return 0;
8811}
8812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008815else
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008818rm -f core conftest.err conftest.$ac_objext \
8819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008820LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8823$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008824if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008826
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008827 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008828 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008829 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008830fi
8831
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008832 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008833fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008834
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008835if test "$posix_threads" = "yes"; then
8836 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008837
Matthias Kloseb9621712010-04-24 17:59:49 +00008838$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008839
8840 fi
8841
8842 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8843 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008844 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008845$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008846
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008847 ;;
8848 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008849$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850
8851 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008852 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008853$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008854
8855 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008856 esac
8857
Matthias Kloseb9621712010-04-24 17:59:49 +00008858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8859$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008860 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008862else
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008864 ac_cv_pthread_system_supported=no
8865else
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008867/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008868#include <pthread.h>
8869 void *foo(void *parm) {
8870 return NULL;
8871 }
8872 main() {
8873 pthread_attr_t attr;
8874 pthread_t id;
8875 if (pthread_attr_init(&attr)) exit(-1);
8876 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8877 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8878 exit(0);
8879 }
8880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008881if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008882 ac_cv_pthread_system_supported=yes
8883else
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8887 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008888fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008890
Guido van Rossum627b2d71993-12-24 10:39:16 +00008891fi
8892
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8894$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008895 if test "$ac_cv_pthread_system_supported" = "yes"; then
8896
Matthias Kloseb9621712010-04-24 17:59:49 +00008897$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008898
8899 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 for ac_func in pthread_sigmask
8901do :
8902 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008903if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008904 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008905#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008906_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008907 case $ac_sys_system in
8908 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008909
Matthias Kloseb9621712010-04-24 17:59:49 +00008910$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008911
8912 ;;
8913 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008914fi
8915done
8916
8917fi
8918
8919
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008921
Matthias Kloseb9621712010-04-24 17:59:49 +00008922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8923$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008925if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8929$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008930 ipv6=no
8931 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8933$as_echo "yes" >&6; }
8934 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008935
8936 ipv6=yes
8937 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008938 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008939else
Martin v. Löwis11437992002-04-12 09:54:03 +00008940
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008942
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8944$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008945 ipv6=no
8946
8947else
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008949/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008950 /* AF_INET6 available check */
8951#include <sys/types.h>
8952#include <sys/socket.h>
8953main()
8954{
8955 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8956 exit(1);
8957 else
8958 exit(0);
8959}
8960
Martin v. Löwis11437992002-04-12 09:54:03 +00008961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008962if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008963
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8965$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008967
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008968else
Matthias Kloseb159a552010-04-25 21:00:44 +00008969
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8971$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008973
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8976 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977fi
8978
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008979
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008980if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8982$as_echo_n "checking if RFC2553 API is available... " >&6; }
8983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008984/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008985
8986 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008987#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008988int
8989main ()
8990{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008991struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008992 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 ;
8994 return 0;
8995}
Matthias Kloseb159a552010-04-25 21:00:44 +00008996
Martin v. Löwis11437992002-04-12 09:54:03 +00008997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008998if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008999
9000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009001$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009002 ipv6=yes
9003
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009004else
Matthias Kloseb159a552010-04-25 21:00:44 +00009005
9006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009007$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009008 ipv6=no
9009
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009012fi
9013
9014if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009016
9017fi
9018
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009019fi
9020
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021
9022ipv6type=unknown
9023ipv6lib=none
9024ipv6trylibc=no
9025
9026if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9028$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009029 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9030 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009031 case $i in
9032 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009034/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009035
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036#include <netinet/in.h>
9037#ifdef IPV6_INRIA_VERSION
9038yes
9039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009040_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009043 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009044fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009045rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009046
9047 ;;
9048 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009050/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009051
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052#include <netinet/in.h>
9053#ifdef __KAME__
9054yes
9055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009056_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059 ipv6type=$i;
9060 ipv6lib=inet6
9061 ipv6libdir=/usr/local/v6/lib
9062 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009063fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009064rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009065
9066 ;;
9067 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009069/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009070
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071#include <features.h>
9072#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9073yes
9074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009075_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078 ipv6type=$i;
9079 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009080fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009081rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009082
9083 ;;
9084 linux-inet6)
9085 if test -d /usr/inet6; then
9086 ipv6type=$i
9087 ipv6lib=inet6
9088 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009089 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009090 fi
9091 ;;
9092 solaris)
9093 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009094 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009095 ipv6type=$i
9096 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097 fi
9098 fi
9099 ;;
9100 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009102/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009103
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104#include <sys/param.h>
9105#ifdef _TOSHIBA_INET6
9106yes
9107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009108_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009109if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009111 ipv6type=$i;
9112 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009113 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009114fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009115rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009116
9117 ;;
9118 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009120/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009121
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009122#include </usr/local/v6/include/sys/v6config.h>
9123#ifdef __V6D__
9124yes
9125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009126_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009129 ipv6type=$i;
9130 ipv6lib=v6;
9131 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009132 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009133fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009134rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009135
9136 ;;
9137 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009139/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009140
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009141#include <sys/param.h>
9142#ifdef _ZETA_MINAMI_INET6
9143yes
9144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009145_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009148 ipv6type=$i;
9149 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009150 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009151fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009152rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009153
9154 ;;
9155 esac
9156 if test "$ipv6type" != "unknown"; then
9157 break
9158 fi
9159 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9161$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009162fi
9163
9164if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9165 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9166 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9167 echo "using lib$ipv6lib"
9168 else
9169 if test $ipv6trylibc = "yes"; then
9170 echo "using libc"
9171 else
9172 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9173 echo "You need to fetch lib$ipv6lib.a from appropriate"
9174 echo 'ipv6 kit and compile beforehand.'
9175 exit 1
9176 fi
9177 fi
9178fi
9179
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9181$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009183/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009184
9185 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009186int
9187main ()
9188{
9189FSIORefNum fRef = 0
9190 ;
9191 return 0;
9192}
Matthias Kloseb159a552010-04-25 21:00:44 +00009193
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009195if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009196
Matthias Kloseb159a552010-04-25 21:00:44 +00009197
Matthias Kloseb9621712010-04-24 17:59:49 +00009198$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009199
Matthias Kloseb9621712010-04-24 17:59:49 +00009200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9201$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009202
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009203else
Matthias Kloseb159a552010-04-25 21:00:44 +00009204
Matthias Kloseb9621712010-04-24 17:59:49 +00009205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9206$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009207
9208fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9210
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009211# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9213$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009215# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009216if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009217 withval=$with_doc_strings;
9218fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009219
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009220
9221if test -z "$with_doc_strings"
9222then with_doc_strings="yes"
9223fi
9224if test "$with_doc_strings" != "no"
9225then
9226
Matthias Kloseb9621712010-04-24 17:59:49 +00009227$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009228
9229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9231$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009232
Antoine Pitrou042b1282010-08-13 21:15:58 +00009233# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9235$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009237# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009238if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009239 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009240if test "$withval" != no
9241then
9242
Matthias Kloseb9621712010-04-24 17:59:49 +00009243$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009244
Matthias Kloseb9621712010-04-24 17:59:49 +00009245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9246$as_echo "yes" >&6; }
9247else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9248$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009249fi
9250else
Matthias Kloseb9621712010-04-24 17:59:49 +00009251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9252$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009253fi
9254
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009255
9256# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9258$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009260# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009261if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009262 withval=$with_pymalloc;
9263fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009264
Neil Schemenauera35c6882001-02-27 04:45:05 +00009265
Neil Schemenauer16c22972002-03-22 15:34:49 +00009266if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009267then
9268 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009269 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009270fi
9271if test "$with_pymalloc" != "no"
9272then
Martin v. Löwis11437992002-04-12 09:54:03 +00009273
Matthias Kloseb9621712010-04-24 17:59:49 +00009274$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009275
9276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9278$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009279
Benjamin Peterson05159c42009-12-03 03:01:27 +00009280# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9282$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009283
9284# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009285if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009286 withval=$with_valgrind;
9287else
9288 with_valgrind=no
9289fi
9290
Matthias Kloseb9621712010-04-24 17:59:49 +00009291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9292$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009293if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009294 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 +02009295if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009296
Matthias Kloseb9621712010-04-24 17:59:49 +00009297$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009298
9299else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009300 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009301
9302fi
9303
9304
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009305 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009306fi
9307
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009308# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009309
Guido van Rossum98935bf2001-09-05 19:13:16 +00009310DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009311
Guido van Rossume97ee181999-12-20 21:27:22 +00009312# the dlopen() function means we might want to use dynload_shlib.o. some
9313# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009314for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009315do :
9316 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009317if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009318 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009319#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009320_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009321
Guido van Rossume97ee181999-12-20 21:27:22 +00009322fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009323done
Guido van Rossume97ee181999-12-20 21:27:22 +00009324
Michael W. Hudson54241132001-12-07 15:38:26 +00009325
Guido van Rossume97ee181999-12-20 21:27:22 +00009326# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9327# loading of modules.
9328
Matthias Kloseb9621712010-04-24 17:59:49 +00009329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9330$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009331if test -z "$DYNLOADFILE"
9332then
9333 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009334 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9335 if test "$ac_cv_func_dlopen" = yes
9336 then DYNLOADFILE="dynload_shlib.o"
9337 else DYNLOADFILE="dynload_aix.o"
9338 fi
9339 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009340 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009341 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9342 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009343 *)
9344 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9345 # out any dynamic loading
9346 if test "$ac_cv_func_dlopen" = yes
9347 then DYNLOADFILE="dynload_shlib.o"
9348 else DYNLOADFILE="dynload_stub.o"
9349 fi
9350 ;;
9351 esac
9352fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9354$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009355if test "$DYNLOADFILE" != "dynload_stub.o"
9356then
Martin v. Löwis11437992002-04-12 09:54:03 +00009357
Matthias Kloseb9621712010-04-24 17:59:49 +00009358$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009359
9360fi
9361
Neil Schemenauer4e425612001-06-19 15:44:15 +00009362# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9363
Michael W. Hudson54241132001-12-07 15:38:26 +00009364
Matthias Kloseb9621712010-04-24 17:59:49 +00009365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9366$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009367if test -z "$MACHDEP_OBJS"
9368then
Jack Jansene578a632001-08-15 01:27:14 +00009369 MACHDEP_OBJS=$extra_machdep_objs
9370else
9371 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9374$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009375
Guido van Rossum627b2d71993-12-24 10:39:16 +00009376# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009377for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009378 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009379 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009380 futimens futimes gai_strerror \
9381 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009382 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009383 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009384 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009385 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009386 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009387 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009388 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009389 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009390 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009391 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9392 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009393 sigaction sigaltstack siginterrupt sigpending sigrelse \
9394 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009395 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009396 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9397 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009398do :
9399 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9400ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009401if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009402 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009403#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009404_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009405
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009406fi
9407done
9408
Michael W. Hudson54241132001-12-07 15:38:26 +00009409
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009410# For some functions, having a definition is not sufficient, since
9411# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9413$as_echo_n "checking for chroot... " >&6; }
9414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009415/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009416#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009417int
9418main ()
9419{
9420void *x=chroot
9421 ;
9422 return 0;
9423}
9424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009426
Matthias Kloseb9621712010-04-24 17:59:49 +00009427$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009428
Matthias Kloseb159a552010-04-25 21:00:44 +00009429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009430$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009431else
Matthias Kloseb9621712010-04-24 17:59:49 +00009432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9433$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009434
9435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9438$as_echo_n "checking for link... " >&6; }
9439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009440/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009441#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009442int
9443main ()
9444{
9445void *x=link
9446 ;
9447 return 0;
9448}
9449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009450if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009451
Matthias Kloseb9621712010-04-24 17:59:49 +00009452$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009453
Matthias Kloseb159a552010-04-25 21:00:44 +00009454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009455$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009456else
Matthias Kloseb9621712010-04-24 17:59:49 +00009457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9458$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009459
9460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9463$as_echo_n "checking for symlink... " >&6; }
9464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009465/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009466#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009467int
9468main ()
9469{
9470void *x=symlink
9471 ;
9472 return 0;
9473}
9474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009476
Matthias Kloseb9621712010-04-24 17:59:49 +00009477$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009478
Matthias Kloseb159a552010-04-25 21:00:44 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009480$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009481else
Matthias Kloseb9621712010-04-24 17:59:49 +00009482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009484
9485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9488$as_echo_n "checking for fchdir... " >&6; }
9489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009490/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009491#include <unistd.h>
9492int
9493main ()
9494{
9495void *x=fchdir
9496 ;
9497 return 0;
9498}
9499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009500if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009501
Matthias Kloseb9621712010-04-24 17:59:49 +00009502$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009503
Matthias Kloseb159a552010-04-25 21:00:44 +00009504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009505$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009506else
Matthias Kloseb9621712010-04-24 17:59:49 +00009507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9508$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009509
9510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9513$as_echo_n "checking for fsync... " >&6; }
9514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009515/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009516#include <unistd.h>
9517int
9518main ()
9519{
9520void *x=fsync
9521 ;
9522 return 0;
9523}
9524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009525if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009526
Matthias Kloseb9621712010-04-24 17:59:49 +00009527$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009528
Matthias Kloseb159a552010-04-25 21:00:44 +00009529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009530$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009531else
Matthias Kloseb9621712010-04-24 17:59:49 +00009532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9533$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009534
9535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9538$as_echo_n "checking for fdatasync... " >&6; }
9539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009540/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009541#include <unistd.h>
9542int
9543main ()
9544{
9545void *x=fdatasync
9546 ;
9547 return 0;
9548}
9549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009550if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009551
Matthias Kloseb9621712010-04-24 17:59:49 +00009552$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009553
Matthias Kloseb159a552010-04-25 21:00:44 +00009554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009555$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009556else
Matthias Kloseb9621712010-04-24 17:59:49 +00009557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9558$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009559
9560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9563$as_echo_n "checking for epoll... " >&6; }
9564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009565/* end confdefs.h. */
9566#include <sys/epoll.h>
9567int
9568main ()
9569{
9570void *x=epoll_create
9571 ;
9572 return 0;
9573}
9574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009575if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009576
Matthias Kloseb9621712010-04-24 17:59:49 +00009577$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009578
Matthias Kloseb159a552010-04-25 21:00:44 +00009579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009580$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009581else
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9583$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009584
9585fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9588$as_echo_n "checking for kqueue... " >&6; }
9589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009590/* end confdefs.h. */
9591
9592#include <sys/types.h>
9593#include <sys/event.h>
9594
9595int
9596main ()
9597{
9598int x=kqueue()
9599 ;
9600 return 0;
9601}
9602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009603if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009604
Matthias Kloseb9621712010-04-24 17:59:49 +00009605$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009606
Matthias Kloseb159a552010-04-25 21:00:44 +00009607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009608$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009609else
Matthias Kloseb9621712010-04-24 17:59:49 +00009610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9611$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009612
9613fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009615# On some systems (eg. FreeBSD 5), we would find a definition of the
9616# functions ctermid_r, setgroups in the library, but no prototype
9617# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9618# address to avoid compiler warnings and potential miscompilations
9619# because of the missing prototypes.
9620
Matthias Kloseb9621712010-04-24 17:59:49 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9622$as_echo_n "checking for ctermid_r... " >&6; }
9623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009624/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009625
Martin v. Löwisd5843682002-11-21 20:41:28 +00009626#include <stdio.h>
9627
Martin v. Löwisd5843682002-11-21 20:41:28 +00009628int
9629main ()
9630{
9631void* p = ctermid_r
9632 ;
9633 return 0;
9634}
9635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009636if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009637
Matthias Kloseb9621712010-04-24 17:59:49 +00009638$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009639
Matthias Kloseb159a552010-04-25 21:00:44 +00009640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009641$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009642else
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9644$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009645
9646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9648
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9650$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009651if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009652 $as_echo_n "(cached) " >&6
9653else
9654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009655/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009656#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009657int
9658main ()
9659{
9660void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009661
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009662 ;
9663 return 0;
9664}
9665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009666if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009667 ac_cv_flock_decl=yes
9668else
9669 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009670
9671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009673
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009674fi
9675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9676$as_echo "$ac_cv_flock_decl" >&6; }
9677if test "x${ac_cv_flock_decl}" = xyes; then
9678 for ac_func in flock
9679do :
9680 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009681if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009682 cat >>confdefs.h <<_ACEOF
9683#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009684_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009685
Antoine Pitroua3000072010-09-07 14:52:42 +00009686else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009688$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009689if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009690 $as_echo_n "(cached) " >&6
9691else
9692 ac_check_lib_save_LIBS=$LIBS
9693LIBS="-lbsd $LIBS"
9694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9695/* end confdefs.h. */
9696
9697/* Override any GCC internal prototype to avoid an error.
9698 Use char because int might match the return type of a GCC
9699 builtin and then its argument prototype would still apply. */
9700#ifdef __cplusplus
9701extern "C"
9702#endif
9703char flock ();
9704int
9705main ()
9706{
9707return flock ();
9708 ;
9709 return 0;
9710}
9711_ACEOF
9712if ac_fn_c_try_link "$LINENO"; then :
9713 ac_cv_lib_bsd_flock=yes
9714else
9715 ac_cv_lib_bsd_flock=no
9716fi
9717rm -f core conftest.err conftest.$ac_objext \
9718 conftest$ac_exeext conftest.$ac_ext
9719LIBS=$ac_check_lib_save_LIBS
9720fi
9721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9722$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009723if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009724 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009725
9726
9727$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9728
9729
9730fi
9731
9732
9733fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009734done
9735
Antoine Pitroua3000072010-09-07 14:52:42 +00009736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737
Matthias Kloseb9621712010-04-24 17:59:49 +00009738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9739$as_echo_n "checking for getpagesize... " >&6; }
9740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009741/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009742
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009743#include <unistd.h>
9744
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009745int
9746main ()
9747{
9748void* p = getpagesize
9749 ;
9750 return 0;
9751}
9752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009753if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009754
Matthias Kloseb9621712010-04-24 17:59:49 +00009755$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009756
Matthias Kloseb159a552010-04-25 21:00:44 +00009757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009758$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009759else
Matthias Kloseb9621712010-04-24 17:59:49 +00009760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9761$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009762
9763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009765
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9767$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9769/* end confdefs.h. */
9770
9771#include <malloc.h>
9772
9773int
9774main ()
9775{
9776mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9777 ;
9778 return 0;
9779}
9780_ACEOF
9781if ac_fn_c_try_compile "$LINENO"; then :
9782
9783$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9784
9785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9786$as_echo "yes" >&6; }
9787else
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; }
9790
9791fi
9792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9793
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009794for ac_prog in true
9795do
9796 # Extract the first word of "$ac_prog", so it can be a program name with args.
9797set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9799$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009800if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009801 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009802else
9803 if test -n "$TRUE"; then
9804 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9805else
9806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9807for as_dir in $PATH
9808do
9809 IFS=$as_save_IFS
9810 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009811 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812 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 +00009813 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009814 $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 +00009815 break 2
9816 fi
9817done
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009820
9821fi
9822fi
9823TRUE=$ac_cv_prog_TRUE
9824if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9826$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009827else
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9829$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009830fi
9831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009833 test -n "$TRUE" && break
9834done
9835test -n "$TRUE" || TRUE="/bin/true"
9836
9837
Matthias Kloseb9621712010-04-24 17:59:49 +00009838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9839$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009840if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009841 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009842else
9843 ac_check_lib_save_LIBS=$LIBS
9844LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009846/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848/* Override any GCC internal prototype to avoid an error.
9849 Use char because int might match the return type of a GCC
9850 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009851#ifdef __cplusplus
9852extern "C"
9853#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009854char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009855int
9856main ()
9857{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009859 ;
9860 return 0;
9861}
9862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009863if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009864 ac_cv_lib_c_inet_aton=yes
9865else
Matthias Kloseb9621712010-04-24 17:59:49 +00009866 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009868rm -f core conftest.err conftest.$ac_objext \
9869 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009870LIBS=$ac_check_lib_save_LIBS
9871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9873$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009874if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009875 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009876else
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9878$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009879if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009881else
9882 ac_check_lib_save_LIBS=$LIBS
9883LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009885/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887/* Override any GCC internal prototype to avoid an error.
9888 Use char because int might match the return type of a GCC
9889 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009890#ifdef __cplusplus
9891extern "C"
9892#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009893char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009894int
9895main ()
9896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009898 ;
9899 return 0;
9900}
9901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009902if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009903 ac_cv_lib_resolv_inet_aton=yes
9904else
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009907rm -f core conftest.err conftest.$ac_objext \
9908 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009909LIBS=$ac_check_lib_save_LIBS
9910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9912$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009913if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009914 cat >>confdefs.h <<_ACEOF
9915#define HAVE_LIBRESOLV 1
9916_ACEOF
9917
9918 LIBS="-lresolv $LIBS"
9919
9920fi
9921
9922
9923fi
9924
9925
Christian Heimesd0764e22007-12-04 15:00:33 +00009926# On Tru64, chflags seems to be present, but calling it will
9927# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9929$as_echo_n "checking for chflags... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009930if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009931 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009932else
Matthias Kloseb9621712010-04-24 17:59:49 +00009933 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009934 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009935else
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009937/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009938
Christian Heimesd0764e22007-12-04 15:00:33 +00009939#include <sys/stat.h>
9940#include <unistd.h>
9941int main(int argc, char*argv[])
9942{
9943 if(chflags(argv[0], 0) != 0)
9944 return 1;
9945 return 0;
9946}
Ned Deily3eb67d52011-06-28 00:00:28 -07009947
Christian Heimesd0764e22007-12-04 15:00:33 +00009948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009949if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009950 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009951else
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9955 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009956fi
9957
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009958
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9961$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009962if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009963 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009964if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009965 ac_cv_have_chflags="yes"
9966else
9967 ac_cv_have_chflags="no"
9968fi
9969
9970fi
9971if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009972
Matthias Kloseb9621712010-04-24 17:59:49 +00009973$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009974
9975fi
9976
Matthias Kloseb9621712010-04-24 17:59:49 +00009977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9978$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009979if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009981else
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009983 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009984else
Matthias Kloseb9621712010-04-24 17:59:49 +00009985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009986/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009987
Christian Heimesd0764e22007-12-04 15:00:33 +00009988#include <sys/stat.h>
9989#include <unistd.h>
9990int main(int argc, char*argv[])
9991{
9992 if(lchflags(argv[0], 0) != 0)
9993 return 1;
9994 return 0;
9995}
Ned Deily3eb67d52011-06-28 00:00:28 -07009996
Christian Heimesd0764e22007-12-04 15:00:33 +00009997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009998if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009999 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010000else
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10004 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010005fi
10006
10007
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10010$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010011if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010013if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010014 ac_cv_have_lchflags="yes"
10015else
10016 ac_cv_have_lchflags="no"
10017fi
10018
10019fi
10020if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010021
Matthias Kloseb9621712010-04-24 17:59:49 +000010022$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010023
10024fi
10025
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010026case $ac_sys_system/$ac_sys_release in
10027Darwin/*)
10028 _CUR_CFLAGS="${CFLAGS}"
10029 _CUR_LDFLAGS="${LDFLAGS}"
10030 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10031 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10032 ;;
10033esac
10034
Matthias Kloseb9621712010-04-24 17:59:49 +000010035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10036$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010037if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010038 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010039else
10040 ac_check_lib_save_LIBS=$LIBS
10041LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010043/* end confdefs.h. */
10044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010045/* Override any GCC internal prototype to avoid an error.
10046 Use char because int might match the return type of a GCC
10047 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010048#ifdef __cplusplus
10049extern "C"
10050#endif
10051char inflateCopy ();
10052int
10053main ()
10054{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010056 ;
10057 return 0;
10058}
10059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010060if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010061 ac_cv_lib_z_inflateCopy=yes
10062else
Matthias Kloseb9621712010-04-24 17:59:49 +000010063 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010065rm -f core conftest.err conftest.$ac_objext \
10066 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010067LIBS=$ac_check_lib_save_LIBS
10068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10070$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010071if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010072
Matthias Kloseb9621712010-04-24 17:59:49 +000010073$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010074
10075fi
10076
10077
10078case $ac_sys_system/$ac_sys_release in
10079Darwin/*)
10080 CFLAGS="${_CUR_CFLAGS}"
10081 LDFLAGS="${_CUR_LDFLAGS}"
10082 ;;
10083esac
10084
Matthias Kloseb9621712010-04-24 17:59:49 +000010085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10086$as_echo_n "checking for hstrerror... " >&6; }
10087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010088/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010089
Martin v. Löwise9416172003-05-03 10:12:45 +000010090#include <netdb.h>
10091
Martin v. Löwise9416172003-05-03 10:12:45 +000010092int
10093main ()
10094{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010095void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010096 ;
10097 return 0;
10098}
10099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010100if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010101
Matthias Kloseb9621712010-04-24 17:59:49 +000010102$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010103
Matthias Kloseb159a552010-04-25 21:00:44 +000010104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010105$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010106else
Matthias Kloseb9621712010-04-24 17:59:49 +000010107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10108$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010109
10110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010111rm -f core conftest.err conftest.$ac_objext \
10112 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010113
Matthias Kloseb9621712010-04-24 17:59:49 +000010114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10115$as_echo_n "checking for inet_aton... " >&6; }
10116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010117/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010118
Martin v. Löwis86d66262006-02-17 08:40:11 +000010119#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010120#include <sys/socket.h>
10121#include <netinet/in.h>
10122#include <arpa/inet.h>
10123
Martin v. Löwise9416172003-05-03 10:12:45 +000010124int
10125main ()
10126{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010127void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010128 ;
10129 return 0;
10130}
10131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010132if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010133
Matthias Kloseb9621712010-04-24 17:59:49 +000010134$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010135
Matthias Kloseb159a552010-04-25 21:00:44 +000010136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010137$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010138else
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010141
10142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010143rm -f core conftest.err conftest.$ac_objext \
10144 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010145
Matthias Kloseb9621712010-04-24 17:59:49 +000010146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10147$as_echo_n "checking for inet_pton... " >&6; }
10148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010149/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010150
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010151#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010152#include <sys/socket.h>
10153#include <netinet/in.h>
10154#include <arpa/inet.h>
10155
Martin v. Löwise9416172003-05-03 10:12:45 +000010156int
10157main ()
10158{
10159void* p = inet_pton
10160 ;
10161 return 0;
10162}
10163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010164if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010165
Matthias Kloseb9621712010-04-24 17:59:49 +000010166$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010167
Matthias Kloseb159a552010-04-25 21:00:44 +000010168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010169$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010170else
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10172$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010173
10174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010176
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010177# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10179$as_echo_n "checking for setgroups... " >&6; }
10180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010181/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010182
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010183#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010184#ifdef HAVE_GRP_H
10185#include <grp.h>
10186#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010187
Martin v. Löwisd5843682002-11-21 20:41:28 +000010188int
10189main ()
10190{
10191void* p = setgroups
10192 ;
10193 return 0;
10194}
10195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010196if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010197
Matthias Kloseb9621712010-04-24 17:59:49 +000010198$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010199
Matthias Kloseb159a552010-04-25 21:00:44 +000010200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010201$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010202else
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10204$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010205
10206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010208
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010209# check for openpty and forkpty
10210
10211for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010212do :
10213 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010214if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010215 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010216#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010217_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010218
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010219else
Matthias Kloseb9621712010-04-24 17:59:49 +000010220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10221$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010222if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010224else
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010226LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230/* Override any GCC internal prototype to avoid an error.
10231 Use char because int might match the return type of a GCC
10232 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010233#ifdef __cplusplus
10234extern "C"
10235#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010236char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010237int
10238main ()
10239{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 ;
10242 return 0;
10243}
10244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010245if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010247else
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010250rm -f core conftest.err conftest.$ac_objext \
10251 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010252LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10255$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010256if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010258 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010259else
Matthias Kloseb9621712010-04-24 17:59:49 +000010260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10261$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010262if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010263 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010264else
10265 ac_check_lib_save_LIBS=$LIBS
10266LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010268/* end confdefs.h. */
10269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270/* Override any GCC internal prototype to avoid an error.
10271 Use char because int might match the return type of a GCC
10272 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010273#ifdef __cplusplus
10274extern "C"
10275#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010276char openpty ();
10277int
10278main ()
10279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010281 ;
10282 return 0;
10283}
10284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010285if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010286 ac_cv_lib_bsd_openpty=yes
10287else
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010290rm -f core conftest.err conftest.$ac_objext \
10291 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010292LIBS=$ac_check_lib_save_LIBS
10293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10295$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010296if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010298 LIBS="$LIBS -lbsd"
10299fi
10300
10301
10302fi
10303
Fred Drake8cef4cf2000-06-28 16:40:38 +000010304
10305fi
10306done
10307
10308for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010309do :
10310 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010311if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010313#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010314_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010315
Fred Drake8cef4cf2000-06-28 16:40:38 +000010316else
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10318$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010319if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010321else
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010323LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010327/* Override any GCC internal prototype to avoid an error.
10328 Use char because int might match the return type of a GCC
10329 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010330#ifdef __cplusplus
10331extern "C"
10332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010333char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010334int
10335main ()
10336{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 ;
10339 return 0;
10340}
10341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010342if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010343 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010344else
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010347rm -f core conftest.err conftest.$ac_objext \
10348 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010349LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10352$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010353if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010354 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010355 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010356else
Matthias Kloseb9621712010-04-24 17:59:49 +000010357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10358$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010359if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010361else
10362 ac_check_lib_save_LIBS=$LIBS
10363LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010365/* end confdefs.h. */
10366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010367/* Override any GCC internal prototype to avoid an error.
10368 Use char because int might match the return type of a GCC
10369 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010370#ifdef __cplusplus
10371extern "C"
10372#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010373char forkpty ();
10374int
10375main ()
10376{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010377return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010378 ;
10379 return 0;
10380}
10381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010382if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010383 ac_cv_lib_bsd_forkpty=yes
10384else
Matthias Kloseb9621712010-04-24 17:59:49 +000010385 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010387rm -f core conftest.err conftest.$ac_objext \
10388 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010389LIBS=$ac_check_lib_save_LIBS
10390fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10392$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010393if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010395 LIBS="$LIBS -lbsd"
10396fi
10397
10398
10399fi
10400
Fred Drake8cef4cf2000-06-28 16:40:38 +000010401
10402fi
10403done
10404
Jack Jansendd19cf82001-12-06 22:36:17 +000010405
Christian Heimesb186d002008-03-18 15:15:01 +000010406# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010407for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010408do :
10409 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010410if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010411 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010412#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010413_ACEOF
10414
10415fi
10416done
10417
10418
Michael W. Hudson54241132001-12-07 15:38:26 +000010419# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010420for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010421do :
10422 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10423ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010424if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010426#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010427_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010428
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010429fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010430done
10431
Michael W. Hudson54241132001-12-07 15:38:26 +000010432
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010433ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010434if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010435 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010436
Martin v. Löwis1142de32002-03-29 16:28:31 +000010437else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010439 *" dup2.$ac_objext "* ) ;;
10440 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010442esac
10443
Martin v. Löwis1142de32002-03-29 16:28:31 +000010444fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010445
10446ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010447if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010448 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10449
10450else
10451 case " $LIBOBJS " in
10452 *" getcwd.$ac_objext "* ) ;;
10453 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10454 ;;
10455esac
10456
10457fi
10458
10459ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010460if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010461 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10462
10463else
10464 case " $LIBOBJS " in
10465 *" strdup.$ac_objext "* ) ;;
10466 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10467 ;;
10468esac
10469
10470fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010471
10472
10473for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010474do :
10475 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010476if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010478#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010481/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010482#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010483int
10484main ()
10485{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010486getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010487 ;
10488 return 0;
10489}
10490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010491if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010492
Matthias Kloseb9621712010-04-24 17:59:49 +000010493$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010494
Guido van Rossum627b2d71993-12-24 10:39:16 +000010495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010497
Guido van Rossum627b2d71993-12-24 10:39:16 +000010498fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010499done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010500
Jack Jansen150753c2003-03-29 22:07:47 +000010501for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010502do :
10503 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010504if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010505 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010506#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010509/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010510#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010511int
10512main ()
10513{
10514setpgrp(0,0);
10515 ;
10516 return 0;
10517}
10518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010520
Matthias Kloseb9621712010-04-24 17:59:49 +000010521$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010522
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010525
10526fi
10527done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010528
Thomas Wouters3a584202000-08-05 23:28:51 +000010529for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010530do :
10531 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010532if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010533 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010534#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010537/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010538#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010539int
10540main ()
10541{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010542gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 ;
10544 return 0;
10545}
10546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010547if ac_fn_c_try_compile "$LINENO"; then :
10548
Guido van Rossum627b2d71993-12-24 10:39:16 +000010549else
Skip Montanaro6dead952003-09-25 14:50:04 +000010550
Matthias Kloseb9621712010-04-24 17:59:49 +000010551$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010552
Martin v. Löwis11437992002-04-12 09:54:03 +000010553
Guido van Rossum627b2d71993-12-24 10:39:16 +000010554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010556
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010557fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010558done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010559
Michael W. Hudson54241132001-12-07 15:38:26 +000010560
Matthias Kloseb9621712010-04-24 17:59:49 +000010561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10562$as_echo_n "checking for major... " >&6; }
10563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010564/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010565
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010566#if defined(MAJOR_IN_MKDEV)
10567#include <sys/mkdev.h>
10568#elif defined(MAJOR_IN_SYSMACROS)
10569#include <sys/sysmacros.h>
10570#else
10571#include <sys/types.h>
10572#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010573
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010574int
10575main ()
10576{
10577
10578 makedev(major(0),minor(0));
10579
10580 ;
10581 return 0;
10582}
10583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010584if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010585
10586
Matthias Kloseb9621712010-04-24 17:59:49 +000010587$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010588
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10590$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010591
10592else
Skip Montanaro6dead952003-09-25 14:50:04 +000010593
Matthias Kloseb9621712010-04-24 17:59:49 +000010594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10595$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010596
10597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010598rm -f core conftest.err conftest.$ac_objext \
10599 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010600
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010601# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010602# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10604$as_echo_n "checking for getaddrinfo... " >&6; }
10605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010606/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010607
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010608#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010609#include <sys/socket.h>
10610#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010611#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010612
Martin v. Löwis11437992002-04-12 09:54:03 +000010613int
10614main ()
10615{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010616getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010617 ;
10618 return 0;
10619}
10620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010621if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010622 have_getaddrinfo=yes
10623else
Matthias Kloseb9621712010-04-24 17:59:49 +000010624 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010625fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010626rm -f core conftest.err conftest.$ac_objext \
10627 conftest$ac_exeext conftest.$ac_ext
10628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10629$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010630if test $have_getaddrinfo = yes
10631then
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10633$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010634 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010636else
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010638 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010639else
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010641/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010642
10643#include <sys/types.h>
10644#include <netdb.h>
10645#include <string.h>
10646#include <sys/socket.h>
10647#include <netinet/in.h>
10648
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010649int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010650{
10651 int passive, gaierr, inet4 = 0, inet6 = 0;
10652 struct addrinfo hints, *ai, *aitop;
10653 char straddr[INET6_ADDRSTRLEN], strport[16];
10654
10655 for (passive = 0; passive <= 1; passive++) {
10656 memset(&hints, 0, sizeof(hints));
10657 hints.ai_family = AF_UNSPEC;
10658 hints.ai_flags = passive ? AI_PASSIVE : 0;
10659 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010660 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010661 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10662 (void)gai_strerror(gaierr);
10663 goto bad;
10664 }
10665 for (ai = aitop; ai; ai = ai->ai_next) {
10666 if (ai->ai_addr == NULL ||
10667 ai->ai_addrlen == 0 ||
10668 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10669 straddr, sizeof(straddr), strport, sizeof(strport),
10670 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10671 goto bad;
10672 }
10673 switch (ai->ai_family) {
10674 case AF_INET:
10675 if (strcmp(strport, "54321") != 0) {
10676 goto bad;
10677 }
10678 if (passive) {
10679 if (strcmp(straddr, "0.0.0.0") != 0) {
10680 goto bad;
10681 }
10682 } else {
10683 if (strcmp(straddr, "127.0.0.1") != 0) {
10684 goto bad;
10685 }
10686 }
10687 inet4++;
10688 break;
10689 case AF_INET6:
10690 if (strcmp(strport, "54321") != 0) {
10691 goto bad;
10692 }
10693 if (passive) {
10694 if (strcmp(straddr, "::") != 0) {
10695 goto bad;
10696 }
10697 } else {
10698 if (strcmp(straddr, "::1") != 0) {
10699 goto bad;
10700 }
10701 }
10702 inet6++;
10703 break;
10704 case AF_UNSPEC:
10705 goto bad;
10706 break;
10707 default:
10708 /* another family support? */
10709 break;
10710 }
10711 }
10712 }
10713
10714 if (!(inet4 == 0 || inet4 == 2))
10715 goto bad;
10716 if (!(inet6 == 0 || inet6 == 2))
10717 goto bad;
10718
10719 if (aitop)
10720 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010721 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010722
10723 bad:
10724 if (aitop)
10725 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010726 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010727}
10728
Martin v. Löwis11437992002-04-12 09:54:03 +000010729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010730if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010731 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010732else
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10736 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010739fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010740
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10744$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10745
Mark Dickinson2df5d282009-12-31 21:22:50 +000010746if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010747then
10748 if test $ipv6 = yes
10749 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010750 echo 'Fatal: You must get working getaddrinfo() function.'
10751 echo ' or you can specify "--disable-ipv6"'.
10752 exit 1
10753 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010754else
Martin v. Löwis11437992002-04-12 09:54:03 +000010755
Matthias Kloseb9621712010-04-24 17:59:49 +000010756$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010757
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010758fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010759
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010760for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010761do :
10762 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010763if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010764 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010765#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010766_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010767
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010768fi
10769done
10770
Michael W. Hudson54241132001-12-07 15:38:26 +000010771
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010772# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10774$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010775if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010777else
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010779/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010780#include <sys/types.h>
10781#include <sys/time.h>
10782#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010783
Martin v. Löwis11437992002-04-12 09:54:03 +000010784int
10785main ()
10786{
10787if ((struct tm *) 0)
10788return 0;
10789 ;
10790 return 0;
10791}
10792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010793if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010794 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010795else
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10801$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010802if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010803
Matthias Kloseb9621712010-04-24 17:59:49 +000010804$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010805
10806fi
10807
Matthias Kloseb9621712010-04-24 17:59:49 +000010808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10809$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010810if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010812else
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010814/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010815#include <sys/types.h>
10816#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010817
Martin v. Löwis11437992002-04-12 09:54:03 +000010818int
10819main ()
10820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821struct tm tm;
10822 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010824 ;
10825 return 0;
10826}
10827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010828if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010829 ac_cv_struct_tm=time.h
10830else
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10836$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010837if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010838
Matthias Kloseb9621712010-04-24 17:59:49 +000010839$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010840
10841fi
10842
Matthias Kloseb9621712010-04-24 17:59:49 +000010843ac_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 +000010844#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010847if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010848
10849cat >>confdefs.h <<_ACEOF
10850#define HAVE_STRUCT_TM_TM_ZONE 1
10851_ACEOF
10852
10853
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010854fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010855
Martin v. Löwis11437992002-04-12 09:54:03 +000010856if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10857
Matthias Kloseb9621712010-04-24 17:59:49 +000010858$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010859
10860else
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10862"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010863if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010865else
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010867fi
10868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010869cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010870#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010871_ACEOF
10872
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10874$as_echo_n "checking for tzname... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010875if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010877else
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010879/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010880#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010881#if !HAVE_DECL_TZNAME
10882extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010884
Martin v. Löwis11437992002-04-12 09:54:03 +000010885int
10886main ()
10887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010888return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010889 ;
10890 return 0;
10891}
10892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010893if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010894 ac_cv_var_tzname=yes
10895else
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010898rm -f core conftest.err conftest.$ac_objext \
10899 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10902$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010903 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010904
Matthias Kloseb9621712010-04-24 17:59:49 +000010905$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010906
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010907 fi
10908fi
10909
Matthias Kloseb9621712010-04-24 17:59:49 +000010910ac_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 +020010911if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010912
10913cat >>confdefs.h <<_ACEOF
10914#define HAVE_STRUCT_STAT_ST_RDEV 1
10915_ACEOF
10916
10917
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010918fi
10919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920ac_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 +020010921if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010922
Martin v. Löwis11437992002-04-12 09:54:03 +000010923cat >>confdefs.h <<_ACEOF
10924#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10925_ACEOF
10926
10927
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010928fi
10929
Matthias Kloseb9621712010-04-24 17:59:49 +000010930ac_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 +020010931if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010932
10933cat >>confdefs.h <<_ACEOF
10934#define HAVE_STRUCT_STAT_ST_FLAGS 1
10935_ACEOF
10936
10937
10938fi
10939
Matthias Kloseb9621712010-04-24 17:59:49 +000010940ac_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 +020010941if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010942
10943cat >>confdefs.h <<_ACEOF
10944#define HAVE_STRUCT_STAT_ST_GEN 1
10945_ACEOF
10946
10947
10948fi
10949
Matthias Kloseb9621712010-04-24 17:59:49 +000010950ac_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 +020010951if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010952
10953cat >>confdefs.h <<_ACEOF
10954#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10955_ACEOF
10956
10957
10958fi
10959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960ac_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 +020010961if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010962
Martin v. Löwis11437992002-04-12 09:54:03 +000010963cat >>confdefs.h <<_ACEOF
10964#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10965_ACEOF
10966
10967
Matthias Kloseb9621712010-04-24 17:59:49 +000010968$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010969
10970else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010971 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010972 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010973 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10974 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010975esac
10976
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010977fi
10978
Michael W. Hudson54241132001-12-07 15:38:26 +000010979
Martin v. Löwis11437992002-04-12 09:54:03 +000010980
Matthias Kloseb9621712010-04-24 17:59:49 +000010981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10982$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010983if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010985else
Matthias Kloseb159a552010-04-25 21:00:44 +000010986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010988/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010989#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010990int
10991main ()
10992{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010993return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010994 ;
10995 return 0;
10996}
10997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010998if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010999 ac_cv_header_time_altzone=yes
11000else
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005fi
11006
Matthias Kloseb9621712010-04-24 17:59:49 +000011007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11008$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011009if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011012
11013fi
11014
Guido van Rossumda88dad1995-01-26 00:46:29 +000011015was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11017$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011019/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011020
11021#include <sys/types.h>
11022#include <sys/select.h>
11023#include <sys/time.h>
11024
Martin v. Löwis11437992002-04-12 09:54:03 +000011025int
11026main ()
11027{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011028;
Martin v. Löwis11437992002-04-12 09:54:03 +000011029 ;
11030 return 0;
11031}
11032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011033if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011034
11035
Matthias Kloseb9621712010-04-24 17:59:49 +000011036$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011037
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011038 was_it_defined=yes
11039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11043$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011044
Matthias Kloseb9621712010-04-24 17:59:49 +000011045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11046$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011047if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011049else
Matthias Kloseb9621712010-04-24 17:59:49 +000011050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011051/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011052#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011053int
11054main ()
11055{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011056struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 ;
11058 return 0;
11059}
11060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011061if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011062 ac_cv_struct_addrinfo=yes
11063else
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11067fi
11068
Matthias Kloseb9621712010-04-24 17:59:49 +000011069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11070$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011071if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011072
Matthias Kloseb9621712010-04-24 17:59:49 +000011073$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011074
11075fi
11076
Matthias Kloseb9621712010-04-24 17:59:49 +000011077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11078$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011079if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011080 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011081else
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011083/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011084
11085# include <sys/types.h>
11086# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011087int
11088main ()
11089{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011090struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011091 ;
11092 return 0;
11093}
11094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011095if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011096 ac_cv_struct_sockaddr_storage=yes
11097else
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11101fi
11102
Matthias Kloseb9621712010-04-24 17:59:49 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11104$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011105if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011106
Matthias Kloseb9621712010-04-24 17:59:49 +000011107$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011108
11109fi
11110
Guido van Rossum627b2d71993-12-24 10:39:16 +000011111# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011112
Matthias Kloseb9621712010-04-24 17:59:49 +000011113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11114$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011115if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011116 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011117else
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011120$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011121int
11122main ()
11123{
11124static int test_array [1 - 2 * !(((char) -1) < 0)];
11125test_array [0] = 0
11126
11127 ;
11128 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011129}
Martin v. Löwis11437992002-04-12 09:54:03 +000011130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011131if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011132 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011133else
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11139$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011140if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011142
11143fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011144
Matthias Kloseb9621712010-04-24 17:59:49 +000011145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11146$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011147if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011148 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011149else
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011151/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011152
Martin v. Löwis11437992002-04-12 09:54:03 +000011153int
11154main ()
11155{
11156/* FIXME: Include the comments suggested by Paul. */
11157#ifndef __cplusplus
11158 /* Ultrix mips cc rejects this. */
11159 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011160 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011162 char const *const *pcpcc;
11163 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 /* NEC SVR4.0.2 mips cc rejects this. */
11165 struct point {int x, y;};
11166 static struct point const zero = {0,0};
11167 /* AIX XL C 1.02.0.0 rejects this.
11168 It does not let you subtract one const X* pointer from another in
11169 an arm of an if-expression whose if-part is not a constant
11170 expression */
11171 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011172 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011174 ++pcpcc;
11175 ppc = (char**) pcpcc;
11176 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 { /* SCO 3.2v4 cc rejects this. */
11178 char *t;
11179 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011180
Martin v. Löwis11437992002-04-12 09:54:03 +000011181 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011182 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 }
11184 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11185 int x[] = {25, 17};
11186 const int *foo = &x[0];
11187 ++foo;
11188 }
11189 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11190 typedef const int *iptr;
11191 iptr p = 0;
11192 ++p;
11193 }
11194 { /* AIX XL C 1.02.0.0 rejects this saying
11195 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11196 struct s { int j; const int *ap[3]; };
11197 struct s *b; b->j = 5;
11198 }
11199 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11200 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011203 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011204#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011205
Martin v. Löwis11437992002-04-12 09:54:03 +000011206 ;
11207 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011208}
Martin v. Löwis11437992002-04-12 09:54:03 +000011209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011210if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011211 ac_cv_c_const=yes
11212else
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11218$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011219if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011222
11223fi
11224
Michael W. Hudson54241132001-12-07 15:38:26 +000011225
Guido van Rossumda88dad1995-01-26 00:46:29 +000011226works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11228$as_echo_n "checking for working volatile... " >&6; }
11229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011230/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011231
Martin v. Löwis11437992002-04-12 09:54:03 +000011232int
11233main ()
11234{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011235volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 ;
11237 return 0;
11238}
11239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011240if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011241 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011242else
Skip Montanaro6dead952003-09-25 14:50:04 +000011243
Matthias Kloseb9621712010-04-24 17:59:49 +000011244$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011245
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011246
Guido van Rossum627b2d71993-12-24 10:39:16 +000011247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11250$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011251
Guido van Rossumda88dad1995-01-26 00:46:29 +000011252works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11254$as_echo_n "checking for working signed char... " >&6; }
11255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011256/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011257
Martin v. Löwis11437992002-04-12 09:54:03 +000011258int
11259main ()
11260{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011261signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 ;
11263 return 0;
11264}
11265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011266if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011267 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011268else
Skip Montanaro6dead952003-09-25 14:50:04 +000011269
Matthias Kloseb9621712010-04-24 17:59:49 +000011270$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011271
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011272
Guido van Rossum7f43da71994-08-01 12:15:30 +000011273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11276$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011277
Guido van Rossumda88dad1995-01-26 00:46:29 +000011278have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11280$as_echo_n "checking for prototypes... " >&6; }
11281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011282/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011283int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011284int
11285main ()
11286{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011287return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 ;
11289 return 0;
11290}
11291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011292if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011293
Matthias Kloseb9621712010-04-24 17:59:49 +000011294$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
Matthias Kloseb159a552010-04-25 21:00:44 +000011296 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11300$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011301
Guido van Rossumda88dad1995-01-26 00:46:29 +000011302works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11304$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011306/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011307
11308#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011309int foo(int x, ...) {
11310 va_list va;
11311 va_start(va, x);
11312 va_arg(va, int);
11313 va_arg(va, char *);
11314 va_arg(va, double);
11315 return 0;
11316}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011317
Martin v. Löwis11437992002-04-12 09:54:03 +000011318int
11319main ()
11320{
Guido van Rossum90eea071996-08-30 20:58:57 +000011321return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 ;
11323 return 0;
11324}
11325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011327
11328
Matthias Kloseb9621712010-04-24 17:59:49 +000011329$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011330
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011331 works=yes
11332
Guido van Rossum627b2d71993-12-24 10:39:16 +000011333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11336$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011337
Martin v. Löwisd6320502004-08-12 13:45:08 +000011338# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11340$as_echo_n "checking for socketpair... " >&6; }
11341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011342/* end confdefs.h. */
11343
11344#include <sys/types.h>
11345#include <sys/socket.h>
11346
11347int
11348main ()
11349{
11350void *x=socketpair
11351 ;
11352 return 0;
11353}
11354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011355if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011356
Matthias Kloseb9621712010-04-24 17:59:49 +000011357$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011358
Matthias Kloseb159a552010-04-25 21:00:44 +000011359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011360$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011361else
Matthias Kloseb9621712010-04-24 17:59:49 +000011362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011364
11365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011367
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011368# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11370$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011372/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011373#include <sys/types.h>
11374#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011375int
11376main ()
11377{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011378struct sockaddr x;
11379x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 ;
11381 return 0;
11382}
11383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011384if ac_fn_c_try_compile "$LINENO"; then :
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11386$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011387
Matthias Kloseb9621712010-04-24 17:59:49 +000011388$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011389
11390else
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011393
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011396
Guido van Rossumda88dad1995-01-26 00:46:29 +000011397va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11399$as_echo_n "checking whether va_list is an array... " >&6; }
11400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011401/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011402
11403#ifdef HAVE_STDARG_PROTOTYPES
11404#include <stdarg.h>
11405#else
11406#include <varargs.h>
11407#endif
11408
Martin v. Löwis11437992002-04-12 09:54:03 +000011409int
11410main ()
11411{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011412va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 ;
11414 return 0;
11415}
11416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011417if ac_fn_c_try_compile "$LINENO"; then :
11418
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011419else
Skip Montanaro6dead952003-09-25 14:50:04 +000011420
Martin v. Löwis11437992002-04-12 09:54:03 +000011421
Matthias Kloseb9621712010-04-24 17:59:49 +000011422$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011423
Guido van Rossumda88dad1995-01-26 00:46:29 +000011424 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011425
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11429$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011430
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011431# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011432
11433
Matthias Kloseb9621712010-04-24 17:59:49 +000011434ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011435if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011436
Matthias Kloseb9621712010-04-24 17:59:49 +000011437 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011438
Matthias Kloseb9621712010-04-24 17:59:49 +000011439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11440$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011441 OLD_CFLAGS=$CFLAGS
11442 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011444/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011445
11446# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011447
Martin v. Löwis11437992002-04-12 09:54:03 +000011448int
11449main ()
11450{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011451
11452 char *name;
11453 struct hostent *he, *res;
11454 char buffer[2048];
11455 int buflen = 2048;
11456 int h_errnop;
11457
11458 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011459
11460 ;
11461 return 0;
11462}
11463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011465
Matthias Kloseb9621712010-04-24 17:59:49 +000011466 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011467
Martin v. Löwis11437992002-04-12 09:54:03 +000011468
Matthias Kloseb9621712010-04-24 17:59:49 +000011469$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011470
Matthias Kloseb9621712010-04-24 17:59:49 +000011471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11472$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011473
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011474else
Skip Montanaro6dead952003-09-25 14:50:04 +000011475
Matthias Kloseb9621712010-04-24 17:59:49 +000011476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11477$as_echo "no" >&6; }
11478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11479$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011481/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011482
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011483# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011484
Martin v. Löwis11437992002-04-12 09:54:03 +000011485int
11486main ()
11487{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011488
11489 char *name;
11490 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011491 char buffer[2048];
11492 int buflen = 2048;
11493 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011494
Matthias Kloseb159a552010-04-25 21:00:44 +000011495 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011496
11497 ;
11498 return 0;
11499}
11500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
Matthias Kloseb9621712010-04-24 17:59:49 +000011503 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011504
Martin v. Löwis11437992002-04-12 09:54:03 +000011505
Matthias Kloseb159a552010-04-25 21:00:44 +000011506$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011507
Matthias Kloseb9621712010-04-24 17:59:49 +000011508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11509$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011510
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011511else
Skip Montanaro6dead952003-09-25 14:50:04 +000011512
Matthias Kloseb9621712010-04-24 17:59:49 +000011513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11514$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11516$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11518/* end confdefs.h. */
11519
11520# include <netdb.h>
11521
11522int
11523main ()
11524{
11525
11526 char *name;
11527 struct hostent *he;
11528 struct hostent_data data;
11529
11530 (void) gethostbyname_r(name, he, &data);
11531
11532 ;
11533 return 0;
11534}
11535_ACEOF
11536if ac_fn_c_try_compile "$LINENO"; then :
11537
11538 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11539
11540
11541$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11542
11543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11544$as_echo "yes" >&6; }
11545
11546else
11547
11548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11549$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011550
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011553
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011556
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011559 CFLAGS=$OLD_CFLAGS
11560
11561else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011562
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 for ac_func in gethostbyname
11564do :
11565 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011566if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011568#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011569_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011570
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011571fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011572done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011573
Michael W. Hudson54241132001-12-07 15:38:26 +000011574
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011575fi
11576
Michael W. Hudson54241132001-12-07 15:38:26 +000011577
11578
11579
11580
11581
11582
Guido van Rossum627b2d71993-12-24 10:39:16 +000011583# checks for system services
11584# (none yet)
11585
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011586# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011587ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011588if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011589
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011590else
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11592$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011593if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011594 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011595else
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011597LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011601/* Override any GCC internal prototype to avoid an error.
11602 Use char because int might match the return type of a GCC
11603 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011604#ifdef __cplusplus
11605extern "C"
11606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011607char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011608int
11609main ()
11610{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011611return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011612 ;
11613 return 0;
11614}
11615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011616if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011617 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011618else
Matthias Kloseb9621712010-04-24 17:59:49 +000011619 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011621rm -f core conftest.err conftest.$ac_objext \
11622 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011623LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011624fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11626$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011627if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 cat >>confdefs.h <<_ACEOF
11629#define HAVE_LIBIEEE 1
11630_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011631
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011632 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011633
Guido van Rossum627b2d71993-12-24 10:39:16 +000011634fi
11635
Michael W. Hudson54241132001-12-07 15:38:26 +000011636
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011637fi
11638
Michael W. Hudson54241132001-12-07 15:38:26 +000011639
Guido van Rossum7f253911997-05-09 02:42:48 +000011640# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11642$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011644# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011645if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011646 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011647if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011648then
11649
Matthias Kloseb9621712010-04-24 17:59:49 +000011650$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11653$as_echo "yes" >&6; }
11654else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11655$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011656fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011657else
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11659$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011660fi
11661
Guido van Rossum7f253911997-05-09 02:42:48 +000011662
Guido van Rossum7f43da71994-08-01 12:15:30 +000011663# check for --with-libm=...
11664
Guido van Rossum563e7081996-09-10 18:20:48 +000011665case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011666Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011667*) LIBM=-lm
11668esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11670$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011672# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011673if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011674 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011675if test "$withval" = no
11676then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11678$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011679elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011680then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11682$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011683else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011684fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011685else
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11687$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688fi
11689
Guido van Rossum7f43da71994-08-01 12:15:30 +000011690
11691# check for --with-libc=...
11692
Matthias Kloseb9621712010-04-24 17:59:49 +000011693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11694$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011696# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011697if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011698 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011699if test "$withval" = no
11700then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11702$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011703elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011704then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11706$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011707else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011708fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011709else
Matthias Kloseb9621712010-04-24 17:59:49 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11711$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011712fi
11713
Guido van Rossum7f43da71994-08-01 12:15:30 +000011714
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011715# **************************************************
11716# * Check for various properties of floating point *
11717# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011718
Matthias Kloseb9621712010-04-24 17:59:49 +000011719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11720$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011721if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011723else
11724
Matthias Kloseb9621712010-04-24 17:59:49 +000011725if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011726 ac_cv_little_endian_double=no
11727else
Matthias Kloseb9621712010-04-24 17:59:49 +000011728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011729/* end confdefs.h. */
11730
11731#include <string.h>
11732int main() {
11733 double x = 9006104071832581.0;
11734 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11735 return 0;
11736 else
11737 return 1;
11738}
11739
11740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011741if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742 ac_cv_little_endian_double=yes
11743else
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11747 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011748fi
11749
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011750fi
11751
Matthias Kloseb9621712010-04-24 17:59:49 +000011752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11753$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011754if test "$ac_cv_little_endian_double" = yes
11755then
11756
Matthias Kloseb9621712010-04-24 17:59:49 +000011757$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011758
11759fi
11760
Matthias Kloseb9621712010-04-24 17:59:49 +000011761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11762$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011763if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011765else
11766
Matthias Kloseb9621712010-04-24 17:59:49 +000011767if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011768 ac_cv_big_endian_double=no
11769else
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011771/* end confdefs.h. */
11772
11773#include <string.h>
11774int main() {
11775 double x = 9006104071832581.0;
11776 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11777 return 0;
11778 else
11779 return 1;
11780}
11781
11782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011783if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011784 ac_cv_big_endian_double=yes
11785else
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11789 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011790fi
11791
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011792fi
11793
Matthias Kloseb9621712010-04-24 17:59:49 +000011794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11795$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011796if test "$ac_cv_big_endian_double" = yes
11797then
11798
Matthias Kloseb9621712010-04-24 17:59:49 +000011799$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011800
11801fi
11802
11803# Some ARM platforms use a mixed-endian representation for doubles.
11804# While Python doesn't currently have full support for these platforms
11805# (see e.g., issue 1762561), we can at least make sure that float <-> string
11806# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11808$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011809if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011811else
11812
Matthias Kloseb9621712010-04-24 17:59:49 +000011813if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011814 ac_cv_mixed_endian_double=no
11815else
Matthias Kloseb9621712010-04-24 17:59:49 +000011816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011817/* end confdefs.h. */
11818
11819#include <string.h>
11820int main() {
11821 double x = 9006104071832581.0;
11822 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11823 return 0;
11824 else
11825 return 1;
11826}
11827
11828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011829if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011830 ac_cv_mixed_endian_double=yes
11831else
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011836fi
11837
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011838fi
11839
Matthias Kloseb9621712010-04-24 17:59:49 +000011840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11841$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011842if test "$ac_cv_mixed_endian_double" = yes
11843then
11844
Matthias Kloseb9621712010-04-24 17:59:49 +000011845$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011846
11847fi
11848
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011849# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011850# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011851# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011852# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011853# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011854# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011855
11856# This inline assembler syntax may also work for suncc and icc,
11857# so we try it on all platforms.
11858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11860$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011862/* end confdefs.h. */
11863
11864int
11865main ()
11866{
11867
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011868 unsigned short cw;
11869 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11870 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011871
11872 ;
11873 return 0;
11874}
11875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011876if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011877 have_gcc_asm_for_x87=yes
11878else
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011880fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11883$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011884if test "$have_gcc_asm_for_x87" = yes
11885then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011886
Matthias Kloseb9621712010-04-24 17:59:49 +000011887$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011888
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011889fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011890
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011891# Detect whether system arithmetic is subject to x87-style double
11892# rounding issues. The result of this test has little meaning on non
11893# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11894# mode is round-to-nearest and double rounding issues are present, and
11895# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11897$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011898# $BASECFLAGS may affect the result
11899ac_save_cc="$CC"
11900CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011901if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011902 ac_cv_x87_double_rounding=no
11903else
Matthias Kloseb9621712010-04-24 17:59:49 +000011904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011905/* end confdefs.h. */
11906
11907#include <stdlib.h>
11908#include <math.h>
11909int main() {
11910 volatile double x, y, z;
11911 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11912 x = 0.99999999999999989; /* 1-2**-53 */
11913 y = 1./x;
11914 if (y != 1.)
11915 exit(0);
11916 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11917 x = 1e16;
11918 y = 2.99999;
11919 z = x + y;
11920 if (z != 1e16+4.)
11921 exit(0);
11922 /* both tests show evidence of double rounding */
11923 exit(1);
11924}
11925
11926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011927if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011928 ac_cv_x87_double_rounding=no
11929else
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011934fi
11935
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011936CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11938$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011939if test "$ac_cv_x87_double_rounding" = yes
11940then
11941
Matthias Kloseb9621712010-04-24 17:59:49 +000011942$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011943
11944fi
11945
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011946# ************************************
11947# * Check for mathematical functions *
11948# ************************************
11949
11950LIBS_SAVE=$LIBS
11951LIBS="$LIBS $LIBM"
11952
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011953for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11954do :
11955 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11956ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011957if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011958 cat >>confdefs.h <<_ACEOF
11959#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11960_ACEOF
11961
11962fi
11963done
11964
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011965for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011966do :
11967 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11968ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011969if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011970 cat >>confdefs.h <<_ACEOF
11971#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11972_ACEOF
11973
11974fi
11975done
11976
11977ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11978"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011979if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011980 ac_have_decl=1
11981else
11982 ac_have_decl=0
11983fi
11984
11985cat >>confdefs.h <<_ACEOF
11986#define HAVE_DECL_ISINF $ac_have_decl
11987_ACEOF
11988ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11989"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011990if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011991 ac_have_decl=1
11992else
11993 ac_have_decl=0
11994fi
11995
11996cat >>confdefs.h <<_ACEOF
11997#define HAVE_DECL_ISNAN $ac_have_decl
11998_ACEOF
11999ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12000"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012001if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012002 ac_have_decl=1
12003else
12004 ac_have_decl=0
12005fi
12006
12007cat >>confdefs.h <<_ACEOF
12008#define HAVE_DECL_ISFINITE $ac_have_decl
12009_ACEOF
12010
12011
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012012# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12013# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12015$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012016if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012017 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012018else
12019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012021 ac_cv_tanh_preserves_zero_sign=no
12022else
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012024/* end confdefs.h. */
12025
12026#include <math.h>
12027#include <stdlib.h>
12028int main() {
12029 /* return 0 if either negative zeros don't exist
12030 on this platform or if negative zeros exist
12031 and tanh(-0.) == -0. */
12032 if (atan2(0., -1.) == atan2(-0., -1.) ||
12033 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12034 else exit(1);
12035}
12036
12037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012038if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012039 ac_cv_tanh_preserves_zero_sign=yes
12040else
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12044 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012045fi
12046
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012047fi
12048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12050$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012051if test "$ac_cv_tanh_preserves_zero_sign" = yes
12052then
12053
Matthias Kloseb9621712010-04-24 17:59:49 +000012054$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012055
12056fi
12057
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012058if test "$ac_cv_func_log1p" = yes
12059then
12060 # On some versions of AIX, log1p(-0.) returns 0. instead of
12061 # -0. See issue #9920.
12062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12063$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012064 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012065 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012066else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012067
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012068 if test "$cross_compiling" = yes; then :
12069 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012070else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12072/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012073
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012074 #include <math.h>
12075 #include <stdlib.h>
12076 int main() {
12077 /* Fail if the signs of log1p(-0.) and -0. can be
12078 distinguished. */
12079 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12080 return 0;
12081 else
12082 return 1;
12083 }
12084
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012085_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012086if ac_fn_c_try_run "$LINENO"; then :
12087 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012088else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012089 ac_cv_log1p_drops_zero_sign=yes
12090fi
12091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012093fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012094
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012095fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012096
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12098$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12099fi
12100if test "$ac_cv_log1p_drops_zero_sign" = yes
12101then
12102
12103$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12104
12105fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012106
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012107LIBS=$LIBS_SAVE
12108
Mark Dickinsona614f042009-11-28 12:48:43 +000012109# For multiprocessing module, check that sem_open
12110# actually works. For FreeBSD versions <= 7.2,
12111# the kernel module that provides POSIX semaphores
12112# isn't loaded by default, so an attempt to call
12113# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12115$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012116if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012120 ac_cv_posix_semaphores_enabled=yes
12121else
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012123/* end confdefs.h. */
12124
12125#include <unistd.h>
12126#include <fcntl.h>
12127#include <stdio.h>
12128#include <semaphore.h>
12129#include <sys/stat.h>
12130
12131int main(void) {
12132 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12133 if (a == SEM_FAILED) {
12134 perror("sem_open");
12135 return 1;
12136 }
12137 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012138 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012139 return 0;
12140}
12141
12142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012143if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012144 ac_cv_posix_semaphores_enabled=yes
12145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12149 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012150fi
12151
12152
Mark Dickinsona614f042009-11-28 12:48:43 +000012153fi
12154
Matthias Kloseb9621712010-04-24 17:59:49 +000012155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12156$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012157if test $ac_cv_posix_semaphores_enabled = no
12158then
12159
Matthias Kloseb9621712010-04-24 17:59:49 +000012160$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012161
12162fi
12163
Mark Dickinson10683072009-04-18 21:18:19 +000012164# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12166$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012167if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012168 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012169else
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012171 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012172else
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012174/* end confdefs.h. */
12175
12176#include <unistd.h>
12177#include <fcntl.h>
12178#include <stdio.h>
12179#include <semaphore.h>
12180#include <sys/stat.h>
12181
12182int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012183 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012184 int count;
12185 int res;
12186 if(a==SEM_FAILED){
12187 perror("sem_open");
12188 return 1;
12189
12190 }
12191 res = sem_getvalue(a, &count);
12192 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012193 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012194 return res==-1 ? 1 : 0;
12195}
12196
Mark Dickinson10683072009-04-18 21:18:19 +000012197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012198if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012199 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12204 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012205fi
12206
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012207
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012208fi
12209
Matthias Kloseb9621712010-04-24 17:59:49 +000012210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12211$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012212if test $ac_cv_broken_sem_getvalue = yes
12213then
12214
Matthias Kloseb9621712010-04-24 17:59:49 +000012215$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012216
12217fi
12218
Mark Dickinsonbd792642009-03-18 20:06:12 +000012219# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12221$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012222# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012223if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012224 enableval=$enable_big_digits; case $enable_big_digits in
12225yes)
12226 enable_big_digits=30 ;;
12227no)
12228 enable_big_digits=15 ;;
1222915|30)
12230 ;;
12231*)
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012232 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 +000012233esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12235$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012236
12237cat >>confdefs.h <<_ACEOF
12238#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12239_ACEOF
12240
12241
12242else
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12244$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012245fi
12246
12247
Guido van Rossumef2255b2000-03-10 22:30:29 +000012248# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012249ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012250if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012251
12252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012254
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012255 wchar_h="yes"
12256
Guido van Rossumef2255b2000-03-10 22:30:29 +000012257else
Martin v. Löwis11437992002-04-12 09:54:03 +000012258 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012259
12260fi
12261
Michael W. Hudson54241132001-12-07 15:38:26 +000012262
Martin v. Löwis11437992002-04-12 09:54:03 +000012263
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012264# determine wchar_t size
12265if test "$wchar_h" = yes
12266then
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12269# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12270# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12272$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012273if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012275else
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12277"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012278
Martin v. Löwis11437992002-04-12 09:54:03 +000012279else
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 if test "$ac_cv_type_wchar_t" = yes; then
12281 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12282$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012283as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012284See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285 else
12286 ac_cv_sizeof_wchar_t=0
12287 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012289
Martin v. Löwis11437992002-04-12 09:54:03 +000012290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12292$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293
12294
12295
Martin v. Löwis11437992002-04-12 09:54:03 +000012296cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012297#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012298_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012299
Michael W. Hudson54241132001-12-07 15:38:26 +000012300
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012301fi
12302
Matthias Kloseb9621712010-04-24 17:59:49 +000012303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12304$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012305have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012307/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012308
12309#include <tcl.h>
12310#if TCL_UTF_MAX != 6
12311# error "NOT UCS4_TCL"
12312#endif
12313int
12314main ()
12315{
12316
12317 ;
12318 return 0;
12319}
12320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012322
12323
Matthias Kloseb9621712010-04-24 17:59:49 +000012324$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012325
12326 have_ucs4_tcl=yes
12327
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12331$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012332
Skip Montanaro6dead952003-09-25 14:50:04 +000012333# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012334if test "$wchar_h" = yes
12335then
12336 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12338$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012339 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012341else
12342
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012344 ac_cv_wchar_t_signed=yes
12345else
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012347/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012348
12349 #include <wchar.h>
12350 int main()
12351 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012352 /* Success: exit code 0 */
12353 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012354 }
12355
12356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012357if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012358 ac_cv_wchar_t_signed=yes
12359else
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012362rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12363 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012364fi
12365
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012366fi
12367
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12369$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370fi
12371
Georg Brandl52d168a2008-01-07 18:10:24 +000012372# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012373if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012374 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012375then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012376 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012377
Matthias Kloseb9621712010-04-24 17:59:49 +000012378$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012379
Georg Brandl52d168a2008-01-07 18:10:24 +000012380else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012381 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012382fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
12384$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012385
12386# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12388$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012389if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012390 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012391else
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 ac_cv_c_bigendian=unknown
12393 # See if we're dealing with a universal compiler.
12394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12395/* end confdefs.h. */
12396#ifndef __APPLE_CC__
12397 not a universal capable compiler
12398 #endif
12399 typedef int dummy;
12400
Skip Montanaro6dead952003-09-25 14:50:04 +000012401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012402if ac_fn_c_try_compile "$LINENO"; then :
12403
12404 # Check for potential -arch flags. It is not universal unless
12405 # there are at least two -arch flags with different values.
12406 ac_arch=
12407 ac_prev=
12408 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12409 if test -n "$ac_prev"; then
12410 case $ac_word in
12411 i?86 | x86_64 | ppc | ppc64)
12412 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12413 ac_arch=$ac_word
12414 else
12415 ac_cv_c_bigendian=universal
12416 break
12417 fi
12418 ;;
12419 esac
12420 ac_prev=
12421 elif test "x$ac_word" = "x-arch"; then
12422 ac_prev=arch
12423 fi
12424 done
12425fi
12426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12427 if test $ac_cv_c_bigendian = unknown; then
12428 # See if sys/param.h defines the BYTE_ORDER macro.
12429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012430/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012431#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012433
Martin v. Löwis11437992002-04-12 09:54:03 +000012434int
12435main ()
12436{
Matthias Kloseb9621712010-04-24 17:59:49 +000012437#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12438 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12439 && LITTLE_ENDIAN)
12440 bogus endian macros
12441 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012442
12443 ;
12444 return 0;
12445}
12446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012447if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012448 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012450/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012451#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012453
Martin v. Löwis11437992002-04-12 09:54:03 +000012454int
12455main ()
12456{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012457#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 not big endian
12459 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
12461 ;
12462 return 0;
12463}
12464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012465if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012466 ac_cv_c_bigendian=yes
12467else
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012471fi
12472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12473 fi
12474 if test $ac_cv_c_bigendian = unknown; then
12475 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012477/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012478#include <limits.h>
12479
Martin v. Löwis11437992002-04-12 09:54:03 +000012480int
12481main ()
12482{
Matthias Kloseb9621712010-04-24 17:59:49 +000012483#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12484 bogus endian macros
12485 #endif
12486
Martin v. Löwis11437992002-04-12 09:54:03 +000012487 ;
12488 return 0;
12489}
12490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012491if ac_fn_c_try_compile "$LINENO"; then :
12492 # It does; now see whether it defined to _BIG_ENDIAN or not.
12493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12494/* end confdefs.h. */
12495#include <limits.h>
12496
12497int
12498main ()
12499{
12500#ifndef _BIG_ENDIAN
12501 not big endian
12502 #endif
12503
12504 ;
12505 return 0;
12506}
12507_ACEOF
12508if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012510else
Matthias Kloseb9621712010-04-24 17:59:49 +000012511 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12514fi
12515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12516 fi
12517 if test $ac_cv_c_bigendian = unknown; then
12518 # Compile a test program.
12519 if test "$cross_compiling" = yes; then :
12520 # Try to guess by grepping values from an object file.
12521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12522/* end confdefs.h. */
12523short int ascii_mm[] =
12524 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12525 short int ascii_ii[] =
12526 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12527 int use_ascii (int i) {
12528 return ascii_mm[i] + ascii_ii[i];
12529 }
12530 short int ebcdic_ii[] =
12531 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12532 short int ebcdic_mm[] =
12533 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12534 int use_ebcdic (int i) {
12535 return ebcdic_mm[i] + ebcdic_ii[i];
12536 }
12537 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538
Matthias Kloseb9621712010-04-24 17:59:49 +000012539int
12540main ()
12541{
12542return use_ascii (foo) == use_ebcdic (foo);
12543 ;
12544 return 0;
12545}
12546_ACEOF
12547if ac_fn_c_try_compile "$LINENO"; then :
12548 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12549 ac_cv_c_bigendian=yes
12550 fi
12551 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12552 if test "$ac_cv_c_bigendian" = unknown; then
12553 ac_cv_c_bigendian=no
12554 else
12555 # finding both strings is unlikely to happen, but who knows?
12556 ac_cv_c_bigendian=unknown
12557 fi
12558 fi
12559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012561else
Matthias Kloseb9621712010-04-24 17:59:49 +000012562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012563/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012564$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012565int
12566main ()
12567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 /* Are we little or big endian? From Harbison&Steele. */
12570 union
12571 {
12572 long int l;
12573 char c[sizeof (long int)];
12574 } u;
12575 u.l = 1;
12576 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012577
12578 ;
12579 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012580}
Martin v. Löwis11437992002-04-12 09:54:03 +000012581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012582if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012583 ac_cv_c_bigendian=no
12584else
Matthias Kloseb9621712010-04-24 17:59:49 +000012585 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12588 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012590
Matthias Kloseb9621712010-04-24 17:59:49 +000012591 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12594$as_echo "$ac_cv_c_bigendian" >&6; }
12595 case $ac_cv_c_bigendian in #(
12596 yes)
12597 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12598;; #(
12599 no)
12600 ;; #(
12601 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012602
Matthias Kloseb9621712010-04-24 17:59:49 +000012603$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012604
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 ;; #(
12606 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012607 as_fn_error $? "unknown endianness
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012608 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012610
Michael W. Hudson54241132001-12-07 15:38:26 +000012611
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012612# ABI version string for Python extension modules. This appears between the
12613# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12614# from the following attributes which affect the ABI of this Python build (in
12615# this order):
12616#
12617# * The Python implementation (always 'cpython-' for us)
12618# * The major and minor version numbers
12619# * --with-pydebug (adds a 'd')
12620# * --with-pymalloc (adds a 'm')
12621# * --with-wide-unicode (adds a 'u')
12622#
12623# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012624# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12625# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012626
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12628$as_echo_n "checking ABIFLAGS... " >&6; }
12629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12630$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12632$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012633SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12635$as_echo "$SOABI" >&6; }
12636
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12638$as_echo_n "checking LDVERSION... " >&6; }
12639LDVERSION='$(VERSION)$(ABIFLAGS)'
12640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12641$as_echo "$LDVERSION" >&6; }
12642
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012643# SO is the extension of shared libraries `(including the dot!)
12644# -- usually .so, .sl on HP-UX, .dll on Cygwin
12645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12646$as_echo_n "checking SO... " >&6; }
12647if test -z "$SO"
12648then
12649 case $ac_sys_system in
12650 hp*|HP*)
12651 case `uname -m` in
12652 ia64) SO=.so;;
12653 *) SO=.sl;;
12654 esac
12655 ;;
12656 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012657 Linux*|GNU*)
12658 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012659 *) SO=.so;;
12660 esac
12661else
12662 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012663 echo
12664 echo '====================================================================='
12665 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012666 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012667 echo '+ Do you really mean to change the extension for shared libraries? +'
12668 echo '+ Continuing in 10 seconds to let you to ponder. +'
12669 echo '+ +'
12670 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012671 sleep 10
12672fi
12673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12674$as_echo "$SO" >&6; }
12675
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012676# Check whether right shifting a negative integer extends the sign bit
12677# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12679$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012680if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012682else
Martin v. Löwis11437992002-04-12 09:54:03 +000012683
Matthias Kloseb9621712010-04-24 17:59:49 +000012684if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012685 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012686else
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012688/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012689
12690int main()
12691{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012692 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012693}
12694
Martin v. Löwis11437992002-04-12 09:54:03 +000012695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012696if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012697 ac_cv_rshift_extends_sign=yes
12698else
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12702 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012703fi
12704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705fi
12706
Matthias Kloseb9621712010-04-24 17:59:49 +000012707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12708$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012709if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012710then
Martin v. Löwis11437992002-04-12 09:54:03 +000012711
Matthias Kloseb9621712010-04-24 17:59:49 +000012712$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012713
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012714fi
12715
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012716# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12718$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012719if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012721else
Martin v. Löwis11437992002-04-12 09:54:03 +000012722
Matthias Kloseb9621712010-04-24 17:59:49 +000012723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012724/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012725#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012726int
12727main ()
12728{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012729
12730 FILE *f = fopen("/dev/null", "r");
12731 flockfile(f);
12732 getc_unlocked(f);
12733 funlockfile(f);
12734
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 ;
12736 return 0;
12737}
12738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012739if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012740 ac_cv_have_getc_unlocked=yes
12741else
Matthias Kloseb9621712010-04-24 17:59:49 +000012742 ac_cv_have_getc_unlocked=no
12743fi
12744rm -f core conftest.err conftest.$ac_objext \
12745 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747
Matthias Kloseb9621712010-04-24 17:59:49 +000012748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12749$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012750if test "$ac_cv_have_getc_unlocked" = yes
12751then
Martin v. Löwis11437992002-04-12 09:54:03 +000012752
Matthias Kloseb9621712010-04-24 17:59:49 +000012753$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012754
12755fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012756
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012757# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012758# save the value of LIBS so we don't actually link Python with readline
12759LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012760
Gregory P. Smith18820942008-09-07 06:24:49 +000012761# On some systems we need to link readline to a termcap compatible
12762# library. NOTE: Keep the precedence of listed libraries synchronised
12763# with setup.py.
12764py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12766$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012767for py_libtermcap in "" ncursesw ncurses curses termcap; do
12768 if test -z "$py_libtermcap"; then
12769 READLINE_LIBS="-lreadline"
12770 else
12771 READLINE_LIBS="-lreadline -l$py_libtermcap"
12772 fi
12773 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012775/* end confdefs.h. */
12776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777/* Override any GCC internal prototype to avoid an error.
12778 Use char because int might match the return type of a GCC
12779 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012780#ifdef __cplusplus
12781extern "C"
12782#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012783char readline ();
12784int
12785main ()
12786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012787return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012788 ;
12789 return 0;
12790}
12791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012792if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012793 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012795rm -f core conftest.err conftest.$ac_objext \
12796 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012797 if test $py_cv_lib_readline = yes; then
12798 break
12799 fi
12800done
12801# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12802#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012803if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12805$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012806else
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12808$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012811
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012812fi
12813
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012814# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12816$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012817if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012819else
12820 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012821LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012823/* end confdefs.h. */
12824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012825/* Override any GCC internal prototype to avoid an error.
12826 Use char because int might match the return type of a GCC
12827 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012828#ifdef __cplusplus
12829extern "C"
12830#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012831char rl_callback_handler_install ();
12832int
12833main ()
12834{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012835return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012836 ;
12837 return 0;
12838}
12839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012840if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012841 ac_cv_lib_readline_rl_callback_handler_install=yes
12842else
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012845rm -f core conftest.err conftest.$ac_objext \
12846 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012847LIBS=$ac_check_lib_save_LIBS
12848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12850$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012851if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012852
Matthias Kloseb9621712010-04-24 17:59:49 +000012853$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012854
12855fi
12856
12857
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012858# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012860/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012861#include <readline/readline.h>
12862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012863if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012864 have_readline=yes
12865else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012866 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012867
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012868fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012869rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012870if test $have_readline = yes
12871then
Matthias Kloseb9621712010-04-24 17:59:49 +000012872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012873/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012874#include <readline/readline.h>
12875
12876_ACEOF
12877if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012879
Matthias Kloseb9621712010-04-24 17:59:49 +000012880$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012881
12882fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012883rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012884
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012886/* end confdefs.h. */
12887#include <readline/readline.h>
12888
12889_ACEOF
12890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012894
12895fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012896rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012897
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012898fi
12899
Martin v. Löwis0daad592001-09-30 21:09:59 +000012900# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12902$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012903if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012905else
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012907LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911/* Override any GCC internal prototype to avoid an error.
12912 Use char because int might match the return type of a GCC
12913 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012914#ifdef __cplusplus
12915extern "C"
12916#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012917char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012918int
12919main ()
12920{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012921return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012922 ;
12923 return 0;
12924}
12925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012926if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012928else
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012931rm -f core conftest.err conftest.$ac_objext \
12932 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012933LIBS=$ac_check_lib_save_LIBS
12934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12936$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012937if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012940
Martin v. Löwis0daad592001-09-30 21:09:59 +000012941fi
12942
Michael W. Hudson54241132001-12-07 15:38:26 +000012943
Thomas Wouters89d996e2007-09-08 17:39:28 +000012944# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12946$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012947if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012948 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012949else
12950 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012951LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012953/* end confdefs.h. */
12954
12955/* Override any GCC internal prototype to avoid an error.
12956 Use char because int might match the return type of a GCC
12957 builtin and then its argument prototype would still apply. */
12958#ifdef __cplusplus
12959extern "C"
12960#endif
12961char rl_completion_display_matches_hook ();
12962int
12963main ()
12964{
12965return rl_completion_display_matches_hook ();
12966 ;
12967 return 0;
12968}
12969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012970if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012971 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12972else
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012975rm -f core conftest.err conftest.$ac_objext \
12976 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012977LIBS=$ac_check_lib_save_LIBS
12978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12980$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012981if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012982
Matthias Kloseb9621712010-04-24 17:59:49 +000012983$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012984
12985fi
12986
12987
Martin v. Löwis0daad592001-09-30 21:09:59 +000012988# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12990$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012991if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012993else
Martin v. Löwis11437992002-04-12 09:54:03 +000012994 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012995LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012999/* Override any GCC internal prototype to avoid an error.
13000 Use char because int might match the return type of a GCC
13001 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013002#ifdef __cplusplus
13003extern "C"
13004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013005char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013006int
13007main ()
13008{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013009return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013010 ;
13011 return 0;
13012}
13013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013015 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013016else
Matthias Kloseb9621712010-04-24 17:59:49 +000013017 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013019rm -f core conftest.err conftest.$ac_objext \
13020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013021LIBS=$ac_check_lib_save_LIBS
13022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13024$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013025if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013026
Matthias Kloseb9621712010-04-24 17:59:49 +000013027$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013028
Guido van Rossum353ae582001-07-10 16:45:32 +000013029fi
13030
Jack Jansendd19cf82001-12-06 22:36:17 +000013031
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013032# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013034/* end confdefs.h. */
13035#include <readline/readline.h>
13036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013037if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013038 have_readline=yes
13039else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013040 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013041
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013042fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013043rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013044if test $have_readline = yes
13045then
Matthias Kloseb9621712010-04-24 17:59:49 +000013046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013047/* end confdefs.h. */
13048#include <readline/readline.h>
13049
13050_ACEOF
13051if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013052 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013053
Matthias Kloseb9621712010-04-24 17:59:49 +000013054$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013055
13056fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013057rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013058
13059fi
13060
Martin v. Löwis82bca632006-02-10 20:49:30 +000013061# End of readline checks: restore LIBS
13062LIBS=$LIBS_no_readline
13063
Matthias Kloseb9621712010-04-24 17:59:49 +000013064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13065$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013066if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013068else
Martin v. Löwis11437992002-04-12 09:54:03 +000013069
Matthias Kloseb9621712010-04-24 17:59:49 +000013070if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013071 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013072else
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013074/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013075
13076int main()
13077{
13078 int val1 = nice(1);
13079 if (val1 != -1 && val1 == nice(2))
13080 exit(0);
13081 exit(1);
13082}
13083
Martin v. Löwis11437992002-04-12 09:54:03 +000013084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013085if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013086 ac_cv_broken_nice=yes
13087else
Matthias Kloseb9621712010-04-24 17:59:49 +000013088 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13091 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013092fi
13093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013094fi
13095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13097$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013098if test "$ac_cv_broken_nice" = yes
13099then
Martin v. Löwis11437992002-04-12 09:54:03 +000013100
Matthias Kloseb9621712010-04-24 17:59:49 +000013101$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013102
13103fi
13104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13106$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013107if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013108 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013109else
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013111 ac_cv_broken_poll=no
13112else
Matthias Kloseb9621712010-04-24 17:59:49 +000013113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013114/* end confdefs.h. */
13115
13116#include <poll.h>
13117
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013118int main()
13119{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013120 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013121 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013122
13123 close (42);
13124
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013125 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013126 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013127 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013128 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013129 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013130 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013131 return 1;
13132}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013133
13134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013135if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013136 ac_cv_broken_poll=yes
13137else
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13141 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013143
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013144fi
13145
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13147$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013148if test "$ac_cv_broken_poll" = yes
13149then
13150
Matthias Kloseb9621712010-04-24 17:59:49 +000013151$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013152
13153fi
13154
Brett Cannon43802422005-02-10 20:48:03 +000013155# 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 +000013156# (which is not required by ISO C or UNIX spec) and/or if we support
13157# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013158ac_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 +000013159#include <$ac_cv_struct_tm>
13160
Matthias Kloseb9621712010-04-24 17:59:49 +000013161"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013162if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013163
13164cat >>confdefs.h <<_ACEOF
13165#define HAVE_STRUCT_TM_TM_ZONE 1
13166_ACEOF
13167
13168
13169fi
13170
13171if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013174
13175else
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13177"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013178if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013180else
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013182fi
13183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013184cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013185#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013186_ACEOF
13187
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13189$as_echo_n "checking for tzname... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013190if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013191 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013192else
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013194/* end confdefs.h. */
13195#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013196#if !HAVE_DECL_TZNAME
13197extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013198#endif
13199
13200int
13201main ()
13202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013203return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013204 ;
13205 return 0;
13206}
13207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013208if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013209 ac_cv_var_tzname=yes
13210else
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013213rm -f core conftest.err conftest.$ac_objext \
13214 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13217$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013218 if test $ac_cv_var_tzname = yes; then
13219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013221
13222 fi
13223fi
13224
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013225
Martin v. Löwis1d459062005-03-14 21:23:33 +000013226# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13228$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013229if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013231else
13232
Matthias Kloseb9621712010-04-24 17:59:49 +000013233if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013234 ac_cv_working_tzset=no
13235else
Matthias Kloseb9621712010-04-24 17:59:49 +000013236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013237/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013238
13239#include <stdlib.h>
13240#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013241#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013242
13243#if HAVE_TZNAME
13244extern char *tzname[];
13245#endif
13246
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013247int main()
13248{
Brett Cannon18367812003-09-19 00:59:16 +000013249 /* Note that we need to ensure that not only does tzset(3)
13250 do 'something' with localtime, but it works as documented
13251 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013252 This includes making sure that tzname is set properly if
13253 tm->tm_zone does not exist since it is the alternative way
13254 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013255
13256 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013257 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013258 */
13259
Martin v. Löwis1d459062005-03-14 21:23:33 +000013260 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013261 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13262
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013263 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013264 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013265 if (localtime(&groundhogday)->tm_hour != 0)
13266 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013267#if HAVE_TZNAME
13268 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13269 if (strcmp(tzname[0], "UTC") ||
13270 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13271 exit(1);
13272#endif
Brett Cannon18367812003-09-19 00:59:16 +000013273
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013274 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013275 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013276 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013277 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013278#if HAVE_TZNAME
13279 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13280 exit(1);
13281#endif
Brett Cannon18367812003-09-19 00:59:16 +000013282
13283 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13284 tzset();
13285 if (localtime(&groundhogday)->tm_hour != 11)
13286 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013287#if HAVE_TZNAME
13288 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13289 exit(1);
13290#endif
13291
13292#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013293 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13294 exit(1);
13295 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13296 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013297#endif
Brett Cannon18367812003-09-19 00:59:16 +000013298
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013299 exit(0);
13300}
13301
13302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013303if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013304 ac_cv_working_tzset=yes
13305else
Matthias Kloseb9621712010-04-24 17:59:49 +000013306 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13309 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013310fi
13311
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013312fi
13313
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13315$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013316if test "$ac_cv_working_tzset" = yes
13317then
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013320
13321fi
13322
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013323# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13325$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013326if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013328else
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013330/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013331#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013332int
13333main ()
13334{
13335
13336struct stat st;
13337st.st_mtim.tv_nsec = 1;
13338
13339 ;
13340 return 0;
13341}
13342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013344 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013345else
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13349fi
13350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13352$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013353if test "$ac_cv_stat_tv_nsec" = yes
13354then
13355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013357
13358fi
13359
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013360# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13362$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013363if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013365else
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013367/* end confdefs.h. */
13368#include <sys/stat.h>
13369int
13370main ()
13371{
13372
13373struct stat st;
13374st.st_mtimespec.tv_nsec = 1;
13375
13376 ;
13377 return 0;
13378}
13379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013381 ac_cv_stat_tv_nsec2=yes
13382else
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13386fi
13387
Matthias Kloseb9621712010-04-24 17:59:49 +000013388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13389$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013390if test "$ac_cv_stat_tv_nsec2" = yes
13391then
13392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013394
13395fi
13396
Jack Jansen666b1e72001-10-31 12:11:48 +000013397# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13399$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013400if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013402else
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013404/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013405#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013406int
13407main ()
13408{
Jack Jansen666b1e72001-10-31 12:11:48 +000013409
13410 int rtn;
13411 rtn = mvwdelch(0,0,0);
13412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413 ;
13414 return 0;
13415}
13416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013417if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013418 ac_cv_mvwdelch_is_expression=yes
13419else
Matthias Kloseb9621712010-04-24 17:59:49 +000013420 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13423fi
13424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13426$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013427
13428if test "$ac_cv_mvwdelch_is_expression" = yes
13429then
Martin v. Löwis11437992002-04-12 09:54:03 +000013430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013432
13433fi
13434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13436$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013437if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013439else
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013441/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013442#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013443int
13444main ()
13445{
Jack Jansen666b1e72001-10-31 12:11:48 +000013446
13447 WINDOW *w;
13448 w->_flags = 0;
13449
Martin v. Löwis11437992002-04-12 09:54:03 +000013450 ;
13451 return 0;
13452}
13453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013454if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013455 ac_cv_window_has_flags=yes
13456else
Matthias Kloseb9621712010-04-24 17:59:49 +000013457 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13460fi
13461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13463$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013464
Jack Jansen666b1e72001-10-31 12:11:48 +000013465
13466if test "$ac_cv_window_has_flags" = yes
13467then
Martin v. Löwis11437992002-04-12 09:54:03 +000013468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013470
13471fi
13472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13474$as_echo_n "checking for is_term_resized... " >&6; }
13475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013476/* end confdefs.h. */
13477#include <curses.h>
13478int
13479main ()
13480{
13481void *x=is_term_resized
13482 ;
13483 return 0;
13484}
13485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013486if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013487
Matthias Kloseb9621712010-04-24 17:59:49 +000013488$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013489
Matthias Kloseb159a552010-04-25 21:00:44 +000013490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013491$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013492else
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13494$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013495
13496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13498
Matthias Kloseb9621712010-04-24 17:59:49 +000013499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13500$as_echo_n "checking for resize_term... " >&6; }
13501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013502/* end confdefs.h. */
13503#include <curses.h>
13504int
13505main ()
13506{
13507void *x=resize_term
13508 ;
13509 return 0;
13510}
13511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013512if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013515
Matthias Kloseb159a552010-04-25 21:00:44 +000013516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013517$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013518else
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13520$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013521
13522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13524
Matthias Kloseb9621712010-04-24 17:59:49 +000013525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13526$as_echo_n "checking for resizeterm... " >&6; }
13527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013528/* end confdefs.h. */
13529#include <curses.h>
13530int
13531main ()
13532{
13533void *x=resizeterm
13534 ;
13535 return 0;
13536}
13537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013538if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013541
Matthias Kloseb159a552010-04-25 21:00:44 +000013542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013543$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013544else
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13546$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013547
13548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13552$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013553
13554if test -r /dev/ptmx
13555then
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13557$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013558
Matthias Kloseb9621712010-04-24 17:59:49 +000013559$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013560
Thomas Wouters89f507f2006-12-13 04:49:30 +000013561else
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13563$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013564fi
13565
Matthias Kloseb9621712010-04-24 17:59:49 +000013566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13567$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013568
13569if test -r /dev/ptc
13570then
Matthias Kloseb9621712010-04-24 17:59:49 +000013571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13572$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013573
Matthias Kloseb9621712010-04-24 17:59:49 +000013574$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013575
Thomas Wouters89f507f2006-12-13 04:49:30 +000013576else
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13578$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013579fi
13580
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013581if test "$have_long_long" = yes
13582then
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13584$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013585 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013587else
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013589 ac_cv_have_long_long_format=no
13590else
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013592/* end confdefs.h. */
13593
13594 #include <stdio.h>
13595 #include <stddef.h>
13596 #include <string.h>
13597
13598 #ifdef HAVE_SYS_TYPES_H
13599 #include <sys/types.h>
13600 #endif
13601
13602 int main()
13603 {
13604 char buffer[256];
13605
13606 if (sprintf(buffer, "%lld", (long long)123) < 0)
13607 return 1;
13608 if (strcmp(buffer, "123"))
13609 return 1;
13610
13611 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13612 return 1;
13613 if (strcmp(buffer, "-123"))
13614 return 1;
13615
13616 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13617 return 1;
13618 if (strcmp(buffer, "123"))
13619 return 1;
13620
13621 return 0;
13622 }
13623
13624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013625if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013626 ac_cv_have_long_long_format=yes
13627else
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13631 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013632fi
13633
13634
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013635fi
13636
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13638$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013639fi
13640
Mark Dickinson89d7d412009-12-31 20:50:59 +000013641if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013642then
13643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013645
13646fi
13647
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013648if test $ac_sys_system = Darwin
13649then
13650 LIBS="$LIBS -framework CoreFoundation"
13651fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13654$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013655if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013657else
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013659 ac_cv_have_size_t_format="cross -- assuming yes"
13660
Thomas Wouters477c8d52006-05-27 19:21:47 +000013661else
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013663/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013664
Thomas Wouters477c8d52006-05-27 19:21:47 +000013665#include <stdio.h>
13666#include <stddef.h>
13667#include <string.h>
13668
Christian Heimes2c181612007-12-17 20:04:13 +000013669#ifdef HAVE_SYS_TYPES_H
13670#include <sys/types.h>
13671#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013672
13673#ifdef HAVE_SSIZE_T
13674typedef ssize_t Py_ssize_t;
13675#elif SIZEOF_VOID_P == SIZEOF_LONG
13676typedef long Py_ssize_t;
13677#else
13678typedef int Py_ssize_t;
13679#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013680
Christian Heimes2c181612007-12-17 20:04:13 +000013681int main()
13682{
13683 char buffer[256];
13684
Thomas Wouters477c8d52006-05-27 19:21:47 +000013685 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13686 return 1;
13687
Thomas Wouters89f507f2006-12-13 04:49:30 +000013688 if (strcmp(buffer, "123"))
13689 return 1;
13690
13691 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13692 return 1;
13693
13694 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013695 return 1;
13696
13697 return 0;
13698}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013699
Thomas Wouters477c8d52006-05-27 19:21:47 +000013700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013701if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013702 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013703else
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013708fi
13709
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13712$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013713if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013716
13717fi
13718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013720#ifdef HAVE_SYS_TYPES_H
13721#include <sys/types.h>
13722#endif
13723#ifdef HAVE_SYS_SOCKET_H
13724#include <sys/socket.h>
13725#endif
13726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013728if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013729
Martin v. Löwis11437992002-04-12 09:54:03 +000013730else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013731
Matthias Kloseb9621712010-04-24 17:59:49 +000013732$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013733
13734fi
13735
Michael W. Hudson54241132001-12-07 15:38:26 +000013736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13738$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013739if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013741else
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013743 ac_cv_broken_mbstowcs=no
13744else
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013746/* end confdefs.h. */
13747
13748#include<stdlib.h>
13749int main() {
13750 size_t len = -1;
13751 const char *str = "text";
13752 len = mbstowcs(NULL, str, 0);
13753 return (len != 4);
13754}
13755
13756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013757if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013758 ac_cv_broken_mbstowcs=no
13759else
Matthias Kloseb9621712010-04-24 17:59:49 +000013760 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13763 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013764fi
13765
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013766fi
13767
Matthias Kloseb9621712010-04-24 17:59:49 +000013768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13769$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013770if test "$ac_cv_broken_mbstowcs" = yes
13771then
13772
Matthias Kloseb9621712010-04-24 17:59:49 +000013773$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013774
13775fi
13776
Antoine Pitrou042b1282010-08-13 21:15:58 +000013777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13778$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013779if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013780 $as_echo_n "(cached) " >&6
13781else
13782 if test "$cross_compiling" = yes; then :
13783 ac_cv_computed_gotos=no
13784else
13785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13786/* end confdefs.h. */
13787
13788int main(int argc, char **argv)
13789{
13790 static void *targets[1] = { &&LABEL1 };
13791 goto LABEL2;
13792LABEL1:
13793 return 0;
13794LABEL2:
13795 goto *targets[0];
13796 return 1;
13797}
13798
13799_ACEOF
13800if ac_fn_c_try_run "$LINENO"; then :
13801 ac_cv_computed_gotos=yes
13802else
13803 ac_cv_computed_gotos=no
13804fi
13805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13806 conftest.$ac_objext conftest.beam conftest.$ac_ext
13807fi
13808
13809fi
13810
13811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13812$as_echo "$ac_cv_computed_gotos" >&6; }
13813if test "$ac_cv_computed_gotos" = yes
13814then
13815
13816$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13817
13818fi
13819
Antoine Pitroub52ec782009-01-25 16:34:23 +000013820# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13822$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013823
13824# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013825if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013826 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013827if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013828then
13829
Matthias Kloseb9621712010-04-24 17:59:49 +000013830$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013831
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13833$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013834fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013835if test "$withval" = no
13836then
13837
13838$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13839
Matthias Kloseb9621712010-04-24 17:59:49 +000013840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13841$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013842fi
13843
Antoine Pitrou042b1282010-08-13 21:15:58 +000013844else
13845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13846$as_echo "no value specified" >&6; }
13847fi
13848
Antoine Pitroub52ec782009-01-25 16:34:23 +000013849
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013850case $ac_sys_system in
13851AIX*)
13852
13853$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13854 ;;
13855esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013856
Michael W. Hudson54241132001-12-07 15:38:26 +000013857
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013858
13859
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013860for h in `(cd $srcdir;echo Python/thread_*.h)`
13861do
13862 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13863done
13864
Michael W. Hudson54241132001-12-07 15:38:26 +000013865
Neal Norwitzd24499d2005-12-18 21:36:39 +000013866SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13868$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013869for dir in $SRCDIRS; do
13870 if test ! -d $dir; then
13871 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013872 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013873done
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13875$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013876
Guido van Rossum627b2d71993-12-24 10:39:16 +000013877# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013878ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013879
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013880ac_config_files="$ac_config_files Modules/ld_so_aix"
13881
Martin v. Löwis11437992002-04-12 09:54:03 +000013882cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013883# This file is a shell script that caches the results of configure
13884# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013885# scripts and configure runs, see configure's option --config-cache.
13886# It is not useful on other systems. If it contains results you don't
13887# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013888#
Martin v. Löwis11437992002-04-12 09:54:03 +000013889# config.status only pays attention to the cache file if you give it
13890# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013891#
Skip Montanaro6dead952003-09-25 14:50:04 +000013892# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013893# loading this file, other *unset* `ac_cv_foo' will be assigned the
13894# following values.
13895
13896_ACEOF
13897
Guido van Rossumf78abae1997-01-21 22:02:36 +000013898# The following way of writing the cache mishandles newlines in values,
13899# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013901# Ultrix sh set writes to stderr and can't be redirected directly,
13902# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013903(
13904 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13905 eval ac_val=\$$ac_var
13906 case $ac_val in #(
13907 *${as_nl}*)
13908 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13910$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911 esac
13912 case $ac_var in #(
13913 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013914 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13915 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916 esac ;;
13917 esac
13918 done
13919
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13922 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 # `set' does not quote correctly, so add quotes: double-quote
13924 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013926 "s/'/'\\\\''/g;
13927 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013929 *)
13930 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013932 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933 esac |
13934 sort
13935) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13941 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13943 :end' >>confcache
13944if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13945 if test -w "$cache_file"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013946 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13948$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013949 if test ! -f "$cache_file" || test -h "$cache_file"; then
13950 cat confcache >"$cache_file"
13951 else
13952 case $cache_file in #(
13953 */* | ?:*)
13954 mv -f confcache "$cache_file"$$ &&
13955 mv -f "$cache_file"$$ "$cache_file" ;; #(
13956 *)
13957 mv -f confcache "$cache_file" ;;
13958 esac
13959 fi
13960 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013961 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13963$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013964 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013965fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013966rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013967
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013968test "x$prefix" = xNONE && prefix=$ac_default_prefix
13969# Let make expand exec_prefix.
13970test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013971
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013972DEFS=-DHAVE_CONFIG_H
13973
Skip Montanaro6dead952003-09-25 14:50:04 +000013974ac_libobjs=
13975ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013976U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013977for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13978 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013980 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013981 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13982 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13984 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013985done
13986LIBOBJS=$ac_libobjs
13987
13988LTLIBOBJS=$ac_ltlibobjs
13989
13990
Martin v. Löwis11437992002-04-12 09:54:03 +000013991
Matthias Kloseb9621712010-04-24 17:59:49 +000013992
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013993: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013994ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013995ac_clean_files_save=$ac_clean_files
13996ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013997{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13998$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13999as_write_fail=0
14000cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014001#! $SHELL
14002# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014003# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014004# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014005# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014006
Martin v. Löwis11437992002-04-12 09:54:03 +000014007debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014008ac_cs_recheck=false
14009ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014010
Matthias Kloseb9621712010-04-24 17:59:49 +000014011SHELL=\${CONFIG_SHELL-$SHELL}
14012export SHELL
14013_ASEOF
14014cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14015## -------------------- ##
14016## M4sh Initialization. ##
14017## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014019# Be more Bourne compatible
14020DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 emulate sh
14023 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014025 # is contrary to our usage. Disable this feature.
14026 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014028else
Matthias Kloseb9621712010-04-24 17:59:49 +000014029 case `(set -o) 2>/dev/null` in #(
14030 *posix*) :
14031 set -o posix ;; #(
14032 *) :
14033 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014036
14037
Matthias Kloseb9621712010-04-24 17:59:49 +000014038as_nl='
14039'
14040export as_nl
14041# Printing a long string crashes Solaris 7 /usr/bin/printf.
14042as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14043as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14044as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14045# Prefer a ksh shell builtin over an external printf program on Solaris,
14046# but without wasting forks for bash or zsh.
14047if test -z "$BASH_VERSION$ZSH_VERSION" \
14048 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14049 as_echo='print -r --'
14050 as_echo_n='print -rn --'
14051elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14052 as_echo='printf %s\n'
14053 as_echo_n='printf %s'
14054else
14055 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14056 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14057 as_echo_n='/usr/ucb/echo -n'
14058 else
14059 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14060 as_echo_n_body='eval
14061 arg=$1;
14062 case $arg in #(
14063 *"$as_nl"*)
14064 expr "X$arg" : "X\\(.*\\)$as_nl";
14065 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14066 esac;
14067 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14068 '
14069 export as_echo_n_body
14070 as_echo_n='sh -c $as_echo_n_body as_echo'
14071 fi
14072 export as_echo_body
14073 as_echo='sh -c $as_echo_body as_echo'
14074fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014075
14076# The user is always right.
14077if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014078 PATH_SEPARATOR=:
14079 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14080 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14081 PATH_SEPARATOR=';'
14082 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014085
14086# IFS
14087# We need space, tab and new line, in precisely that order. Quoting is
14088# there to prevent editors from complaining about space-tab.
14089# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14090# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091IFS=" "" $as_nl"
14092
14093# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014094as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014096 *[\\/]* ) as_myself=$0 ;;
14097 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014098for as_dir in $PATH
14099do
14100 IFS=$as_save_IFS
14101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014106 ;;
14107esac
14108# We did not find ourselves, most probably we were run as `sh COMMAND'
14109# in which case we are not to be found in the path.
14110if test "x$as_myself" = x; then
14111 as_myself=$0
14112fi
14113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116fi
14117
Matthias Kloseb9621712010-04-24 17:59:49 +000014118# Unset variables that we do not need and which cause bugs (e.g. in
14119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14120# suppresses any "Segmentation fault" message there. '((' could
14121# trigger a bug in pdksh 5.2.14.
14122for as_var in BASH_ENV ENV MAIL MAILPATH
14123do eval test x\${$as_var+set} = xset \
14124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125done
14126PS1='$ '
14127PS2='> '
14128PS4='+ '
14129
14130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014131LC_ALL=C
14132export LC_ALL
14133LANGUAGE=C
14134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135
Matthias Kloseb9621712010-04-24 17:59:49 +000014136# CDPATH.
14137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14138
14139
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014140# as_fn_error STATUS ERROR [LINENO LOG_FD]
14141# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014142# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14143# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014144# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014145as_fn_error ()
14146{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014147 as_status=$1; test $as_status -eq 0 && as_status=1
14148 if test "$4"; then
14149 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14150 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014152 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 as_fn_exit $as_status
14154} # as_fn_error
14155
14156
14157# as_fn_set_status STATUS
14158# -----------------------
14159# Set $? to STATUS, without forking.
14160as_fn_set_status ()
14161{
14162 return $1
14163} # as_fn_set_status
14164
14165# as_fn_exit STATUS
14166# -----------------
14167# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14168as_fn_exit ()
14169{
14170 set +e
14171 as_fn_set_status $1
14172 exit $1
14173} # as_fn_exit
14174
14175# as_fn_unset VAR
14176# ---------------
14177# Portably unset VAR.
14178as_fn_unset ()
14179{
14180 { eval $1=; unset $1;}
14181}
14182as_unset=as_fn_unset
14183# as_fn_append VAR VALUE
14184# ----------------------
14185# Append the text in VALUE to the end of the definition contained in VAR. Take
14186# advantage of any shell optimizations that allow amortized linear growth over
14187# repeated appends, instead of the typical quadratic growth present in naive
14188# implementations.
14189if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14190 eval 'as_fn_append ()
14191 {
14192 eval $1+=\$2
14193 }'
14194else
14195 as_fn_append ()
14196 {
14197 eval $1=\$$1\$2
14198 }
14199fi # as_fn_append
14200
14201# as_fn_arith ARG...
14202# ------------------
14203# Perform arithmetic evaluation on the ARGs, and store the result in the
14204# global $as_val. Take advantage of shells that can avoid forks. The arguments
14205# must be portable across $(()) and expr.
14206if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14207 eval 'as_fn_arith ()
14208 {
14209 as_val=$(( $* ))
14210 }'
14211else
14212 as_fn_arith ()
14213 {
14214 as_val=`expr "$@" || test $? -eq 1`
14215 }
14216fi # as_fn_arith
14217
14218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014219if expr a : '\(a\)' >/dev/null 2>&1 &&
14220 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14221 as_expr=expr
14222else
14223 as_expr=false
14224fi
14225
14226if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14227 as_basename=basename
14228else
14229 as_basename=false
14230fi
14231
Matthias Kloseb9621712010-04-24 17:59:49 +000014232if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14233 as_dirname=dirname
14234else
14235 as_dirname=false
14236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238as_me=`$as_basename -- "$0" ||
14239$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14240 X"$0" : 'X\(//\)$' \| \
14241 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014242$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243 sed '/^.*\/\([^/][^/]*\)\/*$/{
14244 s//\1/
14245 q
14246 }
14247 /^X\/\(\/\/\)$/{
14248 s//\1/
14249 q
14250 }
14251 /^X\/\(\/\).*/{
14252 s//\1/
14253 q
14254 }
14255 s/.*/./; q'`
14256
Matthias Kloseb9621712010-04-24 17:59:49 +000014257# Avoid depending upon Character Ranges.
14258as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14259as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14260as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14261as_cr_digits='0123456789'
14262as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263
14264ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014265case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 xy) ECHO_C='\c';;
14270 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14271 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272 esac;;
14273*)
14274 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014275esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014276
Martin v. Löwis11437992002-04-12 09:54:03 +000014277rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014278if test -d conf$$.dir; then
14279 rm -f conf$$.dir/conf$$.file
14280else
14281 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014282 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014284if (echo >conf$$.file) 2>/dev/null; then
14285 if ln -s conf$$.file conf$$ 2>/dev/null; then
14286 as_ln_s='ln -s'
14287 # ... but there are two gotchas:
14288 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14289 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14290 # In both cases, we have to default to `cp -p'.
14291 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14292 as_ln_s='cp -p'
14293 elif ln conf$$.file conf$$ 2>/dev/null; then
14294 as_ln_s=ln
14295 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014296 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014297 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014298else
14299 as_ln_s='cp -p'
14300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014301rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14302rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304
14305# as_fn_mkdir_p
14306# -------------
14307# Create "$as_dir" as a directory, including parents if necessary.
14308as_fn_mkdir_p ()
14309{
14310
14311 case $as_dir in #(
14312 -*) as_dir=./$as_dir;;
14313 esac
14314 test -d "$as_dir" || eval $as_mkdir_p || {
14315 as_dirs=
14316 while :; do
14317 case $as_dir in #(
14318 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14319 *) as_qdir=$as_dir;;
14320 esac
14321 as_dirs="'$as_qdir' $as_dirs"
14322 as_dir=`$as_dirname -- "$as_dir" ||
14323$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14324 X"$as_dir" : 'X\(//\)[^/]' \| \
14325 X"$as_dir" : 'X\(//\)$' \| \
14326 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14327$as_echo X"$as_dir" |
14328 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14329 s//\1/
14330 q
14331 }
14332 /^X\(\/\/\)[^/].*/{
14333 s//\1/
14334 q
14335 }
14336 /^X\(\/\/\)$/{
14337 s//\1/
14338 q
14339 }
14340 /^X\(\/\).*/{
14341 s//\1/
14342 q
14343 }
14344 s/.*/./; q'`
14345 test -d "$as_dir" && break
14346 done
14347 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014348 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014349
14350
14351} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014352if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014353 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014354else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014355 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014356 as_mkdir_p=false
14357fi
14358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359if test -x / >/dev/null 2>&1; then
14360 as_test_x='test -x'
14361else
14362 if ls -dL / >/dev/null 2>&1; then
14363 as_ls_L_option=L
14364 else
14365 as_ls_L_option=
14366 fi
14367 as_test_x='
14368 eval sh -c '\''
14369 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 case $1 in #(
14373 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014376 ???[sx]*):;;*)false;;esac;fi
14377 '\'' sh
14378 '
14379fi
14380as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014381
14382# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014383as_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 +000014384
14385# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014386as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014387
14388
Martin v. Löwis11437992002-04-12 09:54:03 +000014389exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014390## ----------------------------------- ##
14391## Main body of $CONFIG_STATUS script. ##
14392## ----------------------------------- ##
14393_ASEOF
14394test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014395
Matthias Kloseb9621712010-04-24 17:59:49 +000014396cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14397# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014398# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399# values after options handling.
14400ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014401This file was extended by python $as_me 3.3, which was
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014402generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014403
14404 CONFIG_FILES = $CONFIG_FILES
14405 CONFIG_HEADERS = $CONFIG_HEADERS
14406 CONFIG_LINKS = $CONFIG_LINKS
14407 CONFIG_COMMANDS = $CONFIG_COMMANDS
14408 $ $0 $@
14409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014410on `(hostname || uname -n) 2>/dev/null | sed 1q`
14411"
14412
Martin v. Löwis11437992002-04-12 09:54:03 +000014413_ACEOF
14414
Matthias Kloseb9621712010-04-24 17:59:49 +000014415case $ac_config_files in *"
14416"*) set x $ac_config_files; shift; ac_config_files=$*;;
14417esac
14418
14419case $ac_config_headers in *"
14420"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14421esac
14422
14423
14424cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014425# Files that config.status was made for.
Benjamin Peterson94b580d2011-08-02 17:30:04 -050014426config_files="$ac_config_files"
14427config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014429_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014430
Matthias Kloseb9621712010-04-24 17:59:49 +000014431cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014432ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014433\`$as_me' instantiates files and other configuration actions
14434from templates according to the current configuration. Unless the files
14435and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014436
Matthias Kloseb9621712010-04-24 17:59:49 +000014437Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014438
14439 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014440 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 --config print configuration, then exit
14442 -q, --quiet, --silent
14443 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014444 -d, --debug don't remove temporary files
14445 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 --file=FILE[:TEMPLATE]
14447 instantiate the configuration file FILE
14448 --header=FILE[:TEMPLATE]
14449 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
14451Configuration files:
14452$config_files
14453
14454Configuration headers:
14455$config_headers
14456
Matthias Kloseb9621712010-04-24 17:59:49 +000014457Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014460cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14461ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014462ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014463python config.status 3.3
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014464configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014467Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014468This config.status script is free software; the Free Software Foundation
14469gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470
14471ac_pwd='$ac_pwd'
14472srcdir='$srcdir'
14473INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014474test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014475_ACEOF
14476
Matthias Kloseb9621712010-04-24 17:59:49 +000014477cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14478# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014479ac_need_defaults=:
14480while test $# != 0
14481do
14482 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014483 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014484 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14485 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014486 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014487 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014488 --*=)
14489 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14490 ac_optarg=
14491 ac_shift=:
14492 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014494 ac_option=$1
14495 ac_optarg=$2
14496 ac_shift=shift
14497 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 esac
14499
Skip Montanaro6dead952003-09-25 14:50:04 +000014500 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014501 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014502 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14503 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 $as_echo "$ac_cs_version"; exit ;;
14506 --config | --confi | --conf | --con | --co | --c )
14507 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 debug=: ;;
14510 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014511 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 case $ac_optarg in
14513 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014514 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 esac
14516 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 ac_need_defaults=false;;
14518 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014519 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014520 case $ac_optarg in
14521 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14522 esac
14523 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014524 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014525 --he | --h)
14526 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014527 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014528Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014529 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014531 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14532 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14533 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014534
14535 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014536 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014537Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014538
Matthias Kloseb9621712010-04-24 17:59:49 +000014539 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014541
14542 esac
14543 shift
14544done
14545
Skip Montanaro6dead952003-09-25 14:50:04 +000014546ac_configure_extra_args=
14547
14548if $ac_cs_silent; then
14549 exec 6>/dev/null
14550 ac_configure_extra_args="$ac_configure_extra_args --silent"
14551fi
14552
14553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014554cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014555if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14557 shift
14558 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14559 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014560 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014562fi
14563
Martin v. Löwis11437992002-04-12 09:54:03 +000014564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014565cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014566exec 5>>config.log
14567{
14568 echo
14569 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14570## Running $as_me. ##
14571_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014576cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014578
Matthias Kloseb9621712010-04-24 17:59:49 +000014579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580
14581# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014582for ac_config_target in $ac_config_targets
14583do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014584 case $ac_config_target in
14585 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14586 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14587 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014588 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14589 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14591 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014592 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014593 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014594
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014595 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014596 esac
14597done
14598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014599
Martin v. Löwis11437992002-04-12 09:54:03 +000014600# If the user did not use the arguments to specify the items to instantiate,
14601# then the envvar interface is used. Set only those that are not.
14602# We use the long form for the default assignment because of an extremely
14603# bizarre bug on SunOS 4.1.3.
14604if $ac_need_defaults; then
14605 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14606 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14607fi
14608
Skip Montanaro6dead952003-09-25 14:50:04 +000014609# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014611# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014612# Hook for its removal unless debugging.
14613# Note that there is a small window in which the directory will not be cleaned:
14614# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014615$debug ||
14616{
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014617 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618 trap 'exit_status=$?
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014619 : "${ac_tmp:=$tmp}"
14620 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014623}
Martin v. Löwis11437992002-04-12 09:54:03 +000014624# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014625
Martin v. Löwis11437992002-04-12 09:54:03 +000014626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014628 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014629} ||
14630{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631 tmp=./conf$$-$RANDOM
14632 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014633} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014634ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014635
Matthias Kloseb9621712010-04-24 17:59:49 +000014636# Set up the scripts for CONFIG_FILES section.
14637# No need to generate them if there are no CONFIG_FILES.
14638# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014639if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014640
Matthias Kloseb9621712010-04-24 17:59:49 +000014641
14642ac_cr=`echo X | tr X '\015'`
14643# On cygwin, bash can eat \r inside `` if the user requested igncr.
14644# But we know of no other shell where ac_cr would be empty at this
14645# point, so we can use a bashism as a fallback.
14646if test "x$ac_cr" = x; then
14647 eval ac_cr=\$\'\\r\'
14648fi
14649ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14650if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014651 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014652else
14653 ac_cs_awk_cr=$ac_cr
14654fi
14655
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014656echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014657_ACEOF
14658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659
Matthias Kloseb9621712010-04-24 17:59:49 +000014660{
14661 echo "cat >conf$$subs.awk <<_ACEOF" &&
14662 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14663 echo "_ACEOF"
14664} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014665 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14666ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667ac_delim='%!_!# '
14668for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014670 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14673 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674 break
14675 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014676 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677 else
14678 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014679 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680done
Matthias Kloseb9621712010-04-24 17:59:49 +000014681rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682
Matthias Kloseb9621712010-04-24 17:59:49 +000014683cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014684cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014686sed -n '
14687h
14688s/^/S["/; s/!.*/"]=/
14689p
14690g
14691s/^[^!]*!//
14692:repl
14693t repl
14694s/'"$ac_delim"'$//
14695t delim
14696:nl
14697h
14698s/\(.\{148\}\)..*/\1/
14699t more1
14700s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14701p
14702n
14703b repl
14704:more1
14705s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14706p
14707g
14708s/.\{148\}//
14709t nl
14710:delim
14711h
14712s/\(.\{148\}\)..*/\1/
14713t more2
14714s/["\\]/\\&/g; s/^/"/; s/$/"/
14715p
14716b
14717:more2
14718s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14719p
14720g
14721s/.\{148\}//
14722t delim
14723' <conf$$subs.awk | sed '
14724/^[^""]/{
14725 N
14726 s/\n//
14727}
14728' >>$CONFIG_STATUS || ac_write_fail=1
14729rm -f conf$$subs.awk
14730cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14731_ACAWK
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014732cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014733 for (key in S) S_is_set[key] = 1
14734 FS = ""
14735
14736}
14737{
14738 line = $ 0
14739 nfields = split(line, field, "@")
14740 substed = 0
14741 len = length(field[1])
14742 for (i = 2; i < nfields; i++) {
14743 key = field[i]
14744 keylen = length(key)
14745 if (S_is_set[key]) {
14746 value = S[key]
14747 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14748 len += length(value) + length(field[++i])
14749 substed = 1
14750 } else
14751 len += 1 + keylen
14752 }
14753
14754 print line
14755}
14756
14757_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014759cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14760if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14761 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14762else
14763 cat
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014764fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014765 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014766_ACEOF
14767
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014768# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14769# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770# trailing colons and then remove the whole line if VPATH becomes empty
14771# (actually we leave an empty line to preserve line numbers).
14772if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014773 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14774h
14775s///
14776s/^/:/
14777s/[ ]*$/:/
14778s/:\$(srcdir):/:/g
14779s/:\${srcdir}:/:/g
14780s/:@srcdir@:/:/g
14781s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014782s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014783x
14784s/\(=[ ]*\).*/\1/
14785G
14786s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014787s/^[^=]*=[ ]*$//
14788}'
14789fi
14790
Matthias Kloseb9621712010-04-24 17:59:49 +000014791cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014792fi # test -n "$CONFIG_FILES"
14793
Matthias Kloseb9621712010-04-24 17:59:49 +000014794# Set up the scripts for CONFIG_HEADERS section.
14795# No need to generate them if there are no CONFIG_HEADERS.
14796# This happens for instance with `./config.status Makefile'.
14797if test -n "$CONFIG_HEADERS"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014798cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014799BEGIN {
14800_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014801
Matthias Kloseb9621712010-04-24 17:59:49 +000014802# Transform confdefs.h into an awk script `defines.awk', embedded as
14803# here-document in config.status, that substitutes the proper values into
14804# config.h.in to produce config.h.
14805
14806# Create a delimiter string that does not exist in confdefs.h, to ease
14807# handling of long lines.
14808ac_delim='%!_!# '
14809for ac_last_try in false false :; do
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014810 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14811 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 break
14813 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014814 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 else
14816 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14817 fi
14818done
14819
14820# For the awk script, D is an array of macro values keyed by name,
14821# likewise P contains macro parameters if any. Preserve backslash
14822# newline sequences.
14823
14824ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14825sed -n '
14826s/.\{148\}/&'"$ac_delim"'/g
14827t rset
14828:rset
14829s/^[ ]*#[ ]*define[ ][ ]*/ /
14830t def
14831d
14832:def
14833s/\\$//
14834t bsnl
14835s/["\\]/\\&/g
14836s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14837D["\1"]=" \3"/p
14838s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14839d
14840:bsnl
14841s/["\\]/\\&/g
14842s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14843D["\1"]=" \3\\\\\\n"\\/p
14844t cont
14845s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14846t cont
14847d
14848:cont
14849n
14850s/.\{148\}/&'"$ac_delim"'/g
14851t clear
14852:clear
14853s/\\$//
14854t bsnlc
14855s/["\\]/\\&/g; s/^/"/; s/$/"/p
14856d
14857:bsnlc
14858s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14859b cont
14860' <confdefs.h | sed '
14861s/'"$ac_delim"'/"\\\
14862"/g' >>$CONFIG_STATUS || ac_write_fail=1
14863
14864cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14865 for (key in D) D_is_set[key] = 1
14866 FS = ""
14867}
14868/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14869 line = \$ 0
14870 split(line, arg, " ")
14871 if (arg[1] == "#") {
14872 defundef = arg[2]
14873 mac1 = arg[3]
14874 } else {
14875 defundef = substr(arg[1], 2)
14876 mac1 = arg[2]
14877 }
14878 split(mac1, mac2, "(") #)
14879 macro = mac2[1]
14880 prefix = substr(line, 1, index(line, defundef) - 1)
14881 if (D_is_set[macro]) {
14882 # Preserve the white space surrounding the "#".
14883 print prefix "define", macro P[macro] D[macro]
14884 next
14885 } else {
14886 # Replace #undef with comments. This is necessary, for example,
14887 # in the case of _POSIX_SOURCE, which is predefined and required
14888 # on some systems where configure will not decide to define it.
14889 if (defundef == "undef") {
14890 print "/*", prefix defundef, macro, "*/"
14891 next
14892 }
14893 }
14894}
14895{ print }
14896_ACAWK
14897_ACEOF
14898cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014899 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014900fi # test -n "$CONFIG_HEADERS"
14901
14902
14903eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14904shift
14905for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014906do
14907 case $ac_tag in
14908 :[FHLC]) ac_mode=$ac_tag; continue;;
14909 esac
14910 case $ac_mode$ac_tag in
14911 :[FHL]*:*);;
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014912 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913 :[FH]-) ac_tag=-:-;;
14914 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14915 esac
14916 ac_save_IFS=$IFS
14917 IFS=:
14918 set x $ac_tag
14919 IFS=$ac_save_IFS
14920 shift
14921 ac_file=$1
14922 shift
14923
14924 case $ac_mode in
14925 :L) ac_source=$1;;
14926 :[FH])
14927 ac_file_inputs=
14928 for ac_f
14929 do
14930 case $ac_f in
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014931 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932 *) # Look for the file first in the build tree, then in the source tree
14933 # (if the path is not absolute). The absolute path cannot be DOS-style,
14934 # because $ac_f cannot contain `:'.
14935 test -f "$ac_f" ||
14936 case $ac_f in
14937 [\\/$]*) false;;
14938 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14939 esac ||
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014940 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14943 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944 done
14945
14946 # Let's still pretend it is `configure' which instantiates (i.e., don't
14947 # use $as_me), people would be surprised to read:
14948 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014949 configure_input='Generated from '`
14950 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14951 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952 if test x"$ac_file" != x-; then
14953 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14955$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 # Neutralize special characters interpreted by sed in replacement strings.
14958 case $configure_input in #(
14959 *\&* | *\|* | *\\* )
14960 ac_sed_conf_input=`$as_echo "$configure_input" |
14961 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14962 *) ac_sed_conf_input=$configure_input;;
14963 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964
14965 case $ac_tag in
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014966 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14967 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968 esac
14969 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 esac
14971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014973$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014974 X"$ac_file" : 'X\(//\)[^/]' \| \
14975 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014977$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14979 s//\1/
14980 q
14981 }
14982 /^X\(\/\/\)[^/].*/{
14983 s//\1/
14984 q
14985 }
14986 /^X\(\/\/\)$/{
14987 s//\1/
14988 q
14989 }
14990 /^X\(\/\).*/{
14991 s//\1/
14992 q
14993 }
14994 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 ac_builddir=.
14997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014998case "$ac_dir" in
14999.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15000*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004 case $ac_top_builddir_sub in
15005 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15006 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15007 esac ;;
15008esac
15009ac_abs_top_builddir=$ac_pwd
15010ac_abs_builddir=$ac_pwd$ac_dir_suffix
15011# for backward compatibility:
15012ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015013
15014case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017 ac_top_srcdir=$ac_top_builddir_sub
15018 ac_abs_top_srcdir=$ac_pwd ;;
15019 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021 ac_top_srcdir=$srcdir
15022 ac_abs_top_srcdir=$srcdir ;;
15023 *) # Relative name.
15024 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15025 ac_top_srcdir=$ac_top_build_prefix$srcdir
15026 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015027esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015029
Martin v. Löwis11437992002-04-12 09:54:03 +000015030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031 case $ac_mode in
15032 :F)
15033 #
15034 # CONFIG_FILE
15035 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015036
15037 case $INSTALL in
15038 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015041_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015042
Matthias Kloseb9621712010-04-24 17:59:49 +000015043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015044# If the template does not know about datarootdir, expand it.
15045# FIXME: This hack should be removed a few years after 2.60.
15046ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015047ac_sed_dataroot='
15048/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049 p
15050 q
15051}
15052/@datadir@/p
15053/@docdir@/p
15054/@infodir@/p
15055/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015056/@mandir@/p'
15057case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058*datarootdir*) ac_datarootdir_seen=yes;;
15059*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15061$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064 ac_datarootdir_hack='
15065 s&@datadir@&$datadir&g
15066 s&@docdir@&$docdir&g
15067 s&@infodir@&$infodir&g
15068 s&@localedir@&$localedir&g
15069 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015070 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071esac
15072_ACEOF
15073
15074# Neutralize VPATH when `$srcdir' = `.'.
15075# Shell code in configure.ac might set extrasub.
15076# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015077cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15078ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015079$extrasub
15080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015081cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015082:t
15083/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015084s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015086s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087s&@srcdir@&$ac_srcdir&;t t
15088s&@abs_srcdir@&$ac_abs_srcdir&;t t
15089s&@top_srcdir@&$ac_top_srcdir&;t t
15090s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15091s&@builddir@&$ac_builddir&;t t
15092s&@abs_builddir@&$ac_abs_builddir&;t t
15093s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15094s&@INSTALL@&$ac_INSTALL&;t t
15095$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015096"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015097eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15098 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015101 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15102 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15103 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 { $as_echo "$as_me:${as_lineno-$LINENO}: 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" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015106$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015107which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015108
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015109 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 case $ac_file in
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015111 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15112 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015114 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115 ;;
15116 :H)
15117 #
15118 # CONFIG_HEADER
15119 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015120 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 {
15122 $as_echo "/* $configure_input */" \
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015123 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15124 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015125 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015126 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015127 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15128$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 rm -f "$ac_file"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015131 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015132 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 fi
15134 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015135 $as_echo "/* $configure_input */" \
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015136 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015137 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015138 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141
15142 esac
15143
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015144
15145 case $ac_file$ac_mode in
15146 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15147
15148 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015149done # for ac_tag
15150
Guido van Rossum627b2d71993-12-24 10:39:16 +000015151
Matthias Kloseb9621712010-04-24 17:59:49 +000015152as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015153_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015154ac_clean_files=$ac_clean_files_save
15155
Matthias Kloseb9621712010-04-24 17:59:49 +000015156test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015157 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015158
Martin v. Löwis11437992002-04-12 09:54:03 +000015159
15160# configure is writing to config.log, and then calls config.status.
15161# config.status does its own redirection, appending to config.log.
15162# Unfortunately, on DOS this fails, as config.log is still kept open
15163# by configure, so config.status won't be able to write to it; its
15164# output is simply discarded. So we exec the FD to /dev/null,
15165# effectively closing config.log, so it can be properly (re)opened and
15166# appended to by config.status. When coming back to configure, we
15167# need to make the FD available again.
15168if test "$no_create" != yes; then
15169 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015170 ac_config_status_args=
15171 test "$silent" = yes &&
15172 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015174 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 exec 5>>config.log
15176 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15177 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015178 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015179fi
15180if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15181 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15182$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015183fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015184
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015185
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015186echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015187if test ! -f Modules/Setup
15188then
15189 cp $srcdir/Modules/Setup.dist Modules/Setup
15190fi
15191
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015192echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015193if test ! -f Modules/Setup.local
15194then
15195 echo "# Edit this file for local setup changes" >Modules/Setup.local
15196fi
15197
15198echo "creating Makefile"
15199$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15200 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015201 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015202mv config.c Modules