blob: 67ae35cec279ae4144126ac52ef8ab696ab9e994 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnerd169fdc2011-09-08 00:56:17 +020094as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
Victor Stinnerd169fdc2011-09-08 00:56:17 +0200220 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
Victor Stinnerd169fdc2011-09-08 00:56:17 +0200225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000232fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: http://bugs.python.org/ about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246 fi
247 exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265 { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274 return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282 set +e
283 as_fn_set_status $1
284 exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367fi # as_fn_arith
368
369
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000375as_fn_error ()
376{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000381 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200382 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000383 as_fn_exit $as_status
384} # as_fn_error
385
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000386if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389else
390 as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395else
396 as_basename=false
397fi
398
Matthias Kloseb9621712010-04-24 17:59:49 +0000399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401else
402 as_dirname=false
403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000404
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000409$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430
431
Matthias Kloseb9621712010-04-24 17:59:49 +0000432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000446 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000452 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000453 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 # Exit status is that of the last command.
460 exit
461}
462
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000464case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000465-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000466 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 esac;;
472*)
473 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000475
Martin v. Löwis11437992002-04-12 09:54:03 +0000476rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000477if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479else
480 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000481 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000483if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489 # In both cases, we have to default to `cp -p'.
490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491 as_ln_s='cp -p'
492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
498 as_ln_s='cp -p'
499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000502
Skip Montanaro6dead952003-09-25 14:50:04 +0000503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000505else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000507 as_mkdir_p=false
508fi
509
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000510if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000523 case $1 in #(
524 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000525 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530fi
531as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000532
533# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000534as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
539
Matthias Kloseb9621712010-04-24 17:59:49 +0000540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
543# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
Martin v. Löwis11437992002-04-12 09:54:03 +0000548#
549# Initializations.
550#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000552ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000553ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000554LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000563PACKAGE_VERSION='3.3'
564PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000565PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000566PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000567
568ac_unique_file="Include/object.h"
569# Factoring default headers for most tests.
570ac_includes_default="\
571#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000573# include <sys/types.h>
574#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <sys/stat.h>
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000579# include <stdlib.h>
580# include <stddef.h>
581#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000582# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000583# include <stdlib.h>
584# endif
585#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_STRING_H
587# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <memory.h>
589# endif
590# include <string.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <strings.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef HAVE_STDINT_H
599# include <stdint.h>
600#endif
601#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <unistd.h>
603#endif"
604
Matthias Kloseb9621712010-04-24 17:59:49 +0000605ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000606SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000607THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000608SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000609LIBC
610LIBM
611HAVE_GETHOSTBYNAME
612HAVE_GETHOSTBYNAME_R
613HAVE_GETHOSTBYNAME_R_3_ARG
614HAVE_GETHOSTBYNAME_R_5_ARG
615HAVE_GETHOSTBYNAME_R_6_ARG
616LIBOBJS
617TRUE
618MACHDEP_OBJS
619DYNLOADFILE
620DLINCLDIR
621THREADOBJ
622LDLAST
623USE_THREAD_MODULE
624SIGNAL_OBJS
625USE_SIGNAL_MODULE
626LIBFFI_INCLUDEDIR
627PKG_CONFIG
628SHLIBS
629CFLAGSFORSHARED
630LINKFORSHARED
631CCSHARED
632BLDSHARED
633LDCXXSHARED
634LDSHARED
635SO
636LIBTOOL_CRUFT
637OTHER_LIBTOOL_OPT
638UNIVERSAL_ARCH_FLAGS
639BASECFLAGS
640OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000641ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LN
643INSTALL_DATA
644INSTALL_SCRIPT
645INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500646HAS_PYTHON
647DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000648ARFLAGS
649AR
650RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000651USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652GNULD
653LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000654LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000655RUNSHARED
656INSTSONAME
657LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000658PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000659BLDLIBRARY
660DLLLIBRARY
661LDLIBRARY
662LIBRARY
663BUILDEXEEXT
664EGREP
665GREP
666CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200667NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000668MAINCC
669CXX
670OBJEXT
671EXEEXT
672ac_ct_CC
673CPPFLAGS
674LDFLAGS
675CFLAGS
676CC
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CONFIGURE_MACOSX_DEPLOYMENT_TARGET
679SGI_ABI
680MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000681FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000682FRAMEWORKUNIXTOOLSPREFIX
683FRAMEWORKALTINSTALLLAST
684FRAMEWORKALTINSTALLFIRST
685FRAMEWORKINSTALLLAST
686FRAMEWORKINSTALLFIRST
687PYTHONFRAMEWORKINSTALLDIR
688PYTHONFRAMEWORKPREFIX
689PYTHONFRAMEWORKDIR
690PYTHONFRAMEWORKIDENTIFIER
691PYTHONFRAMEWORK
692LIPO_32BIT_FLAGS
693ARCH_RUN_32BIT
694UNIVERSALSDK
695CONFIG_ARGS
696SOVERSION
697VERSION
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500698HAS_HG
699HGBRANCH
700HGTAG
701HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702target_alias
703host_alias
704build_alias
705LIBS
706ECHO_T
707ECHO_N
708ECHO_C
709DEFS
710mandir
711localedir
712libdir
713psdir
714pdfdir
715dvidir
716htmldir
717infodir
718docdir
719oldincludedir
720includedir
721localstatedir
722sharedstatedir
723sysconfdir
724datadir
725datarootdir
726libexecdir
727sbindir
728bindir
729program_transform_name
730prefix
731exec_prefix
732PACKAGE_URL
733PACKAGE_BUGREPORT
734PACKAGE_STRING
735PACKAGE_VERSION
736PACKAGE_TARNAME
737PACKAGE_NAME
738PATH_SEPARATOR
739SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000741ac_user_opts='
742enable_option_checking
743enable_universalsdk
744with_universal_archs
745with_framework_name
746enable_framework
747with_gcc
748with_cxx_main
749with_suffix
750enable_shared
751enable_profiling
752with_pydebug
753with_libs
754with_system_expat
755with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000756enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000757with_dbmliborder
758with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000759with_threads
760with_thread
761enable_ipv6
762with_doc_strings
763with_tsc
764with_pymalloc
765with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000766with_fpectl
767with_libm
768with_libc
769enable_big_digits
770with_wide_unicode
771with_computed_gotos
772'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000773 ac_precious_vars='build_alias
774host_alias
775target_alias
776CC
777CFLAGS
778LDFLAGS
779LIBS
780CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200781CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000782
Guido van Rossum627b2d71993-12-24 10:39:16 +0000783
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785ac_init_help=
786ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000787ac_unrecognized_opts=
788ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789# The variables have the same names as the options, with
790# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000791cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794no_recursion=
795prefix=NONE
796program_prefix=NONE
797program_suffix=NONE
798program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803x_includes=NONE
804x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000805
806# Installation directory options.
807# These are left unexpanded so users can "make install exec_prefix=/foo"
808# and all the variables that are supposed to be based on exec_prefix
809# by default will actually change.
810# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812bindir='${exec_prefix}/bin'
813sbindir='${exec_prefix}/sbin'
814libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815datarootdir='${prefix}/share'
816datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817sysconfdir='${prefix}/etc'
818sharedstatedir='${prefix}/com'
819localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820includedir='${prefix}/include'
821oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
823infodir='${datarootdir}/info'
824htmldir='${docdir}'
825dvidir='${docdir}'
826pdfdir='${docdir}'
827psdir='${docdir}'
828libdir='${exec_prefix}/lib'
829localedir='${datarootdir}/locale'
830mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000835do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836 # If the previous option needs an argument, assign it.
837 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839 ac_prev=
840 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200844 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
845 *=) ac_optarg= ;;
846 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Accept the important Cygnus configure options, so we can diagnose typos.
850
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851 case $ac_dashdash$ac_option in
852 --)
853 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855 -bindir | --bindir | --bindi | --bind | --bin | --bi)
856 ac_prev=bindir ;;
857 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859
860 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865 -cache-file | --cache-file | --cache-fil | --cache-fi \
866 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
867 ac_prev=cache_file ;;
868 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
869 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 cache_file=$ac_optarg ;;
871
872 --config-cache | -C)
873 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000875 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
881 | --dataroo | --dataro | --datar)
882 ac_prev=datarootdir ;;
883 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
884 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
885 datarootdir=$ac_optarg ;;
886
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000888 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000890 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200891 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000892 ac_useropt_orig=$ac_useropt
893 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
894 case $ac_user_opts in
895 *"
896"enable_$ac_useropt"
897"*) ;;
898 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
899 ac_unrecognized_sep=', ';;
900 esac
901 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902
903 -docdir | --docdir | --docdi | --doc | --do)
904 ac_prev=docdir ;;
905 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
906 docdir=$ac_optarg ;;
907
908 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
909 ac_prev=dvidir ;;
910 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
911 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
913 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000914 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000916 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200917 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000918 ac_useropt_orig=$ac_useropt
919 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
920 case $ac_user_opts in
921 *"
922"enable_$ac_useropt"
923"*) ;;
924 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
925 ac_unrecognized_sep=', ';;
926 esac
927 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
930 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
931 | --exec | --exe | --ex)
932 ac_prev=exec_prefix ;;
933 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
934 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
935 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
938 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 # Obsolete; use --with-gas.
940 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 -help | --help | --hel | --he | -h)
943 ac_init_help=long ;;
944 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
945 ac_init_help=recursive ;;
946 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
947 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
955 ac_prev=htmldir ;;
956 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
957 | --ht=*)
958 htmldir=$ac_optarg ;;
959
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -includedir | --includedir | --includedi | --included | --include \
961 | --includ | --inclu | --incl | --inc)
962 ac_prev=includedir ;;
963 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
964 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
967 -infodir | --infodir | --infodi | --infod | --info | --inf)
968 ac_prev=infodir ;;
969 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
972 -libdir | --libdir | --libdi | --libd)
973 ac_prev=libdir ;;
974 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
977 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
978 | --libexe | --libex | --libe)
979 ac_prev=libexecdir ;;
980 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
981 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984 -localedir | --localedir | --localedi | --localed | --locale)
985 ac_prev=localedir ;;
986 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
987 localedir=$ac_optarg ;;
988
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991 ac_prev=localstatedir ;;
992 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
996 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
997 ac_prev=mandir ;;
998 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Obsolete; use --without-fp.
1003 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 no_create=yes ;;
1008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1010 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1011 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1014 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1015 | --oldin | --oldi | --old | --ol | --o)
1016 ac_prev=oldincludedir ;;
1017 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1018 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1019 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1023 ac_prev=prefix ;;
1024 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1028 | --program-pre | --program-pr | --program-p)
1029 ac_prev=program_prefix ;;
1030 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1031 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1035 | --program-suf | --program-su | --program-s)
1036 ac_prev=program_suffix ;;
1037 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1038 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -program-transform-name | --program-transform-name \
1042 | --program-transform-nam | --program-transform-na \
1043 | --program-transform-n | --program-transform- \
1044 | --program-transform | --program-transfor \
1045 | --program-transfo | --program-transf \
1046 | --program-trans | --program-tran \
1047 | --progr-tra | --program-tr | --program-t)
1048 ac_prev=program_transform_name ;;
1049 -program-transform-name=* | --program-transform-name=* \
1050 | --program-transform-nam=* | --program-transform-na=* \
1051 | --program-transform-n=* | --program-transform-=* \
1052 | --program-transform=* | --program-transfor=* \
1053 | --program-transfo=* | --program-transf=* \
1054 | --program-trans=* | --program-tran=* \
1055 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1059 ac_prev=pdfdir ;;
1060 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1061 pdfdir=$ac_optarg ;;
1062
1063 -psdir | --psdir | --psdi | --psd | --ps)
1064 ac_prev=psdir ;;
1065 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1066 psdir=$ac_optarg ;;
1067
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1069 | -silent | --silent | --silen | --sile | --sil)
1070 silent=yes ;;
1071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1073 ac_prev=sbindir ;;
1074 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1075 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
1078 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1079 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1080 | --sharedst | --shareds | --shared | --share | --shar \
1081 | --sha | --sh)
1082 ac_prev=sharedstatedir ;;
1083 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1084 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1085 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1086 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -site | --site | --sit)
1090 ac_prev=site ;;
1091 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1095 ac_prev=srcdir ;;
1096 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1100 | --syscon | --sysco | --sysc | --sys | --sy)
1101 ac_prev=sysconfdir ;;
1102 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1103 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1112 verbose=yes ;;
1113
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 -version | --version | --versio | --versi | --vers | -V)
1115 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001121 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 ac_useropt_orig=$ac_useropt
1123 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1124 case $ac_user_opts in
1125 *"
1126"with_$ac_useropt"
1127"*) ;;
1128 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1129 ac_unrecognized_sep=', ';;
1130 esac
1131 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001134 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001137 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001138 ac_useropt_orig=$ac_useropt
1139 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1140 case $ac_user_opts in
1141 *"
1142"with_$ac_useropt"
1143"*) ;;
1144 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1145 ac_unrecognized_sep=', ';;
1146 esac
1147 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149 --x)
1150 # Obsolete; use --with-x.
1151 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1154 | --x-incl | --x-inc | --x-in | --x-i)
1155 ac_prev=x_includes ;;
1156 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1157 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1161 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1162 ac_prev=x_libraries ;;
1163 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1164 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001167 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1168Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 ;;
1170
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 *=*)
1172 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1173 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 case $ac_envvar in #(
1175 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001176 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 export $ac_envvar ;;
1180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001186 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ;;
1188
1189 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001190done
1191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001194 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195fi
1196
Matthias Kloseb9621712010-04-24 17:59:49 +00001197if test -n "$ac_unrecognized_opts"; then
1198 case $enable_option_checking in
1199 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1202 esac
1203fi
1204
1205# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001206for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1207 datadir sysconfdir sharedstatedir localstatedir includedir \
1208 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1209 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 # Remove trailing slashes.
1213 case $ac_val in
1214 */ )
1215 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1216 eval $ac_var=\$ac_val;;
1217 esac
1218 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220 [\\/$]* | ?:[\\/]* ) continue;;
1221 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001224done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001225
Martin v. Löwis11437992002-04-12 09:54:03 +00001226# There might be people who depend on the old broken behavior: `$host'
1227# used to hold the argument of --host etc.
1228# FIXME: To remove some day.
1229build=$build_alias
1230host=$host_alias
1231target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232
Martin v. Löwis11437992002-04-12 09:54:03 +00001233# FIXME: To remove some day.
1234if test "x$host_alias" != x; then
1235 if test "x$build_alias" = x; then
1236 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001237 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1238 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 elif test "x$build_alias" != "x$host_alias"; then
1240 cross_compiling=yes
1241 fi
1242fi
1243
1244ac_tool_prefix=
1245test -n "$host_alias" && ac_tool_prefix=$host_alias-
1246
1247test "$silent" = yes && exec 6>/dev/null
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250ac_pwd=`pwd` && test -n "$ac_pwd" &&
1251ac_ls_di=`ls -di .` &&
1252ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256
1257
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258# Find the source files, if location was not specified.
1259if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 ac_confdir=`$as_dirname -- "$as_myself" ||
1263$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1264 X"$as_myself" : 'X\(//\)[^/]' \| \
1265 X"$as_myself" : 'X\(//\)$' \| \
1266 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1267$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\/\)[^/].*/{
1273 s//\1/
1274 q
1275 }
1276 /^X\(\/\/\)$/{
1277 s//\1/
1278 q
1279 }
1280 /^X\(\/\).*/{
1281 s//\1/
1282 q
1283 }
1284 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287 srcdir=..
1288 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289else
1290 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292if test ! -r "$srcdir/$ac_unique_file"; then
1293 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001294 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1297ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 pwd)`
1300# When building in place, set srcdir=.
1301if test "$ac_abs_confdir" = "$ac_pwd"; then
1302 srcdir=.
1303fi
1304# Remove unnecessary trailing slashes from srcdir.
1305# Double slashes in file names in object file debugging info
1306# mess up M-x gdb in Emacs.
1307case $srcdir in
1308*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1309esac
1310for ac_var in $ac_precious_vars; do
1311 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1312 eval ac_env_${ac_var}_value=\$${ac_var}
1313 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1314 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1315done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317#
1318# Report the --help message.
1319#
1320if test "$ac_init_help" = "long"; then
1321 # Omit some internal or obsolete options to make the list less imposing.
1322 # This message is too long to be a string in the A/UX 3.1 sh.
1323 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001324\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001325
1326Usage: $0 [OPTION]... [VAR=VALUE]...
1327
1328To assign environment variables (e.g., CC, CFLAGS...), specify them as
1329VAR=VALUE. See below for descriptions of some of the useful variables.
1330
1331Defaults for the options are specified in brackets.
1332
1333Configuration:
1334 -h, --help display this help and exit
1335 --help=short display options specific to this package
1336 --help=recursive display the short help of all the included packages
1337 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --cache-file=FILE cache test results in FILE [disabled]
1340 -C, --config-cache alias for \`--cache-file=config.cache'
1341 -n, --no-create do not create output files
1342 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1343
Martin v. Löwis11437992002-04-12 09:54:03 +00001344Installation directories:
1345 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001347 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001349
1350By default, \`make install' will install all the files in
1351\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1352an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1353for instance \`--prefix=\$HOME'.
1354
1355For better control, use the options below.
1356
1357Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001358 --bindir=DIR user executables [EPREFIX/bin]
1359 --sbindir=DIR system admin executables [EPREFIX/sbin]
1360 --libexecdir=DIR program executables [EPREFIX/libexec]
1361 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1362 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1363 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1364 --libdir=DIR object code libraries [EPREFIX/lib]
1365 --includedir=DIR C header files [PREFIX/include]
1366 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1367 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1368 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1369 --infodir=DIR info documentation [DATAROOTDIR/info]
1370 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1371 --mandir=DIR man documentation [DATAROOTDIR/man]
1372 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1373 --htmldir=DIR html documentation [DOCDIR]
1374 --dvidir=DIR dvi documentation [DOCDIR]
1375 --pdfdir=DIR pdf documentation [DOCDIR]
1376 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001377_ACEOF
1378
1379 cat <<\_ACEOF
1380_ACEOF
1381fi
1382
1383if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001384 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001385 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001386 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 cat <<\_ACEOF
1388
1389Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001390 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1392 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001393 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001394 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --enable-framework[=INSTALLDIR]
1396 Build (MacOSX|Darwin) framework
1397 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001398 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001399 --enable-loadable-sqlite-extensions
1400 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --enable-ipv6 Enable ipv6 (with ipv4) support
1402 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001403 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001404 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Optional Packages:
1407 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1408 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001409 --with-universal-archs=ARCH
1410 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001411 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001412 --with-framework-name=FRAMEWORK
1413 specify an alternate name of the framework built
1414 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001416 --with-cxx-main=<compiler>
1417 compile main() and link python executable with C++
1418 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-suffix=.exe set executable suffix
1420 --with-pydebug build with Py_DEBUG defined
1421 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001422 --with-system-expat build pyexpat module using an installed expat
1423 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001424 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001425 --with-dbmliborder=db1:db2:...
1426 order to check db backends for dbm. Valid value is a
1427 colon separated string with the backend names
1428 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with(out)-threads[=DIRECTORY]
1431 disable/enable thread support
1432 --with(out)-thread[=DIRECTORY]
1433 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001435 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001437 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with-fpectl enable SIGFPE catching
1439 --with-libm=STRING math library
1440 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001441 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001442 --with(out)-computed-gotos
1443 Use computed gotos in evaluation loop (enabled by
1444 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
1446Some influential environment variables:
1447 CC C compiler command
1448 CFLAGS C compiler flags
1449 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1450 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 CPP C preprocessor
1455
1456Use these variables to override the choices made by `configure' or to help
1457it to find libraries and programs with nonstandard names/locations.
1458
Georg Brandle2e15612009-05-20 18:25:10 +00001459Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001462fi
1463
1464if test "$ac_init_help" = "recursive"; then
1465 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 test -d "$ac_dir" ||
1468 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1469 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 ac_builddir=.
1471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472case "$ac_dir" in
1473.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1474*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 case $ac_top_builddir_sub in
1479 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1480 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1481 esac ;;
1482esac
1483ac_abs_top_builddir=$ac_pwd
1484ac_abs_builddir=$ac_pwd$ac_dir_suffix
1485# for backward compatibility:
1486ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491 ac_top_srcdir=$ac_top_builddir_sub
1492 ac_abs_top_srcdir=$ac_pwd ;;
1493 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 ac_top_srcdir=$srcdir
1496 ac_abs_top_srcdir=$srcdir ;;
1497 *) # Relative name.
1498 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1499 ac_top_srcdir=$ac_top_build_prefix$srcdir
1500 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001501esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 cd "$ac_dir" || { ac_status=$?; continue; }
1505 # Check for guested configure.
1506 if test -f "$ac_srcdir/configure.gnu"; then
1507 echo &&
1508 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1509 elif test -f "$ac_srcdir/configure"; then
1510 echo &&
1511 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001513 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514 fi || ac_status=$?
1515 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 done
1517fi
1518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001520if $ac_init_version; then
1521 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001522python configure 3.3
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001523generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001524
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001525Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526This configure script is free software; the Free Software Foundation
1527gives unlimited permission to copy, distribute and modify it.
1528_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001531
1532## ------------------------ ##
1533## Autoconf initialization. ##
1534## ------------------------ ##
1535
1536# ac_fn_c_try_compile LINENO
1537# --------------------------
1538# Try to compile conftest.$ac_ext, and return whether this succeeded.
1539ac_fn_c_try_compile ()
1540{
1541 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1542 rm -f conftest.$ac_objext
1543 if { { ac_try="$ac_compile"
1544case "(($ac_try" in
1545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1546 *) ac_try_echo=$ac_try;;
1547esac
1548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1549$as_echo "$ac_try_echo"; } >&5
1550 (eval "$ac_compile") 2>conftest.err
1551 ac_status=$?
1552 if test -s conftest.err; then
1553 grep -v '^ *+' conftest.err >conftest.er1
1554 cat conftest.er1 >&5
1555 mv -f conftest.er1 conftest.err
1556 fi
1557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1558 test $ac_status = 0; } && {
1559 test -z "$ac_c_werror_flag" ||
1560 test ! -s conftest.err
1561 } && test -s conftest.$ac_objext; then :
1562 ac_retval=0
1563else
1564 $as_echo "$as_me: failed program was:" >&5
1565sed 's/^/| /' conftest.$ac_ext >&5
1566
1567 ac_retval=1
1568fi
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001569 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001570 as_fn_set_status $ac_retval
1571
1572} # ac_fn_c_try_compile
1573
Matthias Kloseb9621712010-04-24 17:59:49 +00001574# ac_fn_c_try_link LINENO
1575# -----------------------
1576# Try to link conftest.$ac_ext, and return whether this succeeded.
1577ac_fn_c_try_link ()
1578{
1579 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1580 rm -f conftest.$ac_objext conftest$ac_exeext
1581 if { { ac_try="$ac_link"
1582case "(($ac_try" in
1583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1584 *) ac_try_echo=$ac_try;;
1585esac
1586eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1587$as_echo "$ac_try_echo"; } >&5
1588 (eval "$ac_link") 2>conftest.err
1589 ac_status=$?
1590 if test -s conftest.err; then
1591 grep -v '^ *+' conftest.err >conftest.er1
1592 cat conftest.er1 >&5
1593 mv -f conftest.er1 conftest.err
1594 fi
1595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1596 test $ac_status = 0; } && {
1597 test -z "$ac_c_werror_flag" ||
1598 test ! -s conftest.err
1599 } && test -s conftest$ac_exeext && {
1600 test "$cross_compiling" = yes ||
1601 $as_test_x conftest$ac_exeext
1602 }; then :
1603 ac_retval=0
1604else
1605 $as_echo "$as_me: failed program was:" >&5
1606sed 's/^/| /' conftest.$ac_ext >&5
1607
1608 ac_retval=1
1609fi
1610 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1611 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1612 # interfere with the next link command; also delete a directory that is
1613 # left behind by Apple's compiler. We do this before executing the actions.
1614 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001615 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001616 as_fn_set_status $ac_retval
1617
1618} # ac_fn_c_try_link
1619
Matthias Kloseb9621712010-04-24 17:59:49 +00001620# ac_fn_c_try_cpp LINENO
1621# ----------------------
1622# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1623ac_fn_c_try_cpp ()
1624{
1625 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1626 if { { ac_try="$ac_cpp conftest.$ac_ext"
1627case "(($ac_try" in
1628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1629 *) ac_try_echo=$ac_try;;
1630esac
1631eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1632$as_echo "$ac_try_echo"; } >&5
1633 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1634 ac_status=$?
1635 if test -s conftest.err; then
1636 grep -v '^ *+' conftest.err >conftest.er1
1637 cat conftest.er1 >&5
1638 mv -f conftest.er1 conftest.err
1639 fi
1640 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001641 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001642 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1643 test ! -s conftest.err
1644 }; then :
1645 ac_retval=0
1646else
1647 $as_echo "$as_me: failed program was:" >&5
1648sed 's/^/| /' conftest.$ac_ext >&5
1649
1650 ac_retval=1
1651fi
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001652 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001653 as_fn_set_status $ac_retval
1654
1655} # ac_fn_c_try_cpp
1656
1657# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1658# -------------------------------------------------------
1659# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1660# the include files in INCLUDES and setting the cache variable VAR
1661# accordingly.
1662ac_fn_c_check_header_mongrel ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001665 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1667$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001668if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 $as_echo_n "(cached) " >&6
1670fi
1671eval ac_res=\$$3
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1673$as_echo "$ac_res" >&6; }
1674else
1675 # Is the header compilable?
1676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1677$as_echo_n "checking $2 usability... " >&6; }
1678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1679/* end confdefs.h. */
1680$4
1681#include <$2>
1682_ACEOF
1683if ac_fn_c_try_compile "$LINENO"; then :
1684 ac_header_compiler=yes
1685else
1686 ac_header_compiler=no
1687fi
1688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1690$as_echo "$ac_header_compiler" >&6; }
1691
1692# Is the header present?
1693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1694$as_echo_n "checking $2 presence... " >&6; }
1695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1696/* end confdefs.h. */
1697#include <$2>
1698_ACEOF
1699if ac_fn_c_try_cpp "$LINENO"; then :
1700 ac_header_preproc=yes
1701else
1702 ac_header_preproc=no
1703fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001704rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1706$as_echo "$ac_header_preproc" >&6; }
1707
1708# So? What about this header?
1709case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1710 yes:no: )
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1712$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1714$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1715 ;;
1716 no:yes:* )
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1718$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1720$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1722$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1724$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1726$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001727( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001728## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001729## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 ) | sed "s/^/$as_me: WARNING: /" >&2
1731 ;;
1732esac
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1734$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001735if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001736 $as_echo_n "(cached) " >&6
1737else
1738 eval "$3=\$ac_header_compiler"
1739fi
1740eval ac_res=\$$3
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1742$as_echo "$ac_res" >&6; }
1743fi
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001744 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001745
1746} # ac_fn_c_check_header_mongrel
1747
1748# ac_fn_c_try_run LINENO
1749# ----------------------
1750# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1751# that executables *can* be run.
1752ac_fn_c_try_run ()
1753{
1754 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1755 if { { ac_try="$ac_link"
1756case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759esac
1760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761$as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_link") 2>&5
1763 ac_status=$?
1764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1765 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1766 { { case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1771$as_echo "$ac_try_echo"; } >&5
1772 (eval "$ac_try") 2>&5
1773 ac_status=$?
1774 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1775 test $ac_status = 0; }; }; then :
1776 ac_retval=0
1777else
1778 $as_echo "$as_me: program exited with status $ac_status" >&5
1779 $as_echo "$as_me: failed program was:" >&5
1780sed 's/^/| /' conftest.$ac_ext >&5
1781
1782 ac_retval=$ac_status
1783fi
1784 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001786 as_fn_set_status $ac_retval
1787
1788} # ac_fn_c_try_run
1789
1790# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1791# -------------------------------------------------------
1792# Tests whether HEADER exists and can be compiled using the include files in
1793# INCLUDES, setting the cache variable VAR accordingly.
1794ac_fn_c_check_header_compile ()
1795{
1796 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1798$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001799if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001800 $as_echo_n "(cached) " >&6
1801else
1802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804$4
1805#include <$2>
1806_ACEOF
1807if ac_fn_c_try_compile "$LINENO"; then :
1808 eval "$3=yes"
1809else
1810 eval "$3=no"
1811fi
1812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1813fi
1814eval ac_res=\$$3
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1816$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001818
1819} # ac_fn_c_check_header_compile
1820
Matthias Kloseb9621712010-04-24 17:59:49 +00001821# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1822# -------------------------------------------
1823# Tests whether TYPE exists after having included INCLUDES, setting cache
1824# variable VAR accordingly.
1825ac_fn_c_check_type ()
1826{
1827 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1829$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001830if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 $as_echo_n "(cached) " >&6
1832else
1833 eval "$3=no"
1834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1835/* end confdefs.h. */
1836$4
1837int
1838main ()
1839{
1840if (sizeof ($2))
1841 return 0;
1842 ;
1843 return 0;
1844}
1845_ACEOF
1846if ac_fn_c_try_compile "$LINENO"; then :
1847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1848/* end confdefs.h. */
1849$4
1850int
1851main ()
1852{
1853if (sizeof (($2)))
1854 return 0;
1855 ;
1856 return 0;
1857}
1858_ACEOF
1859if ac_fn_c_try_compile "$LINENO"; then :
1860
1861else
1862 eval "$3=yes"
1863fi
1864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1865fi
1866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1867fi
1868eval ac_res=\$$3
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1870$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001872
1873} # ac_fn_c_check_type
1874
1875# ac_fn_c_find_uintX_t LINENO BITS VAR
1876# ------------------------------------
1877# Finds an unsigned integer type with width BITS, setting cache variable VAR
1878# accordingly.
1879ac_fn_c_find_uintX_t ()
1880{
1881 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1883$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001884if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001885 $as_echo_n "(cached) " >&6
1886else
1887 eval "$3=no"
1888 # Order is important - never check a type that is potentially smaller
1889 # than half of the expected target width.
1890 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1891 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894$ac_includes_default
1895int
1896main ()
1897{
1898static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1899test_array [0] = 0
1900
1901 ;
1902 return 0;
1903}
1904_ACEOF
1905if ac_fn_c_try_compile "$LINENO"; then :
1906 case $ac_type in #(
1907 uint$2_t) :
1908 eval "$3=yes" ;; #(
1909 *) :
1910 eval "$3=\$ac_type" ;;
1911esac
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001914 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001915
1916else
1917 break
1918fi
1919 done
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_find_uintX_t
1927
1928# ac_fn_c_find_intX_t LINENO BITS VAR
1929# -----------------------------------
1930# Finds a signed integer type with width BITS, setting cache variable VAR
1931# accordingly.
1932ac_fn_c_find_intX_t ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1936$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 # Order is important - never check a type that is potentially smaller
1942 # than half of the expected target width.
1943 for ac_type in int$2_t 'int' 'long int' \
1944 'long long int' 'short int' 'signed char'; do
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001948 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001949int
1950main ()
1951{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001952static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001953test_array [0] = 0
1954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001963 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001964int
1965main ()
1966{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001967static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001968 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1969test_array [0] = 0
1970
1971 ;
1972 return 0;
1973}
1974_ACEOF
1975if ac_fn_c_try_compile "$LINENO"; then :
1976
1977else
1978 case $ac_type in #(
1979 int$2_t) :
1980 eval "$3=yes" ;; #(
1981 *) :
1982 eval "$3=\$ac_type" ;;
1983esac
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001988 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001989
1990else
1991 break
1992fi
1993 done
1994fi
1995eval ac_res=\$$3
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1997$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02001998 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000} # ac_fn_c_find_intX_t
2001
2002# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2003# --------------------------------------------
2004# Tries to find the compile-time value of EXPR in a program that includes
2005# INCLUDES, setting VAR accordingly. Returns whether the value could be
2006# computed
2007ac_fn_c_compute_int ()
2008{
2009 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010 if test "$cross_compiling" = yes; then
2011 # Depending upon the size, compute the lo and hi bounds.
2012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) >= 0)];
2019test_array [0] = 0
2020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_lo=0 ac_mid=0
2027 while :; do
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031int
2032main ()
2033{
2034static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2035test_array [0] = 0
2036
2037 ;
2038 return 0;
2039}
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"; then :
2042 ac_hi=$ac_mid; break
2043else
2044 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2045 if test $ac_lo -le $ac_mid; then
2046 ac_lo= ac_hi=
2047 break
2048 fi
2049 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2050fi
2051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2052 done
2053else
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) < 0)];
2061test_array [0] = 0
2062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_hi=-1 ac_mid=-1
2069 while :; do
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2077test_array [0] = 0
2078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_lo=$ac_mid; break
2085else
2086 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2087 if test $ac_mid -le $ac_hi; then
2088 ac_lo= ac_hi=
2089 break
2090 fi
2091 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094 done
2095else
2096 ac_lo= ac_hi=
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101# Binary search between lo and hi bounds.
2102while test "x$ac_lo" != "x$ac_hi"; do
2103 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2111test_array [0] = 0
2112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=$ac_mid
2119else
2120 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123done
2124case $ac_lo in #((
2125?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2126'') ac_retval=1 ;;
2127esac
2128 else
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132static long int longval () { return $2; }
2133static unsigned long int ulongval () { return $2; }
2134#include <stdio.h>
2135#include <stdlib.h>
2136int
2137main ()
2138{
2139
2140 FILE *f = fopen ("conftest.val", "w");
2141 if (! f)
2142 return 1;
2143 if (($2) < 0)
2144 {
2145 long int i = longval ();
2146 if (i != ($2))
2147 return 1;
2148 fprintf (f, "%ld", i);
2149 }
2150 else
2151 {
2152 unsigned long int i = ulongval ();
2153 if (i != ($2))
2154 return 1;
2155 fprintf (f, "%lu", i);
2156 }
2157 /* Do not output a trailing newline, as this causes \r\n confusion
2158 on some platforms. */
2159 return ferror (f) || fclose (f) != 0;
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_run "$LINENO"; then :
2166 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2167else
2168 ac_retval=1
2169fi
2170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2171 conftest.$ac_objext conftest.beam conftest.$ac_ext
2172rm -f conftest.val
2173
2174 fi
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002175 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 as_fn_set_status $ac_retval
2177
2178} # ac_fn_c_compute_int
2179
2180# ac_fn_c_check_func LINENO FUNC VAR
2181# ----------------------------------
2182# Tests whether FUNC exists, setting the cache variable VAR accordingly
2183ac_fn_c_check_func ()
2184{
2185 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2187$as_echo_n "checking for $2... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002188if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002189 $as_echo_n "(cached) " >&6
2190else
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192/* end confdefs.h. */
2193/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2194 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2195#define $2 innocuous_$2
2196
2197/* System header to define __stub macros and hopefully few prototypes,
2198 which can conflict with char $2 (); below.
2199 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2200 <limits.h> exists even on freestanding compilers. */
2201
2202#ifdef __STDC__
2203# include <limits.h>
2204#else
2205# include <assert.h>
2206#endif
2207
2208#undef $2
2209
2210/* Override any GCC internal prototype to avoid an error.
2211 Use char because int might match the return type of a GCC
2212 builtin and then its argument prototype would still apply. */
2213#ifdef __cplusplus
2214extern "C"
2215#endif
2216char $2 ();
2217/* The GNU C library defines this for functions which it implements
2218 to always fail with ENOSYS. Some functions are actually named
2219 something starting with __ and the normal name is an alias. */
2220#if defined __stub_$2 || defined __stub___$2
2221choke me
2222#endif
2223
2224int
2225main ()
2226{
2227return $2 ();
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_link "$LINENO"; then :
2233 eval "$3=yes"
2234else
2235 eval "$3=no"
2236fi
2237rm -f core conftest.err conftest.$ac_objext \
2238 conftest$ac_exeext conftest.$ac_ext
2239fi
2240eval ac_res=\$$3
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2242$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002243 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002244
2245} # ac_fn_c_check_func
2246
2247# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2248# ----------------------------------------------------
2249# Tries to find if the field MEMBER exists in type AGGR, after including
2250# INCLUDES, setting cache variable VAR accordingly.
2251ac_fn_c_check_member ()
2252{
2253 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2255$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002256if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002257 $as_echo_n "(cached) " >&6
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$5
2262int
2263main ()
2264{
2265static $2 ac_aggr;
2266if (ac_aggr.$3)
2267return 0;
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"; then :
2273 eval "$4=yes"
2274else
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277$5
2278int
2279main ()
2280{
2281static $2 ac_aggr;
2282if (sizeof ac_aggr.$3)
2283return 0;
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_compile "$LINENO"; then :
2289 eval "$4=yes"
2290else
2291 eval "$4=no"
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296fi
2297eval ac_res=\$$4
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002300 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002301
2302} # ac_fn_c_check_member
2303
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002304# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2305# ---------------------------------------------
2306# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2307# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002308ac_fn_c_check_decl ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002311 as_decl_name=`echo $2|sed 's/ *(.*//'`
2312 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2314$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002315if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002316 $as_echo_n "(cached) " >&6
2317else
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h. */
2320$4
2321int
2322main ()
2323{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002324#ifndef $as_decl_name
2325#ifdef __cplusplus
2326 (void) $as_decl_use;
2327#else
2328 (void) $as_decl_name;
2329#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002330#endif
2331
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336if ac_fn_c_try_compile "$LINENO"; then :
2337 eval "$3=yes"
2338else
2339 eval "$3=no"
2340fi
2341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342fi
2343eval ac_res=\$$3
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2345$as_echo "$ac_res" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002346 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002347
2348} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002350This file contains any messages produced by compilers while
2351running configure, to aid debugging if configure makes a mistake.
2352
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002353It was created by python $as_me 3.3, which was
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002354generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002355
2356 $ $0 $@
2357
2358_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002360{
2361cat <<_ASUNAME
2362## --------- ##
2363## Platform. ##
2364## --------- ##
2365
2366hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2367uname -m = `(uname -m) 2>/dev/null || echo unknown`
2368uname -r = `(uname -r) 2>/dev/null || echo unknown`
2369uname -s = `(uname -s) 2>/dev/null || echo unknown`
2370uname -v = `(uname -v) 2>/dev/null || echo unknown`
2371
2372/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2373/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2374
2375/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2376/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2377/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002379/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2380/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2381/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2382
2383_ASUNAME
2384
2385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2386for as_dir in $PATH
2387do
2388 IFS=$as_save_IFS
2389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002390 $as_echo "PATH: $as_dir"
2391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394} >&5
2395
2396cat >&5 <<_ACEOF
2397
2398
2399## ----------- ##
2400## Core tests. ##
2401## ----------- ##
2402
2403_ACEOF
2404
2405
2406# Keep a trace of the command line.
2407# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002411ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_configure_args0=
2413ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002414ac_must_keep_next=false
2415for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002416do
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 for ac_arg
2418 do
2419 case $ac_arg in
2420 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2421 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2422 | -silent | --silent | --silen | --sile | --sil)
2423 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 esac
2427 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002434 case $ac_arg in
2435 *=* | --config-cache | -C | -disable-* | --disable-* \
2436 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2437 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2438 | -with-* | --with-* | -without-* | --without-* | --x)
2439 case "$ac_configure_args0 " in
2440 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2441 esac
2442 ;;
2443 -* ) ac_must_keep_next=true ;;
2444 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 ;;
2448 esac
2449 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002450done
Matthias Kloseb9621712010-04-24 17:59:49 +00002451{ ac_configure_args0=; unset ac_configure_args0;}
2452{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454# When interrupted or exit'd, cleanup temporary files, and complete
2455# config.log. We remove comments because anyway the quotes in there
2456# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457# WARNING: Use '\'' to represent an apostrophe within the trap.
2458# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002459trap 'exit_status=$?
2460 # Save into config.log some information that might help in debugging.
2461 {
2462 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002463
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002464 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002465## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002466## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 echo
2468 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469(
2470 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2471 eval ac_val=\$$ac_var
2472 case $ac_val in #(
2473 *${as_nl}*)
2474 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2476$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 esac
2478 case $ac_var in #(
2479 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2481 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac ;;
2483 esac
2484 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2487 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 "s/'\''/'\''\\\\'\'''\''/g;
2490 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2491 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002494 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac |
2496 sort
2497)
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002499
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_vars
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513
2514 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002515 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 echo
2519 for ac_var in $ac_subst_files
2520 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 eval ac_val=\$$ac_var
2522 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 done | sort
2527 echo
2528 fi
2529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002532## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
2537 fi
2538 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 $as_echo "$as_me: caught signal $ac_signal"
2540 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 rm -f core *.core core.conftest.* &&
2543 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002546for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002547 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
2549ac_signal=0
2550
2551# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002553
Matthias Kloseb9621712010-04-24 17:59:49 +00002554$as_echo "/* confdefs.h */" > confdefs.h
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556# Predefined preprocessor variables.
2557
2558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_NAME "$PACKAGE_NAME"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_VERSION "$PACKAGE_VERSION"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_STRING "$PACKAGE_STRING"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2576_ACEOF
2577
Matthias Kloseb9621712010-04-24 17:59:49 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_URL "$PACKAGE_URL"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582
2583# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002584# Prefer an explicitly selected file to automatically selected ones.
2585ac_site_file1=NONE
2586ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 # We do not want a PATH search for config.site.
2589 case $CONFIG_SITE in #((
2590 -*) ac_site_file1=./$CONFIG_SITE;;
2591 */*) ac_site_file1=$CONFIG_SITE;;
2592 *) ac_site_file1=./$CONFIG_SITE;;
2593 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 ac_site_file1=$prefix/share/config.site
2596 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597else
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 ac_site_file1=$ac_default_prefix/share/config.site
2599 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002601for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602do
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 test "x$ac_site_file" = xNONE && continue
2604 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2606$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002608 . "$ac_site_file" \
2609 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2611as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002612See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613 fi
2614done
2615
2616if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 # Some versions of bash will fail to source /dev/null (special files
2618 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2619 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2621$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2624 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 esac
2626 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627else
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2629$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 >$cache_file
2631fi
2632
2633# Check that the precious variables saved in the cache have kept the same
2634# value.
2635ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2638 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2640 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 case $ac_old_set,$ac_new_set in
2642 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2644$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 ac_cache_corrupted=: ;;
2646 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2648$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_cache_corrupted=: ;;
2650 ,);;
2651 *)
2652 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 # differences in whitespace do not lead to failure.
2654 ac_old_val_w=`echo x $ac_old_val`
2655 ac_new_val_w=`echo x $ac_new_val`
2656 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2658$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2659 ac_cache_corrupted=:
2660 else
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2662$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2663 eval $ac_var=\$ac_old_val
2664 fi
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2666$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2668$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 fi;;
2670 esac
2671 # Pass precious variables to config.status.
2672 if test "$ac_new_set" = set; then
2673 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 *) ac_arg=$ac_var=$ac_new_val ;;
2676 esac
2677 case " $ac_configure_args " in
2678 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 esac
2681 fi
2682done
2683if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2687$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002688 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002690## -------------------- ##
2691## Main body of script. ##
2692## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693
Guido van Rossum7f43da71994-08-01 12:15:30 +00002694ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2698ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699
Guido van Rossum627b2d71993-12-24 10:39:16 +00002700
Michael W. Hudson54241132001-12-07 15:38:26 +00002701
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002702
2703
2704
2705
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002706if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002707then
2708# Extract the first word of "hg", so it can be a program name with args.
2709set dummy hg; ac_word=$2
2710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2711$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02002712if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713 $as_echo_n "(cached) " >&6
2714else
2715 if test -n "$HAS_HG"; then
2716 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2717else
2718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2719for as_dir in $PATH
2720do
2721 IFS=$as_save_IFS
2722 test -z "$as_dir" && as_dir=.
2723 for ac_exec_ext in '' $ac_executable_extensions; do
2724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2725 ac_cv_prog_HAS_HG="found"
2726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2727 break 2
2728 fi
2729done
2730 done
2731IFS=$as_save_IFS
2732
2733 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2734fi
2735fi
2736HAS_HG=$ac_cv_prog_HAS_HG
2737if test -n "$HAS_HG"; then
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2739$as_echo "$HAS_HG" >&6; }
2740else
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2742$as_echo "no" >&6; }
2743fi
2744
2745
2746else
2747HAS_HG=no-repository
2748fi
2749if test $HAS_HG = found
2750then
2751 HGVERSION="hg id -i \$(srcdir)"
2752 HGTAG="hg id -t \$(srcdir)"
2753 HGBRANCH="hg id -b \$(srcdir)"
2754else
2755 HGVERSION=""
2756 HGTAG=""
2757 HGBRANCH=""
2758fi
2759
2760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002761ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002762
2763
Martin v. Löwis11437992002-04-12 09:54:03 +00002764
Benjamin Petersond23f8222009-04-05 19:13:16 +00002765if test "$prefix" != "/"; then
2766 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2767fi
2768
2769
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
2771
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002772# We don't use PACKAGE_ variables, and they cause conflicts
2773# with other autoconf-based packages that include Python.h
2774grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2775rm confdefs.h
2776mv confdefs.h.new confdefs.h
2777
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002778
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002779VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002780
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002781# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002782
2783SOVERSION=1.0
2784
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002785# The later defininition of _XOPEN_SOURCE disables certain features
2786# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2787
Matthias Kloseb9621712010-04-24 17:59:49 +00002788$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002789
2790
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002791# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2792# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2793# them.
2794
Matthias Kloseb9621712010-04-24 17:59:49 +00002795$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002796
2797
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002798# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2799# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2800# them.
2801
Matthias Kloseb9621712010-04-24 17:59:49 +00002802$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002803
2804
Martin v. Löwisd6320502004-08-12 13:45:08 +00002805# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2806# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2807
Matthias Kloseb9621712010-04-24 17:59:49 +00002808$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002809
2810
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002811# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2812# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2813# them.
2814
Matthias Kloseb9621712010-04-24 17:59:49 +00002815$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002816
2817
2818
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002819define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002820
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002821# Arguments passed to configure.
2822
2823CONFIG_ARGS="$ac_configure_args"
2824
Matthias Kloseb9621712010-04-24 17:59:49 +00002825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2826$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002828if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002829 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002830 case $enableval in
2831 yes)
2832 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002833 if test ! -d "${enableval}"
2834 then
2835 enableval=/
2836 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002837 ;;
2838 esac
2839 case $enableval in
2840 no)
2841 UNIVERSALSDK=
2842 enable_universalsdk=
2843 ;;
2844 *)
2845 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002846 if test ! -d "${UNIVERSALSDK}"
2847 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002848 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002849 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002850 ;;
2851 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002852
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002853
Thomas Wouters477c8d52006-05-27 19:21:47 +00002854else
2855
2856 UNIVERSALSDK=
2857 enable_universalsdk=
2858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002859fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002860
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002861if test -n "${UNIVERSALSDK}"
2862then
Matthias Kloseb9621712010-04-24 17:59:49 +00002863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2864$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002865else
Matthias Kloseb9621712010-04-24 17:59:49 +00002866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2867$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002868fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002870
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002871
2872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002873UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002874
Matthias Kloseb9621712010-04-24 17:59:49 +00002875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2876$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002877
2878# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002879if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002880 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2882$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002883 UNIVERSAL_ARCHS="$withval"
2884
2885else
2886
Matthias Kloseb9621712010-04-24 17:59:49 +00002887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2888$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002889
2890fi
2891
2892
2893
2894
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002895
2896# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002897if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002898 withval=$with_framework_name;
2899 PYTHONFRAMEWORK=${withval}
2900 PYTHONFRAMEWORKDIR=${withval}.framework
2901 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2902
2903else
2904
2905 PYTHONFRAMEWORK=Python
2906 PYTHONFRAMEWORKDIR=Python.framework
2907 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2908
2909fi
2910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002911# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002912if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002913 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002914 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002916 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002917 esac
2918 case $enableval in
2919 no)
2920 PYTHONFRAMEWORK=
2921 PYTHONFRAMEWORKDIR=no-framework
2922 PYTHONFRAMEWORKPREFIX=
2923 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924 FRAMEWORKINSTALLFIRST=
2925 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002926 FRAMEWORKALTINSTALLFIRST=
2927 FRAMEWORKALTINSTALLLAST=
2928 if test "x${prefix}" = "xNONE"; then
2929 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2930 else
2931 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2932 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002933 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002934 ;;
2935 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002936 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002937 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002938 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002939 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002940 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2941 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002942 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002943
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002944 if test "x${prefix}" = "xNONE" ; then
2945 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002946
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002947 else
2948 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2949 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002950
2951 case "${enableval}" in
2952 /System*)
2953 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2954 if test "${prefix}" = "NONE" ; then
2955 # See below
2956 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2957 fi
2958 ;;
2959
2960 /Library*)
2961 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2962 ;;
2963
2964 */Library/Frameworks)
2965 MDIR="`dirname "${enableval}"`"
2966 MDIR="`dirname "${MDIR}"`"
2967 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2968
2969 if test "${prefix}" = "NONE"; then
2970 # User hasn't specified the
2971 # --prefix option, but wants to install
2972 # the framework in a non-default location,
2973 # ensure that the compatibility links get
2974 # installed relative to that prefix as well
2975 # instead of in /usr/local.
2976 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2977 fi
2978 ;;
2979
2980 *)
2981 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2982 ;;
2983 esac
2984
Jack Jansen127e56e2001-09-11 14:41:54 +00002985 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002986
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002987 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002988 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002992
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002993 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2994
2995 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2996
Jack Jansene578a632001-08-15 01:27:14 +00002997 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
Guido van Rossum563e7081996-09-10 18:20:48 +00002999else
Martin v. Löwis11437992002-04-12 09:54:03 +00003000
Jack Jansene578a632001-08-15 01:27:14 +00003001 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003002 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003003 PYTHONFRAMEWORKPREFIX=
3004 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003005 FRAMEWORKINSTALLFIRST=
3006 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003007 FRAMEWORKALTINSTALLFIRST=
3008 FRAMEWORKALTINSTALLLAST=
3009 if test "x${prefix}" = "xNONE" ; then
3010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3011 else
3012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3013 fi
Jack Jansene578a632001-08-15 01:27:14 +00003014 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003015
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003017fi
3018
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019
3020
Michael W. Hudson54241132001-12-07 15:38:26 +00003021
3022
3023
3024
Jack Jansene578a632001-08-15 01:27:14 +00003025
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003026
3027
3028
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003029
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003030
Jack Jansene578a632001-08-15 01:27:14 +00003031##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003032## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003033## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003034##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003035# Set name for machine-dependent library files
3036
Matthias Kloseb9621712010-04-24 17:59:49 +00003037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3038$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003039if test -z "$MACHDEP"
3040then
Guido van Rossum563e7081996-09-10 18:20:48 +00003041 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003042 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003043 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003044 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003045 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003046 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003047 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003048 ac_md_system=`echo $ac_sys_system |
3049 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3050 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003051 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003052 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003053
Guido van Rossum07397971997-04-29 21:49:50 +00003054 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003055 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003056 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003057 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003058 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003059 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003060 esac
3061fi
Guido van Rossum91922671997-10-09 20:24:13 +00003062
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003063# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3064# disable features if it is defined, without any means to access these
3065# features as extensions. For these systems, we skip the definition of
3066# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3067# some feature, make sure there is no alternative way to access this
3068# feature. Also, when using wildcards, make sure you have verified the
3069# need for not defining _XOPEN_SOURCE on all systems matching the
3070# wildcard, and that the wildcard does not include future systems
3071# (which may remove their limitations).
3072case $ac_sys_system/$ac_sys_release in
3073 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3074 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003075 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003076 # In addition, Stefan Krah confirms that issue #1244610 exists through
3077 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003078 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003079 define_xopen_source=no
3080 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3081 # also defined. This can be overridden by defining _BSD_SOURCE
3082 # As this has a different meaning on Linux, only define it on OpenBSD
3083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003085
3086 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003087 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003088 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3089 # also defined. This can be overridden by defining _BSD_SOURCE
3090 # As this has a different meaning on Linux, only define it on OpenBSD
3091
Matthias Kloseb9621712010-04-24 17:59:49 +00003092$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003093
3094 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003095 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3096 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3097 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003098 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003099 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003100 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3101 # request to enable features supported by the standard as a request
3102 # to disable features not supported by the standard. The best way
3103 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3104 # entirely and define __EXTENSIONS__ instead.
3105 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003106 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003107 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3108 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003109 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003110 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003111 define_xopen_source=no;;
3112 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003113 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003114 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003115 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003116 # On FreeBSD 4, the math functions C89 does not cover are never defined
3117 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3118 FreeBSD/4.*)
3119 define_xopen_source=no;;
3120 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3121 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3122 # identifies itself as Darwin/7.*
3123 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3124 # disables platform specific features beyond repair.
3125 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3126 # has no effect, don't bother defining them
3127 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003128 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003129 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003130 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003131 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3132 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3133 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003134 AIX/4)
3135 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003136 AIX/5)
3137 if test `uname -r` -eq 1; then
3138 define_xopen_source=no
3139 fi
3140 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003141 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3142 # defining NI_NUMERICHOST.
3143 QNX/6.3.2)
3144 define_xopen_source=no
3145 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003146
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003147esac
3148
3149if test $define_xopen_source = yes
3150then
Victor Stinner14d098d2011-09-07 22:29:43 +02003151 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003152
Victor Stinner14d098d2011-09-07 22:29:43 +02003153$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003154
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003155
3156 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3157 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3158 # several APIs are not declared. Since this is also needed in some
3159 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003160
Matthias Kloseb9621712010-04-24 17:59:49 +00003161$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003162
3163
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003164
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003165$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003166
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003167fi
3168
Guido van Rossum91922671997-10-09 20:24:13 +00003169#
3170# SGI compilers allow the specification of the both the ABI and the
3171# ISA on the command line. Depending on the values of these switches,
3172# different and often incompatable code will be generated.
3173#
3174# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3175# thus supply support for various ABI/ISA combinations. The MACHDEP
3176# variable is also adjusted.
3177#
3178
3179if test ! -z "$SGI_ABI"
3180then
3181 CC="cc $SGI_ABI"
3182 LDFLAGS="$SGI_ABI $LDFLAGS"
3183 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3186$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003187
Jack Jansen6b08a402004-06-03 12:41:45 +00003188# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3189# it may influence the way we can build extensions, so distutils
3190# needs to check it
3191
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Jack Jansen6b08a402004-06-03 12:41:45 +00003193CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003195
Matthias Kloseb9621712010-04-24 17:59:49 +00003196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3197$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003198ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3200$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003201
Guido van Rossum627b2d71993-12-24 10:39:16 +00003202# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003203
3204# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3205# for debug/optimization stuff. BASECFLAGS is for flags that are required
3206# just to get things to compile and link. Users are free to override OPT
3207# when running configure or make. The build should not break if they do.
3208# BASECFLAGS should generally not be messed with, however.
3209
3210# XXX shouldn't some/most/all of this code be merged with the stuff later
3211# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3213$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003216if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003218 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003219 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003220 without_gcc=yes;;
3221 yes) CC=gcc
3222 without_gcc=no;;
3223 *) CC=$withval
3224 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003225 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003226else
Martin v. Löwis11437992002-04-12 09:54:03 +00003227
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003229 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003230 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003231 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003232 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233fi
3234
Matthias Kloseb9621712010-04-24 17:59:49 +00003235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3236$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003237
Guido van Rossum8b131c51995-03-09 14:10:13 +00003238# If the user switches compilers, we can't believe the cache
3239if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3240then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003241 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003242(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003243fi
3244
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003245# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3246# when the compiler supports them, but we don't always want -O2, and
3247# we set -g later.
3248if test -z "$CFLAGS"; then
3249 CFLAGS=
3250fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003251ac_ext=c
3252ac_cpp='$CPP $CPPFLAGS'
3253ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3254ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3255ac_compiler_gnu=$ac_cv_c_compiler_gnu
3256if test -n "$ac_tool_prefix"; then
3257 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3258set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3260$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003261if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003262 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003263else
3264 if test -n "$CC"; then
3265 ac_cv_prog_CC="$CC" # Let the user override the test.
3266else
Martin v. Löwis11437992002-04-12 09:54:03 +00003267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268for as_dir in $PATH
3269do
3270 IFS=$as_save_IFS
3271 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003272 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003274 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003275 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003276 break 2
3277 fi
3278done
Matthias Kloseb9621712010-04-24 17:59:49 +00003279 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003281
Jack Jansendd19cf82001-12-06 22:36:17 +00003282fi
3283fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003284CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003285if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3287$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003288else
Matthias Kloseb9621712010-04-24 17:59:49 +00003289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3290$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003291fi
3292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003293
Martin v. Löwis11437992002-04-12 09:54:03 +00003294fi
3295if test -z "$ac_cv_prog_CC"; then
3296 ac_ct_CC=$CC
3297 # Extract the first word of "gcc", so it can be a program name with args.
3298set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3300$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003301if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003303else
3304 if test -n "$ac_ct_CC"; then
3305 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3306else
3307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3308for as_dir in $PATH
3309do
3310 IFS=$as_save_IFS
3311 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003312 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003313 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003314 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003315 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003316 break 2
3317 fi
3318done
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003320IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003321
3322fi
3323fi
3324ac_ct_CC=$ac_cv_prog_ac_ct_CC
3325if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3327$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003328else
Matthias Kloseb9621712010-04-24 17:59:49 +00003329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3330$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003331fi
3332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003333 if test "x$ac_ct_CC" = x; then
3334 CC=""
3335 else
3336 case $cross_compiling:$ac_tool_warned in
3337yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003338{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3339$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003340ac_tool_warned=yes ;;
3341esac
3342 CC=$ac_ct_CC
3343 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003344else
3345 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003346fi
3347
Jack Jansendd19cf82001-12-06 22:36:17 +00003348if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003349 if test -n "$ac_tool_prefix"; then
3350 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003351set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3353$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003354if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003355 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003356else
3357 if test -n "$CC"; then
3358 ac_cv_prog_CC="$CC" # Let the user override the test.
3359else
Martin v. Löwis11437992002-04-12 09:54:03 +00003360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3361for as_dir in $PATH
3362do
3363 IFS=$as_save_IFS
3364 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003365 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003366 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003367 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003368 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003369 break 2
3370 fi
3371done
Matthias Kloseb9621712010-04-24 17:59:49 +00003372 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003373IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003374
3375fi
3376fi
3377CC=$ac_cv_prog_CC
3378if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3380$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003381else
Matthias Kloseb9621712010-04-24 17:59:49 +00003382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3383$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003384fi
3385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003386
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003388fi
3389if test -z "$CC"; then
3390 # Extract the first word of "cc", so it can be a program name with args.
3391set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3393$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003394if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003396else
3397 if test -n "$CC"; then
3398 ac_cv_prog_CC="$CC" # Let the user override the test.
3399else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003400 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3402for as_dir in $PATH
3403do
3404 IFS=$as_save_IFS
3405 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003406 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003407 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003408 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3409 ac_prog_rejected=yes
3410 continue
3411 fi
3412 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003413 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003414 break 2
3415 fi
3416done
Matthias Kloseb9621712010-04-24 17:59:49 +00003417 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003418IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003419
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003420if test $ac_prog_rejected = yes; then
3421 # We found a bogon in the path, so make sure we never use it.
3422 set dummy $ac_cv_prog_CC
3423 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003425 # We chose a different compiler from the bogus one.
3426 # However, it has the same basename, so the bogon will be chosen
3427 # first if we set CC to just the basename; use the full file name.
3428 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003429 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003430 fi
3431fi
3432fi
3433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003434CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003435if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3437$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003438else
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3440$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003441fi
3442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003443
Martin v. Löwis11437992002-04-12 09:54:03 +00003444fi
3445if test -z "$CC"; then
3446 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 do
3449 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3450set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3452$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003453if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003454 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003455else
3456 if test -n "$CC"; then
3457 ac_cv_prog_CC="$CC" # Let the user override the test.
3458else
Martin v. Löwis11437992002-04-12 09:54:03 +00003459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3460for as_dir in $PATH
3461do
3462 IFS=$as_save_IFS
3463 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003464 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003470done
Matthias Kloseb9621712010-04-24 17:59:49 +00003471 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003472IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003473
3474fi
3475fi
3476CC=$ac_cv_prog_CC
3477if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3479$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003480else
Matthias Kloseb9621712010-04-24 17:59:49 +00003481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3482$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003483fi
3484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485
Martin v. Löwis11437992002-04-12 09:54:03 +00003486 test -n "$CC" && break
3487 done
3488fi
3489if test -z "$CC"; then
3490 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003492do
3493 # Extract the first word of "$ac_prog", so it can be a program name with args.
3494set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3496$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003497if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003498 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003499else
3500 if test -n "$ac_ct_CC"; then
3501 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3502else
3503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3504for as_dir in $PATH
3505do
3506 IFS=$as_save_IFS
3507 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003508 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003511 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 break 2
3513 fi
3514done
Matthias Kloseb9621712010-04-24 17:59:49 +00003515 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003516IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003517
Martin v. Löwis11437992002-04-12 09:54:03 +00003518fi
3519fi
3520ac_ct_CC=$ac_cv_prog_ac_ct_CC
3521if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3523$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003524else
Matthias Kloseb9621712010-04-24 17:59:49 +00003525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3526$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003527fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 test -n "$ac_ct_CC" && break
3531done
Michael W. Hudson54241132001-12-07 15:38:26 +00003532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533 if test "x$ac_ct_CC" = x; then
3534 CC=""
3535 else
3536 case $cross_compiling:$ac_tool_warned in
3537yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003538{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3539$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003540ac_tool_warned=yes ;;
3541esac
3542 CC=$ac_ct_CC
3543 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003544fi
3545
3546fi
3547
3548
Matthias Kloseb9621712010-04-24 17:59:49 +00003549test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003551as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003552See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003553
3554# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003555$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3556set X $ac_compile
3557ac_compiler=$2
3558for ac_option in --version -v -V -qversion; do
3559 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560case "(($ac_try" in
3561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3562 *) ac_try_echo=$ac_try;;
3563esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003564eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3565$as_echo "$ac_try_echo"; } >&5
3566 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 if test -s conftest.err; then
3569 sed '10a\
3570... rest of stderr output deleted ...
3571 10q' conftest.err >conftest.er1
3572 cat conftest.er1 >&5
3573 fi
3574 rm -f conftest.er1 conftest.err
3575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3576 test $ac_status = 0; }
3577done
Martin v. Löwis11437992002-04-12 09:54:03 +00003578
Matthias Kloseb9621712010-04-24 17:59:49 +00003579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003580/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582int
3583main ()
3584{
3585
3586 ;
3587 return 0;
3588}
3589_ACEOF
3590ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003591ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003592# Try to create an executable without -o first, disregard a.out.
3593# It will help us diagnose broken compilers, and finding out an intuition
3594# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3596$as_echo_n "checking whether the C compiler works... " >&6; }
3597ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3598
3599# The possible output files:
3600ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602ac_rmfiles=
3603for ac_file in $ac_files
3604do
3605 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3608 esac
3609done
3610rm -f $ac_rmfiles
3611
Matthias Kloseb9621712010-04-24 17:59:49 +00003612if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613case "(($ac_try" in
3614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3615 *) ac_try_echo=$ac_try;;
3616esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003617eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3618$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3622 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3624# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3625# in a Makefile. We should not override ac_cv_exeext if it was cached,
3626# so that the user can short-circuit this test for compilers unknown to
3627# Autoconf.
3628for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003629do
3630 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003633 ;;
3634 [ab].out )
3635 # We found the default executable, but exeext='' is most
3636 # certainly right.
3637 break;;
3638 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003640 then :; else
3641 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3642 fi
3643 # We set ac_cv_exeext here because the later test for it is not
3644 # safe: cross compilers may not add the suffix if given an `-o'
3645 # argument, so we may need to know it at that point already.
3646 # Even if this section looks crufty: it has the advantage of
3647 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003648 break;;
3649 * )
3650 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003651 esac
3652done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653test "$ac_cv_exeext" = no && ac_cv_exeext=
3654
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003655else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656 ac_file=''
3657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003658if test -z "$ac_file"; then :
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
3661$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003662sed 's/^/| /' conftest.$ac_ext >&5
3663
Matthias Kloseb9621712010-04-24 17:59:49 +00003664{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003666as_fn_error 77 "C compiler cannot create executables
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003667See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003668else
3669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3670$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3673$as_echo_n "checking for C compiler default output file name... " >&6; }
3674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3675$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003676ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003677
Matthias Kloseb9621712010-04-24 17:59:49 +00003678rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003679ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3681$as_echo_n "checking for suffix of executables... " >&6; }
3682if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683case "(($ac_try" in
3684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3685 *) ac_try_echo=$ac_try;;
3686esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3688$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3692 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003693 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3694# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3695# work properly (i.e., refer to `conftest.exe'), while it won't with
3696# `rm'.
3697for ac_file in conftest.exe conftest conftest.*; do
3698 test -f "$ac_file" || continue
3699 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003701 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3702 break;;
3703 * ) break;;
3704 esac
3705done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003706else
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003709as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003710See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003712rm -f conftest conftest$ac_cv_exeext
3713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3714$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003715
3716rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003717EXEEXT=$ac_cv_exeext
3718ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3720/* end confdefs.h. */
3721#include <stdio.h>
3722int
3723main ()
3724{
3725FILE *f = fopen ("conftest.out", "w");
3726 return ferror (f) || fclose (f) != 0;
3727
3728 ;
3729 return 0;
3730}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003732ac_clean_files="$ac_clean_files conftest.out"
3733# Check that the compiler produces executables we can run. If not, either
3734# the compiler is broken, or we cross compile.
3735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3736$as_echo_n "checking whether we are cross compiling... " >&6; }
3737if test "$cross_compiling" != yes; then
3738 { { ac_try="$ac_link"
3739case "(($ac_try" in
3740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3741 *) ac_try_echo=$ac_try;;
3742esac
3743eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3744$as_echo "$ac_try_echo"; } >&5
3745 (eval "$ac_link") 2>&5
3746 ac_status=$?
3747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3748 test $ac_status = 0; }
3749 if { ac_try='./conftest$ac_cv_exeext'
3750 { { case "(($ac_try" in
3751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3752 *) ac_try_echo=$ac_try;;
3753esac
3754eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3755$as_echo "$ac_try_echo"; } >&5
3756 (eval "$ac_try") 2>&5
3757 ac_status=$?
3758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3759 test $ac_status = 0; }; }; then
3760 cross_compiling=no
3761 else
3762 if test "$cross_compiling" = maybe; then
3763 cross_compiling=yes
3764 else
3765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003767as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003768If you meant to cross compile, use \`--host'.
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003769See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 fi
3771 fi
3772fi
3773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3774$as_echo "$cross_compiling" >&6; }
3775
3776rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3777ac_clean_files=$ac_clean_files_save
3778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3779$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003780if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $as_echo_n "(cached) " >&6
3782else
3783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003784/* end confdefs.h. */
3785
3786int
3787main ()
3788{
3789
3790 ;
3791 return 0;
3792}
3793_ACEOF
3794rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003795if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796case "(($ac_try" in
3797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3798 *) ac_try_echo=$ac_try;;
3799esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003800eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3801$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003803 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3805 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806 for ac_file in conftest.o conftest.obj conftest.*; do
3807 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3811 break;;
3812 esac
3813done
3814else
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003816sed 's/^/| /' conftest.$ac_ext >&5
3817
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003820as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003821See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003822fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003823rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3826$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003827OBJEXT=$ac_cv_objext
3828ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3830$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003831if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003833else
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003835/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003836
Martin v. Löwis11437992002-04-12 09:54:03 +00003837int
3838main ()
3839{
3840#ifndef __GNUC__
3841 choke me
3842#endif
3843
3844 ;
3845 return 0;
3846}
3847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003848if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 ac_compiler_gnu=yes
3850else
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003854ac_cv_c_compiler_gnu=$ac_compiler_gnu
3855
3856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3858$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3859if test $ac_compiler_gnu = yes; then
3860 GCC=yes
3861else
3862 GCC=
3863fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003864ac_test_CFLAGS=${CFLAGS+set}
3865ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3867$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003868if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003869 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003870else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871 ac_save_c_werror_flag=$ac_c_werror_flag
3872 ac_c_werror_flag=yes
3873 ac_cv_prog_cc_g=no
3874 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003877
Martin v. Löwis11437992002-04-12 09:54:03 +00003878int
3879main ()
3880{
3881
3882 ;
3883 return 0;
3884}
3885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003886if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003887 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003888else
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 CFLAGS=""
3890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891/* end confdefs.h. */
3892
3893int
3894main ()
3895{
3896
3897 ;
3898 return 0;
3899}
3900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003901if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902
Matthias Kloseb9621712010-04-24 17:59:49 +00003903else
3904 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907/* end confdefs.h. */
3908
3909int
3910main ()
3911{
3912
3913 ;
3914 return 0;
3915}
3916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003917if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3925 ac_c_werror_flag=$ac_save_c_werror_flag
3926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3928$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003929if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003930 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003931elif test $ac_cv_prog_cc_g = yes; then
3932 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003933 CFLAGS="-g -O2"
3934 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003935 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003936 fi
3937else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003938 if test "$GCC" = yes; then
3939 CFLAGS="-O2"
3940 else
3941 CFLAGS=
3942 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3945$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003946if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003948else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003950ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003952/* end confdefs.h. */
3953#include <stdarg.h>
3954#include <stdio.h>
3955#include <sys/types.h>
3956#include <sys/stat.h>
3957/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3958struct buf { int x; };
3959FILE * (*rcsopen) (struct buf *, struct stat *, int);
3960static char *e (p, i)
3961 char **p;
3962 int i;
3963{
3964 return p[i];
3965}
3966static char *f (char * (*g) (char **, int), char **p, ...)
3967{
3968 char *s;
3969 va_list v;
3970 va_start (v,p);
3971 s = g (p, va_arg (v,int));
3972 va_end (v);
3973 return s;
3974}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003975
3976/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3977 function prototypes and stuff, but not '\xHH' hex character constants.
3978 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003980 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3981 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003983int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3986 inside strings and character constants. */
3987#define FOO(x) 'x'
3988int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3989
Skip Montanaro6dead952003-09-25 14:50:04 +00003990int test (int i, double x);
3991struct s1 {int (*f) (int a);};
3992struct s2 {int (*f) (double a);};
3993int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3994int argc;
3995char **argv;
3996int
3997main ()
3998{
3999return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4000 ;
4001 return 0;
4002}
4003_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004004for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4005 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004006do
4007 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004008 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004011rm -f core conftest.err conftest.$ac_objext
4012 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004013done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004015CC=$ac_save_CC
4016
4017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018# AC_CACHE_VAL
4019case "x$ac_cv_prog_cc_c89" in
4020 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4022$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004023 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4025$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004026 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4029$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004030esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004031if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004032
Matthias Kloseb9621712010-04-24 17:59:49 +00004033fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004034
Martin v. Löwis11437992002-04-12 09:54:03 +00004035ac_ext=c
4036ac_cpp='$CPP $CPPFLAGS'
4037ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4038ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4039ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004040
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004041
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004042
4043
Matthias Kloseb9621712010-04-24 17:59:49 +00004044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4045$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004047# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004048if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004049 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004050
4051 case $withval in
4052 no) with_cxx_main=no
4053 MAINCC='$(CC)';;
4054 yes) with_cxx_main=yes
4055 MAINCC='$(CXX)';;
4056 *) with_cxx_main=yes
4057 MAINCC=$withval
4058 if test -z "$CXX"
4059 then
4060 CXX=$withval
4061 fi;;
4062 esac
4063else
4064
4065 with_cxx_main=no
4066 MAINCC='$(CC)'
4067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004068fi
4069
Matthias Kloseb9621712010-04-24 17:59:49 +00004070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4071$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004072
4073preset_cxx="$CXX"
4074if test -z "$CXX"
4075then
4076 case "$CC" in
4077 gcc) # Extract the first word of "g++", so it can be a program name with args.
4078set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4080$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004081if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004083else
4084 case $CXX in
4085 [\\/]* | ?:[\\/]*)
4086 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4087 ;;
4088 *)
4089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4090for as_dir in notfound
4091do
4092 IFS=$as_save_IFS
4093 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004094 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004095 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004096 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004098 break 2
4099 fi
4100done
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004102IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004103
4104 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4105 ;;
4106esac
4107fi
4108CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004109if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4111$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004112else
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4114$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004117 ;;
4118 cc) # Extract the first word of "c++", so it can be a program name with args.
4119set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4121$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004122if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124else
4125 case $CXX in
4126 [\\/]* | ?:[\\/]*)
4127 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4128 ;;
4129 *)
4130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4131for as_dir in notfound
4132do
4133 IFS=$as_save_IFS
4134 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004139 break 2
4140 fi
4141done
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004143IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004144
4145 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4146 ;;
4147esac
4148fi
4149CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004150if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4152$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4155$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004157
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004158 ;;
4159 esac
4160 if test "$CXX" = "notfound"
4161 then
4162 CXX=""
4163 fi
4164fi
4165if test -z "$CXX"
4166then
4167 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4168do
4169 # Extract the first word of "$ac_prog", so it can be a program name with args.
4170set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4172$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004173if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004175else
4176 if test -n "$CXX"; then
4177 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4178else
4179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4180for as_dir in $PATH
4181do
4182 IFS=$as_save_IFS
4183 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004186 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004188 break 2
4189 fi
4190done
Matthias Kloseb9621712010-04-24 17:59:49 +00004191 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004193
4194fi
4195fi
4196CXX=$ac_cv_prog_CXX
4197if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4199$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004200else
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4202$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004203fi
4204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004206 test -n "$CXX" && break
4207done
4208test -n "$CXX" || CXX="notfound"
4209
4210 if test "$CXX" = "notfound"
4211 then
4212 CXX=""
4213 fi
4214fi
4215if test "$preset_cxx" != "$CXX"
4216then
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004218
4219 By default, distutils will build C++ extension modules with \"$CXX\".
4220 If this is not intended, then set CXX on the configure command line.
4221 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004222$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004223
4224 By default, distutils will build C++ extension modules with \"$CXX\".
4225 If this is not intended, then set CXX on the configure command line.
4226 " >&2;}
4227fi
4228
4229
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4231$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4232save_LDFLAGS="$LDFLAGS"
4233LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004234
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4236/* end confdefs.h. */
4237
4238int
4239main ()
4240{
4241
4242 ;
4243 return 0;
4244}
4245_ACEOF
4246if ac_fn_c_try_link "$LINENO"; then :
4247 NO_AS_NEEDED="-Wl,--no-as-needed"
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4249$as_echo "yes" >&6; }
4250else
4251 NO_AS_NEEDED=""
4252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4253$as_echo "no" >&6; }
4254fi
4255rm -f core conftest.err conftest.$ac_objext \
4256 conftest$ac_exeext conftest.$ac_ext
4257LDFLAGS="$save_LDFLAGS"
4258
4259
4260
4261# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004262ac_ext=c
4263ac_cpp='$CPP $CPPFLAGS'
4264ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4265ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4266ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4268$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004269# On Suns, sometimes $CPP names a directory.
4270if test -n "$CPP" && test -d "$CPP"; then
4271 CPP=
4272fi
4273if test -z "$CPP"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004274 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004275 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004276else
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 # Double quotes because CPP needs to be expanded
4278 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4279 do
4280 ac_preproc_ok=false
4281for ac_c_preproc_warn_flag in '' yes
4282do
4283 # Use a header file that comes with gcc, so configuring glibc
4284 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004285 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4286 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004287 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004288 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004290/* end confdefs.h. */
4291#ifdef __STDC__
4292# include <limits.h>
4293#else
4294# include <assert.h>
4295#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004296 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004298if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004299
Matthias Kloseb9621712010-04-24 17:59:49 +00004300else
Martin v. Löwis11437992002-04-12 09:54:03 +00004301 # Broken: fails on valid input.
4302continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004303fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004304rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004307 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004310#include <ac_nonexistent.h>
4311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004312if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004313 # Broken: success on invalid input.
4314continue
4315else
Martin v. Löwis11437992002-04-12 09:54:03 +00004316 # Passes both tests.
4317ac_preproc_ok=:
4318break
4319fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004320rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004321
4322done
4323# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004324rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004325if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004326 break
4327fi
4328
4329 done
4330 ac_cv_prog_CPP=$CPP
4331
4332fi
4333 CPP=$ac_cv_prog_CPP
4334else
4335 ac_cv_prog_CPP=$CPP
4336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4338$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004339ac_preproc_ok=false
4340for ac_c_preproc_warn_flag in '' yes
4341do
4342 # Use a header file that comes with gcc, so configuring glibc
4343 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004344 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4345 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004346 # On the NeXT, cc -E runs the code through the compiler's parser,
4347 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004349/* end confdefs.h. */
4350#ifdef __STDC__
4351# include <limits.h>
4352#else
4353# include <assert.h>
4354#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004355 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004357if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004358
Matthias Kloseb9621712010-04-24 17:59:49 +00004359else
Martin v. Löwis11437992002-04-12 09:54:03 +00004360 # Broken: fails on valid input.
4361continue
4362fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004363rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004366 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004369#include <ac_nonexistent.h>
4370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004371if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004372 # Broken: success on invalid input.
4373continue
4374else
Martin v. Löwis11437992002-04-12 09:54:03 +00004375 # Passes both tests.
4376ac_preproc_ok=:
4377break
4378fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004379rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004380
4381done
4382# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004383rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004384if $ac_preproc_ok; then :
4385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386else
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4388$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004389as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004390See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004391fi
4392
4393ac_ext=c
4394ac_cpp='$CPP $CPPFLAGS'
4395ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4397ac_compiler_gnu=$ac_cv_c_compiler_gnu
4398
4399
Matthias Kloseb9621712010-04-24 17:59:49 +00004400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4401$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004402if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004404else
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 # Loop through the user's path and test for each of PROGNAME-LIST
4408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4410do
4411 IFS=$as_save_IFS
4412 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004413 for ac_prog in grep ggrep; do
4414 for ac_exec_ext in '' $ac_executable_extensions; do
4415 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4416 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4417# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 # Check for GNU $ac_path_GREP
4419case `"$ac_path_GREP" --version 2>&1` in
4420*GNU*)
4421 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4422*)
4423 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425 while :
4426 do
4427 cat "conftest.in" "conftest.in" >"conftest.tmp"
4428 mv "conftest.tmp" "conftest.in"
4429 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004430 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4432 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004433 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4435 # Best one so far, save it but keep looking for a better one
4436 ac_cv_path_GREP="$ac_path_GREP"
4437 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004438 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439 # 10*(2^10) chars as input seems more than enough
4440 test $ac_count -gt 10 && break
4441 done
4442 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4443esac
4444
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 $ac_path_GREP_found && break 3
4446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004448 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004449IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004450 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004451 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004452 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004453else
4454 ac_cv_path_GREP=$GREP
4455fi
4456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4459$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004460 GREP="$ac_cv_path_GREP"
4461
4462
Matthias Kloseb9621712010-04-24 17:59:49 +00004463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4464$as_echo_n "checking for egrep... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004465if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004466 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004467else
4468 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4469 then ac_cv_path_EGREP="$GREP -E"
4470 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004471 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004472 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004473 # Loop through the user's path and test for each of PROGNAME-LIST
4474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004475for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4476do
4477 IFS=$as_save_IFS
4478 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004479 for ac_prog in egrep; do
4480 for ac_exec_ext in '' $ac_executable_extensions; do
4481 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4482 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4483# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004484 # Check for GNU $ac_path_EGREP
4485case `"$ac_path_EGREP" --version 2>&1` in
4486*GNU*)
4487 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4488*)
4489 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004490 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491 while :
4492 do
4493 cat "conftest.in" "conftest.in" >"conftest.tmp"
4494 mv "conftest.tmp" "conftest.in"
4495 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004496 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004497 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4498 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004499 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004500 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4501 # Best one so far, save it but keep looking for a better one
4502 ac_cv_path_EGREP="$ac_path_EGREP"
4503 ac_path_EGREP_max=$ac_count
4504 fi
4505 # 10*(2^10) chars as input seems more than enough
4506 test $ac_count -gt 10 && break
4507 done
4508 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4509esac
4510
Matthias Kloseb9621712010-04-24 17:59:49 +00004511 $ac_path_EGREP_found && break 3
4512 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004513 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004514 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004515IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004517 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004518 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004519else
4520 ac_cv_path_EGREP=$EGREP
4521fi
4522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004523 fi
4524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4526$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004527 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004528
4529
Matthias Kloseb9621712010-04-24 17:59:49 +00004530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4531$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004532if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004533 $as_echo_n "(cached) " >&6
4534else
4535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004536/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004537#include <stdlib.h>
4538#include <stdarg.h>
4539#include <string.h>
4540#include <float.h>
4541
4542int
4543main ()
4544{
4545
4546 ;
4547 return 0;
4548}
4549_ACEOF
4550if ac_fn_c_try_compile "$LINENO"; then :
4551 ac_cv_header_stdc=yes
4552else
4553 ac_cv_header_stdc=no
4554fi
4555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4556
4557if test $ac_cv_header_stdc = yes; then
4558 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4560/* end confdefs.h. */
4561#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004562
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004563_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004565 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004566
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004567else
Matthias Kloseb9621712010-04-24 17:59:49 +00004568 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004569fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004570rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004571
Matthias Kloseb9621712010-04-24 17:59:49 +00004572fi
4573
4574if test $ac_cv_header_stdc = yes; then
4575 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4577/* end confdefs.h. */
4578#include <stdlib.h>
4579
4580_ACEOF
4581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4582 $EGREP "free" >/dev/null 2>&1; then :
4583
4584else
4585 ac_cv_header_stdc=no
4586fi
4587rm -f conftest*
4588
4589fi
4590
4591if test $ac_cv_header_stdc = yes; then
4592 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4593 if test "$cross_compiling" = yes; then :
4594 :
4595else
4596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4597/* end confdefs.h. */
4598#include <ctype.h>
4599#include <stdlib.h>
4600#if ((' ' & 0x0FF) == 0x020)
4601# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4602# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4603#else
4604# define ISLOWER(c) \
4605 (('a' <= (c) && (c) <= 'i') \
4606 || ('j' <= (c) && (c) <= 'r') \
4607 || ('s' <= (c) && (c) <= 'z'))
4608# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4609#endif
4610
4611#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4612int
4613main ()
4614{
4615 int i;
4616 for (i = 0; i < 256; i++)
4617 if (XOR (islower (i), ISLOWER (i))
4618 || toupper (i) != TOUPPER (i))
4619 return 2;
4620 return 0;
4621}
4622_ACEOF
4623if ac_fn_c_try_run "$LINENO"; then :
4624
4625else
4626 ac_cv_header_stdc=no
4627fi
4628rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4629 conftest.$ac_objext conftest.beam conftest.$ac_ext
4630fi
4631
4632fi
4633fi
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4635$as_echo "$ac_cv_header_stdc" >&6; }
4636if test $ac_cv_header_stdc = yes; then
4637
4638$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4639
4640fi
4641
4642# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4643for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4644 inttypes.h stdint.h unistd.h
4645do :
4646 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4647ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4648"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004649if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004650 cat >>confdefs.h <<_ACEOF
4651#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4652_ACEOF
4653
4654fi
4655
4656done
4657
4658
4659
4660 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004661if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004662 MINIX=yes
4663else
4664 MINIX=
4665fi
4666
4667
4668 if test "$MINIX" = yes; then
4669
4670$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4671
4672
4673$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4674
4675
4676$as_echo "#define _MINIX 1" >>confdefs.h
4677
4678 fi
4679
4680
4681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4682$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004683if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004684 $as_echo_n "(cached) " >&6
4685else
4686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4687/* end confdefs.h. */
4688
4689# define __EXTENSIONS__ 1
4690 $ac_includes_default
4691int
4692main ()
4693{
4694
4695 ;
4696 return 0;
4697}
4698_ACEOF
4699if ac_fn_c_try_compile "$LINENO"; then :
4700 ac_cv_safe_to_define___extensions__=yes
4701else
4702 ac_cv_safe_to_define___extensions__=no
4703fi
4704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4705fi
4706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4707$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4708 test $ac_cv_safe_to_define___extensions__ = yes &&
4709 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4710
4711 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4712
4713 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4714
4715 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4716
4717 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4718
4719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004721# Check for unsupported systems
4722case $ac_sys_system/$ac_sys_release in
4723atheos*|Linux*/1*)
4724 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4725 echo See README for details.
4726 exit 1;;
4727esac
4728
4729
Matthias Kloseb9621712010-04-24 17:59:49 +00004730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4731$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004732
4733# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004734if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735 withval=$with_suffix;
4736 case $withval in
4737 no) EXEEXT=;;
4738 yes) EXEEXT=.exe;;
4739 *) EXEEXT=$withval;;
4740 esac
4741fi
4742
Matthias Kloseb9621712010-04-24 17:59:49 +00004743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4744$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745
4746# Test whether we're running on a non-case-sensitive system, in which
4747# case we give a warning if no ext is given
4748
Matthias Kloseb9621712010-04-24 17:59:49 +00004749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4750$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751if test ! -d CaseSensitiveTestDir; then
4752mkdir CaseSensitiveTestDir
4753fi
4754
4755if test -d casesensitivetestdir
4756then
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4758$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759 BUILDEXEEXT=.exe
4760else
Matthias Kloseb9621712010-04-24 17:59:49 +00004761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004763 BUILDEXEEXT=$EXEEXT
4764fi
4765rmdir CaseSensitiveTestDir
4766
4767case $MACHDEP in
4768bsdos*)
4769 case $CC in
4770 gcc) CC="$CC -D_HAVE_BSDI";;
4771 esac;;
4772esac
4773
4774case $ac_sys_system in
4775hp*|HP*)
4776 case $CC in
4777 cc|*/cc) CC="$CC -Ae";;
4778 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779esac
4780
4781
4782
Matthias Kloseb9621712010-04-24 17:59:49 +00004783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4784$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004785if test -z "$LIBRARY"
4786then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004787 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4790$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004791
4792# LDLIBRARY is the name of the library to link against (as opposed to the
4793# name of the library into which to insert object files). BLDLIBRARY is also
4794# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4795# is blank as the main program is not linked directly against LDLIBRARY.
4796# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4797# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4798# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4799# DLLLIBRARY is the shared (i.e., DLL) library.
4800#
4801# RUNSHARED is used to run shared python without installed libraries
4802#
4803# INSTSONAME is the name of the shared library that will be use to install
4804# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004805#
4806# LDVERSION is the shared library version number, normally the Python version
4807# with the ABI build flags appended.
4808
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809
4810
4811
4812
4813
4814
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004815
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004816LDLIBRARY="$LIBRARY"
4817BLDLIBRARY='$(LDLIBRARY)'
4818INSTSONAME='$(LDLIBRARY)'
4819DLLLIBRARY=''
4820LDLIBRARYDIR=''
4821RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004822LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823
4824# LINKCC is the command that links the python executable -- default is $(CC).
4825# If CXX is set, and if it is needed to link a main function that was
4826# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4827# python might then depend on the C++ runtime
4828# This is altered for AIX in order to build the export list before
4829# linking.
4830
Matthias Kloseb9621712010-04-24 17:59:49 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4832$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833if test -z "$LINKCC"
4834then
4835 LINKCC='$(PURIFY) $(MAINCC)'
4836 case $ac_sys_system in
4837 AIX*)
4838 exp_extra="\"\""
4839 if test $ac_sys_release -ge 5 -o \
4840 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4841 exp_extra="."
4842 fi
4843 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844 QNX*)
4845 # qcc must be used because the other compilers do not
4846 # support -N.
4847 LINKCC=qcc;;
4848 esac
4849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4851$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852
4853# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4854# make sure we default having it set to "no": this is used by
4855# distutils.unixccompiler to know if it should add --enable-new-dtags
4856# to linker command lines, and failing to detect GNU ld simply results
4857# in the same bahaviour as before.
4858
Matthias Kloseb9621712010-04-24 17:59:49 +00004859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4860$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861ac_prog=ld
4862if test "$GCC" = yes; then
4863 ac_prog=`$CC -print-prog-name=ld`
4864fi
4865case `"$ac_prog" -V 2>&1 < /dev/null` in
4866 *GNU*)
4867 GNULD=yes;;
4868 *)
4869 GNULD=no;;
4870esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4872$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4875$as_echo_n "checking for inline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02004876if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004877 $as_echo_n "(cached) " >&6
4878else
4879 ac_cv_c_inline=no
4880for ac_kw in inline __inline__ __inline; do
4881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4882/* end confdefs.h. */
4883#ifndef __cplusplus
4884typedef int foo_t;
4885static $ac_kw foo_t static_foo () {return 0; }
4886$ac_kw foo_t foo () {return 0; }
4887#endif
4888
4889_ACEOF
4890if ac_fn_c_try_compile "$LINENO"; then :
4891 ac_cv_c_inline=$ac_kw
4892fi
4893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4894 test "$ac_cv_c_inline" != no && break
4895done
4896
4897fi
4898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4899$as_echo "$ac_cv_c_inline" >&6; }
4900
4901case $ac_cv_c_inline in
4902 inline | yes) ;;
4903 *)
4904 case $ac_cv_c_inline in
4905 no) ac_val=;;
4906 *) ac_val=$ac_cv_c_inline;;
4907 esac
4908 cat >>confdefs.h <<_ACEOF
4909#ifndef __cplusplus
4910#define inline $ac_val
4911#endif
4912_ACEOF
4913 ;;
4914esac
4915
4916if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004917
4918$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004919
4920
4921fi
4922
4923
Matthias Kloseb9621712010-04-24 17:59:49 +00004924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4925$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004927if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 enableval=$enable_shared;
4929fi
4930
4931
4932if test -z "$enable_shared"
4933then
4934 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004935 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936 enable_shared="yes";;
4937 *)
4938 enable_shared="no";;
4939 esac
4940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4942$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943
Matthias Kloseb9621712010-04-24 17:59:49 +00004944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4945$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004947if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948 enableval=$enable_profiling; ac_save_cc="$CC"
4949 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004950 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 ac_enable_profiling="no"
4952else
Matthias Kloseb9621712010-04-24 17:59:49 +00004953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954/* end confdefs.h. */
4955int main() { return 0; }
4956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004957if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958 ac_enable_profiling="yes"
4959else
Matthias Kloseb9621712010-04-24 17:59:49 +00004960 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4963 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964fi
4965
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004966 CC="$ac_save_cc"
4967fi
4968
Matthias Kloseb9621712010-04-24 17:59:49 +00004969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4970$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971
4972case "$ac_enable_profiling" in
4973 "yes")
4974 BASECFLAGS="-pg $BASECFLAGS"
4975 LDFLAGS="-pg $LDFLAGS"
4976 ;;
4977esac
4978
Matthias Kloseb9621712010-04-24 17:59:49 +00004979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4980$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981
4982# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4983# library that we build, but we do not want to link against it (we
4984# will find it with a -framework option). For this reason there is an
4985# extra variable BLDLIBRARY against which Python and the extension
4986# modules are linked, BLDLIBRARY. This is normally the same as
4987# LDLIBRARY, but empty for MacOSX framework builds.
4988if test "$enable_framework"
4989then
4990 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4991 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4992 BLDLIBRARY=''
4993else
4994 BLDLIBRARY='$(LDLIBRARY)'
4995fi
4996
4997# Other platforms follow
4998if test $enable_shared = "yes"; then
4999
Matthias Kloseb9621712010-04-24 17:59:49 +00005000$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005001
5002 case $ac_sys_system in
5003 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005004 LDLIBRARY='libpython$(LDVERSION).dll.a'
5005 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005006 ;;
5007 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005008 LDLIBRARY='libpython$(LDVERSION).so'
5009 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5011 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005012 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005013 then
5014 PY3LIBRARY=libpython3.so
5015 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005016 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005017 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005018 LDLIBRARY='libpython$(LDVERSION).so'
5019 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005020 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5021 case $ac_sys_system in
5022 FreeBSD*)
5023 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5024 ;;
5025 esac
5026 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005027 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005028 then
5029 PY3LIBRARY=libpython3.so
5030 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005031 ;;
5032 hp*|HP*)
5033 case `uname -m` in
5034 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005035 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036 ;;
5037 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005038 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005039 ;;
5040 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005041 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5043 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005045 LDLIBRARY='libpython$(LDVERSION).dylib'
5046 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5048 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005049 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005050 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005051 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5052 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053
5054 esac
5055else # shared is disabled
5056 case $ac_sys_system in
5057 CYGWIN*)
5058 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005059 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060 ;;
5061 esac
5062fi
5063
Matthias Kloseb9621712010-04-24 17:59:49 +00005064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5065$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066
5067if test -n "$ac_tool_prefix"; then
5068 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5069set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5071$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005072if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074else
5075 if test -n "$RANLIB"; then
5076 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5077else
5078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081 IFS=$as_save_IFS
5082 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5085 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087 break 2
5088 fi
5089done
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005091IFS=$as_save_IFS
5092
5093fi
5094fi
5095RANLIB=$ac_cv_prog_RANLIB
5096if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5098$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005099else
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005102fi
5103
5104
5105fi
5106if test -z "$ac_cv_prog_RANLIB"; then
5107 ac_ct_RANLIB=$RANLIB
5108 # Extract the first word of "ranlib", so it can be a program name with args.
5109set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5111$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005112if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005114else
5115 if test -n "$ac_ct_RANLIB"; then
5116 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5117else
5118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5119for as_dir in $PATH
5120do
5121 IFS=$as_save_IFS
5122 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5125 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005127 break 2
5128 fi
5129done
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131IFS=$as_save_IFS
5132
5133fi
5134fi
5135ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5136if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5138$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005139else
Matthias Kloseb9621712010-04-24 17:59:49 +00005140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5141$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142fi
5143
5144 if test "x$ac_ct_RANLIB" = x; then
5145 RANLIB=":"
5146 else
5147 case $cross_compiling:$ac_tool_warned in
5148yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151ac_tool_warned=yes ;;
5152esac
5153 RANLIB=$ac_ct_RANLIB
5154 fi
5155else
5156 RANLIB="$ac_cv_prog_RANLIB"
5157fi
5158
5159
5160for ac_prog in ar aal
5161do
5162 # Extract the first word of "$ac_prog", so it can be a program name with args.
5163set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5165$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005166if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005167 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168else
5169 if test -n "$AR"; then
5170 ac_cv_prog_AR="$AR" # Let the user override the test.
5171else
5172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173for as_dir in $PATH
5174do
5175 IFS=$as_save_IFS
5176 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005177 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5179 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005181 break 2
5182 fi
5183done
Matthias Kloseb9621712010-04-24 17:59:49 +00005184 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005185IFS=$as_save_IFS
5186
5187fi
5188fi
5189AR=$ac_cv_prog_AR
5190if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5192$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005193else
Matthias Kloseb9621712010-04-24 17:59:49 +00005194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5195$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005196fi
5197
5198
5199 test -n "$AR" && break
5200done
5201test -n "$AR" || AR="ar"
5202
5203
5204# tweak ARFLAGS only if the user didn't set it on the command line
5205
5206if test -z "$ARFLAGS"
5207then
5208 ARFLAGS="rc"
5209fi
5210
5211
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005212DISABLE_ASDLGEN=""
5213# Extract the first word of "python", so it can be a program name with args.
5214set dummy python; ac_word=$2
5215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5216$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005217if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005218 $as_echo_n "(cached) " >&6
5219else
5220 if test -n "$HAS_PYTHON"; then
5221 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5222else
5223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5224for as_dir in $PATH
5225do
5226 IFS=$as_save_IFS
5227 test -z "$as_dir" && as_dir=.
5228 for ac_exec_ext in '' $ac_executable_extensions; do
5229 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5230 ac_cv_prog_HAS_PYTHON="found"
5231 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5232 break 2
5233 fi
5234done
5235 done
5236IFS=$as_save_IFS
5237
5238 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5239fi
5240fi
5241HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5242if test -n "$HAS_PYTHON"; then
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5244$as_echo "$HAS_PYTHON" >&6; }
5245else
5246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5247$as_echo "no" >&6; }
5248fi
5249
5250
5251if test $HAS_HG != found -o $HAS_PYTHON != found
5252then
5253 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5254fi
5255
5256
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005257case $MACHDEP in
5258bsdos*|hp*|HP*)
5259 # install -d does not work on BSDI or HP-UX
5260 if test -z "$INSTALL"
5261 then
5262 INSTALL="${srcdir}/install-sh -c"
5263 fi
5264esac
5265ac_aux_dir=
5266for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005267 if test -f "$ac_dir/install-sh"; then
5268 ac_aux_dir=$ac_dir
5269 ac_install_sh="$ac_aux_dir/install-sh -c"
5270 break
5271 elif test -f "$ac_dir/install.sh"; then
5272 ac_aux_dir=$ac_dir
5273 ac_install_sh="$ac_aux_dir/install.sh -c"
5274 break
5275 elif test -f "$ac_dir/shtool"; then
5276 ac_aux_dir=$ac_dir
5277 ac_install_sh="$ac_aux_dir/shtool install -c"
5278 break
5279 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005280done
5281if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005282 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005283fi
5284
5285# These three variables are undocumented and unsupported,
5286# and are intended to be withdrawn in a future Autoconf release.
5287# They can cause serious problems if a builder's source tree is in a directory
5288# whose full name contains unusual characters.
5289ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5290ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5291ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5292
5293
5294# Find a good install program. We prefer a C program (faster),
5295# so one script is as good as another. But avoid the broken or
5296# incompatible versions:
5297# SysV /etc/install, /usr/sbin/install
5298# SunOS /usr/etc/install
5299# IRIX /sbin/install
5300# AIX /bin/install
5301# AmigaOS /C/install, which installs bootblocks on floppy discs
5302# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5303# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5304# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5305# OS/2's system install, which has a completely different semantic
5306# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005307# Reject install programs that cannot install multiple files.
5308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5309$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310if test -z "$INSTALL"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005311if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005312 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313else
5314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5315for as_dir in $PATH
5316do
5317 IFS=$as_save_IFS
5318 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005319 # Account for people who put trailing slashes in PATH elements.
5320case $as_dir/ in #((
5321 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005323 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324 /usr/ucb/* ) ;;
5325 *)
5326 # OSF1 and SCO ODT 3.0 have their own names for install.
5327 # Don't use installbsd from OSF since it installs stuff as root
5328 # by default.
5329 for ac_prog in ginstall scoinst install; do
5330 for ac_exec_ext in '' $ac_executable_extensions; do
5331 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5332 if test $ac_prog = install &&
5333 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5334 # AIX install. It has an incompatible calling convention.
5335 :
5336 elif test $ac_prog = install &&
5337 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5338 # program-specific install script used by HP pwplus--don't use.
5339 :
5340 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005341 rm -rf conftest.one conftest.two conftest.dir
5342 echo one > conftest.one
5343 echo two > conftest.two
5344 mkdir conftest.dir
5345 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5346 test -s conftest.one && test -s conftest.two &&
5347 test -s conftest.dir/conftest.one &&
5348 test -s conftest.dir/conftest.two
5349 then
5350 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5351 break 3
5352 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005353 fi
5354 fi
5355 done
5356 done
5357 ;;
5358esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005359
5360 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005361IFS=$as_save_IFS
5362
Matthias Kloseb9621712010-04-24 17:59:49 +00005363rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364
5365fi
5366 if test "${ac_cv_path_install+set}" = set; then
5367 INSTALL=$ac_cv_path_install
5368 else
5369 # As a last resort, use the slow shell script. Don't cache a
5370 # value for INSTALL within a source directory, because that will
5371 # break other packages using the cache if that directory is
5372 # removed, or if the value is a relative name.
5373 INSTALL=$ac_install_sh
5374 fi
5375fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5377$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005378
5379# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5380# It thinks the first close brace ends the variable substitution.
5381test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5382
5383test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5384
5385test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5386
5387
5388# Not every filesystem supports hard links
5389
5390if test -z "$LN" ; then
5391 case $ac_sys_system in
5392 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393 *) LN=ln;;
5394 esac
5395fi
5396
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005397# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005398
5399ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5403$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404
5405# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005406if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407 withval=$with_pydebug;
5408if test "$withval" != no
5409then
5410
Matthias Kloseb9621712010-04-24 17:59:49 +00005411$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5414$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005416 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005417else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5418$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419fi
5420else
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5422$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005423fi
5424
5425
5426# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5427# merged with this chunk of code?
5428
5429# Optimizer/debugger flags
5430# ------------------------
5431# (The following bit of code is complicated enough - please keep things
5432# indented properly. Just pretend you're editing Python code. ;-)
5433
5434# There are two parallel sets of case statements below, one that checks to
5435# see if OPT was set and one that does BASECFLAGS setting based upon
5436# compiler and platform. BASECFLAGS tweaks need to be made even if the
5437# user set OPT.
5438
5439# tweak OPT based on compiler and platform, only if the user didn't set
5440# it on the command line
5441
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005442if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443then
5444 case $GCC in
5445 yes)
5446 if test "$CC" != 'g++' ; then
5447 STRICT_PROTO="-Wstrict-prototypes"
5448 fi
5449 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5450 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5451 WRAP="-fwrapv"
5452 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005453
5454 # Clang also needs -fwrapv
5455 if test "$CC" = "clang" ; then
5456 WRAP="-fwrapv"
5457 fi
5458
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459 case $ac_cv_prog_cc_g in
5460 yes)
5461 if test "$Py_DEBUG" = 'true' ; then
5462 # Optimization messes up debuggers, so turn it off for
5463 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005464 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465 else
5466 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5467 fi
5468 ;;
5469 *)
5470 OPT="-O3 -Wall $STRICT_PROTO"
5471 ;;
5472 esac
5473 case $ac_sys_system in
5474 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5475 ;;
5476 esac
5477 ;;
5478
5479 *)
5480 OPT="-O"
5481 ;;
5482 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005483fi
5484
5485
5486
5487# The -arch flags for universal builds on OSX
5488UNIVERSAL_ARCH_FLAGS=
5489
5490
5491# tweak BASECFLAGS based on compiler and platform
5492case $GCC in
5493yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005494 # Python doesn't violate C99 aliasing rules, but older versions of
5495 # GCC produce warnings for legal Python code. Enable
5496 # -fno-strict-aliasing on versions of GCC that support but produce
5497 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5499$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500 ac_save_cc="$CC"
5501 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005502 save_CFLAGS="$CFLAGS"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005503 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005504 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005505else
Matthias Kloseb9621712010-04-24 17:59:49 +00005506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005508
Matthias Kloseb159a552010-04-25 21:00:44 +00005509
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005510int
5511main ()
5512{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005513
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005514 ;
5515 return 0;
5516}
Matthias Kloseb159a552010-04-25 21:00:44 +00005517
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005519if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005520
5521 CC="$ac_save_cc -fstrict-aliasing"
5522 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005524/* end confdefs.h. */
5525
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005526 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005527int
5528main ()
5529{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005530double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005531 ;
5532 return 0;
5533}
Matthias Kloseb159a552010-04-25 21:00:44 +00005534
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005536if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005537
5538 ac_cv_no_strict_aliasing=no
5539
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005540else
Matthias Kloseb159a552010-04-25 21:00:44 +00005541
5542 ac_cv_no_strict_aliasing=yes
5543
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005544fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005546
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005547else
Matthias Kloseb159a552010-04-25 21:00:44 +00005548
5549 ac_cv_no_strict_aliasing=no
5550
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005553fi
5554
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005555 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5558$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005559 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560 then
5561 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5562 fi
5563
5564 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5565 # support. Without this, treatment of subnormals doesn't follow
5566 # the standard.
5567 case $ac_sys_machine in
5568 alpha*)
5569 BASECFLAGS="$BASECFLAGS -mieee"
5570 ;;
5571 esac
5572
5573 case $ac_sys_system in
5574 SCO_SV*)
5575 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5576 ;;
5577 # is there any other compiler on Darwin besides gcc?
5578 Darwin*)
5579 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5580 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005581 if test "${CC}" = gcc
5582 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5584$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005585 case "${UNIVERSALSDK}" in
5586 */MacOSX10.4u.sdk)
5587 # Build using 10.4 SDK, force usage of gcc when the
5588 # compiler is gcc, otherwise the user will get very
5589 # confusing error messages when building on OSX 10.6
5590 CC=gcc-4.0
5591 CPP=cpp-4.0
5592 ;;
5593 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5595$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005596 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597
5598
5599 if test "${enable_universalsdk}"; then
5600 UNIVERSAL_ARCH_FLAGS=""
5601 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5602 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5603 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005604 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5606 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005607 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005608 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609
5610 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5611 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005612 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005613 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005615 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5616 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005617 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005618 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005619
5620 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5621 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005622 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005623 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005624
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005626 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 +00005627
5628 fi
5629
5630
Ronald Oussoren666028b2010-04-18 19:07:43 +00005631 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5632 if test "${UNIVERSALSDK}" != "/"
5633 then
5634 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5635 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005636 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637 fi
5638 fi
5639
5640 # Calculate the right deployment target for this build.
5641 #
5642 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5643 if test ${cur_target} '>' 10.2; then
5644 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005645 if test ${enable_universalsdk}; then
5646 if test "${UNIVERSAL_ARCHS}" = "all"; then
5647 # Ensure that the default platform for a
5648 # 4-way universal build is OSX 10.5,
5649 # that's the first OS release where
5650 # 4-way builds make sense.
5651 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005652
5653 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5654 cur_target='10.5'
5655
5656 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5657 cur_target='10.5'
5658
5659 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5660 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005661 fi
5662 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005663 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005664 # On Intel macs default to a deployment
5665 # target of 10.4, that's the first OSX
5666 # release with Intel support.
5667 cur_target="10.4"
5668 fi
5669 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 fi
5671 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5672
5673 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5674 # environment with a value that is the same as what we'll use
5675 # in the Makefile to ensure that we'll get the same compiler
5676 # environment during configure and build time.
5677 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5678 export MACOSX_DEPLOYMENT_TARGET
5679 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5680
5681 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682 esac
5683 ;;
5684
5685*)
5686 case $ac_sys_system in
5687 OpenUNIX*|UnixWare*)
5688 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5689 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690 SCO_SV*)
5691 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5692 ;;
5693 esac
5694 ;;
5695esac
5696
5697if test "$Py_DEBUG" = 'true'; then
5698 :
5699else
5700 OPT="-DNDEBUG $OPT"
5701fi
5702
5703if test "$ac_arch_flags"
5704then
5705 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5706fi
5707
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708# Check whether GCC supports PyArg_ParseTuple format
5709if test "$GCC" = "yes"
5710then
Matthias Kloseb9621712010-04-24 17:59:49 +00005711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5712$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713 save_CFLAGS=$CFLAGS
5714 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716/* end confdefs.h. */
5717
5718 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719int
5720main ()
5721{
5722
5723 ;
5724 return 0;
5725}
Matthias Kloseb159a552010-04-25 21:00:44 +00005726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005728if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729
Matthias Kloseb159a552010-04-25 21:00:44 +00005730
Matthias Kloseb9621712010-04-24 17:59:49 +00005731$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732
Matthias Kloseb159a552010-04-25 21:00:44 +00005733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005734$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005735
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736else
Matthias Kloseb159a552010-04-25 21:00:44 +00005737
5738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005739$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740
5741fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5743 CFLAGS=$save_CFLAGS
5744fi
5745
5746# On some compilers, pthreads are available without further options
5747# (e.g. MacOS X). On some of these systems, the compiler will not
5748# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5749# So we have to see first whether pthreads are available without
5750# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5752$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005753if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755else
Matthias Kloseb9621712010-04-24 17:59:49 +00005756 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757 ac_cv_pthread_is_default=no
5758else
Matthias Kloseb9621712010-04-24 17:59:49 +00005759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760/* end confdefs.h. */
5761
5762#include <pthread.h>
5763
5764void* routine(void* p){return NULL;}
5765
5766int main(){
5767 pthread_t p;
5768 if(pthread_create(&p,NULL,routine,NULL)!=0)
5769 return 1;
5770 (void)pthread_detach(p);
5771 return 0;
5772}
5773
5774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005775if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776
5777 ac_cv_pthread_is_default=yes
5778 ac_cv_kthread=no
5779 ac_cv_pthread=no
5780
5781else
Matthias Kloseb9621712010-04-24 17:59:49 +00005782 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786fi
5787
5788
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789fi
5790
Matthias Kloseb9621712010-04-24 17:59:49 +00005791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5792$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793
5794
5795if test $ac_cv_pthread_is_default = yes
5796then
5797 ac_cv_kpthread=no
5798else
5799# -Kpthread, if available, provides the right #defines
5800# and linker options to make pthread_create available
5801# Some compilers won't report that they do not support -Kpthread,
5802# so we need to run a program to see whether it really made the
5803# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5805$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005806if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005807 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808else
5809 ac_save_cc="$CC"
5810CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005811if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812 ac_cv_kpthread=no
5813else
Matthias Kloseb9621712010-04-24 17:59:49 +00005814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815/* end confdefs.h. */
5816
5817#include <pthread.h>
5818
5819void* routine(void* p){return NULL;}
5820
5821int main(){
5822 pthread_t p;
5823 if(pthread_create(&p,NULL,routine,NULL)!=0)
5824 return 1;
5825 (void)pthread_detach(p);
5826 return 0;
5827}
5828
5829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005830if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831 ac_cv_kpthread=yes
5832else
Matthias Kloseb9621712010-04-24 17:59:49 +00005833 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
5838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839CC="$ac_save_cc"
5840fi
5841
Matthias Kloseb9621712010-04-24 17:59:49 +00005842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5843$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844fi
5845
5846if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5847then
5848# -Kthread, if available, provides the right #defines
5849# and linker options to make pthread_create available
5850# Some compilers won't report that they do not support -Kthread,
5851# so we need to run a program to see whether it really made the
5852# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5854$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005855if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005856 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857else
5858 ac_save_cc="$CC"
5859CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005860if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861 ac_cv_kthread=no
5862else
Matthias Kloseb9621712010-04-24 17:59:49 +00005863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864/* end confdefs.h. */
5865
5866#include <pthread.h>
5867
5868void* routine(void* p){return NULL;}
5869
5870int main(){
5871 pthread_t p;
5872 if(pthread_create(&p,NULL,routine,NULL)!=0)
5873 return 1;
5874 (void)pthread_detach(p);
5875 return 0;
5876}
5877
5878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005879if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880 ac_cv_kthread=yes
5881else
Matthias Kloseb9621712010-04-24 17:59:49 +00005882 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
5887
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888CC="$ac_save_cc"
5889fi
5890
Matthias Kloseb9621712010-04-24 17:59:49 +00005891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5892$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893fi
5894
5895if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5896then
5897# -pthread, if available, provides the right #defines
5898# and linker options to make pthread_create available
5899# Some compilers won't report that they do not support -pthread,
5900# so we need to run a program to see whether it really made the
5901# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5903$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005904if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906else
5907 ac_save_cc="$CC"
5908CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005909if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 ac_cv_pthread=no
5911else
Matthias Kloseb9621712010-04-24 17:59:49 +00005912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913/* end confdefs.h. */
5914
5915#include <pthread.h>
5916
5917void* routine(void* p){return NULL;}
5918
5919int main(){
5920 pthread_t p;
5921 if(pthread_create(&p,NULL,routine,NULL)!=0)
5922 return 1;
5923 (void)pthread_detach(p);
5924 return 0;
5925}
5926
5927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005928if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ac_cv_pthread=yes
5930else
Matthias Kloseb9621712010-04-24 17:59:49 +00005931 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5934 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935fi
5936
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937CC="$ac_save_cc"
5938fi
5939
Matthias Kloseb9621712010-04-24 17:59:49 +00005940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5941$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942fi
5943
5944# If we have set a CC compiler flag for thread support then
5945# check if it works for CXX, too.
5946ac_cv_cxx_thread=no
5947if test ! -z "$CXX"
5948then
Matthias Kloseb9621712010-04-24 17:59:49 +00005949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5950$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951ac_save_cxx="$CXX"
5952
5953if test "$ac_cv_kpthread" = "yes"
5954then
5955 CXX="$CXX -Kpthread"
5956 ac_cv_cxx_thread=yes
5957elif test "$ac_cv_kthread" = "yes"
5958then
5959 CXX="$CXX -Kthread"
5960 ac_cv_cxx_thread=yes
5961elif test "$ac_cv_pthread" = "yes"
5962then
5963 CXX="$CXX -pthread"
5964 ac_cv_cxx_thread=yes
5965fi
5966
5967if test $ac_cv_cxx_thread = yes
5968then
5969 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5970 $CXX -c conftest.$ac_ext 2>&5
5971 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5972 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5973 then
5974 ac_cv_cxx_thread=yes
5975 else
5976 ac_cv_cxx_thread=no
5977 fi
5978 rm -fr conftest*
5979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5981$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982fi
5983CXX="$ac_save_cxx"
5984
5985
5986# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5988$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005989if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991else
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993/* end confdefs.h. */
5994#include <stdlib.h>
5995#include <stdarg.h>
5996#include <string.h>
5997#include <float.h>
5998
5999int
6000main ()
6001{
6002
6003 ;
6004 return 0;
6005}
6006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006007if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008 ac_cv_header_stdc=yes
6009else
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6013
6014if test $ac_cv_header_stdc = yes; then
6015 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017/* end confdefs.h. */
6018#include <string.h>
6019
6020_ACEOF
6021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006022 $EGREP "memchr" >/dev/null 2>&1; then :
6023
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024else
6025 ac_cv_header_stdc=no
6026fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006027rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028
6029fi
6030
6031if test $ac_cv_header_stdc = yes; then
6032 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034/* end confdefs.h. */
6035#include <stdlib.h>
6036
6037_ACEOF
6038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 $EGREP "free" >/dev/null 2>&1; then :
6040
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041else
6042 ac_cv_header_stdc=no
6043fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006044rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045
6046fi
6047
6048if test $ac_cv_header_stdc = yes; then
6049 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006050 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051 :
6052else
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054/* end confdefs.h. */
6055#include <ctype.h>
6056#include <stdlib.h>
6057#if ((' ' & 0x0FF) == 0x020)
6058# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6059# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6060#else
6061# define ISLOWER(c) \
6062 (('a' <= (c) && (c) <= 'i') \
6063 || ('j' <= (c) && (c) <= 'r') \
6064 || ('s' <= (c) && (c) <= 'z'))
6065# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6066#endif
6067
6068#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6069int
6070main ()
6071{
6072 int i;
6073 for (i = 0; i < 256; i++)
6074 if (XOR (islower (i), ISLOWER (i))
6075 || toupper (i) != TOUPPER (i))
6076 return 2;
6077 return 0;
6078}
6079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006080if ac_fn_c_try_run "$LINENO"; then :
6081
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082else
Matthias Kloseb9621712010-04-24 17:59:49 +00006083 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6086 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087fi
6088
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089fi
6090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6092$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093if test $ac_cv_header_stdc = yes; then
6094
Matthias Kloseb9621712010-04-24 17:59:49 +00006095$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096
6097fi
6098
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006099for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006100fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006101ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006102sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006103unistd.h utime.h \
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006104sys/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 +00006105sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006106sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6107sys/stat.h sys/termio.h sys/time.h \
6108sys/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 -07006109libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006110bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006111do :
6112 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6113ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006114if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006115 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006116#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006117_ACEOF
6118
6119fi
6120
Guido van Rossum627b2d71993-12-24 10:39:16 +00006121done
6122
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006123ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006124for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006125 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6127$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006128if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006129 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006130else
Matthias Kloseb9621712010-04-24 17:59:49 +00006131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006132/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006133#include <sys/types.h>
6134#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006135
Martin v. Löwis11437992002-04-12 09:54:03 +00006136int
6137main ()
6138{
6139if ((DIR *) 0)
6140return 0;
6141 ;
6142 return 0;
6143}
6144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006145if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006146 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006147else
Matthias Kloseb9621712010-04-24 17:59:49 +00006148 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006152eval ac_res=\$$as_ac_Header
6153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6154$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006155if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006156 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006157#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006158_ACEOF
6159
6160ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006161fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006162
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006163done
6164# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6165if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6167$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006168if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006169 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006170else
Martin v. Löwis11437992002-04-12 09:54:03 +00006171 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006174
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006175/* Override any GCC internal prototype to avoid an error.
6176 Use char because int might match the return type of a GCC
6177 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006178#ifdef __cplusplus
6179extern "C"
6180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006181char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006182int
6183main ()
6184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006185return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006186 ;
6187 return 0;
6188}
6189_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190for ac_lib in '' dir; do
6191 if test -z "$ac_lib"; then
6192 ac_res="none required"
6193 else
6194 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006195 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006198 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006200rm -f core conftest.err conftest.$ac_objext \
6201 conftest$ac_exeext
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006202 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006205done
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006206if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006207
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006208else
6209 ac_cv_search_opendir=no
6210fi
6211rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006212LIBS=$ac_func_search_save_LIBS
6213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6215$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006216ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006217if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006218 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006219
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006220fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006221
Michael W. Hudson54241132001-12-07 15:38:26 +00006222else
Matthias Kloseb9621712010-04-24 17:59:49 +00006223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6224$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006225if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006226 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006227else
6228 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006232/* Override any GCC internal prototype to avoid an error.
6233 Use char because int might match the return type of a GCC
6234 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006235#ifdef __cplusplus
6236extern "C"
6237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006238char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006239int
6240main ()
6241{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006242return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006243 ;
6244 return 0;
6245}
6246_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006247for ac_lib in '' x; do
6248 if test -z "$ac_lib"; then
6249 ac_res="none required"
6250 else
6251 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006252 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006253 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006254 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006255 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006257rm -f core conftest.err conftest.$ac_objext \
6258 conftest$ac_exeext
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006259 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006260 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006262done
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006263if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006265else
6266 ac_cv_search_opendir=no
6267fi
6268rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006269LIBS=$ac_func_search_save_LIBS
6270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6272$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006273ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006274if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006275 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006276
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006277fi
6278
6279fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006280
Matthias Kloseb9621712010-04-24 17:59:49 +00006281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6282$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006283if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006284 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285else
Matthias Kloseb9621712010-04-24 17:59:49 +00006286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006287/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289int
6290main ()
6291{
6292return makedev(0, 0);
6293 ;
6294 return 0;
6295}
6296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006297if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006298 ac_cv_header_sys_types_h_makedev=yes
6299else
Matthias Kloseb9621712010-04-24 17:59:49 +00006300 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006302rm -f core conftest.err conftest.$ac_objext \
6303 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304
6305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6307$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308
6309if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006310ac_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 +02006311if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006312
Matthias Kloseb9621712010-04-24 17:59:49 +00006313$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006314
6315fi
6316
6317
6318
6319 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006320 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 +02006321if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006322
Matthias Kloseb9621712010-04-24 17:59:49 +00006323$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006324
6325fi
6326
6327
6328 fi
6329fi
6330
Michael W. Hudson54241132001-12-07 15:38:26 +00006331
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006332# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6333for ac_header in net/if.h
6334do :
6335 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6336#ifdef STDC_HEADERS
6337# include <stdlib.h>
6338# include <stddef.h>
6339#else
6340# ifdef HAVE_STDLIB_H
6341# include <stdlib.h>
6342# endif
6343#endif
6344#ifdef HAVE_SYS_SOCKET_H
6345# include <sys/socket.h>
6346#endif
6347
6348"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006349if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006350 cat >>confdefs.h <<_ACEOF
6351#define HAVE_NET_IF_H 1
6352_ACEOF
6353
6354fi
6355
6356done
6357
6358
6359
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006361for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006362do :
6363 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006364#ifdef HAVE_CURSES_H
6365#include <curses.h>
6366#endif
6367
Matthias Kloseb9621712010-04-24 17:59:49 +00006368"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006369if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006370 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006371#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006372_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006373
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006374fi
6375
6376done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006377
6378
Martin v. Löwis11017b12006-01-14 18:12:57 +00006379# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006380for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006381do :
6382 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 +00006383#ifdef HAVE_ASM_TYPES_H
6384#include <asm/types.h>
6385#endif
6386#ifdef HAVE_SYS_SOCKET_H
6387#include <sys/socket.h>
6388#endif
6389
Matthias Kloseb9621712010-04-24 17:59:49 +00006390"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006391if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006392 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006393#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006394_ACEOF
6395
6396fi
6397
6398done
6399
6400
Guido van Rossum627b2d71993-12-24 10:39:16 +00006401# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006402was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6404$as_echo_n "checking for clock_t in time.h... " >&6; }
6405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006406/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006407#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006408
6409_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006411 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006412 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006413else
Martin v. Löwis11437992002-04-12 09:54:03 +00006414
6415
Matthias Kloseb9621712010-04-24 17:59:49 +00006416$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006417
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006418
Guido van Rossum627b2d71993-12-24 10:39:16 +00006419fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006420rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006421
Matthias Kloseb9621712010-04-24 17:59:49 +00006422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6423$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006424
Matthias Kloseb9621712010-04-24 17:59:49 +00006425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6426$as_echo_n "checking for makedev... " >&6; }
6427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006428/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006429
Jesus Cea740f53a2010-04-28 11:35:30 +00006430#if defined(MAJOR_IN_MKDEV)
6431#include <sys/mkdev.h>
6432#elif defined(MAJOR_IN_SYSMACROS)
6433#include <sys/sysmacros.h>
6434#else
6435#include <sys/types.h>
6436#endif
6437
Neal Norwitz11690112002-07-30 01:08:28 +00006438int
6439main ()
6440{
Jesus Cea740f53a2010-04-28 11:35:30 +00006441
6442 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006443 ;
6444 return 0;
6445}
Matthias Kloseb159a552010-04-25 21:00:44 +00006446
Neal Norwitz11690112002-07-30 01:08:28 +00006447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006448if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006449 ac_cv_has_makedev=yes
6450else
Matthias Kloseb9621712010-04-24 17:59:49 +00006451 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006453rm -f core conftest.err conftest.$ac_objext \
6454 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6456$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006457if test "$ac_cv_has_makedev" = "yes"; then
6458
Matthias Kloseb9621712010-04-24 17:59:49 +00006459$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006460
6461fi
6462
Martin v. Löwis399a6892002-10-04 10:22:02 +00006463# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6464# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6465# defined, but the compiler does not support pragma redefine_extname,
6466# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6467# structures (such as rlimit64) without declaring them. As a
6468# work-around, disable LFS on such configurations
6469
6470use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6472$as_echo_n "checking Solaris LFS bug... " >&6; }
6473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006474/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006475
6476#define _LARGEFILE_SOURCE 1
6477#define _FILE_OFFSET_BITS 64
6478#include <sys/resource.h>
6479
Martin v. Löwis399a6892002-10-04 10:22:02 +00006480int
6481main ()
6482{
6483struct rlimit foo;
6484 ;
6485 return 0;
6486}
6487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006489 sol_lfs_bug=no
6490else
Matthias Kloseb9621712010-04-24 17:59:49 +00006491 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6495$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006496if test "$sol_lfs_bug" = "yes"; then
6497 use_lfs=no
6498fi
6499
6500if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006501# Two defines needed to enable largefile support on various platforms
6502# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006503case $ac_sys_system/$ac_sys_release in
6504AIX*)
6505
6506$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6507
6508 ;;
6509esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006510
Matthias Kloseb9621712010-04-24 17:59:49 +00006511$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006512
6513
Matthias Kloseb9621712010-04-24 17:59:49 +00006514$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006515
Martin v. Löwis399a6892002-10-04 10:22:02 +00006516fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006517
Guido van Rossum84e7b241996-08-19 21:59:00 +00006518# Add some code to confdefs.h so that the test for off_t works on SCO
6519cat >> confdefs.h <<\EOF
6520#if defined(SCO_DS)
6521#undef _OFF_T
6522#endif
6523EOF
6524
Guido van Rossumef2255b2000-03-10 22:30:29 +00006525# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006526ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006527if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006528
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006529else
Martin v. Löwis11437992002-04-12 09:54:03 +00006530
6531cat >>confdefs.h <<_ACEOF
6532#define mode_t int
6533_ACEOF
6534
6535fi
6536
Matthias Kloseb9621712010-04-24 17:59:49 +00006537ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006538if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006539
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006540else
Martin v. Löwis11437992002-04-12 09:54:03 +00006541
6542cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006543#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006544_ACEOF
6545
6546fi
6547
Matthias Kloseb9621712010-04-24 17:59:49 +00006548ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006549if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006550
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006551else
Martin v. Löwis11437992002-04-12 09:54:03 +00006552
6553cat >>confdefs.h <<_ACEOF
6554#define pid_t int
6555_ACEOF
6556
6557fi
6558
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006559
Martin v. Löwis11437992002-04-12 09:54:03 +00006560cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006561#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006562_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006563
Matthias Kloseb9621712010-04-24 17:59:49 +00006564ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006565if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006566
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567else
Martin v. Löwis11437992002-04-12 09:54:03 +00006568
6569cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006570#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006571_ACEOF
6572
6573fi
6574
Matthias Kloseb9621712010-04-24 17:59:49 +00006575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6576$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006577if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006578 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006579else
Matthias Kloseb9621712010-04-24 17:59:49 +00006580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006581/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006582#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006583
6584_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006585if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006586 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006587 ac_cv_type_uid_t=yes
6588else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006589 ac_cv_type_uid_t=no
6590fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006591rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006592
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6595$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006596if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006597
Matthias Kloseb9621712010-04-24 17:59:49 +00006598$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006599
6600
Matthias Kloseb9621712010-04-24 17:59:49 +00006601$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006602
6603fi
6604
Matthias Kloseb9621712010-04-24 17:59:49 +00006605ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6606case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006607 no|yes) ;; #(
6608 *)
6609
Matthias Kloseb9621712010-04-24 17:59:49 +00006610$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006611
6612
6613cat >>confdefs.h <<_ACEOF
6614#define uint32_t $ac_cv_c_uint32_t
6615_ACEOF
6616;;
6617 esac
6618
Matthias Kloseb9621712010-04-24 17:59:49 +00006619ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6620case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006621 no|yes) ;; #(
6622 *)
6623
Matthias Kloseb9621712010-04-24 17:59:49 +00006624$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006625
6626
6627cat >>confdefs.h <<_ACEOF
6628#define uint64_t $ac_cv_c_uint64_t
6629_ACEOF
6630;;
6631 esac
6632
Matthias Kloseb9621712010-04-24 17:59:49 +00006633ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6634case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006635 no|yes) ;; #(
6636 *)
6637
6638cat >>confdefs.h <<_ACEOF
6639#define int32_t $ac_cv_c_int32_t
6640_ACEOF
6641;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006642esac
6643
Matthias Kloseb9621712010-04-24 17:59:49 +00006644ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6645case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006646 no|yes) ;; #(
6647 *)
6648
6649cat >>confdefs.h <<_ACEOF
6650#define int64_t $ac_cv_c_int64_t
6651_ACEOF
6652;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006653esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006654
Matthias Kloseb9621712010-04-24 17:59:49 +00006655ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006656if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006657
Matthias Kloseb9621712010-04-24 17:59:49 +00006658$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006659
6660fi
6661
Jack Jansendd19cf82001-12-06 22:36:17 +00006662
Michael W. Hudson54241132001-12-07 15:38:26 +00006663# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006664# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006665# The cast to long int works around a bug in the HP C Compiler
6666# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6667# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6668# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6670$as_echo_n "checking size of int... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006671if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006672 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006673else
Matthias Kloseb9621712010-04-24 17:59:49 +00006674 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 +00006675
Martin v. Löwis11437992002-04-12 09:54:03 +00006676else
Matthias Kloseb9621712010-04-24 17:59:49 +00006677 if test "$ac_cv_type_int" = yes; then
6678 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006680as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006681See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006682 else
6683 ac_cv_sizeof_int=0
6684 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006686
Martin v. Löwis11437992002-04-12 09:54:03 +00006687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6689$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006690
6691
6692
Martin v. Löwis11437992002-04-12 09:54:03 +00006693cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006694#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006695_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006696
6697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006698# The cast to long int works around a bug in the HP C Compiler
6699# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6700# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6701# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6703$as_echo_n "checking size of long... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006704if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006705 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006706else
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 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 +00006708
Martin v. Löwis11437992002-04-12 09:54:03 +00006709else
Matthias Kloseb9621712010-04-24 17:59:49 +00006710 if test "$ac_cv_type_long" = yes; then
6711 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006713as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006714See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006715 else
6716 ac_cv_sizeof_long=0
6717 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006719
Martin v. Löwis11437992002-04-12 09:54:03 +00006720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6722$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006723
6724
6725
Martin v. Löwis11437992002-04-12 09:54:03 +00006726cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006727#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006728_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006729
6730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006731# The cast to long int works around a bug in the HP C Compiler
6732# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6733# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6734# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6736$as_echo_n "checking size of void *... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006737if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006738 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006739else
Matthias Kloseb9621712010-04-24 17:59:49 +00006740 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 +00006741
Martin v. Löwis11437992002-04-12 09:54:03 +00006742else
Matthias Kloseb9621712010-04-24 17:59:49 +00006743 if test "$ac_cv_type_void_p" = yes; then
6744 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6745$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006746as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006747See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006748 else
6749 ac_cv_sizeof_void_p=0
6750 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6755$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006756
6757
6758
Martin v. Löwis11437992002-04-12 09:54:03 +00006759cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006760#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006761_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006762
6763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006764# The cast to long int works around a bug in the HP C Compiler
6765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6767# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6769$as_echo_n "checking size of short... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006770if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006771 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006772else
Matthias Kloseb9621712010-04-24 17:59:49 +00006773 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 +00006774
Martin v. Löwis11437992002-04-12 09:54:03 +00006775else
Matthias Kloseb9621712010-04-24 17:59:49 +00006776 if test "$ac_cv_type_short" = yes; then
6777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006779as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006780See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006781 else
6782 ac_cv_sizeof_short=0
6783 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006785
Martin v. Löwis11437992002-04-12 09:54:03 +00006786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6788$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006789
6790
6791
Martin v. Löwis11437992002-04-12 09:54:03 +00006792cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006793#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006794_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006795
6796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006797# The cast to long int works around a bug in the HP C Compiler
6798# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6799# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6800# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6802$as_echo_n "checking size of float... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006803if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006804 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006805else
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 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 +00006807
Martin v. Löwis11437992002-04-12 09:54:03 +00006808else
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 if test "$ac_cv_type_float" = yes; then
6810 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006812as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006813See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006814 else
6815 ac_cv_sizeof_float=0
6816 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006818
Martin v. Löwis11437992002-04-12 09:54:03 +00006819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6821$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006822
6823
6824
Martin v. Löwis11437992002-04-12 09:54:03 +00006825cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006826#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006827_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006828
6829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006830# The cast to long int works around a bug in the HP C Compiler
6831# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6832# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6833# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6835$as_echo_n "checking size of double... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006836if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006837 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006838else
Matthias Kloseb9621712010-04-24 17:59:49 +00006839 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 +00006840
Martin v. Löwis11437992002-04-12 09:54:03 +00006841else
Matthias Kloseb9621712010-04-24 17:59:49 +00006842 if test "$ac_cv_type_double" = yes; then
6843 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6844$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006845as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006846See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006847 else
6848 ac_cv_sizeof_double=0
6849 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006851
Martin v. Löwis11437992002-04-12 09:54:03 +00006852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6854$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006855
6856
6857
Martin v. Löwis11437992002-04-12 09:54:03 +00006858cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006859#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006860_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006861
6862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006863# The cast to long int works around a bug in the HP C Compiler
6864# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6865# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6866# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6868$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006869if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006870 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006871else
Matthias Kloseb9621712010-04-24 17:59:49 +00006872 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 +00006873
Martin v. Löwis11437992002-04-12 09:54:03 +00006874else
Matthias Kloseb9621712010-04-24 17:59:49 +00006875 if test "$ac_cv_type_fpos_t" = yes; then
6876 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006878as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006879See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006880 else
6881 ac_cv_sizeof_fpos_t=0
6882 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006884
Martin v. Löwis11437992002-04-12 09:54:03 +00006885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6887$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006888
6889
6890
Martin v. Löwis11437992002-04-12 09:54:03 +00006891cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006892#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006893_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006894
Michael W. Hudson54241132001-12-07 15:38:26 +00006895
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006896# The cast to long int works around a bug in the HP C Compiler
6897# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6898# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6899# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6901$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006902if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006903 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006904else
Matthias Kloseb9621712010-04-24 17:59:49 +00006905 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 +00006906
Martin v. Löwis18e16552006-02-15 17:27:45 +00006907else
Matthias Kloseb9621712010-04-24 17:59:49 +00006908 if test "$ac_cv_type_size_t" = yes; then
6909 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006911as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006912See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006913 else
6914 ac_cv_sizeof_size_t=0
6915 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006917
Martin v. Löwis18e16552006-02-15 17:27:45 +00006918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6920$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006921
6922
6923
Martin v. Löwis18e16552006-02-15 17:27:45 +00006924cat >>confdefs.h <<_ACEOF
6925#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6926_ACEOF
6927
6928
Christian Heimes400adb02008-02-01 08:12:03 +00006929# The cast to long int works around a bug in the HP C Compiler
6930# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6931# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6932# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6934$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006935if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006936 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006937else
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 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 +00006939
Christian Heimes400adb02008-02-01 08:12:03 +00006940else
Matthias Kloseb9621712010-04-24 17:59:49 +00006941 if test "$ac_cv_type_pid_t" = yes; then
6942 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006944as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006945See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006946 else
6947 ac_cv_sizeof_pid_t=0
6948 fi
6949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006950
Christian Heimes400adb02008-02-01 08:12:03 +00006951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6953$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006954
6955
6956
6957cat >>confdefs.h <<_ACEOF
6958#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6959_ACEOF
6960
6961
Michael W. Hudson54241132001-12-07 15:38:26 +00006962
Matthias Kloseb9621712010-04-24 17:59:49 +00006963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6964$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006965have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006967/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006968
Martin v. Löwis11437992002-04-12 09:54:03 +00006969int
6970main ()
6971{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006972long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006973 ;
6974 return 0;
6975}
6976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006977if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006978
6979
Matthias Kloseb9621712010-04-24 17:59:49 +00006980$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006981
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006982 have_long_long=yes
6983
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6987$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006988if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006989# The cast to long int works around a bug in the HP C Compiler
6990# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6991# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6992# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6994$as_echo_n "checking size of long long... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006995if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006996 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006997else
Matthias Kloseb9621712010-04-24 17:59:49 +00006998 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 +00006999
Martin v. Löwis11437992002-04-12 09:54:03 +00007000else
Matthias Kloseb9621712010-04-24 17:59:49 +00007001 if test "$ac_cv_type_long_long" = yes; then
7002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007004as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007005See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007006 else
7007 ac_cv_sizeof_long_long=0
7008 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007010
Martin v. Löwis11437992002-04-12 09:54:03 +00007011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7013$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007014
7015
7016
Martin v. Löwis11437992002-04-12 09:54:03 +00007017cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007018#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007019_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007020
Michael W. Hudson54241132001-12-07 15:38:26 +00007021
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007022fi
7023
Matthias Kloseb9621712010-04-24 17:59:49 +00007024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7025$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007026have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007028/* end confdefs.h. */
7029
7030int
7031main ()
7032{
7033long double x; x = (long double)0;
7034 ;
7035 return 0;
7036}
7037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007038if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007039
7040
Matthias Kloseb9621712010-04-24 17:59:49 +00007041$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007042
7043 have_long_double=yes
7044
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007045fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7048$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007049if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007050# The cast to long int works around a bug in the HP C Compiler
7051# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7052# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7053# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7055$as_echo_n "checking size of long double... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007056if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007057 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007058else
Matthias Kloseb9621712010-04-24 17:59:49 +00007059 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 +00007060
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007061else
Matthias Kloseb9621712010-04-24 17:59:49 +00007062 if test "$ac_cv_type_long_double" = yes; then
7063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007065as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007066See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007067 else
7068 ac_cv_sizeof_long_double=0
7069 fi
7070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007071
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7074$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007075
7076
7077
7078cat >>confdefs.h <<_ACEOF
7079#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7080_ACEOF
7081
7082
7083fi
7084
7085
Matthias Kloseb9621712010-04-24 17:59:49 +00007086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7087$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007088have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007090/* end confdefs.h. */
7091
7092int
7093main ()
7094{
7095_Bool x; x = (_Bool)0;
7096 ;
7097 return 0;
7098}
7099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007100if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007101
7102
Matthias Kloseb9621712010-04-24 17:59:49 +00007103$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007104
7105 have_c99_bool=yes
7106
Thomas Woutersb2137042007-02-01 18:02:27 +00007107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7110$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007111if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112# The cast to long int works around a bug in the HP C Compiler
7113# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7114# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7115# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7117$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007118if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007119 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007120else
Matthias Kloseb9621712010-04-24 17:59:49 +00007121 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 +00007122
Thomas Woutersb2137042007-02-01 18:02:27 +00007123else
Matthias Kloseb9621712010-04-24 17:59:49 +00007124 if test "$ac_cv_type__Bool" = yes; then
7125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007127as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007128See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007129 else
7130 ac_cv_sizeof__Bool=0
7131 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007133
Thomas Woutersb2137042007-02-01 18:02:27 +00007134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7136$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007137
7138
7139
Thomas Woutersb2137042007-02-01 18:02:27 +00007140cat >>confdefs.h <<_ACEOF
7141#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7142_ACEOF
7143
7144
7145fi
7146
Matthias Kloseb9621712010-04-24 17:59:49 +00007147ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007148 #include <stdint.h>
7149 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007150 #ifdef HAVE_INTTYPES_H
7151 #include <inttypes.h>
7152 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007153"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007154if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007155
7156cat >>confdefs.h <<_ACEOF
7157#define HAVE_UINTPTR_T 1
7158_ACEOF
7159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007160# The cast to long int works around a bug in the HP C Compiler
7161# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7162# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7163# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7165$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007166if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007167 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007168else
Matthias Kloseb9621712010-04-24 17:59:49 +00007169 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 +00007170
Martin v. Löwis11437992002-04-12 09:54:03 +00007171else
Matthias Kloseb9621712010-04-24 17:59:49 +00007172 if test "$ac_cv_type_uintptr_t" = yes; then
7173 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7174$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007175as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007176See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007177 else
7178 ac_cv_sizeof_uintptr_t=0
7179 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007181
Martin v. Löwis11437992002-04-12 09:54:03 +00007182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7184$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007185
7186
7187
Martin v. Löwis11437992002-04-12 09:54:03 +00007188cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007189#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007190_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007191
Michael W. Hudson54241132001-12-07 15:38:26 +00007192
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007193fi
7194
Thomas Wouters89f507f2006-12-13 04:49:30 +00007195
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007196# The cast to long int works around a bug in the HP C Compiler
7197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7198# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7199# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7201$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007202if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007203 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007204else
Matthias Kloseb9621712010-04-24 17:59:49 +00007205 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007206#ifdef HAVE_SYS_TYPES_H
7207#include <sys/types.h>
7208#endif
7209
Matthias Kloseb9621712010-04-24 17:59:49 +00007210"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007211
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007212else
Matthias Kloseb9621712010-04-24 17:59:49 +00007213 if test "$ac_cv_type_off_t" = yes; then
7214 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7215$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007216as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007217See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007218 else
7219 ac_cv_sizeof_off_t=0
7220 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007221fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007222
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7225$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007226
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007227
7228
Martin v. Löwis11437992002-04-12 09:54:03 +00007229cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007230#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007231_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007232
Michael W. Hudson54241132001-12-07 15:38:26 +00007233
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007234
Matthias Kloseb9621712010-04-24 17:59:49 +00007235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7236$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007237if test "$have_long_long" = yes
7238then
7239if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007240 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007241
Matthias Kloseb9621712010-04-24 17:59:49 +00007242$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007243
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7245$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007246else
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7248$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007249fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007250else
Matthias Kloseb9621712010-04-24 17:59:49 +00007251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7252$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007253fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007254
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007255# The cast to long int works around a bug in the HP C Compiler
7256# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7257# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7258# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7260$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007261if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007262 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007263else
Matthias Kloseb9621712010-04-24 17:59:49 +00007264 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265#ifdef HAVE_SYS_TYPES_H
7266#include <sys/types.h>
7267#endif
7268#ifdef HAVE_TIME_H
7269#include <time.h>
7270#endif
7271
Matthias Kloseb9621712010-04-24 17:59:49 +00007272"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007273
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007274else
Matthias Kloseb9621712010-04-24 17:59:49 +00007275 if test "$ac_cv_type_time_t" = yes; then
7276 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007278as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007279See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007280 else
7281 ac_cv_sizeof_time_t=0
7282 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007284
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7287$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007288
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007289
7290
Martin v. Löwis11437992002-04-12 09:54:03 +00007291cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007292#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007293_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007294
Michael W. Hudson54241132001-12-07 15:38:26 +00007295
7296
Trent Mick635f6fb2000-08-23 21:33:05 +00007297# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007298ac_save_cc="$CC"
7299if test "$ac_cv_kpthread" = "yes"
7300then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007301elif test "$ac_cv_kthread" = "yes"
7302then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007303elif test "$ac_cv_pthread" = "yes"
7304then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007305fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007306
Matthias Kloseb9621712010-04-24 17:59:49 +00007307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7308$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007309have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007311/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007312
7313 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007314int
7315main ()
7316{
Guido van Rossum12580492000-09-24 16:47:19 +00007317pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007318 ;
7319 return 0;
7320}
Matthias Kloseb159a552010-04-25 21:00:44 +00007321
Martin v. Löwis11437992002-04-12 09:54:03 +00007322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007323if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007324 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7328$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007329if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007331# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7332# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7333# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7335$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007336if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007337 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007338else
Matthias Kloseb9621712010-04-24 17:59:49 +00007339 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007340#ifdef HAVE_PTHREAD_H
7341#include <pthread.h>
7342#endif
7343
Matthias Kloseb9621712010-04-24 17:59:49 +00007344"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007345
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007346else
Matthias Kloseb9621712010-04-24 17:59:49 +00007347 if test "$ac_cv_type_pthread_t" = yes; then
7348 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7349$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007350as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007351See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007352 else
7353 ac_cv_sizeof_pthread_t=0
7354 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007356
Trent Mick635f6fb2000-08-23 21:33:05 +00007357fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7359$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007360
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007361
7362
Martin v. Löwis11437992002-04-12 09:54:03 +00007363cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007364#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007365_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007366
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007367
Trent Mick635f6fb2000-08-23 21:33:05 +00007368fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007369CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007370
Michael W. Hudson54241132001-12-07 15:38:26 +00007371
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007372case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007373 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007374 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7375 ;;
7376 Darwin/*)
7377 OTHER_LIBTOOL_OPT=""
7378 ;;
7379esac
7380
7381
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007382ARCH_RUN_32BIT=""
7383
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007384case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007385 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007386 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7387 if test "${enable_universalsdk}"; then
7388 :
7389 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007390 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007391 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007392 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007393 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007394 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007395 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007396 if test ${gcc_version} '<' 4.0
7397 then
7398 LIBTOOL_CRUFT="-lcc_dynamic"
7399 else
7400 LIBTOOL_CRUFT=""
7401 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007403 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007404else
Matthias Kloseb9621712010-04-24 17:59:49 +00007405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007406/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007407
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007408 #include <unistd.h>
7409 int main(int argc, char*argv[])
7410 {
7411 if (sizeof(long) == 4) {
7412 return 0;
7413 } else {
7414 return 1;
7415 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007416 }
7417
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007419if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007420 ac_osx_32bit=yes
7421else
Matthias Kloseb9621712010-04-24 17:59:49 +00007422 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7425 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007426fi
7427
7428
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007429 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007430 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007431 i386)
7432 MACOSX_DEFAULT_ARCH="i386"
7433 ;;
7434 ppc)
7435 MACOSX_DEFAULT_ARCH="ppc"
7436 ;;
7437 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007438 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007439 ;;
7440 esac
7441 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007442 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007443 i386)
7444 MACOSX_DEFAULT_ARCH="x86_64"
7445 ;;
7446 ppc)
7447 MACOSX_DEFAULT_ARCH="ppc64"
7448 ;;
7449 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007450 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007451 ;;
7452 esac
7453
7454 #ARCH_RUN_32BIT="true"
7455 fi
7456
7457 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007458 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007459 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007460esac
7461
Matthias Kloseb9621712010-04-24 17:59:49 +00007462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7463$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007464if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007465then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007466 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007467 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007468 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007469
Matthias Kloseb9621712010-04-24 17:59:49 +00007470$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007471
Matthias Kloseb9621712010-04-24 17:59:49 +00007472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7473$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007474 if test $enable_shared = "yes"
7475 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007476 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 +00007477 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007478else
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7480$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007481fi
7482
Matthias Kloseb9621712010-04-24 17:59:49 +00007483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7484$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007485case $ac_sys_system/$ac_sys_release in
7486 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007487
Matthias Kloseb9621712010-04-24 17:59:49 +00007488$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007489
Matthias Kloseb9621712010-04-24 17:59:49 +00007490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7491$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007492 ;;
7493 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7495$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007496 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007497esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007498
Guido van Rossum0a516c91994-09-12 10:58:40 +00007499# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007500
Michael W. Hudson54241132001-12-07 15:38:26 +00007501
7502
7503
7504
Benjamin Peterson99f03762010-04-11 22:15:28 +00007505
Thomas Wouters477c8d52006-05-27 19:21:47 +00007506
Georg Brandlb1441c72009-01-03 22:33:39 +00007507
Thomas Wouters477c8d52006-05-27 19:21:47 +00007508cat >>confdefs.h <<_ACEOF
7509#define SHLIB_EXT "$SO"
7510_ACEOF
7511
Guido van Rossum0a516c91994-09-12 10:58:40 +00007512# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007513# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007514# (Shared libraries in this instance are shared modules to be loaded into
7515# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7517$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007518if test -z "$LDSHARED"
7519then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007520 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007521 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007522 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007523 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007524 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007525 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007526 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007527 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007528 if test "$GCC" = "yes" ; then
7529 LDSHARED='$(CC) -shared'
7530 LDCXXSHARED='$(CXX) -shared'
7531 else
7532 LDSHARED='$(CC) -G'
7533 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007534 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007535 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007536 if test "$GCC" = "yes" ; then
7537 LDSHARED='$(CC) -shared'
7538 LDCXXSHARED='$(CXX) -shared'
7539 else
7540 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007541 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007542 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007543 LDSHARED='$(CC) -bundle'
7544 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007545 if test "$enable_framework" ; then
7546 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007547 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7548 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007549 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007550 else
7551 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007552 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007553 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007554 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007555 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007556 LDSHARED='$(CC) -bundle'
7557 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007558 if test "$enable_framework" ; then
7559 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007560 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7561 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007562 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007563 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007564 # No framework, use the Python app as bundle-loader
7565 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007566 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007567 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007568 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007569 Darwin/*)
7570 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7571 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007572
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007573 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007574 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007575 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007576 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007577 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007578 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7579 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007580 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007581 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007582 LDSHARED='$(CC) -bundle'
7583 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007584 if test "$enable_framework" ; then
7585 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007586 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7587 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007588 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007589 else
7590 # No framework, use the Python app as bundle-loader
7591 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7592 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007593 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007594 fi
7595 fi
7596 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007597 Linux*|GNU*|QNX*)
7598 LDSHARED='$(CC) -shared'
7599 LDCXXSHARED='$(CXX) -shared';;
7600 BSD/OS*/4*)
7601 LDSHARED="gcc -shared"
7602 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007603 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007604 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007605 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007606 LDSHARED='$(CC) -shared'
7607 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007608 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007609 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007610 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007611 OpenBSD*)
7612 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7613 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007614 LDSHARED='$(CC) -shared $(CCSHARED)'
7615 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007616 else
7617 case `uname -r` in
7618 [01].* | 2.[0-7] | 2.[0-7].*)
7619 LDSHARED="ld -Bshareable ${LDFLAGS}"
7620 ;;
7621 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007622 LDSHARED='$(CC) -shared $(CCSHARED)'
7623 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007624 ;;
7625 esac
7626 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007627 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007628 LDSHARED='$(CC) -shared'
7629 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007630 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007631 if test "$GCC" = "yes" ; then
7632 LDSHARED='$(CC) -shared'
7633 LDCXXSHARED='$(CXX) -shared'
7634 else
7635 LDSHARED='$(CC) -G'
7636 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007637 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007638 SCO_SV*)
7639 LDSHARED='$(CC) -Wl,-G,-Bexport'
7640 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7641 CYGWIN*)
7642 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7643 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007644 *) LDSHARED="ld";;
7645 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7648$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007649LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007650BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007651# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007652# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7654$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007655if test -z "$CCSHARED"
7656then
Guido van Rossum07397971997-04-29 21:49:50 +00007657 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007658 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007659 then CCSHARED="-fPIC";
7660 elif test `uname -p` = sparc;
7661 then CCSHARED="-xcode=pic32";
7662 else CCSHARED="-Kpic";
7663 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007664 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007665 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007666 else CCSHARED="+z";
7667 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007668 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007669 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007670 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007671 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007672 if test "$GCC" = "yes"
7673 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007674 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007675 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007676 SCO_SV*)
7677 if test "$GCC" = "yes"
7678 then CCSHARED="-fPIC"
7679 else CCSHARED="-Kpic -belf"
7680 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007681 IRIX*/6*) case $CC in
7682 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007683 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007684 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007685 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7688$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007689# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007690# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7692$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007693if test -z "$LINKFORSHARED"
7694then
Guido van Rossum07397971997-04-29 21:49:50 +00007695 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007696 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007697 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007698 LINKFORSHARED="-Wl,-E -Wl,+s";;
7699# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007700 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007701 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007702 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007703 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007704 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007705 if test "$enable_framework"
7706 then
Jack Jansenda49e192005-01-07 13:08:22 +00007707 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007708 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007709 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007710 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007711 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007712 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007713 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007714 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7715 then
7716 LINKFORSHARED="-Wl,--export-dynamic"
7717 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007718 SunOS/5*) case $CC in
7719 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007720 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007721 then
7722 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007723 fi;;
7724 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007725 CYGWIN*)
7726 if test $enable_shared = "no"
7727 then
7728 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7729 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007730 QNX*)
7731 # -Wl,-E causes the symbols to be added to the dynamic
7732 # symbol table so that they can be found when a module
7733 # is loaded. -N 2048K causes the stack size to be set
7734 # to 2048 kilobytes so that the stack doesn't overflow
7735 # when running test_compile.py.
7736 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007737 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7740$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007741
Michael W. Hudson54241132001-12-07 15:38:26 +00007742
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007743
Matthias Kloseb9621712010-04-24 17:59:49 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7745$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007746if test ! "$LIBRARY" = "$LDLIBRARY"
7747then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007748 case $ac_sys_system in
7749 CYGWIN*)
7750 # Cygwin needs CCSHARED when building extension DLLs
7751 # but not when building the interpreter DLL.
7752 CFLAGSFORSHARED='';;
7753 *)
7754 CFLAGSFORSHARED='$(CCSHARED)'
7755 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7758$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007759
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007760# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7761# library (with --enable-shared).
7762# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007763# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7764# if it is not required, since it creates a dependency of the shared library
7765# to LIBS. This, in turn, means that applications linking the shared libpython
7766# don't need to link LIBS explicitly. The default should be only changed
7767# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007768
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7770$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007771case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007772 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007773 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007774esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7776$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007777
7778
Guido van Rossum627b2d71993-12-24 10:39:16 +00007779# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7781$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007782if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007783 $as_echo_n "(cached) " >&6
7784else
7785 ac_check_lib_save_LIBS=$LIBS
7786LIBS="-lsendfile $LIBS"
7787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7788/* end confdefs.h. */
7789
7790/* Override any GCC internal prototype to avoid an error.
7791 Use char because int might match the return type of a GCC
7792 builtin and then its argument prototype would still apply. */
7793#ifdef __cplusplus
7794extern "C"
7795#endif
7796char sendfile ();
7797int
7798main ()
7799{
7800return sendfile ();
7801 ;
7802 return 0;
7803}
7804_ACEOF
7805if ac_fn_c_try_link "$LINENO"; then :
7806 ac_cv_lib_sendfile_sendfile=yes
7807else
7808 ac_cv_lib_sendfile_sendfile=no
7809fi
7810rm -f core conftest.err conftest.$ac_objext \
7811 conftest$ac_exeext conftest.$ac_ext
7812LIBS=$ac_check_lib_save_LIBS
7813fi
7814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7815$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007816if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007817 cat >>confdefs.h <<_ACEOF
7818#define HAVE_LIBSENDFILE 1
7819_ACEOF
7820
7821 LIBS="-lsendfile $LIBS"
7822
7823fi
7824
Matthias Kloseb9621712010-04-24 17:59:49 +00007825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7826$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007827if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007828 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007829else
Martin v. Löwis11437992002-04-12 09:54:03 +00007830 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007831LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835/* Override any GCC internal prototype to avoid an error.
7836 Use char because int might match the return type of a GCC
7837 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007838#ifdef __cplusplus
7839extern "C"
7840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007841char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007842int
7843main ()
7844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 ;
7847 return 0;
7848}
7849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007850if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007852else
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007855rm -f core conftest.err conftest.$ac_objext \
7856 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007857LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7860$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007861if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 cat >>confdefs.h <<_ACEOF
7863#define HAVE_LIBDL 1
7864_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007865
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007866 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007867
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007868fi
7869 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7871$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007872if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007874else
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007876LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880/* Override any GCC internal prototype to avoid an error.
7881 Use char because int might match the return type of a GCC
7882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007883#ifdef __cplusplus
7884extern "C"
7885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007886char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007887int
7888main ()
7889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 ;
7892 return 0;
7893}
7894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007895if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007896 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007897else
Matthias Kloseb9621712010-04-24 17:59:49 +00007898 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900rm -f core conftest.err conftest.$ac_objext \
7901 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007902LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7905$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007906if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007907 cat >>confdefs.h <<_ACEOF
7908#define HAVE_LIBDLD 1
7909_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007910
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007911 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007912
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007913fi
7914 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007915
Georg Brandlb1441c72009-01-03 22:33:39 +00007916# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007917if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7919$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007920if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007921 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007922else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007923 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927/* Override any GCC internal prototype to avoid an error.
7928 Use char because int might match the return type of a GCC
7929 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007930#ifdef __cplusplus
7931extern "C"
7932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007933char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007934int
7935main ()
7936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007937return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 ;
7939 return 0;
7940}
7941_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942for ac_lib in '' pthread rt posix4; do
7943 if test -z "$ac_lib"; then
7944 ac_res="none required"
7945 else
7946 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007947 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007949 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007952rm -f core conftest.err conftest.$ac_objext \
7953 conftest$ac_exeext
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007954 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007957done
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007958if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960else
7961 ac_cv_search_sem_init=no
7962fi
7963rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007964LIBS=$ac_func_search_save_LIBS
7965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7967$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007968ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007969if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007971
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007972fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007973 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007974 # posix4 on Solaris 2.6
7975 # pthread (first!) on Linux
7976fi
7977
Martin v. Löwis19d17342003-06-14 21:03:05 +00007978# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7980$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007981if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007983else
7984 ac_check_lib_save_LIBS=$LIBS
7985LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007987/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989/* Override any GCC internal prototype to avoid an error.
7990 Use char because int might match the return type of a GCC
7991 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007992#ifdef __cplusplus
7993extern "C"
7994#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007995char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007996int
7997main ()
7998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008000 ;
8001 return 0;
8002}
8003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008004if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008005 ac_cv_lib_intl_textdomain=yes
8006else
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008009rm -f core conftest.err conftest.$ac_objext \
8010 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008011LIBS=$ac_check_lib_save_LIBS
8012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8014$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008015if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008016
Matthias Kloseb9621712010-04-24 17:59:49 +00008017$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008018
Brett Cannonc6d936e2009-06-07 20:09:53 +00008019 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008020fi
8021
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008022
8023# checks for system dependent C++ extensions support
8024case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8026$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008028/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008029
Georg Brandl59e87bd2011-02-15 19:48:59 +00008030 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008031int
8032main ()
8033{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008034loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008035 ;
8036 return 0;
8037}
Matthias Kloseb159a552010-04-25 21:00:44 +00008038
Martin v. Löwis11437992002-04-12 09:54:03 +00008039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008040if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008041
Matthias Kloseb159a552010-04-25 21:00:44 +00008042
Matthias Kloseb9621712010-04-24 17:59:49 +00008043$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008044
Matthias Kloseb159a552010-04-25 21:00:44 +00008045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008046$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008047
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008048else
Matthias Kloseb159a552010-04-25 21:00:44 +00008049
8050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008051$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008052
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008054rm -f core conftest.err conftest.$ac_objext \
8055 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008056 *) ;;
8057esac
8058
Guido van Rossum70c7f481998-03-26 18:44:10 +00008059# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8061$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008062if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008064else
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008066LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008068/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070/* Override any GCC internal prototype to avoid an error.
8071 Use char because int might match the return type of a GCC
8072 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008073#ifdef __cplusplus
8074extern "C"
8075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008076char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008077int
8078main ()
8079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008080return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008081 ;
8082 return 0;
8083}
8084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008085if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008087else
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008090rm -f core conftest.err conftest.$ac_objext \
8091 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008092LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008093fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8095$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008096if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008097 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008098fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008099 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8101$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008102if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008104else
Martin v. Löwis11437992002-04-12 09:54:03 +00008105 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008106LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110/* Override any GCC internal prototype to avoid an error.
8111 Use char because int might match the return type of a GCC
8112 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008113#ifdef __cplusplus
8114extern "C"
8115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008116char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008117int
8118main ()
8119{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008120return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 ;
8122 return 0;
8123}
8124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008125if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008126 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008127else
Matthias Kloseb9621712010-04-24 17:59:49 +00008128 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008130rm -f core conftest.err conftest.$ac_objext \
8131 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008132LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8135$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008136if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008137 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008138fi
8139 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8142$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008145if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008146 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8148$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008149LIBS="$withval $LIBS"
8150
8151else
Matthias Kloseb9621712010-04-24 17:59:49 +00008152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8153$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008154fi
8155
Guido van Rossum7f43da71994-08-01 12:15:30 +00008156
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008157if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008158 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8159set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8161$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008162if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008164else
8165 case $PKG_CONFIG in
8166 [\\/]* | ?:[\\/]*)
8167 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8168 ;;
8169 *)
8170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8171for as_dir in $PATH
8172do
8173 IFS=$as_save_IFS
8174 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8177 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008179 break 2
8180 fi
8181done
Matthias Kloseb9621712010-04-24 17:59:49 +00008182 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008183IFS=$as_save_IFS
8184
8185 ;;
8186esac
8187fi
8188PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8189if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8191$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008192else
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8194$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008195fi
8196
8197
8198fi
8199if test -z "$ac_cv_path_PKG_CONFIG"; then
8200 ac_pt_PKG_CONFIG=$PKG_CONFIG
8201 # Extract the first word of "pkg-config", so it can be a program name with args.
8202set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8204$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008205if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008206 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008207else
8208 case $ac_pt_PKG_CONFIG in
8209 [\\/]* | ?:[\\/]*)
8210 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8211 ;;
8212 *)
8213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8214for as_dir in $PATH
8215do
8216 IFS=$as_save_IFS
8217 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008218 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008219 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8220 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008222 break 2
8223 fi
8224done
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008226IFS=$as_save_IFS
8227
8228 ;;
8229esac
8230fi
8231ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8232if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8234$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008235else
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8237$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008238fi
8239
8240 if test "x$ac_pt_PKG_CONFIG" = x; then
8241 PKG_CONFIG=""
8242 else
8243 case $cross_compiling:$ac_tool_warned in
8244yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008245{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8246$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008247ac_tool_warned=yes ;;
8248esac
8249 PKG_CONFIG=$ac_pt_PKG_CONFIG
8250 fi
8251else
8252 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8253fi
8254
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008255
8256# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8258$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008259
8260# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008261if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008262 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008263else
8264 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008265fi
8266
8267
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8269$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008270
8271# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8273$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008274
8275# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008276if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008277 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008278else
8279 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008280fi
8281
8282
8283if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008284 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8285else
8286 LIBFFI_INCLUDEDIR=""
8287fi
8288
8289
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8291$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008292
Benjamin Peterson076ed002010-10-31 17:11:02 +00008293# Check for support for loadable sqlite extensions
8294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8295$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8296# Check whether --enable-loadable-sqlite-extensions was given.
8297if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8298 enableval=$enable_loadable_sqlite_extensions;
8299else
8300 enable_loadable_sqlite_extensions="no"
8301fi
8302
8303
8304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8305$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8306
Matthias Klose55708cc2009-04-30 08:06:49 +00008307# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8309$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008310
8311# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008312if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008313 withval=$with_dbmliborder;
8314if test x$with_dbmliborder = xyes
8315then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008316as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008317else
8318 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8319 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8320 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008321 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008322 fi
8323 done
8324fi
8325fi
8326
Matthias Kloseb9621712010-04-24 17:59:49 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8328$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008329
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008330# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008331
8332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8334$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008336# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008337if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008338 withval=$with_signal_module;
8339fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008340
8341
8342if test -z "$with_signal_module"
8343then with_signal_module="yes"
8344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8346$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008347
8348if test "${with_signal_module}" = "yes"; then
8349 USE_SIGNAL_MODULE=""
8350 SIGNAL_OBJS=""
8351else
8352 USE_SIGNAL_MODULE="#"
8353 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8354fi
8355
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008356# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008357
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008358USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008359
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008360
Martin v. Löwis11437992002-04-12 09:54:03 +00008361
8362# Templates for things AC_DEFINEd more than once.
8363# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008364
8365
Martin v. Löwis11437992002-04-12 09:54:03 +00008366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8368$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008369
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008370# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008371if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008372 withval=$with_threads;
8373fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008374
8375
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008376# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008377
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008378# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008379if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008380 withval=$with_thread; with_threads=$with_thread
8381fi
8382
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008383
8384if test -z "$with_threads"
8385then with_threads="yes"
8386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8388$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008389
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008390
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008391if test "$with_threads" = "no"
8392then
8393 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008394elif test "$ac_cv_pthread_is_default" = yes
8395then
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008397
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008398 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008399 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008400
8401 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008403elif test "$ac_cv_kpthread" = "yes"
8404then
8405 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008406 if test "$ac_cv_cxx_thread" = "yes"; then
8407 CXX="$CXX -Kpthread"
8408 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008409 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008410
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008411 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008412 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008413elif test "$ac_cv_kthread" = "yes"
8414then
8415 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008416 if test "$ac_cv_cxx_thread" = "yes"; then
8417 CXX="$CXX -Kthread"
8418 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008420
8421 posix_threads=yes
8422 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008423elif test "$ac_cv_pthread" = "yes"
8424then
8425 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008426 if test "$ac_cv_cxx_thread" = "yes"; then
8427 CXX="$CXX -pthread"
8428 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008430
8431 posix_threads=yes
8432 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008433else
8434 if test ! -z "$with_threads" -a -d "$with_threads"
8435 then LDFLAGS="$LDFLAGS -L$with_threads"
8436 fi
8437 if test ! -z "$withval" -a -d "$withval"
8438 then LDFLAGS="$LDFLAGS -L$withval"
8439 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008440
8441 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008442 # define _POSIX_THREADS in unistd.h. Some apparently don't
8443 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8445$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008447/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008448
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008449#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008450#ifdef _POSIX_THREADS
8451yes
8452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008453
8454_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008457 unistd_defines_pthreads=yes
8458else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008459 unistd_defines_pthreads=no
8460fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008461rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008462
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8464$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008465
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008467
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008468 # Just looking for pthread_create in libpthread is not enough:
8469 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8470 # So we really have to include pthread.h, and then link.
8471 _libs=$LIBS
8472 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8474$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008476/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008477#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008478
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008479void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008480int
8481main ()
8482{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008483
8484pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 ;
8486 return 0;
8487}
8488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008489if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008490
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8492$as_echo "yes" >&6; }
8493 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008494
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008495 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008496 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008497else
Martin v. Löwis11437992002-04-12 09:54:03 +00008498
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008499 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008501if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008503
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008504 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008505 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008506else
Guido van Rossumad678af1998-10-02 14:42:15 +00008507
Matthias Kloseb9621712010-04-24 17:59:49 +00008508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8509$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008510if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008512else
Martin v. Löwis11437992002-04-12 09:54:03 +00008513 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008514LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518/* Override any GCC internal prototype to avoid an error.
8519 Use char because int might match the return type of a GCC
8520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008521#ifdef __cplusplus
8522extern "C"
8523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008524char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008525int
8526main ()
8527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 ;
8530 return 0;
8531}
8532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008535else
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008538rm -f core conftest.err conftest.$ac_objext \
8539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008540LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8543$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008544if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008546
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008547 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008548 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008549 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008550else
Greg Steinadf63d62000-07-05 10:38:09 +00008551
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8553$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008554if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008556else
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008558LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562/* Override any GCC internal prototype to avoid an error.
8563 Use char because int might match the return type of a GCC
8564 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008565#ifdef __cplusplus
8566extern "C"
8567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008568char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008569int
8570main ()
8571{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 ;
8574 return 0;
8575}
8576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008577if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008579else
Matthias Kloseb9621712010-04-24 17:59:49 +00008580 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008582rm -f core conftest.err conftest.$ac_objext \
8583 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008584LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8587$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008588if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008590
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008591 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008592 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008593 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008594else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008595
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8597$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008598if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008600else
Martin v. Löwis11437992002-04-12 09:54:03 +00008601 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008602LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606/* Override any GCC internal prototype to avoid an error.
8607 Use char because int might match the return type of a GCC
8608 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008609#ifdef __cplusplus
8610extern "C"
8611#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008612char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008613int
8614main ()
8615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 ;
8618 return 0;
8619}
8620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008621if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008622 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008623else
Matthias Kloseb9621712010-04-24 17:59:49 +00008624 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008626rm -f core conftest.err conftest.$ac_objext \
8627 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008628LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8631$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008632if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008634
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008635 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008636 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008637 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008638else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008639
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8641$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008642if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008644else
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008646LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650/* Override any GCC internal prototype to avoid an error.
8651 Use char because int might match the return type of a GCC
8652 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008653#ifdef __cplusplus
8654extern "C"
8655#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008656char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008657int
8658main ()
8659{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 ;
8662 return 0;
8663}
8664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008665if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008666 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008667else
Matthias Kloseb9621712010-04-24 17:59:49 +00008668 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670rm -f core conftest.err conftest.$ac_objext \
8671 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008672LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8675$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008676if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008678
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008679 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008680 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008681 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008682else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008683
Martin v. Löwis130fb172001-07-19 11:00:41 +00008684 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008685fi
8686
Guido van Rossum627b2d71993-12-24 10:39:16 +00008687
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008688fi
8689
Guido van Rossum0be3e491997-05-22 20:33:33 +00008690fi
8691
Guido van Rossum49545951997-12-02 19:28:29 +00008692fi
8693
Guido van Rossumb93a8621998-05-07 13:27:32 +00008694fi
8695
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697rm -f core conftest.err conftest.$ac_objext \
8698 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008699
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8701$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008702if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008704else
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008706LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710/* Override any GCC internal prototype to avoid an error.
8711 Use char because int might match the return type of a GCC
8712 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713#ifdef __cplusplus
8714extern "C"
8715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008716char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008717int
8718main ()
8719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008721 ;
8722 return 0;
8723}
8724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730rm -f core conftest.err conftest.$ac_objext \
8731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008732LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8735$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008736if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008738
Martin v. Löwis130fb172001-07-19 11:00:41 +00008739 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008740 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008741 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008742fi
8743
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008744
Neal Norwitza978ab02002-11-02 16:58:05 +00008745 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8747$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008748if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008750else
Martin v. Löwis11437992002-04-12 09:54:03 +00008751 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008752LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756/* Override any GCC internal prototype to avoid an error.
8757 Use char because int might match the return type of a GCC
8758 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008759#ifdef __cplusplus
8760extern "C"
8761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008762char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008763int
8764main ()
8765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ;
8768 return 0;
8769}
8770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008771if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008773else
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008776rm -f core conftest.err conftest.$ac_objext \
8777 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008778LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8781$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008782if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008784
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008785 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008786 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008787 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008788fi
8789
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008790 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008791fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008792
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008793if test "$posix_threads" = "yes"; then
8794 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008795
Matthias Kloseb9621712010-04-24 17:59:49 +00008796$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008797
8798 fi
8799
8800 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8801 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008802 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008803$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008804
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008805 ;;
8806 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008807$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008808
8809 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008810 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008811$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008812
8813 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008814 esac
8815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8817$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008818 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008820else
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008822 ac_cv_pthread_system_supported=no
8823else
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008825/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008826#include <pthread.h>
8827 void *foo(void *parm) {
8828 return NULL;
8829 }
8830 main() {
8831 pthread_attr_t attr;
8832 pthread_t id;
8833 if (pthread_attr_init(&attr)) exit(-1);
8834 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8835 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8836 exit(0);
8837 }
8838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008839if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008840 ac_cv_pthread_system_supported=yes
8841else
Matthias Kloseb9621712010-04-24 17:59:49 +00008842 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8845 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008846fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008848
Guido van Rossum627b2d71993-12-24 10:39:16 +00008849fi
8850
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8852$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008853 if test "$ac_cv_pthread_system_supported" = "yes"; then
8854
Matthias Kloseb9621712010-04-24 17:59:49 +00008855$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008856
8857 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008858 for ac_func in pthread_sigmask
8859do :
8860 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008861if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008862 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008863#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008864_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008865 case $ac_sys_system in
8866 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008867
Matthias Kloseb9621712010-04-24 17:59:49 +00008868$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008869
8870 ;;
8871 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008872fi
8873done
8874
8875fi
8876
8877
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008878# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008879
Matthias Kloseb9621712010-04-24 17:59:49 +00008880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8881$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008882# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008883if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008885 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8887$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008888 ipv6=no
8889 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8891$as_echo "yes" >&6; }
8892 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008893
8894 ipv6=yes
8895 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008897else
Martin v. Löwis11437992002-04-12 09:54:03 +00008898
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008900
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8902$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008903 ipv6=no
8904
8905else
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008907/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008908 /* AF_INET6 available check */
8909#include <sys/types.h>
8910#include <sys/socket.h>
8911main()
8912{
8913 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8914 exit(1);
8915 else
8916 exit(0);
8917}
8918
Martin v. Löwis11437992002-04-12 09:54:03 +00008919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008920if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008921
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8923$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008924 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926else
Matthias Kloseb159a552010-04-25 21:00:44 +00008927
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
Matthias Kloseb159a552010-04-25 21:00:44 +00008931
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8934 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008935fi
8936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008937
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008938if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8940$as_echo_n "checking if RFC2553 API is available... " >&6; }
8941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008942/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008943
8944 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008945#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008946int
8947main ()
8948{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008949struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008950 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 ;
8952 return 0;
8953}
Matthias Kloseb159a552010-04-25 21:00:44 +00008954
Martin v. Löwis11437992002-04-12 09:54:03 +00008955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008956if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008957
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008959$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008960 ipv6=yes
8961
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008962else
Matthias Kloseb159a552010-04-25 21:00:44 +00008963
8964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008965$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008966 ipv6=no
8967
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008970fi
8971
8972if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008974
8975fi
8976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977fi
8978
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008979
8980ipv6type=unknown
8981ipv6lib=none
8982ipv6trylibc=no
8983
8984if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8986$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008987 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8988 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008989 case $i in
8990 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008992/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008993
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008994#include <netinet/in.h>
8995#ifdef IPV6_INRIA_VERSION
8996yes
8997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008998_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009001 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009002fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009003rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009004
9005 ;;
9006 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009008/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009009
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010#include <netinet/in.h>
9011#ifdef __KAME__
9012yes
9013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009014_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017 ipv6type=$i;
9018 ipv6lib=inet6
9019 ipv6libdir=/usr/local/v6/lib
9020 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009022rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023
9024 ;;
9025 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009027/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009028
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029#include <features.h>
9030#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9031yes
9032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009033_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036 ipv6type=$i;
9037 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009039rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040
9041 ;;
9042 linux-inet6)
9043 if test -d /usr/inet6; then
9044 ipv6type=$i
9045 ipv6lib=inet6
9046 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009047 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009048 fi
9049 ;;
9050 solaris)
9051 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009052 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053 ipv6type=$i
9054 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055 fi
9056 fi
9057 ;;
9058 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009060/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009061
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009062#include <sys/param.h>
9063#ifdef _TOSHIBA_INET6
9064yes
9065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009066_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009069 ipv6type=$i;
9070 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009071 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009073rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074
9075 ;;
9076 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009078/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009079
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009080#include </usr/local/v6/include/sys/v6config.h>
9081#ifdef __V6D__
9082yes
9083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009084_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009086 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087 ipv6type=$i;
9088 ipv6lib=v6;
9089 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009090 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009091fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009092rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009093
9094 ;;
9095 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009097/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009098
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099#include <sys/param.h>
9100#ifdef _ZETA_MINAMI_INET6
9101yes
9102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009103_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009106 ipv6type=$i;
9107 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009108 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009109fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009110rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009111
9112 ;;
9113 esac
9114 if test "$ipv6type" != "unknown"; then
9115 break
9116 fi
9117 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9119$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009120fi
9121
9122if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9123 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9124 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9125 echo "using lib$ipv6lib"
9126 else
9127 if test $ipv6trylibc = "yes"; then
9128 echo "using libc"
9129 else
9130 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9131 echo "You need to fetch lib$ipv6lib.a from appropriate"
9132 echo 'ipv6 kit and compile beforehand.'
9133 exit 1
9134 fi
9135 fi
9136fi
9137
Matthias Kloseb9621712010-04-24 17:59:49 +00009138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9139$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009141/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009142
9143 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009144int
9145main ()
9146{
9147FSIORefNum fRef = 0
9148 ;
9149 return 0;
9150}
Matthias Kloseb159a552010-04-25 21:00:44 +00009151
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009153if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009154
Matthias Kloseb159a552010-04-25 21:00:44 +00009155
Matthias Kloseb9621712010-04-24 17:59:49 +00009156$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009157
Matthias Kloseb9621712010-04-24 17:59:49 +00009158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9159$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009160
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009161else
Matthias Kloseb159a552010-04-25 21:00:44 +00009162
Matthias Kloseb9621712010-04-24 17:59:49 +00009163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9164$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009165
9166fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9168
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009169# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9171$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009173# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009174if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009175 withval=$with_doc_strings;
9176fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009177
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009178
9179if test -z "$with_doc_strings"
9180then with_doc_strings="yes"
9181fi
9182if test "$with_doc_strings" != "no"
9183then
9184
Matthias Kloseb9621712010-04-24 17:59:49 +00009185$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009186
9187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9189$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009190
Antoine Pitrou042b1282010-08-13 21:15:58 +00009191# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9193$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009195# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009196if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009197 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009198if test "$withval" != no
9199then
9200
Matthias Kloseb9621712010-04-24 17:59:49 +00009201$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009202
Matthias Kloseb9621712010-04-24 17:59:49 +00009203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9204$as_echo "yes" >&6; }
9205else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9206$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009207fi
9208else
Matthias Kloseb9621712010-04-24 17:59:49 +00009209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9210$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009211fi
9212
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009213
9214# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9216$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009218# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009219if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009220 withval=$with_pymalloc;
9221fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009222
Neil Schemenauera35c6882001-02-27 04:45:05 +00009223
Neil Schemenauer16c22972002-03-22 15:34:49 +00009224if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009225then
9226 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009227 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009228fi
9229if test "$with_pymalloc" != "no"
9230then
Martin v. Löwis11437992002-04-12 09:54:03 +00009231
Matthias Kloseb9621712010-04-24 17:59:49 +00009232$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009233
9234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9236$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009237
Benjamin Peterson05159c42009-12-03 03:01:27 +00009238# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9240$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009241
9242# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009243if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009244 withval=$with_valgrind;
9245else
9246 with_valgrind=no
9247fi
9248
Matthias Kloseb9621712010-04-24 17:59:49 +00009249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9250$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009251if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009252 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 +02009253if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009254
Matthias Kloseb9621712010-04-24 17:59:49 +00009255$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009256
9257else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009258 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009259
9260fi
9261
9262
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009263 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009264fi
9265
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009266# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009267
Guido van Rossum98935bf2001-09-05 19:13:16 +00009268DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009269
Guido van Rossume97ee181999-12-20 21:27:22 +00009270# the dlopen() function means we might want to use dynload_shlib.o. some
9271# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009272for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009273do :
9274 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009275if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009276 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009277#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009278_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009279
Guido van Rossume97ee181999-12-20 21:27:22 +00009280fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009281done
Guido van Rossume97ee181999-12-20 21:27:22 +00009282
Michael W. Hudson54241132001-12-07 15:38:26 +00009283
Guido van Rossume97ee181999-12-20 21:27:22 +00009284# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9285# loading of modules.
9286
Matthias Kloseb9621712010-04-24 17:59:49 +00009287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9288$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009289if test -z "$DYNLOADFILE"
9290then
9291 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009292 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9293 if test "$ac_cv_func_dlopen" = yes
9294 then DYNLOADFILE="dynload_shlib.o"
9295 else DYNLOADFILE="dynload_aix.o"
9296 fi
9297 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009298 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009299 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9300 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009301 *)
9302 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9303 # out any dynamic loading
9304 if test "$ac_cv_func_dlopen" = yes
9305 then DYNLOADFILE="dynload_shlib.o"
9306 else DYNLOADFILE="dynload_stub.o"
9307 fi
9308 ;;
9309 esac
9310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9312$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009313if test "$DYNLOADFILE" != "dynload_stub.o"
9314then
Martin v. Löwis11437992002-04-12 09:54:03 +00009315
Matthias Kloseb9621712010-04-24 17:59:49 +00009316$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009317
9318fi
9319
Neil Schemenauer4e425612001-06-19 15:44:15 +00009320# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9321
Michael W. Hudson54241132001-12-07 15:38:26 +00009322
Matthias Kloseb9621712010-04-24 17:59:49 +00009323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9324$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009325if test -z "$MACHDEP_OBJS"
9326then
Jack Jansene578a632001-08-15 01:27:14 +00009327 MACHDEP_OBJS=$extra_machdep_objs
9328else
9329 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9332$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009333
Guido van Rossum627b2d71993-12-24 10:39:16 +00009334# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009335for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009336 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009337 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009338 futimens futimes gai_strerror \
9339 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009340 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009341 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009342 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009343 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009344 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009345 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009346 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009347 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009348 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009349 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9350 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009351 sigaction sigaltstack siginterrupt sigpending sigrelse \
9352 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009353 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009354 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9355 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009356do :
9357 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9358ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009359if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009361#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009362_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009363
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009364fi
9365done
9366
Michael W. Hudson54241132001-12-07 15:38:26 +00009367
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009368# For some functions, having a definition is not sufficient, since
9369# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9371$as_echo_n "checking for chroot... " >&6; }
9372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009373/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009374#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009375int
9376main ()
9377{
9378void *x=chroot
9379 ;
9380 return 0;
9381}
9382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009384
Matthias Kloseb9621712010-04-24 17:59:49 +00009385$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009386
Matthias Kloseb159a552010-04-25 21:00:44 +00009387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009388$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009389else
Matthias Kloseb9621712010-04-24 17:59:49 +00009390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9391$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009392
9393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9396$as_echo_n "checking for link... " >&6; }
9397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009398/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009399#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009400int
9401main ()
9402{
9403void *x=link
9404 ;
9405 return 0;
9406}
9407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009409
Matthias Kloseb9621712010-04-24 17:59:49 +00009410$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009411
Matthias Kloseb159a552010-04-25 21:00:44 +00009412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009413$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009414else
Matthias Kloseb9621712010-04-24 17:59:49 +00009415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009417
9418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9421$as_echo_n "checking for symlink... " >&6; }
9422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009423/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009424#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009425int
9426main ()
9427{
9428void *x=symlink
9429 ;
9430 return 0;
9431}
9432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009434
Matthias Kloseb9621712010-04-24 17:59:49 +00009435$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009436
Matthias Kloseb159a552010-04-25 21:00:44 +00009437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009438$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009439else
Matthias Kloseb9621712010-04-24 17:59:49 +00009440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9441$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009442
9443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9446$as_echo_n "checking for fchdir... " >&6; }
9447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009448/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009449#include <unistd.h>
9450int
9451main ()
9452{
9453void *x=fchdir
9454 ;
9455 return 0;
9456}
9457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009458if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009459
Matthias Kloseb9621712010-04-24 17:59:49 +00009460$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009461
Matthias Kloseb159a552010-04-25 21:00:44 +00009462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009463$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009464else
Matthias Kloseb9621712010-04-24 17:59:49 +00009465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9466$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009467
9468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9471$as_echo_n "checking for fsync... " >&6; }
9472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009473/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009474#include <unistd.h>
9475int
9476main ()
9477{
9478void *x=fsync
9479 ;
9480 return 0;
9481}
9482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009483if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009484
Matthias Kloseb9621712010-04-24 17:59:49 +00009485$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009486
Matthias Kloseb159a552010-04-25 21:00:44 +00009487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009488$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009489else
Matthias Kloseb9621712010-04-24 17:59:49 +00009490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9491$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009492
9493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9496$as_echo_n "checking for fdatasync... " >&6; }
9497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009498/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009499#include <unistd.h>
9500int
9501main ()
9502{
9503void *x=fdatasync
9504 ;
9505 return 0;
9506}
9507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009508if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009509
Matthias Kloseb9621712010-04-24 17:59:49 +00009510$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009511
Matthias Kloseb159a552010-04-25 21:00:44 +00009512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009513$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009514else
Matthias Kloseb9621712010-04-24 17:59:49 +00009515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9516$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009517
9518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9521$as_echo_n "checking for epoll... " >&6; }
9522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009523/* end confdefs.h. */
9524#include <sys/epoll.h>
9525int
9526main ()
9527{
9528void *x=epoll_create
9529 ;
9530 return 0;
9531}
9532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009533if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009534
Matthias Kloseb9621712010-04-24 17:59:49 +00009535$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009536
Matthias Kloseb159a552010-04-25 21:00:44 +00009537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009538$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009539else
Matthias Kloseb9621712010-04-24 17:59:49 +00009540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009542
9543fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9546$as_echo_n "checking for kqueue... " >&6; }
9547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009548/* end confdefs.h. */
9549
9550#include <sys/types.h>
9551#include <sys/event.h>
9552
9553int
9554main ()
9555{
9556int x=kqueue()
9557 ;
9558 return 0;
9559}
9560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009561if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009562
Matthias Kloseb9621712010-04-24 17:59:49 +00009563$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009564
Matthias Kloseb159a552010-04-25 21:00:44 +00009565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009566$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009567else
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9569$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009570
9571fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009573# On some systems (eg. FreeBSD 5), we would find a definition of the
9574# functions ctermid_r, setgroups in the library, but no prototype
9575# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9576# address to avoid compiler warnings and potential miscompilations
9577# because of the missing prototypes.
9578
Matthias Kloseb9621712010-04-24 17:59:49 +00009579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9580$as_echo_n "checking for ctermid_r... " >&6; }
9581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009582/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009583
Martin v. Löwisd5843682002-11-21 20:41:28 +00009584#include <stdio.h>
9585
Martin v. Löwisd5843682002-11-21 20:41:28 +00009586int
9587main ()
9588{
9589void* p = ctermid_r
9590 ;
9591 return 0;
9592}
9593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009595
Matthias Kloseb9621712010-04-24 17:59:49 +00009596$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009597
Matthias Kloseb159a552010-04-25 21:00:44 +00009598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009599$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009600else
Matthias Kloseb9621712010-04-24 17:59:49 +00009601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9602$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009603
9604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9606
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9608$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009609if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009610 $as_echo_n "(cached) " >&6
9611else
9612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009613/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009614#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009615int
9616main ()
9617{
9618void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009619
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009620 ;
9621 return 0;
9622}
9623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009624if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009625 ac_cv_flock_decl=yes
9626else
9627 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009628
9629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009631
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009632fi
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9634$as_echo "$ac_cv_flock_decl" >&6; }
9635if test "x${ac_cv_flock_decl}" = xyes; then
9636 for ac_func in flock
9637do :
9638 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009639if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009640 cat >>confdefs.h <<_ACEOF
9641#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009642_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009643
Antoine Pitroua3000072010-09-07 14:52:42 +00009644else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009646$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009647if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009648 $as_echo_n "(cached) " >&6
9649else
9650 ac_check_lib_save_LIBS=$LIBS
9651LIBS="-lbsd $LIBS"
9652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9653/* end confdefs.h. */
9654
9655/* Override any GCC internal prototype to avoid an error.
9656 Use char because int might match the return type of a GCC
9657 builtin and then its argument prototype would still apply. */
9658#ifdef __cplusplus
9659extern "C"
9660#endif
9661char flock ();
9662int
9663main ()
9664{
9665return flock ();
9666 ;
9667 return 0;
9668}
9669_ACEOF
9670if ac_fn_c_try_link "$LINENO"; then :
9671 ac_cv_lib_bsd_flock=yes
9672else
9673 ac_cv_lib_bsd_flock=no
9674fi
9675rm -f core conftest.err conftest.$ac_objext \
9676 conftest$ac_exeext conftest.$ac_ext
9677LIBS=$ac_check_lib_save_LIBS
9678fi
9679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9680$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009681if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009682 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009683
9684
9685$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9686
9687
9688fi
9689
9690
9691fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009692done
9693
Antoine Pitroua3000072010-09-07 14:52:42 +00009694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009695
Matthias Kloseb9621712010-04-24 17:59:49 +00009696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9697$as_echo_n "checking for getpagesize... " >&6; }
9698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009699/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009700
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009701#include <unistd.h>
9702
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009703int
9704main ()
9705{
9706void* p = getpagesize
9707 ;
9708 return 0;
9709}
9710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009712
Matthias Kloseb9621712010-04-24 17:59:49 +00009713$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009714
Matthias Kloseb159a552010-04-25 21:00:44 +00009715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009716$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009717else
Matthias Kloseb9621712010-04-24 17:59:49 +00009718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9719$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009720
9721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009723
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9725$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9727/* end confdefs.h. */
9728
9729#include <malloc.h>
9730
9731int
9732main ()
9733{
9734mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9735 ;
9736 return 0;
9737}
9738_ACEOF
9739if ac_fn_c_try_compile "$LINENO"; then :
9740
9741$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9742
9743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9744$as_echo "yes" >&6; }
9745else
9746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9747$as_echo "no" >&6; }
9748
9749fi
9750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9751
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009752for ac_prog in true
9753do
9754 # Extract the first word of "$ac_prog", so it can be a program name with args.
9755set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9757$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009758if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009759 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009760else
9761 if test -n "$TRUE"; then
9762 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9763else
9764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9765for as_dir in $PATH
9766do
9767 IFS=$as_save_IFS
9768 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009769 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009770 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 +00009771 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 $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 +00009773 break 2
9774 fi
9775done
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009778
9779fi
9780fi
9781TRUE=$ac_cv_prog_TRUE
9782if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9784$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009785else
Matthias Kloseb9621712010-04-24 17:59:49 +00009786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9787$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009788fi
9789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009790
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009791 test -n "$TRUE" && break
9792done
9793test -n "$TRUE" || TRUE="/bin/true"
9794
9795
Matthias Kloseb9621712010-04-24 17:59:49 +00009796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9797$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009798if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009800else
9801 ac_check_lib_save_LIBS=$LIBS
9802LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009804/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806/* Override any GCC internal prototype to avoid an error.
9807 Use char because int might match the return type of a GCC
9808 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009809#ifdef __cplusplus
9810extern "C"
9811#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009812char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009813int
9814main ()
9815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009817 ;
9818 return 0;
9819}
9820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009821if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009822 ac_cv_lib_c_inet_aton=yes
9823else
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009826rm -f core conftest.err conftest.$ac_objext \
9827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009828LIBS=$ac_check_lib_save_LIBS
9829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9831$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009832if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009833 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009834else
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9836$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009837if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009838 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009839else
9840 ac_check_lib_save_LIBS=$LIBS
9841LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009843/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845/* Override any GCC internal prototype to avoid an error.
9846 Use char because int might match the return type of a GCC
9847 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009848#ifdef __cplusplus
9849extern "C"
9850#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009851char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009852int
9853main ()
9854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009856 ;
9857 return 0;
9858}
9859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009860if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009861 ac_cv_lib_resolv_inet_aton=yes
9862else
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009865rm -f core conftest.err conftest.$ac_objext \
9866 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009867LIBS=$ac_check_lib_save_LIBS
9868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9870$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009871if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009872 cat >>confdefs.h <<_ACEOF
9873#define HAVE_LIBRESOLV 1
9874_ACEOF
9875
9876 LIBS="-lresolv $LIBS"
9877
9878fi
9879
9880
9881fi
9882
9883
Christian Heimesd0764e22007-12-04 15:00:33 +00009884# On Tru64, chflags seems to be present, but calling it will
9885# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9887$as_echo_n "checking for chflags... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009888if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009890else
Matthias Kloseb9621712010-04-24 17:59:49 +00009891 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009892 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009893else
Matthias Kloseb9621712010-04-24 17:59:49 +00009894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009895/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009896
Christian Heimesd0764e22007-12-04 15:00:33 +00009897#include <sys/stat.h>
9898#include <unistd.h>
9899int main(int argc, char*argv[])
9900{
9901 if(chflags(argv[0], 0) != 0)
9902 return 1;
9903 return 0;
9904}
Ned Deily3eb67d52011-06-28 00:00:28 -07009905
Christian Heimesd0764e22007-12-04 15:00:33 +00009906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009907if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009908 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009909else
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009914fi
9915
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009916
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9919$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009920if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009922if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009923 ac_cv_have_chflags="yes"
9924else
9925 ac_cv_have_chflags="no"
9926fi
9927
9928fi
9929if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009930
Matthias Kloseb9621712010-04-24 17:59:49 +00009931$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009932
9933fi
9934
Matthias Kloseb9621712010-04-24 17:59:49 +00009935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9936$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009937if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009938 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009939else
Matthias Kloseb9621712010-04-24 17:59:49 +00009940 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009941 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009942else
Matthias Kloseb9621712010-04-24 17:59:49 +00009943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009944/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009945
Christian Heimesd0764e22007-12-04 15:00:33 +00009946#include <sys/stat.h>
9947#include <unistd.h>
9948int main(int argc, char*argv[])
9949{
9950 if(lchflags(argv[0], 0) != 0)
9951 return 1;
9952 return 0;
9953}
Ned Deily3eb67d52011-06-28 00:00:28 -07009954
Christian Heimesd0764e22007-12-04 15:00:33 +00009955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009956if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009957 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009958else
Matthias Kloseb9621712010-04-24 17:59:49 +00009959 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009963fi
9964
9965
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9968$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009969if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009970 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009971if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009972 ac_cv_have_lchflags="yes"
9973else
9974 ac_cv_have_lchflags="no"
9975fi
9976
9977fi
9978if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009979
Matthias Kloseb9621712010-04-24 17:59:49 +00009980$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009981
9982fi
9983
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009984case $ac_sys_system/$ac_sys_release in
9985Darwin/*)
9986 _CUR_CFLAGS="${CFLAGS}"
9987 _CUR_LDFLAGS="${LDFLAGS}"
9988 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9989 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9990 ;;
9991esac
9992
Matthias Kloseb9621712010-04-24 17:59:49 +00009993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9994$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009995if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009997else
9998 ac_check_lib_save_LIBS=$LIBS
9999LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010001/* end confdefs.h. */
10002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010003/* Override any GCC internal prototype to avoid an error.
10004 Use char because int might match the return type of a GCC
10005 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010006#ifdef __cplusplus
10007extern "C"
10008#endif
10009char inflateCopy ();
10010int
10011main ()
10012{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010013return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010014 ;
10015 return 0;
10016}
10017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010018if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010019 ac_cv_lib_z_inflateCopy=yes
10020else
Matthias Kloseb9621712010-04-24 17:59:49 +000010021 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010023rm -f core conftest.err conftest.$ac_objext \
10024 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010025LIBS=$ac_check_lib_save_LIBS
10026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10028$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010029if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010030
Matthias Kloseb9621712010-04-24 17:59:49 +000010031$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010032
10033fi
10034
10035
10036case $ac_sys_system/$ac_sys_release in
10037Darwin/*)
10038 CFLAGS="${_CUR_CFLAGS}"
10039 LDFLAGS="${_CUR_LDFLAGS}"
10040 ;;
10041esac
10042
Matthias Kloseb9621712010-04-24 17:59:49 +000010043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10044$as_echo_n "checking for hstrerror... " >&6; }
10045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010046/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010047
Martin v. Löwise9416172003-05-03 10:12:45 +000010048#include <netdb.h>
10049
Martin v. Löwise9416172003-05-03 10:12:45 +000010050int
10051main ()
10052{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010053void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010054 ;
10055 return 0;
10056}
10057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010058if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010059
Matthias Kloseb9621712010-04-24 17:59:49 +000010060$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010061
Matthias Kloseb159a552010-04-25 21:00:44 +000010062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010063$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010064else
Matthias Kloseb9621712010-04-24 17:59:49 +000010065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10066$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010067
10068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010069rm -f core conftest.err conftest.$ac_objext \
10070 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010071
Matthias Kloseb9621712010-04-24 17:59:49 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10073$as_echo_n "checking for inet_aton... " >&6; }
10074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010075/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010076
Martin v. Löwis86d66262006-02-17 08:40:11 +000010077#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010078#include <sys/socket.h>
10079#include <netinet/in.h>
10080#include <arpa/inet.h>
10081
Martin v. Löwise9416172003-05-03 10:12:45 +000010082int
10083main ()
10084{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010085void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010086 ;
10087 return 0;
10088}
10089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010090if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010091
Matthias Kloseb9621712010-04-24 17:59:49 +000010092$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010093
Matthias Kloseb159a552010-04-25 21:00:44 +000010094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010095$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010096else
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010099
10100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010101rm -f core conftest.err conftest.$ac_objext \
10102 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010103
Matthias Kloseb9621712010-04-24 17:59:49 +000010104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10105$as_echo_n "checking for inet_pton... " >&6; }
10106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010107/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010108
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010109#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010110#include <sys/socket.h>
10111#include <netinet/in.h>
10112#include <arpa/inet.h>
10113
Martin v. Löwise9416172003-05-03 10:12:45 +000010114int
10115main ()
10116{
10117void* p = inet_pton
10118 ;
10119 return 0;
10120}
10121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010122if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010123
Matthias Kloseb9621712010-04-24 17:59:49 +000010124$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010125
Matthias Kloseb159a552010-04-25 21:00:44 +000010126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010127$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010128else
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010131
10132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010134
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010135# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10137$as_echo_n "checking for setgroups... " >&6; }
10138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010139/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010140
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010141#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010142#ifdef HAVE_GRP_H
10143#include <grp.h>
10144#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010145
Martin v. Löwisd5843682002-11-21 20:41:28 +000010146int
10147main ()
10148{
10149void* p = setgroups
10150 ;
10151 return 0;
10152}
10153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010154if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010155
Matthias Kloseb9621712010-04-24 17:59:49 +000010156$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010157
Matthias Kloseb159a552010-04-25 21:00:44 +000010158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010159$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010160else
Matthias Kloseb9621712010-04-24 17:59:49 +000010161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10162$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010163
10164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010166
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010167# check for openpty and forkpty
10168
10169for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010170do :
10171 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010172if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010174#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010175_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010176
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010177else
Matthias Kloseb9621712010-04-24 17:59:49 +000010178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10179$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010180if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010181 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010182else
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010184LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188/* Override any GCC internal prototype to avoid an error.
10189 Use char because int might match the return type of a GCC
10190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010191#ifdef __cplusplus
10192extern "C"
10193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010194char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010195int
10196main ()
10197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010198return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 ;
10200 return 0;
10201}
10202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010203if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010205else
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010208rm -f core conftest.err conftest.$ac_objext \
10209 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010210LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10213$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010214if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010215 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010216 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010217else
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10219$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010220if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010222else
10223 ac_check_lib_save_LIBS=$LIBS
10224LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010226/* end confdefs.h. */
10227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228/* Override any GCC internal prototype to avoid an error.
10229 Use char because int might match the return type of a GCC
10230 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010231#ifdef __cplusplus
10232extern "C"
10233#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010234char openpty ();
10235int
10236main ()
10237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010239 ;
10240 return 0;
10241}
10242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010243if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010244 ac_cv_lib_bsd_openpty=yes
10245else
Matthias Kloseb9621712010-04-24 17:59:49 +000010246 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010248rm -f core conftest.err conftest.$ac_objext \
10249 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010250LIBS=$ac_check_lib_save_LIBS
10251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10253$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010254if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010256 LIBS="$LIBS -lbsd"
10257fi
10258
10259
10260fi
10261
Fred Drake8cef4cf2000-06-28 16:40:38 +000010262
10263fi
10264done
10265
10266for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010267do :
10268 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010269if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010271#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010272_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010273
Fred Drake8cef4cf2000-06-28 16:40:38 +000010274else
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10276$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010277if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010279else
Martin v. Löwis11437992002-04-12 09:54:03 +000010280 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010281LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010285/* Override any GCC internal prototype to avoid an error.
10286 Use char because int might match the return type of a GCC
10287 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010288#ifdef __cplusplus
10289extern "C"
10290#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010291char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010292int
10293main ()
10294{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 ;
10297 return 0;
10298}
10299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010300if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010302else
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010305rm -f core conftest.err conftest.$ac_objext \
10306 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010307LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10310$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010311if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010313 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010314else
Matthias Kloseb9621712010-04-24 17:59:49 +000010315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10316$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010317if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010319else
10320 ac_check_lib_save_LIBS=$LIBS
10321LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010323/* end confdefs.h. */
10324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010325/* Override any GCC internal prototype to avoid an error.
10326 Use char because int might match the return type of a GCC
10327 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010328#ifdef __cplusplus
10329extern "C"
10330#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010331char forkpty ();
10332int
10333main ()
10334{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010335return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010336 ;
10337 return 0;
10338}
10339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010340if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010341 ac_cv_lib_bsd_forkpty=yes
10342else
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010344fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010345rm -f core conftest.err conftest.$ac_objext \
10346 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010347LIBS=$ac_check_lib_save_LIBS
10348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10350$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010351if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010353 LIBS="$LIBS -lbsd"
10354fi
10355
10356
10357fi
10358
Fred Drake8cef4cf2000-06-28 16:40:38 +000010359
10360fi
10361done
10362
Jack Jansendd19cf82001-12-06 22:36:17 +000010363
Christian Heimesb186d002008-03-18 15:15:01 +000010364# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010365for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010366do :
10367 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010368if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010369 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010370#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010371_ACEOF
10372
10373fi
10374done
10375
10376
Michael W. Hudson54241132001-12-07 15:38:26 +000010377# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010378for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010379do :
10380 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10381ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010382if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010383 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010384#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010385_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010386
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010387fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010388done
10389
Michael W. Hudson54241132001-12-07 15:38:26 +000010390
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010391ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010392if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010393 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010394
Martin v. Löwis1142de32002-03-29 16:28:31 +000010395else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010396 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010397 *" dup2.$ac_objext "* ) ;;
10398 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010399 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010400esac
10401
Martin v. Löwis1142de32002-03-29 16:28:31 +000010402fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010403
10404ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010405if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010406 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10407
10408else
10409 case " $LIBOBJS " in
10410 *" getcwd.$ac_objext "* ) ;;
10411 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10412 ;;
10413esac
10414
10415fi
10416
10417ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010418if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010419 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10420
10421else
10422 case " $LIBOBJS " in
10423 *" strdup.$ac_objext "* ) ;;
10424 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10425 ;;
10426esac
10427
10428fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010429
10430
10431for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010432do :
10433 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010434if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010435 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010436#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010439/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010440#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010441int
10442main ()
10443{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010444getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 ;
10446 return 0;
10447}
10448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010450
Matthias Kloseb9621712010-04-24 17:59:49 +000010451$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010452
Guido van Rossum627b2d71993-12-24 10:39:16 +000010453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010455
Guido van Rossum627b2d71993-12-24 10:39:16 +000010456fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010457done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010458
Jack Jansen150753c2003-03-29 22:07:47 +000010459for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010460do :
10461 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010462if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010463 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010464#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010467/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010468#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010469int
10470main ()
10471{
10472setpgrp(0,0);
10473 ;
10474 return 0;
10475}
10476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010477if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010478
Matthias Kloseb9621712010-04-24 17:59:49 +000010479$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010480
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010483
10484fi
10485done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010486
Thomas Wouters3a584202000-08-05 23:28:51 +000010487for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010488do :
10489 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010490if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010491 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010492#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010495/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010496#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010497int
10498main ()
10499{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010500gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010501 ;
10502 return 0;
10503}
10504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010505if ac_fn_c_try_compile "$LINENO"; then :
10506
Guido van Rossum627b2d71993-12-24 10:39:16 +000010507else
Skip Montanaro6dead952003-09-25 14:50:04 +000010508
Matthias Kloseb9621712010-04-24 17:59:49 +000010509$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010510
Martin v. Löwis11437992002-04-12 09:54:03 +000010511
Guido van Rossum627b2d71993-12-24 10:39:16 +000010512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010514
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010515fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010516done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010517
Michael W. Hudson54241132001-12-07 15:38:26 +000010518
Matthias Kloseb9621712010-04-24 17:59:49 +000010519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10520$as_echo_n "checking for major... " >&6; }
10521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010522/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010523
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010524#if defined(MAJOR_IN_MKDEV)
10525#include <sys/mkdev.h>
10526#elif defined(MAJOR_IN_SYSMACROS)
10527#include <sys/sysmacros.h>
10528#else
10529#include <sys/types.h>
10530#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010531
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010532int
10533main ()
10534{
10535
10536 makedev(major(0),minor(0));
10537
10538 ;
10539 return 0;
10540}
10541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010542if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010543
10544
Matthias Kloseb9621712010-04-24 17:59:49 +000010545$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010546
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10548$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010549
10550else
Skip Montanaro6dead952003-09-25 14:50:04 +000010551
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10553$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010554
10555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010556rm -f core conftest.err conftest.$ac_objext \
10557 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010558
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010559# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010560# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10562$as_echo_n "checking for getaddrinfo... " >&6; }
10563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010564/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010565
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010566#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010567#include <sys/socket.h>
10568#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010569#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010570
Martin v. Löwis11437992002-04-12 09:54:03 +000010571int
10572main ()
10573{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010574getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 ;
10576 return 0;
10577}
10578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010579if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010580 have_getaddrinfo=yes
10581else
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010584rm -f core conftest.err conftest.$ac_objext \
10585 conftest$ac_exeext conftest.$ac_ext
10586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10587$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010588if test $have_getaddrinfo = yes
10589then
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10591$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010592 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010594else
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010596 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010597else
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010599/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010600
10601#include <sys/types.h>
10602#include <netdb.h>
10603#include <string.h>
10604#include <sys/socket.h>
10605#include <netinet/in.h>
10606
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010607int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010608{
10609 int passive, gaierr, inet4 = 0, inet6 = 0;
10610 struct addrinfo hints, *ai, *aitop;
10611 char straddr[INET6_ADDRSTRLEN], strport[16];
10612
10613 for (passive = 0; passive <= 1; passive++) {
10614 memset(&hints, 0, sizeof(hints));
10615 hints.ai_family = AF_UNSPEC;
10616 hints.ai_flags = passive ? AI_PASSIVE : 0;
10617 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010618 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010619 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10620 (void)gai_strerror(gaierr);
10621 goto bad;
10622 }
10623 for (ai = aitop; ai; ai = ai->ai_next) {
10624 if (ai->ai_addr == NULL ||
10625 ai->ai_addrlen == 0 ||
10626 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10627 straddr, sizeof(straddr), strport, sizeof(strport),
10628 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10629 goto bad;
10630 }
10631 switch (ai->ai_family) {
10632 case AF_INET:
10633 if (strcmp(strport, "54321") != 0) {
10634 goto bad;
10635 }
10636 if (passive) {
10637 if (strcmp(straddr, "0.0.0.0") != 0) {
10638 goto bad;
10639 }
10640 } else {
10641 if (strcmp(straddr, "127.0.0.1") != 0) {
10642 goto bad;
10643 }
10644 }
10645 inet4++;
10646 break;
10647 case AF_INET6:
10648 if (strcmp(strport, "54321") != 0) {
10649 goto bad;
10650 }
10651 if (passive) {
10652 if (strcmp(straddr, "::") != 0) {
10653 goto bad;
10654 }
10655 } else {
10656 if (strcmp(straddr, "::1") != 0) {
10657 goto bad;
10658 }
10659 }
10660 inet6++;
10661 break;
10662 case AF_UNSPEC:
10663 goto bad;
10664 break;
10665 default:
10666 /* another family support? */
10667 break;
10668 }
10669 }
10670 }
10671
10672 if (!(inet4 == 0 || inet4 == 2))
10673 goto bad;
10674 if (!(inet6 == 0 || inet6 == 2))
10675 goto bad;
10676
10677 if (aitop)
10678 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010679 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010680
10681 bad:
10682 if (aitop)
10683 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010684 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010685}
10686
Martin v. Löwis11437992002-04-12 09:54:03 +000010687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010688if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010689 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010690else
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10694 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010697fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010698
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10702$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10703
Mark Dickinson2df5d282009-12-31 21:22:50 +000010704if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010705then
10706 if test $ipv6 = yes
10707 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010708 echo 'Fatal: You must get working getaddrinfo() function.'
10709 echo ' or you can specify "--disable-ipv6"'.
10710 exit 1
10711 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010712else
Martin v. Löwis11437992002-04-12 09:54:03 +000010713
Matthias Kloseb9621712010-04-24 17:59:49 +000010714$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010715
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010716fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010717
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010718for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010719do :
10720 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010721if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010723#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010724_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010725
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010726fi
10727done
10728
Michael W. Hudson54241132001-12-07 15:38:26 +000010729
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010730# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10732$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010733if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010735else
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010737/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010738#include <sys/types.h>
10739#include <sys/time.h>
10740#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010741
Martin v. Löwis11437992002-04-12 09:54:03 +000010742int
10743main ()
10744{
10745if ((struct tm *) 0)
10746return 0;
10747 ;
10748 return 0;
10749}
10750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010751if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010752 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010753else
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10759$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010760if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010761
Matthias Kloseb9621712010-04-24 17:59:49 +000010762$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010763
10764fi
10765
Matthias Kloseb9621712010-04-24 17:59:49 +000010766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10767$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010768if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010770else
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010772/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010773#include <sys/types.h>
10774#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010775
Martin v. Löwis11437992002-04-12 09:54:03 +000010776int
10777main ()
10778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010779struct tm tm;
10780 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010782 ;
10783 return 0;
10784}
10785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010786if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010787 ac_cv_struct_tm=time.h
10788else
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10794$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010795if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010796
Matthias Kloseb9621712010-04-24 17:59:49 +000010797$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010798
10799fi
10800
Matthias Kloseb9621712010-04-24 17:59:49 +000010801ac_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 +000010802#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010803
Matthias Kloseb9621712010-04-24 17:59:49 +000010804"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010805if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010806
10807cat >>confdefs.h <<_ACEOF
10808#define HAVE_STRUCT_TM_TM_ZONE 1
10809_ACEOF
10810
10811
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010812fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010813
Martin v. Löwis11437992002-04-12 09:54:03 +000010814if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010817
10818else
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10820"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010821if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823else
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010825fi
10826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010827cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010828#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010829_ACEOF
10830
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10832$as_echo_n "checking for tzname... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010833if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010835else
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010837/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010838#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010839#if !HAVE_DECL_TZNAME
10840extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010842
Martin v. Löwis11437992002-04-12 09:54:03 +000010843int
10844main ()
10845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010847 ;
10848 return 0;
10849}
10850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010851if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010852 ac_cv_var_tzname=yes
10853else
Matthias Kloseb9621712010-04-24 17:59:49 +000010854 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010856rm -f core conftest.err conftest.$ac_objext \
10857 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10860$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010861 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010864
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010865 fi
10866fi
10867
Matthias Kloseb9621712010-04-24 17:59:49 +000010868ac_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 +020010869if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010870
10871cat >>confdefs.h <<_ACEOF
10872#define HAVE_STRUCT_STAT_ST_RDEV 1
10873_ACEOF
10874
10875
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010876fi
10877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878ac_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 +020010879if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010880
Martin v. Löwis11437992002-04-12 09:54:03 +000010881cat >>confdefs.h <<_ACEOF
10882#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10883_ACEOF
10884
10885
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010886fi
10887
Matthias Kloseb9621712010-04-24 17:59:49 +000010888ac_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 +020010889if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010890
10891cat >>confdefs.h <<_ACEOF
10892#define HAVE_STRUCT_STAT_ST_FLAGS 1
10893_ACEOF
10894
10895
10896fi
10897
Matthias Kloseb9621712010-04-24 17:59:49 +000010898ac_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 +020010899if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010900
10901cat >>confdefs.h <<_ACEOF
10902#define HAVE_STRUCT_STAT_ST_GEN 1
10903_ACEOF
10904
10905
10906fi
10907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908ac_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 +020010909if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010910
10911cat >>confdefs.h <<_ACEOF
10912#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10913_ACEOF
10914
10915
10916fi
10917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918ac_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 +020010919if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010920
Martin v. Löwis11437992002-04-12 09:54:03 +000010921cat >>confdefs.h <<_ACEOF
10922#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10923_ACEOF
10924
10925
Matthias Kloseb9621712010-04-24 17:59:49 +000010926$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010927
10928else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010929 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010930 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010931 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10932 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010933esac
10934
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010935fi
10936
Michael W. Hudson54241132001-12-07 15:38:26 +000010937
Martin v. Löwis11437992002-04-12 09:54:03 +000010938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10940$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010941if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010943else
Matthias Kloseb159a552010-04-25 21:00:44 +000010944
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010946/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010947#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010948int
10949main ()
10950{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010951return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010952 ;
10953 return 0;
10954}
10955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010956if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010957 ac_cv_header_time_altzone=yes
10958else
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010963fi
10964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10966$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010967if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010968
Matthias Kloseb9621712010-04-24 17:59:49 +000010969$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010970
10971fi
10972
Guido van Rossumda88dad1995-01-26 00:46:29 +000010973was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10975$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010977/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010978
10979#include <sys/types.h>
10980#include <sys/select.h>
10981#include <sys/time.h>
10982
Martin v. Löwis11437992002-04-12 09:54:03 +000010983int
10984main ()
10985{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010986;
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 ;
10988 return 0;
10989}
10990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010991if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010992
10993
Matthias Kloseb9621712010-04-24 17:59:49 +000010994$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010995
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010996 was_it_defined=yes
10997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11001$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11004$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011005if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011006 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011007else
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011009/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011010#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011011int
11012main ()
11013{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011014struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011015 ;
11016 return 0;
11017}
11018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011019if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011020 ac_cv_struct_addrinfo=yes
11021else
Matthias Kloseb9621712010-04-24 17:59:49 +000011022 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11025fi
11026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11028$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011029if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011030
Matthias Kloseb9621712010-04-24 17:59:49 +000011031$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011032
11033fi
11034
Matthias Kloseb9621712010-04-24 17:59:49 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11036$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011037if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011038 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011039else
Matthias Kloseb9621712010-04-24 17:59:49 +000011040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011041/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011042
11043# include <sys/types.h>
11044# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011045int
11046main ()
11047{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011048struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 ;
11050 return 0;
11051}
11052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011053if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011054 ac_cv_struct_sockaddr_storage=yes
11055else
Matthias Kloseb9621712010-04-24 17:59:49 +000011056 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11059fi
11060
Matthias Kloseb9621712010-04-24 17:59:49 +000011061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11062$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011063if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011064
Matthias Kloseb9621712010-04-24 17:59:49 +000011065$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011066
11067fi
11068
Guido van Rossum627b2d71993-12-24 10:39:16 +000011069# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011070
Matthias Kloseb9621712010-04-24 17:59:49 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11072$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011073if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011074 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011075else
Matthias Kloseb9621712010-04-24 17:59:49 +000011076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011078$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011079int
11080main ()
11081{
11082static int test_array [1 - 2 * !(((char) -1) < 0)];
11083test_array [0] = 0
11084
11085 ;
11086 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011087}
Martin v. Löwis11437992002-04-12 09:54:03 +000011088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011089if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011090 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011091else
Matthias Kloseb9621712010-04-24 17:59:49 +000011092 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11097$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011098if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011099 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011100
11101fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011102
Matthias Kloseb9621712010-04-24 17:59:49 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11104$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011105if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011106 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011107else
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011109/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011110
Martin v. Löwis11437992002-04-12 09:54:03 +000011111int
11112main ()
11113{
11114/* FIXME: Include the comments suggested by Paul. */
11115#ifndef __cplusplus
11116 /* Ultrix mips cc rejects this. */
11117 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011118 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011119 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011120 char const *const *pcpcc;
11121 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 /* NEC SVR4.0.2 mips cc rejects this. */
11123 struct point {int x, y;};
11124 static struct point const zero = {0,0};
11125 /* AIX XL C 1.02.0.0 rejects this.
11126 It does not let you subtract one const X* pointer from another in
11127 an arm of an if-expression whose if-part is not a constant
11128 expression */
11129 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011131 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011132 ++pcpcc;
11133 ppc = (char**) pcpcc;
11134 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011135 { /* SCO 3.2v4 cc rejects this. */
11136 char *t;
11137 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011138
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011140 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011141 }
11142 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11143 int x[] = {25, 17};
11144 const int *foo = &x[0];
11145 ++foo;
11146 }
11147 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11148 typedef const int *iptr;
11149 iptr p = 0;
11150 ++p;
11151 }
11152 { /* AIX XL C 1.02.0.0 rejects this saying
11153 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11154 struct s { int j; const int *ap[3]; };
11155 struct s *b; b->j = 5;
11156 }
11157 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11158 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011159 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011161 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011162#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011163
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 ;
11165 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011166}
Martin v. Löwis11437992002-04-12 09:54:03 +000011167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011168if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011169 ac_cv_c_const=yes
11170else
Matthias Kloseb9621712010-04-24 17:59:49 +000011171 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11176$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011177if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011178
Matthias Kloseb9621712010-04-24 17:59:49 +000011179$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011180
11181fi
11182
Michael W. Hudson54241132001-12-07 15:38:26 +000011183
Guido van Rossumda88dad1995-01-26 00:46:29 +000011184works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11186$as_echo_n "checking for working volatile... " >&6; }
11187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011188/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011189
Martin v. Löwis11437992002-04-12 09:54:03 +000011190int
11191main ()
11192{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011193volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 ;
11195 return 0;
11196}
11197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011198if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011199 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011200else
Skip Montanaro6dead952003-09-25 14:50:04 +000011201
Matthias Kloseb9621712010-04-24 17:59:49 +000011202$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011203
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011204
Guido van Rossum627b2d71993-12-24 10:39:16 +000011205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11208$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011209
Guido van Rossumda88dad1995-01-26 00:46:29 +000011210works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11212$as_echo_n "checking for working signed char... " >&6; }
11213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011214/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011215
Martin v. Löwis11437992002-04-12 09:54:03 +000011216int
11217main ()
11218{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011219signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011220 ;
11221 return 0;
11222}
11223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011224if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011225 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011226else
Skip Montanaro6dead952003-09-25 14:50:04 +000011227
Matthias Kloseb9621712010-04-24 17:59:49 +000011228$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011229
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011230
Guido van Rossum7f43da71994-08-01 12:15:30 +000011231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11234$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011235
Guido van Rossumda88dad1995-01-26 00:46:29 +000011236have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11238$as_echo_n "checking for prototypes... " >&6; }
11239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011240/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011241int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011242int
11243main ()
11244{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011245return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011246 ;
11247 return 0;
11248}
11249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011250if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011253
Matthias Kloseb159a552010-04-25 21:00:44 +000011254 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11258$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011259
Guido van Rossumda88dad1995-01-26 00:46:29 +000011260works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11262$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011264/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011265
11266#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011267int foo(int x, ...) {
11268 va_list va;
11269 va_start(va, x);
11270 va_arg(va, int);
11271 va_arg(va, char *);
11272 va_arg(va, double);
11273 return 0;
11274}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011275
Martin v. Löwis11437992002-04-12 09:54:03 +000011276int
11277main ()
11278{
Guido van Rossum90eea071996-08-30 20:58:57 +000011279return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 ;
11281 return 0;
11282}
11283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011284if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011285
11286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011288
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011289 works=yes
11290
Guido van Rossum627b2d71993-12-24 10:39:16 +000011291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11294$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011295
Martin v. Löwisd6320502004-08-12 13:45:08 +000011296# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11298$as_echo_n "checking for socketpair... " >&6; }
11299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011300/* end confdefs.h. */
11301
11302#include <sys/types.h>
11303#include <sys/socket.h>
11304
11305int
11306main ()
11307{
11308void *x=socketpair
11309 ;
11310 return 0;
11311}
11312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011314
Matthias Kloseb9621712010-04-24 17:59:49 +000011315$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011316
Matthias Kloseb159a552010-04-25 21:00:44 +000011317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011318$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011319else
Matthias Kloseb9621712010-04-24 17:59:49 +000011320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11321$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011322
11323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011325
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011326# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11328$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011330/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011331#include <sys/types.h>
11332#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011333int
11334main ()
11335{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011336struct sockaddr x;
11337x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 ;
11339 return 0;
11340}
11341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011342if ac_fn_c_try_compile "$LINENO"; then :
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11344$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011345
Matthias Kloseb9621712010-04-24 17:59:49 +000011346$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011347
11348else
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11350$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011351
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011354
Guido van Rossumda88dad1995-01-26 00:46:29 +000011355va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11357$as_echo_n "checking whether va_list is an array... " >&6; }
11358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011359/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011360
11361#ifdef HAVE_STDARG_PROTOTYPES
11362#include <stdarg.h>
11363#else
11364#include <varargs.h>
11365#endif
11366
Martin v. Löwis11437992002-04-12 09:54:03 +000011367int
11368main ()
11369{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011370va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011371 ;
11372 return 0;
11373}
11374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011375if ac_fn_c_try_compile "$LINENO"; then :
11376
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011377else
Skip Montanaro6dead952003-09-25 14:50:04 +000011378
Martin v. Löwis11437992002-04-12 09:54:03 +000011379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011381
Guido van Rossumda88dad1995-01-26 00:46:29 +000011382 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011383
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11387$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011388
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011389# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011390
11391
Matthias Kloseb9621712010-04-24 17:59:49 +000011392ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011393if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011394
Matthias Kloseb9621712010-04-24 17:59:49 +000011395 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011396
Matthias Kloseb9621712010-04-24 17:59:49 +000011397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11398$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011399 OLD_CFLAGS=$CFLAGS
11400 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011402/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011403
11404# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011405
Martin v. Löwis11437992002-04-12 09:54:03 +000011406int
11407main ()
11408{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011409
11410 char *name;
11411 struct hostent *he, *res;
11412 char buffer[2048];
11413 int buflen = 2048;
11414 int h_errnop;
11415
11416 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011417
11418 ;
11419 return 0;
11420}
11421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011423
Matthias Kloseb9621712010-04-24 17:59:49 +000011424 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011425
Martin v. Löwis11437992002-04-12 09:54:03 +000011426
Matthias Kloseb9621712010-04-24 17:59:49 +000011427$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011428
Matthias Kloseb9621712010-04-24 17:59:49 +000011429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11430$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011431
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011432else
Skip Montanaro6dead952003-09-25 14:50:04 +000011433
Matthias Kloseb9621712010-04-24 17:59:49 +000011434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11435$as_echo "no" >&6; }
11436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11437$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011439/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011440
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011441# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011442
Martin v. Löwis11437992002-04-12 09:54:03 +000011443int
11444main ()
11445{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011446
11447 char *name;
11448 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011449 char buffer[2048];
11450 int buflen = 2048;
11451 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011452
Matthias Kloseb159a552010-04-25 21:00:44 +000011453 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011454
11455 ;
11456 return 0;
11457}
11458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011459if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011460
Matthias Kloseb9621712010-04-24 17:59:49 +000011461 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011462
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Matthias Kloseb159a552010-04-25 21:00:44 +000011464$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011465
Matthias Kloseb9621712010-04-24 17:59:49 +000011466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11467$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011468
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011469else
Skip Montanaro6dead952003-09-25 14:50:04 +000011470
Matthias Kloseb9621712010-04-24 17:59:49 +000011471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11472$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11474$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11476/* end confdefs.h. */
11477
11478# include <netdb.h>
11479
11480int
11481main ()
11482{
11483
11484 char *name;
11485 struct hostent *he;
11486 struct hostent_data data;
11487
11488 (void) gethostbyname_r(name, he, &data);
11489
11490 ;
11491 return 0;
11492}
11493_ACEOF
11494if ac_fn_c_try_compile "$LINENO"; then :
11495
11496 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11497
11498
11499$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11500
11501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11502$as_echo "yes" >&6; }
11503
11504else
11505
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11507$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011508
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011511
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011514
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011517 CFLAGS=$OLD_CFLAGS
11518
11519else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011520
Matthias Kloseb9621712010-04-24 17:59:49 +000011521 for ac_func in gethostbyname
11522do :
11523 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011524if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011526#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011527_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011528
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011529fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011530done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011531
Michael W. Hudson54241132001-12-07 15:38:26 +000011532
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011533fi
11534
Michael W. Hudson54241132001-12-07 15:38:26 +000011535
11536
11537
11538
11539
11540
Guido van Rossum627b2d71993-12-24 10:39:16 +000011541# checks for system services
11542# (none yet)
11543
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011544# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011545ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011546if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011547
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011548else
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11550$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011551if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011553else
Martin v. Löwis11437992002-04-12 09:54:03 +000011554 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011555LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011559/* Override any GCC internal prototype to avoid an error.
11560 Use char because int might match the return type of a GCC
11561 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011562#ifdef __cplusplus
11563extern "C"
11564#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011565char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011566int
11567main ()
11568{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011569return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011570 ;
11571 return 0;
11572}
11573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011574if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011576else
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011579rm -f core conftest.err conftest.$ac_objext \
11580 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011581LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11584$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011585if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 cat >>confdefs.h <<_ACEOF
11587#define HAVE_LIBIEEE 1
11588_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011589
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011590 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011591
Guido van Rossum627b2d71993-12-24 10:39:16 +000011592fi
11593
Michael W. Hudson54241132001-12-07 15:38:26 +000011594
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011595fi
11596
Michael W. Hudson54241132001-12-07 15:38:26 +000011597
Guido van Rossum7f253911997-05-09 02:42:48 +000011598# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11600$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011603if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011604 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011605if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011606then
11607
Matthias Kloseb9621712010-04-24 17:59:49 +000011608$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011609
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11611$as_echo "yes" >&6; }
11612else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11613$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011614fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011615else
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11617$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011618fi
11619
Guido van Rossum7f253911997-05-09 02:42:48 +000011620
Guido van Rossum7f43da71994-08-01 12:15:30 +000011621# check for --with-libm=...
11622
Guido van Rossum563e7081996-09-10 18:20:48 +000011623case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011624Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011625*) LIBM=-lm
11626esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11628$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011630# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011631if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011632 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011633if test "$withval" = no
11634then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11636$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011637elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011638then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11640$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011641else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011642fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011643else
Matthias Kloseb9621712010-04-24 17:59:49 +000011644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11645$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011646fi
11647
Guido van Rossum7f43da71994-08-01 12:15:30 +000011648
11649# check for --with-libc=...
11650
Matthias Kloseb9621712010-04-24 17:59:49 +000011651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11652$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011654# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011655if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011657if test "$withval" = no
11658then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11660$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011661elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011662then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11664$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011665else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011666fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011667else
Matthias Kloseb9621712010-04-24 17:59:49 +000011668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11669$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670fi
11671
Guido van Rossum7f43da71994-08-01 12:15:30 +000011672
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011673# **************************************************
11674# * Check for various properties of floating point *
11675# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011676
Matthias Kloseb9621712010-04-24 17:59:49 +000011677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11678$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011679if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011681else
11682
Matthias Kloseb9621712010-04-24 17:59:49 +000011683if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684 ac_cv_little_endian_double=no
11685else
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011687/* end confdefs.h. */
11688
11689#include <string.h>
11690int main() {
11691 double x = 9006104071832581.0;
11692 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11693 return 0;
11694 else
11695 return 1;
11696}
11697
11698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011699if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011700 ac_cv_little_endian_double=yes
11701else
Matthias Kloseb9621712010-04-24 17:59:49 +000011702 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11705 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011706fi
11707
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011708fi
11709
Matthias Kloseb9621712010-04-24 17:59:49 +000011710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11711$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011712if test "$ac_cv_little_endian_double" = yes
11713then
11714
Matthias Kloseb9621712010-04-24 17:59:49 +000011715$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716
11717fi
11718
Matthias Kloseb9621712010-04-24 17:59:49 +000011719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11720$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011721if ${ac_cv_big_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_big_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, "\x43\x3f\xff\x01\x02\x03\x04\x05", 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_big_endian_double=yes
11743else
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 ac_cv_big_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_big_endian_double" >&5
11753$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011754if test "$ac_cv_big_endian_double" = yes
11755then
11756
Matthias Kloseb9621712010-04-24 17:59:49 +000011757$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011758
11759fi
11760
11761# Some ARM platforms use a mixed-endian representation for doubles.
11762# While Python doesn't currently have full support for these platforms
11763# (see e.g., issue 1762561), we can at least make sure that float <-> string
11764# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11766$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011767if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011769else
11770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011772 ac_cv_mixed_endian_double=no
11773else
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011775/* end confdefs.h. */
11776
11777#include <string.h>
11778int main() {
11779 double x = 9006104071832581.0;
11780 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11781 return 0;
11782 else
11783 return 1;
11784}
11785
11786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011787if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788 ac_cv_mixed_endian_double=yes
11789else
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011794fi
11795
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011796fi
11797
Matthias Kloseb9621712010-04-24 17:59:49 +000011798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11799$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011800if test "$ac_cv_mixed_endian_double" = yes
11801then
11802
Matthias Kloseb9621712010-04-24 17:59:49 +000011803$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011804
11805fi
11806
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011807# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011808# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011809# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011810# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011811# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011812# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011813
11814# This inline assembler syntax may also work for suncc and icc,
11815# so we try it on all platforms.
11816
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11818$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011820/* end confdefs.h. */
11821
11822int
11823main ()
11824{
11825
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011826 unsigned short cw;
11827 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11828 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011829
11830 ;
11831 return 0;
11832}
11833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011834if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011835 have_gcc_asm_for_x87=yes
11836else
Matthias Kloseb9621712010-04-24 17:59:49 +000011837 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011838fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11841$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011842if test "$have_gcc_asm_for_x87" = yes
11843then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011844
Matthias Kloseb9621712010-04-24 17:59:49 +000011845$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011846
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011847fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011848
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011849# Detect whether system arithmetic is subject to x87-style double
11850# rounding issues. The result of this test has little meaning on non
11851# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11852# mode is round-to-nearest and double rounding issues are present, and
11853# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11855$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011856# $BASECFLAGS may affect the result
11857ac_save_cc="$CC"
11858CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011859if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011860 ac_cv_x87_double_rounding=no
11861else
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011863/* end confdefs.h. */
11864
11865#include <stdlib.h>
11866#include <math.h>
11867int main() {
11868 volatile double x, y, z;
11869 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11870 x = 0.99999999999999989; /* 1-2**-53 */
11871 y = 1./x;
11872 if (y != 1.)
11873 exit(0);
11874 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11875 x = 1e16;
11876 y = 2.99999;
11877 z = x + y;
11878 if (z != 1e16+4.)
11879 exit(0);
11880 /* both tests show evidence of double rounding */
11881 exit(1);
11882}
11883
11884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011885if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011886 ac_cv_x87_double_rounding=no
11887else
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011892fi
11893
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011894CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11896$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011897if test "$ac_cv_x87_double_rounding" = yes
11898then
11899
Matthias Kloseb9621712010-04-24 17:59:49 +000011900$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011901
11902fi
11903
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011904# ************************************
11905# * Check for mathematical functions *
11906# ************************************
11907
11908LIBS_SAVE=$LIBS
11909LIBS="$LIBS $LIBM"
11910
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011911for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11912do :
11913 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11914ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011915if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011916 cat >>confdefs.h <<_ACEOF
11917#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11918_ACEOF
11919
11920fi
11921done
11922
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011923for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011924do :
11925 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11926ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011927if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011928 cat >>confdefs.h <<_ACEOF
11929#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11930_ACEOF
11931
11932fi
11933done
11934
11935ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11936"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011937if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011938 ac_have_decl=1
11939else
11940 ac_have_decl=0
11941fi
11942
11943cat >>confdefs.h <<_ACEOF
11944#define HAVE_DECL_ISINF $ac_have_decl
11945_ACEOF
11946ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11947"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011948if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011949 ac_have_decl=1
11950else
11951 ac_have_decl=0
11952fi
11953
11954cat >>confdefs.h <<_ACEOF
11955#define HAVE_DECL_ISNAN $ac_have_decl
11956_ACEOF
11957ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11958"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011959if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011960 ac_have_decl=1
11961else
11962 ac_have_decl=0
11963fi
11964
11965cat >>confdefs.h <<_ACEOF
11966#define HAVE_DECL_ISFINITE $ac_have_decl
11967_ACEOF
11968
11969
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011970# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11971# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11973$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011974if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011975 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011976else
11977
Matthias Kloseb9621712010-04-24 17:59:49 +000011978if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011979 ac_cv_tanh_preserves_zero_sign=no
11980else
Matthias Kloseb9621712010-04-24 17:59:49 +000011981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011982/* end confdefs.h. */
11983
11984#include <math.h>
11985#include <stdlib.h>
11986int main() {
11987 /* return 0 if either negative zeros don't exist
11988 on this platform or if negative zeros exist
11989 and tanh(-0.) == -0. */
11990 if (atan2(0., -1.) == atan2(-0., -1.) ||
11991 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11992 else exit(1);
11993}
11994
11995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011996if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011997 ac_cv_tanh_preserves_zero_sign=yes
11998else
Matthias Kloseb9621712010-04-24 17:59:49 +000011999 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12002 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012003fi
12004
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012005fi
12006
Matthias Kloseb9621712010-04-24 17:59:49 +000012007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12008$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012009if test "$ac_cv_tanh_preserves_zero_sign" = yes
12010then
12011
Matthias Kloseb9621712010-04-24 17:59:49 +000012012$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012013
12014fi
12015
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012016if test "$ac_cv_func_log1p" = yes
12017then
12018 # On some versions of AIX, log1p(-0.) returns 0. instead of
12019 # -0. See issue #9920.
12020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12021$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012022 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012023 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012024else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012025
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012026 if test "$cross_compiling" = yes; then :
12027 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012028else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12030/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012031
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012032 #include <math.h>
12033 #include <stdlib.h>
12034 int main() {
12035 /* Fail if the signs of log1p(-0.) and -0. can be
12036 distinguished. */
12037 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12038 return 0;
12039 else
12040 return 1;
12041 }
12042
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012043_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012044if ac_fn_c_try_run "$LINENO"; then :
12045 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012046else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012047 ac_cv_log1p_drops_zero_sign=yes
12048fi
12049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012051fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012052
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012053fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012054
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12056$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12057fi
12058if test "$ac_cv_log1p_drops_zero_sign" = yes
12059then
12060
12061$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12062
12063fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012064
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012065LIBS=$LIBS_SAVE
12066
Mark Dickinsona614f042009-11-28 12:48:43 +000012067# For multiprocessing module, check that sem_open
12068# actually works. For FreeBSD versions <= 7.2,
12069# the kernel module that provides POSIX semaphores
12070# isn't loaded by default, so an attempt to call
12071# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12073$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012074if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012075 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012076else
Matthias Kloseb9621712010-04-24 17:59:49 +000012077 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012078 ac_cv_posix_semaphores_enabled=yes
12079else
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012081/* end confdefs.h. */
12082
12083#include <unistd.h>
12084#include <fcntl.h>
12085#include <stdio.h>
12086#include <semaphore.h>
12087#include <sys/stat.h>
12088
12089int main(void) {
12090 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12091 if (a == SEM_FAILED) {
12092 perror("sem_open");
12093 return 1;
12094 }
12095 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012096 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012097 return 0;
12098}
12099
12100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012101if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012102 ac_cv_posix_semaphores_enabled=yes
12103else
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12107 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012108fi
12109
12110
Mark Dickinsona614f042009-11-28 12:48:43 +000012111fi
12112
Matthias Kloseb9621712010-04-24 17:59:49 +000012113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12114$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012115if test $ac_cv_posix_semaphores_enabled = no
12116then
12117
Matthias Kloseb9621712010-04-24 17:59:49 +000012118$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012119
12120fi
12121
Mark Dickinson10683072009-04-18 21:18:19 +000012122# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12124$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012125if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012127else
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012129 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012130else
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012132/* end confdefs.h. */
12133
12134#include <unistd.h>
12135#include <fcntl.h>
12136#include <stdio.h>
12137#include <semaphore.h>
12138#include <sys/stat.h>
12139
12140int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012141 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012142 int count;
12143 int res;
12144 if(a==SEM_FAILED){
12145 perror("sem_open");
12146 return 1;
12147
12148 }
12149 res = sem_getvalue(a, &count);
12150 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012151 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012152 return res==-1 ? 1 : 0;
12153}
12154
Mark Dickinson10683072009-04-18 21:18:19 +000012155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012156if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012157 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012158else
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12162 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012163fi
12164
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012165
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012166fi
12167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12169$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012170if test $ac_cv_broken_sem_getvalue = yes
12171then
12172
Matthias Kloseb9621712010-04-24 17:59:49 +000012173$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012174
12175fi
12176
Mark Dickinsonbd792642009-03-18 20:06:12 +000012177# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12179$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012180# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012181if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012182 enableval=$enable_big_digits; case $enable_big_digits in
12183yes)
12184 enable_big_digits=30 ;;
12185no)
12186 enable_big_digits=15 ;;
1218715|30)
12188 ;;
12189*)
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012190 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 +000012191esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12193$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012194
12195cat >>confdefs.h <<_ACEOF
12196#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12197_ACEOF
12198
12199
12200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12202$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012203fi
12204
12205
Guido van Rossumef2255b2000-03-10 22:30:29 +000012206# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012207ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012208if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012209
12210
Matthias Kloseb9621712010-04-24 17:59:49 +000012211$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012212
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012213 wchar_h="yes"
12214
Guido van Rossumef2255b2000-03-10 22:30:29 +000012215else
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012217
12218fi
12219
Michael W. Hudson54241132001-12-07 15:38:26 +000012220
Martin v. Löwis11437992002-04-12 09:54:03 +000012221
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012222# determine wchar_t size
12223if test "$wchar_h" = yes
12224then
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012226# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12227# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12228# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12230$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012231if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012233else
Matthias Kloseb9621712010-04-24 17:59:49 +000012234 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12235"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012236
Martin v. Löwis11437992002-04-12 09:54:03 +000012237else
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 if test "$ac_cv_type_wchar_t" = yes; then
12239 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12240$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012241as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012242See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243 else
12244 ac_cv_sizeof_wchar_t=0
12245 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012247
Martin v. Löwis11437992002-04-12 09:54:03 +000012248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12250$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012251
12252
12253
Martin v. Löwis11437992002-04-12 09:54:03 +000012254cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012255#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012256_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012257
Michael W. Hudson54241132001-12-07 15:38:26 +000012258
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012259fi
12260
Matthias Kloseb9621712010-04-24 17:59:49 +000012261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12262$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012263have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012265/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012266
12267#include <tcl.h>
12268#if TCL_UTF_MAX != 6
12269# error "NOT UCS4_TCL"
12270#endif
12271int
12272main ()
12273{
12274
12275 ;
12276 return 0;
12277}
12278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012279if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012280
12281
Matthias Kloseb9621712010-04-24 17:59:49 +000012282$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012283
12284 have_ucs4_tcl=yes
12285
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12289$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012290
Skip Montanaro6dead952003-09-25 14:50:04 +000012291# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012292if test "$wchar_h" = yes
12293then
12294 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12296$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012297 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012299else
12300
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012302 ac_cv_wchar_t_signed=yes
12303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012305/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012306
12307 #include <wchar.h>
12308 int main()
12309 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012310 /* Success: exit code 0 */
12311 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012312 }
12313
12314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012315if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012316 ac_cv_wchar_t_signed=yes
12317else
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12321 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012322fi
12323
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012324fi
12325
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12327$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012328fi
12329
Matthias Kloseb9621712010-04-24 17:59:49 +000012330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12331$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012332
12333# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012334if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012335 withval=$with_wide_unicode;
12336if test "$withval" != no
12337then unicode_size="4"
12338else unicode_size="2"
12339fi
12340
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012341else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342
Georg Brandl52d168a2008-01-07 18:10:24 +000012343case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012344 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012345 *) unicode_size="2" ;;
12346esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012347
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012348fi
12349
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012350
12351
Georg Brandl52d168a2008-01-07 18:10:24 +000012352case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012353 4)
12354 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12355
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012356 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012357 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012358 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012359 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012360esac
12361
Michael W. Hudson54241132001-12-07 15:38:26 +000012362
Martin v. Löwis11437992002-04-12 09:54:03 +000012363
Georg Brandl52d168a2008-01-07 18:10:24 +000012364# wchar_t is only usable if it maps to an unsigned type
12365if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012366 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012367then
12368 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012371
Matthias Kloseb9621712010-04-24 17:59:49 +000012372 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012373
Georg Brandl52d168a2008-01-07 18:10:24 +000012374elif test "$ac_cv_sizeof_short" = "$unicode_size"
12375then
12376 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012378
Georg Brandl52d168a2008-01-07 18:10:24 +000012379elif test "$ac_cv_sizeof_long" = "$unicode_size"
12380then
12381 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012382 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012383
Georg Brandl52d168a2008-01-07 18:10:24 +000012384else
12385 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12388$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012389
12390# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12392$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012393if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012394 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012395else
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 ac_cv_c_bigendian=unknown
12397 # See if we're dealing with a universal compiler.
12398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12399/* end confdefs.h. */
12400#ifndef __APPLE_CC__
12401 not a universal capable compiler
12402 #endif
12403 typedef int dummy;
12404
Skip Montanaro6dead952003-09-25 14:50:04 +000012405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012406if ac_fn_c_try_compile "$LINENO"; then :
12407
12408 # Check for potential -arch flags. It is not universal unless
12409 # there are at least two -arch flags with different values.
12410 ac_arch=
12411 ac_prev=
12412 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12413 if test -n "$ac_prev"; then
12414 case $ac_word in
12415 i?86 | x86_64 | ppc | ppc64)
12416 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12417 ac_arch=$ac_word
12418 else
12419 ac_cv_c_bigendian=universal
12420 break
12421 fi
12422 ;;
12423 esac
12424 ac_prev=
12425 elif test "x$ac_word" = "x-arch"; then
12426 ac_prev=arch
12427 fi
12428 done
12429fi
12430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12431 if test $ac_cv_c_bigendian = unknown; then
12432 # See if sys/param.h defines the BYTE_ORDER macro.
12433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012434/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012435#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012436 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012437
Martin v. Löwis11437992002-04-12 09:54:03 +000012438int
12439main ()
12440{
Matthias Kloseb9621712010-04-24 17:59:49 +000012441#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12442 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12443 && LITTLE_ENDIAN)
12444 bogus endian macros
12445 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
12447 ;
12448 return 0;
12449}
12450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012452 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012454/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012455#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012457
Martin v. Löwis11437992002-04-12 09:54:03 +000012458int
12459main ()
12460{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012461#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 not big endian
12463 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012464
12465 ;
12466 return 0;
12467}
12468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012469if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012470 ac_cv_c_bigendian=yes
12471else
Matthias Kloseb9621712010-04-24 17:59:49 +000012472 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012475fi
12476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12477 fi
12478 if test $ac_cv_c_bigendian = unknown; then
12479 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012481/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012482#include <limits.h>
12483
Martin v. Löwis11437992002-04-12 09:54:03 +000012484int
12485main ()
12486{
Matthias Kloseb9621712010-04-24 17:59:49 +000012487#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12488 bogus endian macros
12489 #endif
12490
Martin v. Löwis11437992002-04-12 09:54:03 +000012491 ;
12492 return 0;
12493}
12494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012495if ac_fn_c_try_compile "$LINENO"; then :
12496 # It does; now see whether it defined to _BIG_ENDIAN or not.
12497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12498/* end confdefs.h. */
12499#include <limits.h>
12500
12501int
12502main ()
12503{
12504#ifndef _BIG_ENDIAN
12505 not big endian
12506 #endif
12507
12508 ;
12509 return 0;
12510}
12511_ACEOF
12512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012513 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012514else
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12518fi
12519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12520 fi
12521 if test $ac_cv_c_bigendian = unknown; then
12522 # Compile a test program.
12523 if test "$cross_compiling" = yes; then :
12524 # Try to guess by grepping values from an object file.
12525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12526/* end confdefs.h. */
12527short int ascii_mm[] =
12528 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12529 short int ascii_ii[] =
12530 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12531 int use_ascii (int i) {
12532 return ascii_mm[i] + ascii_ii[i];
12533 }
12534 short int ebcdic_ii[] =
12535 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12536 short int ebcdic_mm[] =
12537 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12538 int use_ebcdic (int i) {
12539 return ebcdic_mm[i] + ebcdic_ii[i];
12540 }
12541 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542
Matthias Kloseb9621712010-04-24 17:59:49 +000012543int
12544main ()
12545{
12546return use_ascii (foo) == use_ebcdic (foo);
12547 ;
12548 return 0;
12549}
12550_ACEOF
12551if ac_fn_c_try_compile "$LINENO"; then :
12552 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12553 ac_cv_c_bigendian=yes
12554 fi
12555 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12556 if test "$ac_cv_c_bigendian" = unknown; then
12557 ac_cv_c_bigendian=no
12558 else
12559 # finding both strings is unlikely to happen, but who knows?
12560 ac_cv_c_bigendian=unknown
12561 fi
12562 fi
12563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012565else
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012567/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012569int
12570main ()
12571{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012572
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 /* Are we little or big endian? From Harbison&Steele. */
12574 union
12575 {
12576 long int l;
12577 char c[sizeof (long int)];
12578 } u;
12579 u.l = 1;
12580 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012581
12582 ;
12583 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012584}
Martin v. Löwis11437992002-04-12 09:54:03 +000012585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012586if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012587 ac_cv_c_bigendian=no
12588else
Matthias Kloseb9621712010-04-24 17:59:49 +000012589 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12592 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012594
Matthias Kloseb9621712010-04-24 17:59:49 +000012595 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12598$as_echo "$ac_cv_c_bigendian" >&6; }
12599 case $ac_cv_c_bigendian in #(
12600 yes)
12601 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12602;; #(
12603 no)
12604 ;; #(
12605 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012606
Matthias Kloseb9621712010-04-24 17:59:49 +000012607$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012608
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 ;; #(
12610 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012611 as_fn_error $? "unknown endianness
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012612 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012613 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012614
Michael W. Hudson54241132001-12-07 15:38:26 +000012615
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012616# ABI version string for Python extension modules. This appears between the
12617# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12618# from the following attributes which affect the ABI of this Python build (in
12619# this order):
12620#
12621# * The Python implementation (always 'cpython-' for us)
12622# * The major and minor version numbers
12623# * --with-pydebug (adds a 'd')
12624# * --with-pymalloc (adds a 'm')
12625# * --with-wide-unicode (adds a 'u')
12626#
12627# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012628# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12629# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012630
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12632$as_echo_n "checking ABIFLAGS... " >&6; }
12633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12634$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12636$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012637SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12639$as_echo "$SOABI" >&6; }
12640
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12642$as_echo_n "checking LDVERSION... " >&6; }
12643LDVERSION='$(VERSION)$(ABIFLAGS)'
12644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12645$as_echo "$LDVERSION" >&6; }
12646
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012647# SO is the extension of shared libraries `(including the dot!)
12648# -- usually .so, .sl on HP-UX, .dll on Cygwin
12649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12650$as_echo_n "checking SO... " >&6; }
12651if test -z "$SO"
12652then
12653 case $ac_sys_system in
12654 hp*|HP*)
12655 case `uname -m` in
12656 ia64) SO=.so;;
12657 *) SO=.sl;;
12658 esac
12659 ;;
12660 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012661 Linux*|GNU*)
12662 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012663 *) SO=.so;;
12664 esac
12665else
12666 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012667 echo
12668 echo '====================================================================='
12669 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012670 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012671 echo '+ Do you really mean to change the extension for shared libraries? +'
12672 echo '+ Continuing in 10 seconds to let you to ponder. +'
12673 echo '+ +'
12674 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012675 sleep 10
12676fi
12677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12678$as_echo "$SO" >&6; }
12679
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012680# Check whether right shifting a negative integer extends the sign bit
12681# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12683$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012684if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012685 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012686else
Martin v. Löwis11437992002-04-12 09:54:03 +000012687
Matthias Kloseb9621712010-04-24 17:59:49 +000012688if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012689 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012690else
Matthias Kloseb9621712010-04-24 17:59:49 +000012691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012692/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012693
12694int main()
12695{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012696 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012697}
12698
Martin v. Löwis11437992002-04-12 09:54:03 +000012699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012701 ac_cv_rshift_extends_sign=yes
12702else
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12706 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012707fi
12708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709fi
12710
Matthias Kloseb9621712010-04-24 17:59:49 +000012711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12712$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012713if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012714then
Martin v. Löwis11437992002-04-12 09:54:03 +000012715
Matthias Kloseb9621712010-04-24 17:59:49 +000012716$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012717
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012718fi
12719
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012720# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12722$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012723if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012725else
Martin v. Löwis11437992002-04-12 09:54:03 +000012726
Matthias Kloseb9621712010-04-24 17:59:49 +000012727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012728/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012729#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012730int
12731main ()
12732{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012733
12734 FILE *f = fopen("/dev/null", "r");
12735 flockfile(f);
12736 getc_unlocked(f);
12737 funlockfile(f);
12738
Martin v. Löwis11437992002-04-12 09:54:03 +000012739 ;
12740 return 0;
12741}
12742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012743if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012744 ac_cv_have_getc_unlocked=yes
12745else
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 ac_cv_have_getc_unlocked=no
12747fi
12748rm -f core conftest.err conftest.$ac_objext \
12749 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012751
Matthias Kloseb9621712010-04-24 17:59:49 +000012752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12753$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012754if test "$ac_cv_have_getc_unlocked" = yes
12755then
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
Matthias Kloseb9621712010-04-24 17:59:49 +000012757$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012758
12759fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012760
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012761# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012762# save the value of LIBS so we don't actually link Python with readline
12763LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012764
Gregory P. Smith18820942008-09-07 06:24:49 +000012765# On some systems we need to link readline to a termcap compatible
12766# library. NOTE: Keep the precedence of listed libraries synchronised
12767# with setup.py.
12768py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12770$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012771for py_libtermcap in "" ncursesw ncurses curses termcap; do
12772 if test -z "$py_libtermcap"; then
12773 READLINE_LIBS="-lreadline"
12774 else
12775 READLINE_LIBS="-lreadline -l$py_libtermcap"
12776 fi
12777 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012779/* end confdefs.h. */
12780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012781/* Override any GCC internal prototype to avoid an error.
12782 Use char because int might match the return type of a GCC
12783 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012784#ifdef __cplusplus
12785extern "C"
12786#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012787char readline ();
12788int
12789main ()
12790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012792 ;
12793 return 0;
12794}
12795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012796if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012797 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012799rm -f core conftest.err conftest.$ac_objext \
12800 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012801 if test $py_cv_lib_readline = yes; then
12802 break
12803 fi
12804done
12805# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12806#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012807if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12809$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012810else
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12812$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012815
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012816fi
12817
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012818# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12820$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012821if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012823else
12824 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012825LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012827/* end confdefs.h. */
12828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012829/* Override any GCC internal prototype to avoid an error.
12830 Use char because int might match the return type of a GCC
12831 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012832#ifdef __cplusplus
12833extern "C"
12834#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012835char rl_callback_handler_install ();
12836int
12837main ()
12838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012839return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012840 ;
12841 return 0;
12842}
12843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012844if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012845 ac_cv_lib_readline_rl_callback_handler_install=yes
12846else
Matthias Kloseb9621712010-04-24 17:59:49 +000012847 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012849rm -f core conftest.err conftest.$ac_objext \
12850 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012851LIBS=$ac_check_lib_save_LIBS
12852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12854$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012855if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012858
12859fi
12860
12861
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012862# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012864/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012865#include <readline/readline.h>
12866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012867if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012868 have_readline=yes
12869else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012870 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012871
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012872fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012873rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012874if test $have_readline = yes
12875then
Matthias Kloseb9621712010-04-24 17:59:49 +000012876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012877/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012878#include <readline/readline.h>
12879
12880_ACEOF
12881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012883
Matthias Kloseb9621712010-04-24 17:59:49 +000012884$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012885
12886fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012887rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012890/* end confdefs.h. */
12891#include <readline/readline.h>
12892
12893_ACEOF
12894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012898
12899fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012900rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012901
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012902fi
12903
Martin v. Löwis0daad592001-09-30 21:09:59 +000012904# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12906$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012907if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012909else
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012911LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915/* Override any GCC internal prototype to avoid an error.
12916 Use char because int might match the return type of a GCC
12917 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012918#ifdef __cplusplus
12919extern "C"
12920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012921char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012922int
12923main ()
12924{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 ;
12927 return 0;
12928}
12929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012930if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012932else
Matthias Kloseb9621712010-04-24 17:59:49 +000012933 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012935rm -f core conftest.err conftest.$ac_objext \
12936 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012937LIBS=$ac_check_lib_save_LIBS
12938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12940$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012941if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012942
Matthias Kloseb9621712010-04-24 17:59:49 +000012943$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012944
Martin v. Löwis0daad592001-09-30 21:09:59 +000012945fi
12946
Michael W. Hudson54241132001-12-07 15:38:26 +000012947
Thomas Wouters89d996e2007-09-08 17:39:28 +000012948# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12950$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012951if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012952 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012953else
12954 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012955LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012957/* end confdefs.h. */
12958
12959/* Override any GCC internal prototype to avoid an error.
12960 Use char because int might match the return type of a GCC
12961 builtin and then its argument prototype would still apply. */
12962#ifdef __cplusplus
12963extern "C"
12964#endif
12965char rl_completion_display_matches_hook ();
12966int
12967main ()
12968{
12969return rl_completion_display_matches_hook ();
12970 ;
12971 return 0;
12972}
12973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012974if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012975 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12976else
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012979rm -f core conftest.err conftest.$ac_objext \
12980 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012981LIBS=$ac_check_lib_save_LIBS
12982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12984$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012985if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012986
Matthias Kloseb9621712010-04-24 17:59:49 +000012987$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012988
12989fi
12990
12991
Martin v. Löwis0daad592001-09-30 21:09:59 +000012992# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12994$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012995if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012997else
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012999LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013003/* Override any GCC internal prototype to avoid an error.
13004 Use char because int might match the return type of a GCC
13005 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013006#ifdef __cplusplus
13007extern "C"
13008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013009char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013010int
13011main ()
13012{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013013return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013014 ;
13015 return 0;
13016}
13017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013018if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013019 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013020else
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013023rm -f core conftest.err conftest.$ac_objext \
13024 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013025LIBS=$ac_check_lib_save_LIBS
13026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13028$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013029if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013032
Guido van Rossum353ae582001-07-10 16:45:32 +000013033fi
13034
Jack Jansendd19cf82001-12-06 22:36:17 +000013035
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013036# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013038/* end confdefs.h. */
13039#include <readline/readline.h>
13040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013041if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013042 have_readline=yes
13043else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013044 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013045
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013046fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013047rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013048if test $have_readline = yes
13049then
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013051/* end confdefs.h. */
13052#include <readline/readline.h>
13053
13054_ACEOF
13055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013056 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013059
13060fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013061rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013062
13063fi
13064
Martin v. Löwis82bca632006-02-10 20:49:30 +000013065# End of readline checks: restore LIBS
13066LIBS=$LIBS_no_readline
13067
Matthias Kloseb9621712010-04-24 17:59:49 +000013068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13069$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013070if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013072else
Martin v. Löwis11437992002-04-12 09:54:03 +000013073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013075 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013076else
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013078/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013079
13080int main()
13081{
13082 int val1 = nice(1);
13083 if (val1 != -1 && val1 == nice(2))
13084 exit(0);
13085 exit(1);
13086}
13087
Martin v. Löwis11437992002-04-12 09:54:03 +000013088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013089if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013090 ac_cv_broken_nice=yes
13091else
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13095 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013096fi
13097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013098fi
13099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13101$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013102if test "$ac_cv_broken_nice" = yes
13103then
Martin v. Löwis11437992002-04-12 09:54:03 +000013104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013106
13107fi
13108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13110$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013111if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013113else
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013115 ac_cv_broken_poll=no
13116else
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013118/* end confdefs.h. */
13119
13120#include <poll.h>
13121
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122int main()
13123{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013124 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013125 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013126
13127 close (42);
13128
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013129 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013130 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013131 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013132 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013133 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013134 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013135 return 1;
13136}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013137
13138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013139if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013140 ac_cv_broken_poll=yes
13141else
Matthias Kloseb9621712010-04-24 17:59:49 +000013142 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013148fi
13149
Matthias Kloseb9621712010-04-24 17:59:49 +000013150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13151$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013152if test "$ac_cv_broken_poll" = yes
13153then
13154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013156
13157fi
13158
Brett Cannon43802422005-02-10 20:48:03 +000013159# 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 +000013160# (which is not required by ISO C or UNIX spec) and/or if we support
13161# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013162ac_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 +000013163#include <$ac_cv_struct_tm>
13164
Matthias Kloseb9621712010-04-24 17:59:49 +000013165"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013166if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013167
13168cat >>confdefs.h <<_ACEOF
13169#define HAVE_STRUCT_TM_TM_ZONE 1
13170_ACEOF
13171
13172
13173fi
13174
13175if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13176
Matthias Kloseb9621712010-04-24 17:59:49 +000013177$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013178
13179else
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13181"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013182if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013184else
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013186fi
13187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013188cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013189#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013190_ACEOF
13191
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13193$as_echo_n "checking for tzname... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013194if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013195 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013196else
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013198/* end confdefs.h. */
13199#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013200#if !HAVE_DECL_TZNAME
13201extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013202#endif
13203
13204int
13205main ()
13206{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013208 ;
13209 return 0;
13210}
13211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013212if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013213 ac_cv_var_tzname=yes
13214else
Matthias Kloseb9621712010-04-24 17:59:49 +000013215 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013217rm -f core conftest.err conftest.$ac_objext \
13218 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13221$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013222 if test $ac_cv_var_tzname = yes; then
13223
Matthias Kloseb9621712010-04-24 17:59:49 +000013224$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013225
13226 fi
13227fi
13228
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013229
Martin v. Löwis1d459062005-03-14 21:23:33 +000013230# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13232$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013233if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013234 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013235else
13236
Matthias Kloseb9621712010-04-24 17:59:49 +000013237if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013238 ac_cv_working_tzset=no
13239else
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013241/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013242
13243#include <stdlib.h>
13244#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013245#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013246
13247#if HAVE_TZNAME
13248extern char *tzname[];
13249#endif
13250
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013251int main()
13252{
Brett Cannon18367812003-09-19 00:59:16 +000013253 /* Note that we need to ensure that not only does tzset(3)
13254 do 'something' with localtime, but it works as documented
13255 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013256 This includes making sure that tzname is set properly if
13257 tm->tm_zone does not exist since it is the alternative way
13258 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013259
13260 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013261 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013262 */
13263
Martin v. Löwis1d459062005-03-14 21:23:33 +000013264 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013265 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13266
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013267 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013268 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013269 if (localtime(&groundhogday)->tm_hour != 0)
13270 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013271#if HAVE_TZNAME
13272 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13273 if (strcmp(tzname[0], "UTC") ||
13274 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13275 exit(1);
13276#endif
Brett Cannon18367812003-09-19 00:59:16 +000013277
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013278 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013279 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013280 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013281 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013282#if HAVE_TZNAME
13283 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13284 exit(1);
13285#endif
Brett Cannon18367812003-09-19 00:59:16 +000013286
13287 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13288 tzset();
13289 if (localtime(&groundhogday)->tm_hour != 11)
13290 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013291#if HAVE_TZNAME
13292 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13293 exit(1);
13294#endif
13295
13296#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013297 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13298 exit(1);
13299 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13300 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013301#endif
Brett Cannon18367812003-09-19 00:59:16 +000013302
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013303 exit(0);
13304}
13305
13306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013307if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013308 ac_cv_working_tzset=yes
13309else
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13313 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013314fi
13315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013316fi
13317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13319$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013320if test "$ac_cv_working_tzset" = yes
13321then
13322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013324
13325fi
13326
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013327# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13329$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013330if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013334/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013335#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013336int
13337main ()
13338{
13339
13340struct stat st;
13341st.st_mtim.tv_nsec = 1;
13342
13343 ;
13344 return 0;
13345}
13346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013348 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013349else
Matthias Kloseb9621712010-04-24 17:59:49 +000013350 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13353fi
13354
Matthias Kloseb9621712010-04-24 17:59:49 +000013355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13356$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013357if test "$ac_cv_stat_tv_nsec" = yes
13358then
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013361
13362fi
13363
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013364# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13366$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013367if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013368 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013369else
Matthias Kloseb9621712010-04-24 17:59:49 +000013370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013371/* end confdefs.h. */
13372#include <sys/stat.h>
13373int
13374main ()
13375{
13376
13377struct stat st;
13378st.st_mtimespec.tv_nsec = 1;
13379
13380 ;
13381 return 0;
13382}
13383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013385 ac_cv_stat_tv_nsec2=yes
13386else
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13390fi
13391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13393$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013394if test "$ac_cv_stat_tv_nsec2" = yes
13395then
13396
Matthias Kloseb9621712010-04-24 17:59:49 +000013397$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013398
13399fi
13400
Jack Jansen666b1e72001-10-31 12:11:48 +000013401# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13403$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013404if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013406else
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013408/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013409#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013410int
13411main ()
13412{
Jack Jansen666b1e72001-10-31 12:11:48 +000013413
13414 int rtn;
13415 rtn = mvwdelch(0,0,0);
13416
Martin v. Löwis11437992002-04-12 09:54:03 +000013417 ;
13418 return 0;
13419}
13420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013421if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013422 ac_cv_mvwdelch_is_expression=yes
13423else
Matthias Kloseb9621712010-04-24 17:59:49 +000013424 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13427fi
13428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13430$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013431
13432if test "$ac_cv_mvwdelch_is_expression" = yes
13433then
Martin v. Löwis11437992002-04-12 09:54:03 +000013434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013436
13437fi
13438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13440$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013441if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013442 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013443else
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013445/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013446#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013447int
13448main ()
13449{
Jack Jansen666b1e72001-10-31 12:11:48 +000013450
13451 WINDOW *w;
13452 w->_flags = 0;
13453
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 ;
13455 return 0;
13456}
13457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013458if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013459 ac_cv_window_has_flags=yes
13460else
Matthias Kloseb9621712010-04-24 17:59:49 +000013461 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13464fi
13465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13467$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013468
Jack Jansen666b1e72001-10-31 12:11:48 +000013469
13470if test "$ac_cv_window_has_flags" = yes
13471then
Martin v. Löwis11437992002-04-12 09:54:03 +000013472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013474
13475fi
13476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13478$as_echo_n "checking for is_term_resized... " >&6; }
13479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013480/* end confdefs.h. */
13481#include <curses.h>
13482int
13483main ()
13484{
13485void *x=is_term_resized
13486 ;
13487 return 0;
13488}
13489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013490if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013493
Matthias Kloseb159a552010-04-25 21:00:44 +000013494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013495$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013496else
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13498$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013499
13500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13502
Matthias Kloseb9621712010-04-24 17:59:49 +000013503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13504$as_echo_n "checking for resize_term... " >&6; }
13505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013506/* end confdefs.h. */
13507#include <curses.h>
13508int
13509main ()
13510{
13511void *x=resize_term
13512 ;
13513 return 0;
13514}
13515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013516if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013519
Matthias Kloseb159a552010-04-25 21:00:44 +000013520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013521$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013522else
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13524$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013525
13526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13530$as_echo_n "checking for resizeterm... " >&6; }
13531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013532/* end confdefs.h. */
13533#include <curses.h>
13534int
13535main ()
13536{
13537void *x=resizeterm
13538 ;
13539 return 0;
13540}
13541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013542if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013543
Matthias Kloseb9621712010-04-24 17:59:49 +000013544$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013545
Matthias Kloseb159a552010-04-25 21:00:44 +000013546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013547$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013548else
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13550$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013551
13552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13556$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013557
13558if test -r /dev/ptmx
13559then
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13561$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013562
Matthias Kloseb9621712010-04-24 17:59:49 +000013563$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013564
Thomas Wouters89f507f2006-12-13 04:49:30 +000013565else
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13567$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013568fi
13569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13571$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013572
13573if test -r /dev/ptc
13574then
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13576$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013577
Matthias Kloseb9621712010-04-24 17:59:49 +000013578$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013579
Thomas Wouters89f507f2006-12-13 04:49:30 +000013580else
Matthias Kloseb9621712010-04-24 17:59:49 +000013581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13582$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013583fi
13584
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013585if test "$have_long_long" = yes
13586then
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13588$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013589 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013591else
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013593 ac_cv_have_long_long_format=no
13594else
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013596/* end confdefs.h. */
13597
13598 #include <stdio.h>
13599 #include <stddef.h>
13600 #include <string.h>
13601
13602 #ifdef HAVE_SYS_TYPES_H
13603 #include <sys/types.h>
13604 #endif
13605
13606 int main()
13607 {
13608 char buffer[256];
13609
13610 if (sprintf(buffer, "%lld", (long long)123) < 0)
13611 return 1;
13612 if (strcmp(buffer, "123"))
13613 return 1;
13614
13615 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13616 return 1;
13617 if (strcmp(buffer, "-123"))
13618 return 1;
13619
13620 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13621 return 1;
13622 if (strcmp(buffer, "123"))
13623 return 1;
13624
13625 return 0;
13626 }
13627
13628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013629if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013630 ac_cv_have_long_long_format=yes
13631else
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13635 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013636fi
13637
13638
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013639fi
13640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13642$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013643fi
13644
Mark Dickinson89d7d412009-12-31 20:50:59 +000013645if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013646then
13647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013649
13650fi
13651
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013652if test $ac_sys_system = Darwin
13653then
13654 LIBS="$LIBS -framework CoreFoundation"
13655fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13658$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013659if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013661else
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013663 ac_cv_have_size_t_format="cross -- assuming yes"
13664
Thomas Wouters477c8d52006-05-27 19:21:47 +000013665else
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013667/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013668
Thomas Wouters477c8d52006-05-27 19:21:47 +000013669#include <stdio.h>
13670#include <stddef.h>
13671#include <string.h>
13672
Christian Heimes2c181612007-12-17 20:04:13 +000013673#ifdef HAVE_SYS_TYPES_H
13674#include <sys/types.h>
13675#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013676
13677#ifdef HAVE_SSIZE_T
13678typedef ssize_t Py_ssize_t;
13679#elif SIZEOF_VOID_P == SIZEOF_LONG
13680typedef long Py_ssize_t;
13681#else
13682typedef int Py_ssize_t;
13683#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013684
Christian Heimes2c181612007-12-17 20:04:13 +000013685int main()
13686{
13687 char buffer[256];
13688
Thomas Wouters477c8d52006-05-27 19:21:47 +000013689 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13690 return 1;
13691
Thomas Wouters89f507f2006-12-13 04:49:30 +000013692 if (strcmp(buffer, "123"))
13693 return 1;
13694
13695 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13696 return 1;
13697
13698 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013699 return 1;
13700
13701 return 0;
13702}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013703
Thomas Wouters477c8d52006-05-27 19:21:47 +000013704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013705if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013706 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013707else
Matthias Kloseb9621712010-04-24 17:59:49 +000013708 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13711 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013712fi
13713
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13716$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013717if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013720
13721fi
13722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013724#ifdef HAVE_SYS_TYPES_H
13725#include <sys/types.h>
13726#endif
13727#ifdef HAVE_SYS_SOCKET_H
13728#include <sys/socket.h>
13729#endif
13730
Matthias Kloseb9621712010-04-24 17:59:49 +000013731"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013732if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013733
Martin v. Löwis11437992002-04-12 09:54:03 +000013734else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013735
Matthias Kloseb9621712010-04-24 17:59:49 +000013736$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013737
13738fi
13739
Michael W. Hudson54241132001-12-07 15:38:26 +000013740
Matthias Kloseb9621712010-04-24 17:59:49 +000013741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13742$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013743if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013745else
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013747 ac_cv_broken_mbstowcs=no
13748else
Matthias Kloseb9621712010-04-24 17:59:49 +000013749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013750/* end confdefs.h. */
13751
13752#include<stdlib.h>
13753int main() {
13754 size_t len = -1;
13755 const char *str = "text";
13756 len = mbstowcs(NULL, str, 0);
13757 return (len != 4);
13758}
13759
13760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013761if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013762 ac_cv_broken_mbstowcs=no
13763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013768fi
13769
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013770fi
13771
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13773$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013774if test "$ac_cv_broken_mbstowcs" = yes
13775then
13776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013778
13779fi
13780
Antoine Pitrou042b1282010-08-13 21:15:58 +000013781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13782$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013783if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013784 $as_echo_n "(cached) " >&6
13785else
13786 if test "$cross_compiling" = yes; then :
13787 ac_cv_computed_gotos=no
13788else
13789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13790/* end confdefs.h. */
13791
13792int main(int argc, char **argv)
13793{
13794 static void *targets[1] = { &&LABEL1 };
13795 goto LABEL2;
13796LABEL1:
13797 return 0;
13798LABEL2:
13799 goto *targets[0];
13800 return 1;
13801}
13802
13803_ACEOF
13804if ac_fn_c_try_run "$LINENO"; then :
13805 ac_cv_computed_gotos=yes
13806else
13807 ac_cv_computed_gotos=no
13808fi
13809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13810 conftest.$ac_objext conftest.beam conftest.$ac_ext
13811fi
13812
13813fi
13814
13815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13816$as_echo "$ac_cv_computed_gotos" >&6; }
13817if test "$ac_cv_computed_gotos" = yes
13818then
13819
13820$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13821
13822fi
13823
Antoine Pitroub52ec782009-01-25 16:34:23 +000013824# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13826$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013827
13828# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013829if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013830 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013831if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013832then
13833
Matthias Kloseb9621712010-04-24 17:59:49 +000013834$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13837$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013838fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013839if test "$withval" = no
13840then
13841
13842$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13843
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13845$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013846fi
13847
Antoine Pitrou042b1282010-08-13 21:15:58 +000013848else
13849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13850$as_echo "no value specified" >&6; }
13851fi
13852
Antoine Pitroub52ec782009-01-25 16:34:23 +000013853
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013854case $ac_sys_system in
13855AIX*)
13856
13857$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13858 ;;
13859esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013860
Michael W. Hudson54241132001-12-07 15:38:26 +000013861
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013862
13863
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013864for h in `(cd $srcdir;echo Python/thread_*.h)`
13865do
13866 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13867done
13868
Michael W. Hudson54241132001-12-07 15:38:26 +000013869
Neal Norwitzd24499d2005-12-18 21:36:39 +000013870SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13872$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013873for dir in $SRCDIRS; do
13874 if test ! -d $dir; then
13875 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013876 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013877done
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13879$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013880
Guido van Rossum627b2d71993-12-24 10:39:16 +000013881# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013882ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013883
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013884ac_config_files="$ac_config_files Modules/ld_so_aix"
13885
Martin v. Löwis11437992002-04-12 09:54:03 +000013886cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013887# This file is a shell script that caches the results of configure
13888# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013889# scripts and configure runs, see configure's option --config-cache.
13890# It is not useful on other systems. If it contains results you don't
13891# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013892#
Martin v. Löwis11437992002-04-12 09:54:03 +000013893# config.status only pays attention to the cache file if you give it
13894# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013895#
Skip Montanaro6dead952003-09-25 14:50:04 +000013896# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013897# loading this file, other *unset* `ac_cv_foo' will be assigned the
13898# following values.
13899
13900_ACEOF
13901
Guido van Rossumf78abae1997-01-21 22:02:36 +000013902# The following way of writing the cache mishandles newlines in values,
13903# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013904# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013905# Ultrix sh set writes to stderr and can't be redirected directly,
13906# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907(
13908 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13909 eval ac_val=\$$ac_var
13910 case $ac_val in #(
13911 *${as_nl}*)
13912 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013913 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13914$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915 esac
13916 case $ac_var in #(
13917 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13919 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920 esac ;;
13921 esac
13922 done
13923
Martin v. Löwis11437992002-04-12 09:54:03 +000013924 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13926 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 # `set' does not quote correctly, so add quotes: double-quote
13928 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013929 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013930 "s/'/'\\\\''/g;
13931 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 *)
13934 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937 esac |
13938 sort
13939) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013942 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013943 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013944 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13945 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13947 :end' >>confcache
13948if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13949 if test -w "$cache_file"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013950 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13952$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013953 if test ! -f "$cache_file" || test -h "$cache_file"; then
13954 cat confcache >"$cache_file"
13955 else
13956 case $cache_file in #(
13957 */* | ?:*)
13958 mv -f confcache "$cache_file"$$ &&
13959 mv -f "$cache_file"$$ "$cache_file" ;; #(
13960 *)
13961 mv -f confcache "$cache_file" ;;
13962 esac
13963 fi
13964 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013965 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13967$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013968 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013969fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013970rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013971
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013972test "x$prefix" = xNONE && prefix=$ac_default_prefix
13973# Let make expand exec_prefix.
13974test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013975
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013976DEFS=-DHAVE_CONFIG_H
13977
Skip Montanaro6dead952003-09-25 14:50:04 +000013978ac_libobjs=
13979ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013980U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013981for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13982 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013983 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13986 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013987 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13988 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013989done
13990LIBOBJS=$ac_libobjs
13991
13992LTLIBOBJS=$ac_ltlibobjs
13993
13994
Martin v. Löwis11437992002-04-12 09:54:03 +000013995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013997: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013998ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013999ac_clean_files_save=$ac_clean_files
14000ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014001{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14002$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14003as_write_fail=0
14004cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014005#! $SHELL
14006# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014007# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014008# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014009# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014010
Martin v. Löwis11437992002-04-12 09:54:03 +000014011debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014012ac_cs_recheck=false
14013ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014014
Matthias Kloseb9621712010-04-24 17:59:49 +000014015SHELL=\${CONFIG_SHELL-$SHELL}
14016export SHELL
14017_ASEOF
14018cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14019## -------------------- ##
14020## M4sh Initialization. ##
14021## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014023# Be more Bourne compatible
14024DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014025if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014026 emulate sh
14027 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014028 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014029 # is contrary to our usage. Disable this feature.
14030 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014032else
Matthias Kloseb9621712010-04-24 17:59:49 +000014033 case `(set -o) 2>/dev/null` in #(
14034 *posix*) :
14035 set -o posix ;; #(
14036 *) :
14037 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014038esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014039fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014040
14041
Matthias Kloseb9621712010-04-24 17:59:49 +000014042as_nl='
14043'
14044export as_nl
14045# Printing a long string crashes Solaris 7 /usr/bin/printf.
14046as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14047as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14048as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14049# Prefer a ksh shell builtin over an external printf program on Solaris,
14050# but without wasting forks for bash or zsh.
14051if test -z "$BASH_VERSION$ZSH_VERSION" \
14052 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14053 as_echo='print -r --'
14054 as_echo_n='print -rn --'
14055elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14056 as_echo='printf %s\n'
14057 as_echo_n='printf %s'
14058else
14059 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14060 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14061 as_echo_n='/usr/ucb/echo -n'
14062 else
14063 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14064 as_echo_n_body='eval
14065 arg=$1;
14066 case $arg in #(
14067 *"$as_nl"*)
14068 expr "X$arg" : "X\\(.*\\)$as_nl";
14069 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14070 esac;
14071 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14072 '
14073 export as_echo_n_body
14074 as_echo_n='sh -c $as_echo_n_body as_echo'
14075 fi
14076 export as_echo_body
14077 as_echo='sh -c $as_echo_body as_echo'
14078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014079
14080# The user is always right.
14081if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 PATH_SEPARATOR=:
14083 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14084 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14085 PATH_SEPARATOR=';'
14086 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089
14090# IFS
14091# We need space, tab and new line, in precisely that order. Quoting is
14092# there to prevent editors from complaining about space-tab.
14093# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14094# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014095IFS=" "" $as_nl"
14096
14097# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014098as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014099case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100 *[\\/]* ) as_myself=$0 ;;
14101 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014102for as_dir in $PATH
14103do
14104 IFS=$as_save_IFS
14105 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014106 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14107 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014108IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014110 ;;
14111esac
14112# We did not find ourselves, most probably we were run as `sh COMMAND'
14113# in which case we are not to be found in the path.
14114if test "x$as_myself" = x; then
14115 as_myself=$0
14116fi
14117if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14119 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014120fi
14121
Matthias Kloseb9621712010-04-24 17:59:49 +000014122# Unset variables that we do not need and which cause bugs (e.g. in
14123# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14124# suppresses any "Segmentation fault" message there. '((' could
14125# trigger a bug in pdksh 5.2.14.
14126for as_var in BASH_ENV ENV MAIL MAILPATH
14127do eval test x\${$as_var+set} = xset \
14128 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014129done
14130PS1='$ '
14131PS2='> '
14132PS4='+ '
14133
14134# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014135LC_ALL=C
14136export LC_ALL
14137LANGUAGE=C
14138export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014139
Matthias Kloseb9621712010-04-24 17:59:49 +000014140# CDPATH.
14141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14142
14143
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014144# as_fn_error STATUS ERROR [LINENO LOG_FD]
14145# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014146# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14147# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014148# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014149as_fn_error ()
14150{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014151 as_status=$1; test $as_status -eq 0 && as_status=1
14152 if test "$4"; then
14153 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14154 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014156 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014157 as_fn_exit $as_status
14158} # as_fn_error
14159
14160
14161# as_fn_set_status STATUS
14162# -----------------------
14163# Set $? to STATUS, without forking.
14164as_fn_set_status ()
14165{
14166 return $1
14167} # as_fn_set_status
14168
14169# as_fn_exit STATUS
14170# -----------------
14171# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14172as_fn_exit ()
14173{
14174 set +e
14175 as_fn_set_status $1
14176 exit $1
14177} # as_fn_exit
14178
14179# as_fn_unset VAR
14180# ---------------
14181# Portably unset VAR.
14182as_fn_unset ()
14183{
14184 { eval $1=; unset $1;}
14185}
14186as_unset=as_fn_unset
14187# as_fn_append VAR VALUE
14188# ----------------------
14189# Append the text in VALUE to the end of the definition contained in VAR. Take
14190# advantage of any shell optimizations that allow amortized linear growth over
14191# repeated appends, instead of the typical quadratic growth present in naive
14192# implementations.
14193if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14194 eval 'as_fn_append ()
14195 {
14196 eval $1+=\$2
14197 }'
14198else
14199 as_fn_append ()
14200 {
14201 eval $1=\$$1\$2
14202 }
14203fi # as_fn_append
14204
14205# as_fn_arith ARG...
14206# ------------------
14207# Perform arithmetic evaluation on the ARGs, and store the result in the
14208# global $as_val. Take advantage of shells that can avoid forks. The arguments
14209# must be portable across $(()) and expr.
14210if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14211 eval 'as_fn_arith ()
14212 {
14213 as_val=$(( $* ))
14214 }'
14215else
14216 as_fn_arith ()
14217 {
14218 as_val=`expr "$@" || test $? -eq 1`
14219 }
14220fi # as_fn_arith
14221
14222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014223if expr a : '\(a\)' >/dev/null 2>&1 &&
14224 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14225 as_expr=expr
14226else
14227 as_expr=false
14228fi
14229
14230if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14231 as_basename=basename
14232else
14233 as_basename=false
14234fi
14235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14237 as_dirname=dirname
14238else
14239 as_dirname=false
14240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242as_me=`$as_basename -- "$0" ||
14243$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14244 X"$0" : 'X\(//\)$' \| \
14245 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014246$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247 sed '/^.*\/\([^/][^/]*\)\/*$/{
14248 s//\1/
14249 q
14250 }
14251 /^X\/\(\/\/\)$/{
14252 s//\1/
14253 q
14254 }
14255 /^X\/\(\/\).*/{
14256 s//\1/
14257 q
14258 }
14259 s/.*/./; q'`
14260
Matthias Kloseb9621712010-04-24 17:59:49 +000014261# Avoid depending upon Character Ranges.
14262as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14263as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14264as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14265as_cr_digits='0123456789'
14266as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267
14268ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014269case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014270-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014271 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 xy) ECHO_C='\c';;
14274 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14275 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014276 esac;;
14277*)
14278 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014279esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014280
Martin v. Löwis11437992002-04-12 09:54:03 +000014281rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282if test -d conf$$.dir; then
14283 rm -f conf$$.dir/conf$$.file
14284else
14285 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014286 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014288if (echo >conf$$.file) 2>/dev/null; then
14289 if ln -s conf$$.file conf$$ 2>/dev/null; then
14290 as_ln_s='ln -s'
14291 # ... but there are two gotchas:
14292 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14293 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14294 # In both cases, we have to default to `cp -p'.
14295 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14296 as_ln_s='cp -p'
14297 elif ln conf$$.file conf$$ 2>/dev/null; then
14298 as_ln_s=ln
14299 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014300 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014302else
14303 as_ln_s='cp -p'
14304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014305rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14306rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014307
Matthias Kloseb9621712010-04-24 17:59:49 +000014308
14309# as_fn_mkdir_p
14310# -------------
14311# Create "$as_dir" as a directory, including parents if necessary.
14312as_fn_mkdir_p ()
14313{
14314
14315 case $as_dir in #(
14316 -*) as_dir=./$as_dir;;
14317 esac
14318 test -d "$as_dir" || eval $as_mkdir_p || {
14319 as_dirs=
14320 while :; do
14321 case $as_dir in #(
14322 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14323 *) as_qdir=$as_dir;;
14324 esac
14325 as_dirs="'$as_qdir' $as_dirs"
14326 as_dir=`$as_dirname -- "$as_dir" ||
14327$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14328 X"$as_dir" : 'X\(//\)[^/]' \| \
14329 X"$as_dir" : 'X\(//\)$' \| \
14330 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14331$as_echo X"$as_dir" |
14332 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14333 s//\1/
14334 q
14335 }
14336 /^X\(\/\/\)[^/].*/{
14337 s//\1/
14338 q
14339 }
14340 /^X\(\/\/\)$/{
14341 s//\1/
14342 q
14343 }
14344 /^X\(\/\).*/{
14345 s//\1/
14346 q
14347 }
14348 s/.*/./; q'`
14349 test -d "$as_dir" && break
14350 done
14351 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014352 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014353
14354
14355} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014356if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014357 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014358else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014359 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014360 as_mkdir_p=false
14361fi
14362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363if test -x / >/dev/null 2>&1; then
14364 as_test_x='test -x'
14365else
14366 if ls -dL / >/dev/null 2>&1; then
14367 as_ls_L_option=L
14368 else
14369 as_ls_L_option=
14370 fi
14371 as_test_x='
14372 eval sh -c '\''
14373 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014376 case $1 in #(
14377 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014378 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014380 ???[sx]*):;;*)false;;esac;fi
14381 '\'' sh
14382 '
14383fi
14384as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014385
14386# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014387as_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 +000014388
14389# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014390as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014391
14392
Martin v. Löwis11437992002-04-12 09:54:03 +000014393exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014394## ----------------------------------- ##
14395## Main body of $CONFIG_STATUS script. ##
14396## ----------------------------------- ##
14397_ASEOF
14398test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014399
Matthias Kloseb9621712010-04-24 17:59:49 +000014400cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14401# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014402# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014403# values after options handling.
14404ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014405This file was extended by python $as_me 3.3, which was
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014406generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014407
14408 CONFIG_FILES = $CONFIG_FILES
14409 CONFIG_HEADERS = $CONFIG_HEADERS
14410 CONFIG_LINKS = $CONFIG_LINKS
14411 CONFIG_COMMANDS = $CONFIG_COMMANDS
14412 $ $0 $@
14413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014414on `(hostname || uname -n) 2>/dev/null | sed 1q`
14415"
14416
Martin v. Löwis11437992002-04-12 09:54:03 +000014417_ACEOF
14418
Matthias Kloseb9621712010-04-24 17:59:49 +000014419case $ac_config_files in *"
14420"*) set x $ac_config_files; shift; ac_config_files=$*;;
14421esac
14422
14423case $ac_config_headers in *"
14424"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14425esac
14426
14427
14428cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014429# Files that config.status was made for.
Benjamin Peterson94b580d2011-08-02 17:30:04 -050014430config_files="$ac_config_files"
14431config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
Matthias Kloseb9621712010-04-24 17:59:49 +000014435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014436ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014437\`$as_me' instantiates files and other configuration actions
14438from templates according to the current configuration. Unless the files
14439and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
Matthias Kloseb9621712010-04-24 17:59:49 +000014441Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014442
14443 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014444 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 --config print configuration, then exit
14446 -q, --quiet, --silent
14447 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014448 -d, --debug don't remove temporary files
14449 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014450 --file=FILE[:TEMPLATE]
14451 instantiate the configuration file FILE
14452 --header=FILE[:TEMPLATE]
14453 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014454
14455Configuration files:
14456$config_files
14457
14458Configuration headers:
14459$config_headers
14460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014464cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14465ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014466ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014467python config.status 3.3
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014468configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014470
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014471Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014472This config.status script is free software; the Free Software Foundation
14473gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474
14475ac_pwd='$ac_pwd'
14476srcdir='$srcdir'
14477INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014478test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014479_ACEOF
14480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14482# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014483ac_need_defaults=:
14484while test $# != 0
14485do
14486 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014487 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014488 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14489 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014490 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014492 --*=)
14493 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14494 ac_optarg=
14495 ac_shift=:
14496 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014497 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014498 ac_option=$1
14499 ac_optarg=$2
14500 ac_shift=shift
14501 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 esac
14503
Skip Montanaro6dead952003-09-25 14:50:04 +000014504 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014505 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014506 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14507 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 $as_echo "$ac_cs_version"; exit ;;
14510 --config | --confi | --conf | --con | --co | --c )
14511 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014512 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 debug=: ;;
14514 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014515 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 case $ac_optarg in
14517 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014518 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 esac
14520 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014521 ac_need_defaults=false;;
14522 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014523 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 case $ac_optarg in
14525 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14526 esac
14527 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014528 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014529 --he | --h)
14530 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014531 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014532Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014533 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014535 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14536 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14537 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014538
14539 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014540 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014541Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014542
Matthias Kloseb9621712010-04-24 17:59:49 +000014543 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014545
14546 esac
14547 shift
14548done
14549
Skip Montanaro6dead952003-09-25 14:50:04 +000014550ac_configure_extra_args=
14551
14552if $ac_cs_silent; then
14553 exec 6>/dev/null
14554 ac_configure_extra_args="$ac_configure_extra_args --silent"
14555fi
14556
14557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014558cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014559if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014560 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14561 shift
14562 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14563 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014565 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014566fi
14567
Martin v. Löwis11437992002-04-12 09:54:03 +000014568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014569cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570exec 5>>config.log
14571{
14572 echo
14573 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14574## Running $as_me. ##
14575_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014576 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014580cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014581_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014582
Matthias Kloseb9621712010-04-24 17:59:49 +000014583cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014584
14585# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014586for ac_config_target in $ac_config_targets
14587do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588 case $ac_config_target in
14589 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14590 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14591 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014592 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14593 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014594 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14595 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014596 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014597 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014599 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014600 esac
14601done
14602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014603
Martin v. Löwis11437992002-04-12 09:54:03 +000014604# If the user did not use the arguments to specify the items to instantiate,
14605# then the envvar interface is used. Set only those that are not.
14606# We use the long form for the default assignment because of an extremely
14607# bizarre bug on SunOS 4.1.3.
14608if $ac_need_defaults; then
14609 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14610 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14611fi
14612
Skip Montanaro6dead952003-09-25 14:50:04 +000014613# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014615# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616# Hook for its removal unless debugging.
14617# Note that there is a small window in which the directory will not be cleaned:
14618# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014619$debug ||
14620{
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014621 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014622 trap 'exit_status=$?
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014623 : "${ac_tmp:=$tmp}"
14624 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014626 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014627}
Martin v. Löwis11437992002-04-12 09:54:03 +000014628# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014629
Martin v. Löwis11437992002-04-12 09:54:03 +000014630{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014632 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014633} ||
14634{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635 tmp=./conf$$-$RANDOM
14636 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014637} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014638ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014639
Matthias Kloseb9621712010-04-24 17:59:49 +000014640# Set up the scripts for CONFIG_FILES section.
14641# No need to generate them if there are no CONFIG_FILES.
14642# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014644
Matthias Kloseb9621712010-04-24 17:59:49 +000014645
14646ac_cr=`echo X | tr X '\015'`
14647# On cygwin, bash can eat \r inside `` if the user requested igncr.
14648# But we know of no other shell where ac_cr would be empty at this
14649# point, so we can use a bashism as a fallback.
14650if test "x$ac_cr" = x; then
14651 eval ac_cr=\$\'\\r\'
14652fi
14653ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14654if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014655 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014656else
14657 ac_cs_awk_cr=$ac_cr
14658fi
14659
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014660echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014661_ACEOF
14662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014663
Matthias Kloseb9621712010-04-24 17:59:49 +000014664{
14665 echo "cat >conf$$subs.awk <<_ACEOF" &&
14666 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14667 echo "_ACEOF"
14668} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014669 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14670ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671ac_delim='%!_!# '
14672for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014673 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014674 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014675
Matthias Kloseb9621712010-04-24 17:59:49 +000014676 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14677 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678 break
14679 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014680 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014681 else
14682 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014683 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684done
Matthias Kloseb9621712010-04-24 17:59:49 +000014685rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014688cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014690sed -n '
14691h
14692s/^/S["/; s/!.*/"]=/
14693p
14694g
14695s/^[^!]*!//
14696:repl
14697t repl
14698s/'"$ac_delim"'$//
14699t delim
14700:nl
14701h
14702s/\(.\{148\}\)..*/\1/
14703t more1
14704s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14705p
14706n
14707b repl
14708:more1
14709s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14710p
14711g
14712s/.\{148\}//
14713t nl
14714:delim
14715h
14716s/\(.\{148\}\)..*/\1/
14717t more2
14718s/["\\]/\\&/g; s/^/"/; s/$/"/
14719p
14720b
14721:more2
14722s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14723p
14724g
14725s/.\{148\}//
14726t delim
14727' <conf$$subs.awk | sed '
14728/^[^""]/{
14729 N
14730 s/\n//
14731}
14732' >>$CONFIG_STATUS || ac_write_fail=1
14733rm -f conf$$subs.awk
14734cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14735_ACAWK
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014736cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 for (key in S) S_is_set[key] = 1
14738 FS = ""
14739
14740}
14741{
14742 line = $ 0
14743 nfields = split(line, field, "@")
14744 substed = 0
14745 len = length(field[1])
14746 for (i = 2; i < nfields; i++) {
14747 key = field[i]
14748 keylen = length(key)
14749 if (S_is_set[key]) {
14750 value = S[key]
14751 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14752 len += length(value) + length(field[++i])
14753 substed = 1
14754 } else
14755 len += 1 + keylen
14756 }
14757
14758 print line
14759}
14760
14761_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014763cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14764if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14765 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14766else
14767 cat
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014768fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014769 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014770_ACEOF
14771
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014772# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14773# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014774# trailing colons and then remove the whole line if VPATH becomes empty
14775# (actually we leave an empty line to preserve line numbers).
14776if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014777 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14778h
14779s///
14780s/^/:/
14781s/[ ]*$/:/
14782s/:\$(srcdir):/:/g
14783s/:\${srcdir}:/:/g
14784s/:@srcdir@:/:/g
14785s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014787x
14788s/\(=[ ]*\).*/\1/
14789G
14790s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014791s/^[^=]*=[ ]*$//
14792}'
14793fi
14794
Matthias Kloseb9621712010-04-24 17:59:49 +000014795cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014796fi # test -n "$CONFIG_FILES"
14797
Matthias Kloseb9621712010-04-24 17:59:49 +000014798# Set up the scripts for CONFIG_HEADERS section.
14799# No need to generate them if there are no CONFIG_HEADERS.
14800# This happens for instance with `./config.status Makefile'.
14801if test -n "$CONFIG_HEADERS"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014802cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014803BEGIN {
14804_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014805
Matthias Kloseb9621712010-04-24 17:59:49 +000014806# Transform confdefs.h into an awk script `defines.awk', embedded as
14807# here-document in config.status, that substitutes the proper values into
14808# config.h.in to produce config.h.
14809
14810# Create a delimiter string that does not exist in confdefs.h, to ease
14811# handling of long lines.
14812ac_delim='%!_!# '
14813for ac_last_try in false false :; do
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014814 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14815 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014816 break
14817 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014818 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014819 else
14820 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14821 fi
14822done
14823
14824# For the awk script, D is an array of macro values keyed by name,
14825# likewise P contains macro parameters if any. Preserve backslash
14826# newline sequences.
14827
14828ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14829sed -n '
14830s/.\{148\}/&'"$ac_delim"'/g
14831t rset
14832:rset
14833s/^[ ]*#[ ]*define[ ][ ]*/ /
14834t def
14835d
14836:def
14837s/\\$//
14838t bsnl
14839s/["\\]/\\&/g
14840s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14841D["\1"]=" \3"/p
14842s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14843d
14844:bsnl
14845s/["\\]/\\&/g
14846s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14847D["\1"]=" \3\\\\\\n"\\/p
14848t cont
14849s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14850t cont
14851d
14852:cont
14853n
14854s/.\{148\}/&'"$ac_delim"'/g
14855t clear
14856:clear
14857s/\\$//
14858t bsnlc
14859s/["\\]/\\&/g; s/^/"/; s/$/"/p
14860d
14861:bsnlc
14862s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14863b cont
14864' <confdefs.h | sed '
14865s/'"$ac_delim"'/"\\\
14866"/g' >>$CONFIG_STATUS || ac_write_fail=1
14867
14868cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14869 for (key in D) D_is_set[key] = 1
14870 FS = ""
14871}
14872/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14873 line = \$ 0
14874 split(line, arg, " ")
14875 if (arg[1] == "#") {
14876 defundef = arg[2]
14877 mac1 = arg[3]
14878 } else {
14879 defundef = substr(arg[1], 2)
14880 mac1 = arg[2]
14881 }
14882 split(mac1, mac2, "(") #)
14883 macro = mac2[1]
14884 prefix = substr(line, 1, index(line, defundef) - 1)
14885 if (D_is_set[macro]) {
14886 # Preserve the white space surrounding the "#".
14887 print prefix "define", macro P[macro] D[macro]
14888 next
14889 } else {
14890 # Replace #undef with comments. This is necessary, for example,
14891 # in the case of _POSIX_SOURCE, which is predefined and required
14892 # on some systems where configure will not decide to define it.
14893 if (defundef == "undef") {
14894 print "/*", prefix defundef, macro, "*/"
14895 next
14896 }
14897 }
14898}
14899{ print }
14900_ACAWK
14901_ACEOF
14902cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014903 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014904fi # test -n "$CONFIG_HEADERS"
14905
14906
14907eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14908shift
14909for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910do
14911 case $ac_tag in
14912 :[FHLC]) ac_mode=$ac_tag; continue;;
14913 esac
14914 case $ac_mode$ac_tag in
14915 :[FHL]*:*);;
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014916 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917 :[FH]-) ac_tag=-:-;;
14918 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14919 esac
14920 ac_save_IFS=$IFS
14921 IFS=:
14922 set x $ac_tag
14923 IFS=$ac_save_IFS
14924 shift
14925 ac_file=$1
14926 shift
14927
14928 case $ac_mode in
14929 :L) ac_source=$1;;
14930 :[FH])
14931 ac_file_inputs=
14932 for ac_f
14933 do
14934 case $ac_f in
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014935 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936 *) # Look for the file first in the build tree, then in the source tree
14937 # (if the path is not absolute). The absolute path cannot be DOS-style,
14938 # because $ac_f cannot contain `:'.
14939 test -f "$ac_f" ||
14940 case $ac_f in
14941 [\\/$]*) false;;
14942 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14943 esac ||
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014944 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14947 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948 done
14949
14950 # Let's still pretend it is `configure' which instantiates (i.e., don't
14951 # use $as_me), people would be surprised to read:
14952 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 configure_input='Generated from '`
14954 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14955 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956 if test x"$ac_file" != x-; then
14957 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14959$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 # Neutralize special characters interpreted by sed in replacement strings.
14962 case $configure_input in #(
14963 *\&* | *\|* | *\\* )
14964 ac_sed_conf_input=`$as_echo "$configure_input" |
14965 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14966 *) ac_sed_conf_input=$configure_input;;
14967 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968
14969 case $ac_tag in
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014970 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14971 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972 esac
14973 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 esac
14975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014977$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014978 X"$ac_file" : 'X\(//\)[^/]' \| \
14979 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014981$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14983 s//\1/
14984 q
14985 }
14986 /^X\(\/\/\)[^/].*/{
14987 s//\1/
14988 q
14989 }
14990 /^X\(\/\/\)$/{
14991 s//\1/
14992 q
14993 }
14994 /^X\(\/\).*/{
14995 s//\1/
14996 q
14997 }
14998 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015000 ac_builddir=.
15001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002case "$ac_dir" in
15003.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15004*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015007 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008 case $ac_top_builddir_sub in
15009 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15010 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15011 esac ;;
15012esac
15013ac_abs_top_builddir=$ac_pwd
15014ac_abs_builddir=$ac_pwd$ac_dir_suffix
15015# for backward compatibility:
15016ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015017
15018case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021 ac_top_srcdir=$ac_top_builddir_sub
15022 ac_abs_top_srcdir=$ac_pwd ;;
15023 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025 ac_top_srcdir=$srcdir
15026 ac_abs_top_srcdir=$srcdir ;;
15027 *) # Relative name.
15028 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15029 ac_top_srcdir=$ac_top_build_prefix$srcdir
15030 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015031esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015033
Martin v. Löwis11437992002-04-12 09:54:03 +000015034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035 case $ac_mode in
15036 :F)
15037 #
15038 # CONFIG_FILE
15039 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015040
15041 case $INSTALL in
15042 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015045_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046
Matthias Kloseb9621712010-04-24 17:59:49 +000015047cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048# If the template does not know about datarootdir, expand it.
15049# FIXME: This hack should be removed a few years after 2.60.
15050ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015051ac_sed_dataroot='
15052/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053 p
15054 q
15055}
15056/@datadir@/p
15057/@docdir@/p
15058/@infodir@/p
15059/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015060/@mandir@/p'
15061case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062*datarootdir*) ac_datarootdir_seen=yes;;
15063*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15065$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015067cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068 ac_datarootdir_hack='
15069 s&@datadir@&$datadir&g
15070 s&@docdir@&$docdir&g
15071 s&@infodir@&$infodir&g
15072 s&@localedir@&$localedir&g
15073 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015074 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075esac
15076_ACEOF
15077
15078# Neutralize VPATH when `$srcdir' = `.'.
15079# Shell code in configure.ac might set extrasub.
15080# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015081cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15082ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015083$extrasub
15084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015085cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015086:t
15087/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015088s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015090s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015091s&@srcdir@&$ac_srcdir&;t t
15092s&@abs_srcdir@&$ac_abs_srcdir&;t t
15093s&@top_srcdir@&$ac_top_srcdir&;t t
15094s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15095s&@builddir@&$ac_builddir&;t t
15096s&@abs_builddir@&$ac_abs_builddir&;t t
15097s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15098s&@INSTALL@&$ac_INSTALL&;t t
15099$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015100"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015101eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15102 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015105 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15106 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15107 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015108 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015109which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015110$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015111which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015112
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015113 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015114 case $ac_file in
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015115 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15116 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015117 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015118 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119 ;;
15120 :H)
15121 #
15122 # CONFIG_HEADER
15123 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 {
15126 $as_echo "/* $configure_input */" \
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015127 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15128 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015129 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015130 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15132$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 rm -f "$ac_file"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015135 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015136 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 fi
15138 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015139 $as_echo "/* $configure_input */" \
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015140 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015141 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015143 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145
15146 esac
15147
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015148
15149 case $ac_file$ac_mode in
15150 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15151
15152 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153done # for ac_tag
15154
Guido van Rossum627b2d71993-12-24 10:39:16 +000015155
Matthias Kloseb9621712010-04-24 17:59:49 +000015156as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015157_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015158ac_clean_files=$ac_clean_files_save
15159
Matthias Kloseb9621712010-04-24 17:59:49 +000015160test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015161 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015162
Martin v. Löwis11437992002-04-12 09:54:03 +000015163
15164# configure is writing to config.log, and then calls config.status.
15165# config.status does its own redirection, appending to config.log.
15166# Unfortunately, on DOS this fails, as config.log is still kept open
15167# by configure, so config.status won't be able to write to it; its
15168# output is simply discarded. So we exec the FD to /dev/null,
15169# effectively closing config.log, so it can be properly (re)opened and
15170# appended to by config.status. When coming back to configure, we
15171# need to make the FD available again.
15172if test "$no_create" != yes; then
15173 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015174 ac_config_status_args=
15175 test "$silent" = yes &&
15176 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015178 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015179 exec 5>>config.log
15180 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15181 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015182 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015183fi
15184if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15185 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15186$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015187fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015188
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015189
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015190echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015191if test ! -f Modules/Setup
15192then
15193 cp $srcdir/Modules/Setup.dist Modules/Setup
15194fi
15195
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015196echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015197if test ! -f Modules/Setup.local
15198then
15199 echo "# Edit this file for local setup changes" >Modules/Setup.local
15200fi
15201
15202echo "creating Makefile"
15203$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15204 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015205 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015206mv config.c Modules